Example #1
0
File: Npc.cs Project: PenpenLi/BWM
    public static void Execute(AddMapNpcDataAndPosMapUserCmd_S cmd)
    {
        var npc = Npc.All[cmd.data.tempid];

        if (npc != null)
        {
            npc.ServerInfo = cmd.data;
        }
        else
        {
            npc = Npc.Create(cmd.baseid, cmd.data);
            Npc.All[cmd.data.tempid] = npc;
        }

        npc.entity.Grid = new MapGrid(cmd.poscm);
    }