Exemple #1
0
        public void newClanMessage(Clan c, ChatMessage chatMessage)
        {
            PacketBuilder pb = new PacketBuilder();

            pb.setId(54).setSize(Packet.Size.VariableByte);
            pb.addLong(chatMessage.getPlayer().getLoginDetails().getLongName());
            pb.addByte((byte)1); // dummy
            pb.addLong(misc.playerNameToLong(c.getClanName()));
            pb.addUShort(0);     // some message counter bs
            string message        = chatMessage.getChatText();
            int    messageCounter = player.getFriends().getNextUniqueId();

            pb.addThreeBytes(messageCounter);
            pb.addByte((byte)chatMessage.getPlayer().getRights());
            pb.addBytes(chatMessage.getPacked());
            connection.SendPacket(pb.toPacket());
        }
Exemple #2
0
        public void updateClan(Clan c)
        {
            PacketBuilder pb = new PacketBuilder();

            pb.setId(55).setSize(Packet.Size.VariableShort);
            pb.addLong(misc.playerNameToLong(c.getClanOwner()));
            pb.addLong(misc.playerNameToLong(c.getClanName()));
            pb.addByte((byte)c.getKickRights());
            pb.addByte((byte)c.getUserList().Count);
            foreach (ClanUser list in c.getUserList())
            {
                Player p = list.getClanMember();
                pb.addLong(p.getLoginDetails().getLongName());
                pb.addUShort(p.getWorld());
                int rights = Convert.ToInt32(list.getClanRights());
                pb.addByte((byte)rights);
                pb.addString("Server " + p.getWorld());
            }
            connection.SendPacket(pb.toPacket());
        }
 public void updateClan(Clan c)
 {
     PacketBuilder pb = new PacketBuilder();
     pb.setId(55).setSize(Packet.Size.VariableShort);
     pb.addLong(misc.playerNameToLong(c.getClanOwner()));
     pb.addLong(misc.playerNameToLong(c.getClanName()));
     pb.addByte((byte)c.getKickRights());
     pb.addByte((byte)c.getUserList().Count);
     foreach (ClanUser list in c.getUserList())
     {
         Player p = list.getClanMember();
         pb.addLong(p.getLoginDetails().getLongName());
         pb.addUShort(p.getWorld());
         int rights = Convert.ToInt32(list.getClanRights());
         pb.addByte((byte)rights);
         pb.addString("Server " + p.getWorld());
     }
     connection.SendPacket(pb.toPacket());
 }
        public void newClanMessage(Clan c, ChatMessage chatMessage) {
			PacketBuilder pb = new PacketBuilder();
            pb.setId(54).setSize(Packet.Size.VariableByte);
            pb.addLong(chatMessage.getPlayer().getLoginDetails().getLongName());
            pb.addByte((byte)1); // dummy
            pb.addLong(misc.playerNameToLong(c.getClanName()));
            pb.addUShort(0); // some message counter bs
            string message = chatMessage.getChatText();
			int messageCounter = player.getFriends().getNextUniqueId();
            pb.addThreeBytes(messageCounter);
            pb.addByte((byte)chatMessage.getPlayer().getRights());
            pb.addBytes(chatMessage.getPacked());
            connection.SendPacket(pb.toPacket());
        }