With the 9.60 client, currently the test server client, CipSoft had to increase the sprite IDs from an unsigned short (2 bytes) to an unsigned integer (4 bytes). If/once I find anymore changes I'll update this post.
With the 9.60 client, currently the test server client, CipSoft had to increase the sprite IDs from an unsigned short (2 bytes) to an unsigned integer (4 bytes). If/once I find anymore changes I'll update this post.
Can anyone update this for Tibia 9.81? I wonder what needs to be changed. (I wish I could figure this out on my own!)
I think the only thing you need to edit is this
[code=vb.net]
For i As Integer = 0 To itemData.NumberOfSprites - 1
itemData.Sprites(i) = reader.ReadUInt16()
Next
[/code]
to this
[code=vb.net]
For i As Integer = 0 To itemData.NumberOfSprites - 1
itemData.Sprites(i) = reader.ReadUInt32()
Next
[/code]
Tibia 9.81...
Reading it from memory is different than reading from Tibia.dat file, right? I mean, the structures are different.
While browsing the memory, all I could find was the ItemName (32 bytes) and ItemFlags (8 bytes).
Correct. And you can check the current TibiaAPI, for 9.71/9.81, to see where I updated the offsets and flags for memory reading.Originally Posted by Dayle
Thanks a lot Jo3Bingham.Originally Posted by Jo3Bingham
Found out here.
Can you explain something to me here... I think my brain is failing miserably at a basic concept, but at risk of sounding stupid:Originally Posted by Jo3Bingham
2 bytes (8 bits) can hold an int of up to 255 (128 + 64 + 32 + 16 + 8 + 4 + 2 + 1) 4 bytes, however, can contain an int up to 65535 (calculated same way)... When you say "sprite ID"... You're implying (to my brain) that there were only 255 sprites until 9.60... but surely that's not right? Also, why would they increase it from 255 to 65535? Surely if they survived with 255 whatevers until then, why would they suddenly need 65535? Does the unsigned integer actually support this number? Or is it actually a combination of 2x 2 byte smalls?
I'm pretty new to memory stuff, only done some basic memory reading so far so go easy on me please lol
1 byte has a max value of 255 (0xFF)Originally Posted by ManInTheCave
2 bytes has a max value of 65535 (0xFFFF)
4 bytes has a max value of 4ish billion (0xFFFFFFFF)
edit: These are unsigned, for signed values simply divide by 2 (i.e. signed byte has min value of -127 and max value of 127)
@Blaster_89 I was just typing that and you beat me to it. :P