Пример #1
0
 private void handleScreenSettings(Player player, Packet packet)
 {
     int windowType = packet.readByte() & 0xff;
     int windowWidth = packet.readUShort();
     int windowHeight = packet.readUShort();
     int junk = packet.readByte() & 0xff;
     player.getPackets().configureGameScreen(windowType);
 }
Пример #2
0
        private void handlePublicChat(Player player, Packet packet)
        {
            int colour = packet.readByte();
            int effects = packet.readByte();
            byte[] packedChatData = packet.getRemainingData();
            string unpacked = Misc.textUnpack(packedChatData);
            ChatMessage message;

            if (unpacked.StartsWith("/") && player.getClan() != null)
            {
                packedChatData = Misc.textPack(unpacked.Substring(1));
                message = new ChatMessage(colour, unpacked.Substring(1), effects, player, packedChatData);
                Server.getClanManager().newClanMessage(player.getClan(), message);
                return;
            }
            message = new ChatMessage(colour, unpacked, effects, player, packedChatData);
            player.setLastChatMessage(message);
        }
Пример #3
0
 private void handlePrivacySettings(Player player, Packet packet)
 {
     int publicStatus = packet.readByte();
     int privateStatus = packet.readByte();
     int tradeStatus = packet.readByte();
     player.getFriends().setPrivacyOption((Friends.STATUS)publicStatus, (Friends.STATUS)privateStatus, (Friends.STATUS)tradeStatus);
 }