Quote:
Originally Posted by shadowman123
So how can i get these subtypes and how to Construct them ?
|
... packet log... trial and error or reverse engineering.
Most public sources don't have properly/fully structured arena packets so trial and error may take a bit of work. You could always try running through all the possible status effects.
here's how I did it in albetros.
user.StatusEffect1 = (1UL << int.Parse(data[1]));
Keep in mind that in my source modifying StatusEffect1 or StatusEffect2 automatically updates others screens so that you can see the changes, your source may require you to manually set the update packet.
The way status effects work is that they are bitflags. Most people take the simple route of storing them as two ulongs and performing simple operations to add/remove flags from this effect 'pool'. Two ulongs are needed because tq uses 16 bytes of bitflags in the spawn packet (ulongs each require 8 bytes to hold their data).
Note: a bit is a single binary digit. This means it can be either 1 or 0 (on or off) which is perfect for representing status effects. In the case of this command we are taking the value 1 and shifting it over as many bits as we wish using the << operator.