CTT/Server/Hotfix/Game/Event/OnCreateUnitEvent.cs

24 lines
627 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
using ET.EventType;
using System;
using System.Collections.Generic;
namespace ET
{
public class OnCreateUnitEvent : AEvent<OnCreateUnit>
{
public override async ETTask Run(OnCreateUnit args)
{
M2C_CreateMapMonster pproto = new M2C_CreateMapMonster
{
2021-05-01 11:27:41 +08:00
Id = args.monsterId,
2021-04-08 20:09:59 +08:00
X = args.pos.x,
Y = args.pos.y,
ConfigId=args.configId,
MapMonsterType = (int)args.monsterType
};
2021-05-01 11:27:41 +08:00
MessageHelper.SendActor(args.actor,pproto);
2021-04-08 20:09:59 +08:00
await ETTask.CompletedTask;
}
}
}