[Arena] 5180 Help!

01/23/2011 19:43 §hift#1
Hello e*PvPers. I'm trying to learn how the packets are going, But I've got a trouble. Once i try to send the arena packet , the client crashes :/ I've made the packet from 12tails' Packet Structure. Please check if it's right. and forward me on the right way.
There's the packet.
Code:
public static COPacket ArenaInfo(Game.Character C)
        {
            byte[] Packet = new byte[52];
            COPacket P = new COPacket(Packet);//0
            P.WriteInt16(2209);//2
            P.WriteInt16(C.ArenaRank);//4
            P.WriteInt32(C.ArenaStatus);//12
            P.WriteInt16(C.ActivityPoint);//16
            P.WriteByte(C.TimesToday);//20
            P.WriteByte(C.WinsToday);//21
            P.WriteInt32((uint)(C.WinsHistory));//24 (int)
            P.WriteInt32((uint)C.LosesHistory);// 28 (int)
            P.WriteInt32((uint)C.SeasonWins);//32 (int)
            P.WriteInt32((uint)C.SeasonLoses);//36 (int)
            P.WriteInt32((uint)C.HistoryHonor);//40 (int)
            P.WriteInt32((uint)C.CurrentHonor);//44 (int)
            P.WriteInt32((uint)C.ArenaPoint);//48 (int)
            return P;
        }
And There's the structure
Quote:
[Offset] [Type] [Value]
0 ushort 52
2 ushort 2209
4 ushort Rank
12 uint Status(signed/awaiting/inactive)
16 ushort ActitivityPoint
20 byte TimesToday
21 byte WinsToday
24 int HistoryWins
28 int HistoryDefeats
32 int SeansonWins
36 int SeasonDefeats
40 int HistoryHonnor
44 int CurrentHonnor
48 int ArenaPoint
Thanks Fang For helping me
#request close
01/23/2011 20:00 FuriousFang#2
Code:
public static COPacket ArenaInfo(Game.Character C)
        {
            byte[] Packet = new byte[60];
            COPacket P = new COPacket(Packet);

            P.WriteInt16((ushort)(Packet.Length - 8)); //0
            P.WriteInt16(2209);//2
            P.WriteInt32(C.ArenaRank);//4
            P.Move(4);//8
            P.WriteInt32(C.ArenaStatus);//12
            P.WriteInt32(C.ActivityPoint);//16
            P.WriteByte(C.TimesToday);//20
            P.WriteByte(C.WinsToday);//21
            P.Move(2) //22
            P.WriteInt32((uint)(C.WinsHistory));//24 (int)
            P.WriteInt32((uint)C.LosesHistory);// 28 (int)
            P.WriteInt32((uint)C.SeasonWins);//32 (int)
            P.WriteInt32((uint)C.SeasonLoses);//36 (int)
            P.WriteInt32((uint)C.HistoryHonor);//40 (int)
            P.WriteInt32((uint)C.CurrentHonor);//44 (int)
            P.WriteInt32((uint)C.ArenaPoint);//48 (int)
            return P; // returns 52
        }
=p
btw, int != uint
01/23/2011 20:28 pro4never#3
Unless it's changed recently that entire structure looks wrong...

Hint for you... size of the one I'm using is 44 + 8. That's current patch but I can't see much of a reason for tq to be SHRINKING packets. They're always expanding them.
01/23/2011 20:39 FuriousFang#4
Quote:
Originally Posted by pro4never View Post
Unless it's changed recently that entire structure looks wrong...

Hint for you... size of the one I'm using is 44 + 8. That's current patch but I can't see much of a reason for tq to be SHRINKING packets. They're always expanding them.
Nah. The structure is correct. It's the 5180 structure. It should work fine o.o
Maybe they did shrink it - it's possible since your arena is split into new pages and such.
I don't know much about your patch =o
01/23/2011 21:06 pro4never#5
Quote:
Originally Posted by FuriousFang View Post
Nah. The structure is correct. It's the 5180 structure. It should work fine o.o
Maybe they did shrink it - it's possible since your arena is split into new pages and such.
I don't know much about your patch =o
Figures, the one time tq DOESN'T balloon a packet to insane sizes (IE: 1009. Make a new damn packet for your show eq subtype tq!)
01/23/2011 21:19 §hift#6
Quote:
Originally Posted by FuriousFang View Post
Code:
public static COPacket ArenaInfo(Game.Character C)
        {
            byte[] Packet = new byte[60];
            COPacket P = new COPacket(Packet);

            P.WriteInt16((ushort)(Packet.Length - 8)); //0
            P.WriteInt16(2209);//2
            P.WriteInt32(C.ArenaRank);//4
            P.Move(4);//8
            P.WriteInt32(C.ArenaStatus);//12
            P.WriteInt32(C.ActivityPoint);//16
            P.WriteByte(C.TimesToday);//20
            P.WriteByte(C.WinsToday);//21
            P.Move(2) //22
            P.WriteInt32((uint)(C.WinsHistory));//24 (int)
            P.WriteInt32((uint)C.LosesHistory);// 28 (int)
            P.WriteInt32((uint)C.SeasonWins);//32 (int)
            P.WriteInt32((uint)C.SeasonLoses);//36 (int)
            P.WriteInt32((uint)C.HistoryHonor);//40 (int)
            P.WriteInt32((uint)C.CurrentHonor);//44 (int)
            P.WriteInt32((uint)C.ArenaPoint);//48 (int)
            return P; // returns 52
        }
=p
btw, int != uint
I know that , but i didn't find other way to write the ints. that's why i typed (int) ,, to know the original value
01/23/2011 21:39 FuriousFang#7
Quote:
Originally Posted by §hift View Post
I know that , but i didn't find other way to write the ints. that's why i typed (int) ,, to know the original value
The original value NEEDS to be a uint.
If it's just an int, it's going to fuck up around 255+ wins / times you've been in the arena.
01/23/2011 21:46 §hift#8
aaaa I see..