public static void AppendNpcSpawn(IMap map, PacketHitList hitlist, int mapNpcSlot)
 {
     MapNpc mapNpc = map.ActiveNpc[mapNpcSlot];
     foreach (Client i in map.GetSurroundingClients(map)) {
         i.Player.SeeNewCharacter(mapNpc);
     }
     hitlist.AddPacketToSurroundingPlayers(map, CreateNpcSpawn(mapNpc));
 }
 public static void ChangeNpcDir(PacketHitList packetList, IMap map, int mapNpcNum, Enums.Direction direction)
 {
     // Check for subscript out of range
     if (mapNpcNum < 0 || mapNpcNum > Constants.MAX_MAP_NPCS || direction < Enums.Direction.Up || direction > Enums.Direction.Right) {
         return;
     }
     MapNpc mapNpc = map.ActiveNpc[mapNpcNum];
     mapNpc.Direction = direction;
     packetList.AddPacketToSurroundingPlayers(map, PacketBuilder.CreateNpcDir(mapNpc));
     //packetList.AddPacketToMap(map, TcpPacket.CreatePacket("npcdir", MapNpcNum.ToString(), ((int)Direction).ToString()));
 }