View Full Version : Player profile offset #s wrong?
bad_captain
02-22-2010, 02:19 PM
While messing around with the player profile, and trying to shift some data around, I noticed:
/*0348*/ uint8 unknown0256[44];
/*0396*/ Color_Struct item_tint[MAX_MATERIALS];
I think item_tint should start at /*0392*/ (348+44 = 392). I tried to go through line by line, but I can't find where the numbers get back on track. My profile size is correct (/*19568*/), but I don't want to mess with anything until I know if the posted numbers are correct.
Anyone know or am I completely wrong? lol
joligario
02-22-2010, 03:10 PM
Those comments shouldn't affect the actual pp. As long as the items are the correct size, that is.
Derision
02-22-2010, 04:39 PM
As Joligario says, some of the offset comments are wrong, so just trust your math :) and correct the comments to have the correct values.
Also, the Unknown values should have a suffix that reflects their offset, so assuming Unknown0256 is really at offset 348, it should really be defined as:
/*0348*/ uint8 Unknown0348[44]
bad_captain
02-22-2010, 05:54 PM
I understand that the comments don't have anything to do with the code, but I can't find where the other error is to realign the offsets, so I'm not sure at what offset I should be splitting for some sql code I'm writing. I guess I'll go through them again and try to find it.
Derision
02-22-2010, 06:44 PM
Ah, didn't realise you needed absolute offsets for SQL purposes.
I think I've used code like this in the past to find the offsets:
uchar *PPStartAddress = (uchar*) &m_pp;
uchar *Unk256Address = (uchar*) &m_pp.unknown0256;
printf("Unknown0256 is %i bytes into the player profile\n", Unk256Address - PPStartAddress); fflush(stdout);
Put somewhere like Client::CompleteConnect
Output:
Unknown0256 is 348 bytes into the player profile
bad_captain
02-23-2010, 09:17 AM
Thanks. Hopefully I get to this by this weekend and if I find where the offsets are wrong, I'll make the changes so everyone will have the correct numbers.
joligario
09-01-2010, 06:42 AM
Just to update this, I fixed the PP comments and unknowns to match the math.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.