43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using ServerCore; using ServerBase;
|
|
|
|
namespace ServerCommon
|
|
{
|
|
public class QuestMail : EntityBase
|
|
{
|
|
public QuestMail(EntityBase parent)
|
|
: base(EntityType.QuestMail, parent)
|
|
{
|
|
onInit().Wait();
|
|
}
|
|
|
|
public override async Task<Result> onInit()
|
|
{
|
|
addEntityAttributes();
|
|
return await base.onInit();
|
|
}
|
|
|
|
private void addEntityAttributes()
|
|
{
|
|
var parent = getDirectParent();
|
|
NullReferenceCheckHelper.throwIfNull(parent, () => $"parent is null !!!");
|
|
addEntityAttribute(new QuestMailAttribute(this, parent));
|
|
}
|
|
|
|
public override string toBasicString()
|
|
{
|
|
return $"{this.getTypeName()} - {getRootParent()?.toBasicString()}";
|
|
}
|
|
|
|
public override string toSummaryString()
|
|
{
|
|
return $"{this.getTypeName()} - {getRootParent()?.toBasicString()}";
|
|
}
|
|
}
|
|
|
|
}
|