| | WoW Memory Editing WoW Memory Editing for learning purposes only.
This section is more advanced than others on MMOwned Read the section specific rules, infractions will be given out if u break them!That is including the expectations! - If you don't meet them then don't post |  | 
11-19-2008
| | Sergeant | | | Join Date: Nov 2007
Posts: 65
Reputation: 19 | | [Out of Process] GetNumLootItems() 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: 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;
}
I didnt test this too much yet, it appears to be working fine tho.
If youre interested in the commenting I did while reversing this, feel free to drop me an PM. | Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx. 
11-19-2008
| | Sergeant | | | Join Date: May 2008
Posts: 67
Reputation: 29 Level up: 50%, 251 Points needed |   | | | Why don't you just set auto loot in interface options so that when you call interact/right click on mob it takes everything and you don't have to worry about how many items the mob has.
But seeing as how you already did the work - congrats. Thanks for sharing your information with the community.
__________________ Then it comes to be that the soothing light at the end of your tunnel
Was just a freight train coming your way | 
11-19-2008
| | Sergeant | | | Join Date: Nov 2007
Posts: 65
Reputation: 19 | | Quote:
Originally Posted by korknob Why don't you just set auto loot in interface options so that when you call interact/right click on mob it takes everything and you don't have to worry about how many items the mob has.
But seeing as how you already did the work - congrats. Thanks for sharing your information with the community. | I really wanted a way to tell wether looting is finished or not.
As I said in my first post Id like to be able to tell wether a mob has a loottable but guess this will do for now. You could say walk up to a mob, interact, see if it has a loottable and wait until the corpse is empty. You could also count the amount of items you loot this way (which is nice to have imo). | 
11-19-2008
|  | Contributor | | | Join Date: May 2008
Posts: 387
Reputation: 87 Level up: 2%, 494 Points needed |    | | | I believe it's uh if ((mob.DynamicFlags & 0x0D) == 0x0D). Not sure, may have changed or I may just be wrong. | 
11-20-2008
|  | Kynox's sister's pimp Legendary User | | | Join Date: Apr 2006 Location: ntdll.dll
Posts: 4,180
Nominated 63 Times in 4 Posts  TOTM/W Award(s): 1 Reputation: 1085 Points: 55,512, Level: 35 | Level up: 14%, 3,188 Points needed |     | | | Unconfirmed:
enum eUnitDynamicFlags
{
UDF_LOOTABLE=0x1,
UDF_TRACKED=0x2,
UDF_TAPPED=0x4,
UDF_TAPPEDBYME=0x8,
UDF_SPECIALINFO=0x10,
UDF_DEAD=0x20,
};
Orrrrrr....
Confirmed:
0x65A2B0 CGUnit_C::CanLoot
I'd double check but I'm currently in Heroic Oculus.
Last edited by Cypher; 11-20-2008 at 12:33 AM.
| 
11-20-2008
| | Sergeant | | | Join Date: Nov 2007
Posts: 65
Reputation: 19 | | Quote: enum eUnitDynamicFlags
{
UDF_LOOTABLE=0x1,
UDF_TRACKED=0x2,
UDF_TAPPED=0x4,
UDF_TAPPEDBYME=0x8,
UDF_SPECIALINFO=0x10,
UDF_DEAD=0x20,
}; | Thanks alot, that still seems to be accurate except for UDF_DEAD which does not apply. I havent been able to confirm UDF_SPECIALINFO and UDF_TRACKED but the rest is working great! Edit: Did you copy this from WowX? I tried looking through it but I never found said enum :/
Last edited by hypnodok; 11-20-2008 at 06:54 AM.
Reason: quoting cypher makes my text green, noes!
| 
12-16-2008
|  | Contributor | | | Join Date: Jul 2008 Location: Node #23
Posts: 316
Reputation: 89 Level up: 97%, 30 Points needed |     | | Ty for the Code hypnodok for you
Last edited by luciferc; 12-16-2008 at 03:51 PM.
| 
12-16-2008
|  | MaiN's Biatch Legendary User | | | Join Date: Mar 2007 Location: VirtualAllocEx
Posts: 1,115
Nominated 26 Times in 3 Posts  TOTM/W Award(s): 1 Reputation: 727 Points: 36,171, Level: 28 | Level up: 95%, 129 Points needed |     | | | Necrobump ftw? Ey o_O | 
12-16-2008
|  | Contributor | | | Join Date: Jul 2008 Location: Node #23
Posts: 316
Reputation: 89 Level up: 97%, 30 Points needed |     | | | Eh i forgot to read the post date its still some good shit yes :O |  |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -4. The time now is 09:48 PM. |