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

24 lines
627 B
C#
Executable File

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
{
Id = args.monsterId,
X = args.pos.x,
Y = args.pos.y,
ConfigId=args.configId,
MapMonsterType = (int)args.monsterType
};
MessageHelper.SendActor(args.actor,pproto);
await ETTask.CompletedTask;
}
}
}