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