CTT/Server/Hotfix/Game/Handler/UI/Bag/C2M_AddRandomItemHandler.cs

17 lines
466 B
C#

namespace ET
{
[ActorMessageHandler]
public class C2M_AddRandomItemHandler : AMActorLocationHandler<Unit, C2M_AddRandomItem>
{
protected override async ETTask Run(Unit unit, C2M_AddRandomItem message)
{
Game.EventSystem.Publish(new EventType.AddItem
{
unit = unit,
itemType = message.ItemType
}).Coroutine();
await ETTask.CompletedTask;
}
}
}