@Main
Well how do I access this OOP? B/c it seems like what you're referring to would only matter if I'm doing injection. Since I'd have to check the stack pointer to determine where the structure actually is.
All I can do now is jump to the spell struct row as follows:
Code:
UInt32 spellDbc = 0xD2E300;
int spellID = 15616;
UInt32 minIndex = [memory readInt:spellDbc + 0x10 withSize:sizeof(UInt32)];
UInt32 maxIndex = [memory readInt:spellDbc + 0xC withSize:sizeof(UInt32)];
if ( spellID >= minIndex && spellID <= maxIndex ){
UInt32 spellRow = [memory readInt:spellDbc + 0x20 withSize:sizeof(UInt32)] + ( 4 * (spellID - minIndex) );
UInt32 spellStruct = [memory readInt:spellRow withSize:sizeof(UInt32)];
NSLog(@"Spell Row: 0x%X Spell struct: 0x%X", spellRow, spellStruct);
// we don't have a pointer to a struct /cry
if ( spellStruct == 0 ){
return;
}
// now I have a pointer to the spell struct, how do I now get to the name/description etc..?
}
But then I get there, and I don't know how to actually access to the name/description. I will always land on the correct spell ID (which is part of the struct here):
Spell.dbc - wiki.nibbits.com
so I know I'm landing on the struct, but I don't understand where I need to start "unpacking" data - or even how to do this?
Edit: And don't worry, I WILL clean it up once I actually have working code
So you won't see +0xC and +0x10 everywhere