I reversed GetNumLootItems() today, you can use it to tell how many items are in a dead monster and wether you are finished looting your mob yet.
Took me quite a while but I finally did it, Im quite happy with myself now
Unfortunatelly this will only work if you have already interacted with the dead mob, Id appreciate it if someone could tell me how to go about reading loottables from memory.
Anyways, heres the code:I didnt test this too much yet, it appears to be working fine tho.Code:int GetNumLootInActiveCorpse() { DWORD loottableguid = wowMemory.ReadUINT32(0x10B9030); //GUID of the currently opened loot table //this is 0 until you interact with the mob DWORD bytemask = wowMemory.ReadUINT32(0x10B9034); //13F0000Ch or something int result = 0; if(loottableguid | bytemask > 0) { int var1 = 2; int var2 = 4; int pointer = 0x10B8E4C; do { int item = wowMemory.ReadUINT32(pointer-0x20); if(item > 0) result = var1-1; item = wowMemory.ReadUINT32(pointer); if(item > 0) result = var1; item = wowMemory.ReadUINT32(pointer+0x20); if(item > 0) result = var1+1; item = wowMemory.ReadUINT32(pointer+0x40); if(item > 0) result = var1+2; var1+=4; pointer +=0x80; var2-=1; } while(var2 != 0); DWORD unkVar = wowMemory.ReadUINT32(0x10B9028); if(unkVar != 0) result++; } return result; }
If youre interested in the commenting I did while reversing this, feel free to drop me an PM.