Beispiel #1
0
        public static void SendRemoveEntity(Character c, Player player, CharacterRemovalReason reason)
        {
            var packet = NetworkManager.StartPacket(PacketType.RemoveEntity, 32);

            packet.Write(c.Id);
            packet.Write((byte)reason);

            NetworkManager.SendMessage(packet, player.Connection.ClientConnection);
        }
Beispiel #2
0
        public static void SendRemoveEntityMulti(Character c, CharacterRemovalReason reason)
        {
            if (recipients.Count <= 0)
            {
                return;
            }

            var packet = NetworkManager.StartPacket(PacketType.RemoveEntity, 32);

            packet.Write(c.Id);
            packet.Write((byte)reason);

            NetworkManager.SendMessageMulti(packet, recipients);
        }