Ejemplo n.º 1
0
        public static byte[] refreshGuild(Character chr)
        {
            Guild guild = chr.getGuild();

            OutPacket op = new OutPacket(1644);
            op.WriteInt		(32);
            op.WriteShort	(4);
            op.WriteShort	(97);
            op.WriteInt		(1);
            op.WriteInt		(chr.getuID());
            op.Skip			(16);

            op.WriteInt		(1612);
            op.WriteShort	(4);
            op.WriteShort	(65);
            op.WriteInt		(1);
            op.WriteInt		(chr.getuID());
            op.WriteShort	(1);
            op.WritePaddedString(guild.guildName, 18);
            op.WriteShort	(guild.guildIcon);
            op.WriteShort	(guild.guildType);
            op.WriteInt		((guild.guildFame / 100) + (guild.guildGold / 10));
            op.WriteInt		(guild.guildFame);
            op.WriteLong	(guild.guildGold);
            op.WriteInt		(guild.guildHat);

            for(int i = 0;i < 50;i++)
            {
                op.WriteInt(guild.guildMembers.ElementAt(i) == null ? 0 : guild.guildMembers.ElementAt(i).getuID());
            } // 60 - 259

            for(int i = 0;i < 50;i++)
            {
                op.WriteByte(guild.guildMembers.ElementAt(i) == null ? (byte)0 : guild.guildMembers.ElementAt(i).getGuildRank());
            } // 260 - 309

            for(int i = 0;i < 50;i++)
            {
                if(guild.guildMembers.ElementAt(i) == null)
                {
                    op.Skip(17);
                    continue;
                }
                if(guild.guildMembers.ElementAt(i).getOnlineCharacter() == null)
                {
                    op.Skip(17);
                    continue;
                }
                Character tmp = guild.guildMembers.ElementAt(i).getOnlineCharacter();
                op.WritePaddedString(tmp.getName(), 17);
            } // 310 - 1159

            for(int i = 0;i < 50;i++)
            {
                if(guild.guildMembers.ElementAt(i) == null)
                {
                    op.Skip(1);
                    continue;
                }
                if(guild.guildMembers.ElementAt(i).getOnlineCharacter() == null)
                {
                    op.Skip(1);
                    continue;
                }
                Character tmp = guild.guildMembers.ElementAt(i).getOnlineCharacter();
                op.WriteByte(tmp.getcClass());
            }
            return op.ToArray();
        }
Ejemplo n.º 2
0
 public static byte[] extCharGuild(Character chr)
 {
     OutPacket op = new OutPacket(40);
     op.WriteInt		(40);
     op.WriteShort	(5);
     op.WriteShort	(65);
     op.WriteInt		(1);
     op.WriteInt		(chr.getuID());
     op.WriteByte	(chr.getGuild().guildType);
     op.WritePaddedString(chr.getGuild().guildName, 17);
     op.WriteShort	(chr.getGuild().guildIcon);
     return op.ToArray();
 }