-
Member
GetBagsAndSlots [TBC 2.5.3 42.083]
Hello, i am trying to get contents of container slots and found a thread on this forum it used GetBagsAndSlot and mentioned return address spoof, I reversed this function , called it with spoof but it returns 0x0 to me , even if my containers are full. Imgur: The magic of the Internet
I will be glad for any help.
the signature I use to find the function is E8 ? ? ? ? 48 8B 5C 24 ? 84 C0 74 3D
-
Never used this function, so I can't really answer your question. But have you tried simply looking at the info available in descriptors? The player descriptors contain a list of guids in the backpack as well as the guid of each equipped bag. From the bag item's descriptors you can get the list of guids of each item it contains. You should be able to traverse the player inventory just with this info.
-
Post Thanks / Like - 2 Thanks
-
Contributor
Last edited by ChrisIsMe; 11-01-2023 at 05:04 PM.
-
Post Thanks / Like - 1 Thanks
moped_coder (1 members gave Thanks to ChrisIsMe for this useful post)
-
Member
Originally Posted by
ChrisIsMe
Code:
I think you're calling
CGContainerInfo::GetLuaBagAndSlot (who's first parameter is a lua_state pointer
When you want to call
CGBag_C::GetItemPointer
Which is really just
itemGUID = *(uintptr_t *)(*(uintptr_t *)(bagPtr + 8) + 0x10LL * slot);
itemPtr = ClntObjMgrObjectPtr(&itemGUID);
Thank you for your answer,
Where i can find offset / signature for GetLuaBagAndSlot?
I really wish to try this function in my code, but the last mention of GetLua offset was in 2011
Last edited by moped_coder; 02-08-2022 at 03:28 AM.
-
Member
Originally Posted by
Jadd
Never used this function, so I can't really answer your question. But have you tried simply looking at the info available in descriptors? The player descriptors contain a list of guids in the backpack as well as the guid of each equipped bag. From the bag item's descriptors you can get the list of guids of each item it contains. You should be able to traverse the player inventory just with this info.
Thanks for your answer, the WoW engine is something new to me and it's hard for me to work with it now, it would be really cool if you could share the code
-
Contributor
Last edited by ChrisIsMe; 11-01-2023 at 05:04 PM.
-
Member
Originally Posted by
ChrisIsMe
It's in Script_GetContainerItemID search for the lua error string containing "GetContainerItemID(index, slot)"
Thanks for your answer, I solved my problem.