zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Server/Hotfix/Game/Handler/Other/C2G_SendQMacroHandler.cs

24 lines
675 B
C#

using System;
namespace ET
{
[ActorMessageHandler]
public class C2M_SendQMacroHandler : AMActorLocationHandler<Unit ,C2M_SendQMacro>
{
protected override async ETTask Run(Unit unit, C2M_SendQMacro message)
{
Log.Error($"*【{ UserComponent.Instance.Get(unit.Id)?.NickName} ({ unit.Id})】按键精灵");
AccoutSafe accoutSafe = await DBComponent.Instance.Query<AccoutSafe>(unit.Id);
if (accoutSafe == null)
{
accoutSafe = new AccoutSafe
{
Id = unit.Id
};
}
accoutSafe.log.Add($"{DateTime.Now} 使用按键精灵");
await DBComponent.Instance.Save(accoutSafe);
await ETTask.CompletedTask;
}
}
}