초기커밋
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class UgcNpcCommunicationRankAttribute : EntityAttributeBase, ICopyEntityAttributeFromCache
|
||||
{
|
||||
public UgcNpcCommunicationRankAttribute(EntityBase owner) : base(owner)
|
||||
{
|
||||
}
|
||||
|
||||
public override void onClear()
|
||||
{
|
||||
}
|
||||
|
||||
public override EntityAttributeBase onCloned()
|
||||
{
|
||||
var cloned = new UgcNpcCommunicationRankAttribute(getOwner());
|
||||
|
||||
return cloned;
|
||||
}
|
||||
|
||||
public bool copyEntityAttributeFromCache(CacheBase? cacheBase)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override IEntityAttributeTransactor onNewEntityAttributeTransactor()
|
||||
{
|
||||
return new UgcNpcCommunicationRankAttributeTransactor(getOwner());
|
||||
}
|
||||
|
||||
public override async Task<(Result, DynamoDbDocBase?)> toDocBase(bool isForQuery = true)
|
||||
{
|
||||
await Task.CompletedTask;
|
||||
|
||||
return (new Result(), null);
|
||||
}
|
||||
}
|
||||
|
||||
public class UgcNpcCommunicationRankAttributeTransactor : EntityAttributeTransactorBase<UgcNpcLikeRankAttribute>, ICopyEntityAttributeTransactorFromEntityAttribute
|
||||
{
|
||||
public UgcNpcCommunicationRankAttributeTransactor(EntityBase owner) : base(owner)
|
||||
{
|
||||
}
|
||||
|
||||
public bool copyEntityAttributeTransactorFromEntityAttribute(EntityAttributeBase entityAttributeBase)
|
||||
{
|
||||
string err_msg;
|
||||
|
||||
var copy_from_ugc_npc_communication_attribute = entityAttributeBase as UgcNpcCommunicationRankAttribute;
|
||||
if (null == copy_from_ugc_npc_communication_attribute)
|
||||
{
|
||||
err_msg = $"Failed to copyEntityAttributeTransactorFromEntityAttribute() !!!, copy_from_ugc_npc_communication_attribute is null :{nameof(UgcNpcCommunicationRankAttribute)}";
|
||||
Log.getLogger().error(err_msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
var copy_to_ugc_npc_communication_attribute = getClonedEntityAttribute() as UgcNpcCommunicationRankAttribute;
|
||||
if (null == copy_to_ugc_npc_communication_attribute)
|
||||
{
|
||||
err_msg = $"Failed to copyEntityAttributeTransactorFromEntityAttribute() !!!, copy_to_ugc_npc_communication_attribute is null :{nameof(UgcNpcCommunicationRankAttribute)}";
|
||||
Log.getLogger().error(err_msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
// copy attribute members
|
||||
// ...
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user