Quote:
Originally Posted by 3DProgrammer
Hmm so you basically mean while parsing 0x3015 you want to skip all the bytes before the ID and read ID instantly? Correct? If so I believe you can't.
0x3015 Packet have lots of flags(It means the number of bytes changes each packet).
But if you just wish to know how to skip bytes? You can use ReadInt8Array(int count)
Code:
current.ReadInt8Array(8);
string Name = current.ReadAscii();
|
i know that this packet changes because the number of inventory slots between 00 and 08 (Set , Weapon , Shield) each item has ID uint32 and plus uint8 , also inventory avatars between 0 and 5 (Avatar , Attach , Hat , Flag , Devil)
so it needs alot of cases by if and else if ,
here an example :
Get unit A1 = inventory item count between 0 and 8
if (A1 == 0)
{
continue and make also 6 cases for avatar inv item count between 0 and 5
then skip bytes to arrive to select ObjID
}
else if (A1 == 1)
{
ignore bytes then target the inventory avatar item count in a variable
Copy the 6 cases of avatar inventory item count from previous case
then skip bytes to arrive to select ObjID
}
..... etc for arrive to case (A1 = 8) , in each case of A1 you must copy the 6 cases of avatar inv item count.
Okey thanks alot
for help me to ignore bytes by int array
#Close