Hey, thx for replying. I didnt get into it in my post but thats how im handling it atm, Iterating over the auras in the player obj and looking them up in the object i found. The slots correspond to the ids so you can lookup a spell with this formula:
index = (Spellid-1)*4;
I suspect it might not be a good idea to read directly from the object if i would have to search for my values however it seems to contain other interesting data which could be useful for other things. In the end im curios to see wether this is the spelldb data or something else.
----------------------------------------------
Update:
I see no reason to bump this thread so im adding this here instead:
I thought that i had stumbled on something commonly used but since it looks like that might not be the case ill add some more information on how ive been using it in case it may be of use to someone. I dont think this is the spelldb and what im getting is probably the buffTextureName.
If one is to use a method call to get the struct its better to use the function at 0x466680 which has some error handling in place. Theres more information than the buff name in there but i havent looked into it any further. From what i can tell it seems to be stable when called from a remote thread.
Heres a function I wrote while playing with it, anyone wanting to use it should be able to derive what they need from it:
Code:
public string GetBuffNameTest2(int auraId)
{
uint spellDb = 0xBA0BE0; //probably not spelldb, some object.
var structMem = _memory.AllocateMemory(0x260);
string[] asm =
{
"push dword " + structMem,
"push dword " + auraId,
"mov ecx, " + spellDb,
"call " +0x466680, //bool __thiscall sub_466680(int this, int id, void *a3)
};
try
{
IntPtr retval;
if (!InjectAndExecuteReturn(asm, out retval,false) || (int)retval == 0) return string.Empty;
return _memory.ReadString(_memory.Read<IntPtr>(structMem + 0x1fC), Encoding.UTF8);
}
catch (Exception err)
{
Log.WriteLine(err.StackTrace);
return string.Empty;
}
finally
{
_memory.FreeMemory(structMem);
}
}