MakeRemoveEntity() 정적인 개인적인 메소드

static private MakeRemoveEntity ( int id ) : Packet
id int
리턴 Packet
예제 #1
0
 /// <summary>
 /// Completely removes the entity and data of the bot.
 /// </summary>
 public void removeBot()
 {
     thread.Stop();
     isMoving = false;
     Server.Bots.Remove(this);
     Server.Players.Send(PacketWriter.MakeRemoveEntity(ID));
 }
예제 #2
0
        // Remove player from the list, and notify remaining players
        public void UnregisterPlayer(Player player)
        {
            if (player == null)
            {
                log.Log("World.UnregisterPlayer: Trying to unregister a non-existent (null) player.", LogType.Debug);
                return;
            }

            lock ( playerListLock ) {
                if (players[player.id] == player)
                {
                    log.Log("{0} left the server.", LogType.UserActivity, player.name);
                    db.ProcessLogout(player);
                    db.Save();
                    players[player.id] = null;
                    playerCount--;
                    SendToAll(PacketWriter.MakeRemoveEntity(player.id), null);
                    SendToAll(PacketWriter.MakeMessage(Color.Sys + player.name + " left the server."), null);
                    UpdatePlayerList();
                }
                else
                {
                    log.Log("World.UnregisterPlayer: Trying to unregister a non-existent (unknown id) player.", LogType.Warning);
                }
            }
        }
예제 #3
0
        internal void UpdatePlayer(Player updatedPlayer)
        {
            Player player;

            for (int i = 1; i < players.Length; i++)
            {
                player = players[i];
                if (player != null && player != updatedPlayer)
                {
                    player.Send(PacketWriter.MakeRemoveEntity(updatedPlayer.id));
                    player.Send(PacketWriter.MakeAddEntity(updatedPlayer, updatedPlayer.pos));
                }
            }
        }
예제 #4
0
 void Hide(Player player, Command cmd)
 {
     if (player.Can(Permissions.Hide))
     {
         if (!player.isHidden)
         {
             world.SendToAll(PacketWriter.MakeRemoveEntity(player.id), null);
             world.SendToAll(PacketWriter.MakeMessage(Color.Sys + player.name + " left the server."), null);
             player.isHidden = true;
             player.Message(Color.Gray, "You are now hidden.");
         }
         else
         {
             player.Message("You are already hidden.");
         }
     }
     else
     {
         world.NoAccessMessage(player);
     }
 }
예제 #5
0
 /// <summary>
 /// Removes the bot entity, however the bot data remains. Intended as for temp bot changes.
 /// </summary>
 public void tempRemoveBot()
 {
     Server.Players.Send(PacketWriter.MakeRemoveEntity(ID));
 }