Exemplo n.º 1
0
 public Npc(DbNpc _npc, Map _map)
 {
     BaseNpc     = _npc;
     UID         = _npc.UID;
     Location    = new Point(_npc.X, _npc.Y);
     SpawnPacket = SpawnNpcPacket.Create(this);
     Map         = _map;
 }
Exemplo n.º 2
0
 private static void Process_Test_Npc(Player client, string[] command)
 {
     if (client.Account.Permission < PlayerPermission.GM)
         return;
     uint id;
     ushort mesh;
     if (command.Length > 2 && uint.TryParse(command[1], out id) && ushort.TryParse(command[2], out mesh))
     {
         var spawnPacket = SpawnNpcPacket.Create(id, mesh, client.Location);
         uint type;
         if (command.Length > 3 && uint.TryParse(command[3], out type))
             spawnPacket.Type = (NpcType)type;                
         client.Send(spawnPacket);
     }
     else
         client.SendMessage("Error: Format should be /testnpc id mesh");
 }