Reading players inventory / available bag slots left menu

User Tag List

Results 1 to 8 of 8
  1. #1
    Envoke's Avatar Contributor
    Reputation
    105
    Join Date
    Jan 2009
    Posts
    201
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reading players inventory / available bag slots left

    Hello I have done some research on this forum and found a few different methods to read the players inventory, but havent been able to get it to work for my software. I am able to read the first bag, and all its items, like so:

    Code:
    PLAYER_FIELD_PACK_SLOT_1 = (ObjectEnum.OBJECT_END + UnitEnum.UNIT_END) * 4 + 0x15C * 4
    
    item = ObjectDescriptor + ((uint)Enums.PlayerEnum.PLAYER_FIELD_PACK_SLOT_1) + value
    Then I can just check to see if the item is 0 or not, but how would I go about reading from the other bags? Is there a

    PLAYER_FIELD_PACK_SLOT_2
    PLAYER_FIELD_PACK_SLOT_3
    cont..

    Thanks a lot for any help! It is much appreciated, and I will +rep any answers that help me come to a solution!

    Reading players inventory / available bag slots left
  2. #2
    namreeb's Avatar Legendary

    Reputation
    668
    Join Date
    Sep 2008
    Posts
    1,029
    Thanks G/R
    8/222
    Trade Feedback
    0 (0%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    If memory serves, there are a few "equipped item" slots which refer to the bags you have equipped. Then in the descriptors for the container objects corresponding to those equipped bags you will find a list of the items contained within them.

  3. #3
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you think CGContainer_C and CONTAINER_FIELDS_SLOT_1 stand for?
    Also http://www.ownedcore.com/forums/worl...available.html (Reading Memory - Bag slots available?) as the first result from googling "sitewnedcore:com memory bag space"
    Last edited by Bananenbrot; 05-25-2012 at 01:55 PM.

  4. #4
    namreeb's Avatar Legendary

    Reputation
    668
    Join Date
    Sep 2008
    Posts
    1,029
    Thanks G/R
    8/222
    Trade Feedback
    0 (0%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Bananenbrot View Post
    What do you think CGContainer_C and CONTAINER_FIELDS_SLOT_1 stand for?
    Also http://www.ownedcore.com/forums/worl...available.html (Reading Memory - Bag slots available?) as the first result from googling "sitewnedcore:com memory bag space"
    His question seemed perfectly legitimate to me. There's no need to be sarcastic, especially when you're simultaneously asking a question which has also been answered in the past.

  5. #5
    Envoke's Avatar Contributor
    Reputation
    105
    Join Date
    Jan 2009
    Posts
    201
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help guys! I figured how to get the total number of free slots, by using PLAYER_FIELD_PACK_SLOT_1, CONTAINER_FIELD_NUM_SLOTS, and CONTAINER_FIELD_SLOT_1. Only one issue.... Say for example player has a enchanting bag, herb bag or something for profession, it counts all those values. So my total free space in my regular bags is 12, which is what WoW displays on the bag, but when I run the check I get 25 free slots because of my herbalism bag. Is there anyway I can get the actual items I can store in my bag excluding the herb bag?
    Last edited by Envoke; 05-26-2012 at 12:46 AM.

  6. #6
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you look for is the BagFamily (BagType, ItemFamily, w/e) itemFamily - WoWWiki - Your guide to the World of Warcraft . When looking through Script_GetContainerNumFreeSlots, you can see how it calls a member function of CGItem_C at the end, CGItem_C::GetBagType (TOM_RUS IDA dbs are just awesome!). You can see that it indexes into an ItemSparseRec dbc row with its OBJECT_FIELD_ENTRY descriptor as its ID. Unless you are injected or have a dbc reader, there sadly is no chance to get that information easily.

  7. #7
    Envoke's Avatar Contributor
    Reputation
    105
    Join Date
    Jan 2009
    Posts
    201
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Bananenbrot View Post
    What you look for is the BagFamily (BagType, ItemFamily, w/e) itemFamily - WoWWiki - Your guide to the World of Warcraft . When looking through Script_GetContainerNumFreeSlots, you can see how it calls a member function of CGItem_C at the end, CGItem_C::GetBagType (TOM_RUS IDA dbs are just awesome!). You can see that it indexes into an ItemSparseRec dbc row with its OBJECT_FIELD_ENTRY descriptor as its ID. Unless you are injected or have a dbc reader, there sadly is no chance to get that information easily.
    I am trying to keep my software from injecting. I have been able to do everything else without it so I will find a way to avoid this. I might create a new xml file and extract all the profession bags entry ID's and just compare this when I am checking the bags. I just thought there might be a flag, type, or something else I could read from the object base... :/

  8. #8
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, I was wrong on CGItem_C::GetBagFamily()... That function only returns in which bag that item fits, not what type of bag that item is.
    For that, you have to check on API GetItemInfo - WoWWiki - Your guide to the World of Warcraft and check itemSubType. It references into ItemSubClass.dbc tc2 - TrinityCore Wiki, you can encode the subclass into an enum and check only that as long as you are sure to work with a container.
    Last edited by Bananenbrot; 05-26-2012 at 05:20 PM.

Similar Threads

  1. Reading Memory - Bag slots available?
    By Tanaris4 in forum WoW Memory Editing
    Replies: 7
    Last Post: 04-11-2010, 05:47 PM
  2. [Help][C#] Reading player level
    By -Ryuk- in forum Programming
    Replies: 5
    Last Post: 12-11-2009, 11:12 AM
  3. [Help]Reading bag slots used/remaining slots, gold
    By weber7655 in forum WoW Memory Editing
    Replies: 0
    Last Post: 09-21-2009, 06:09 PM
  4. [Help] Reading Player Names
    By nopz in forum WoW Memory Editing
    Replies: 0
    Last Post: 09-15-2009, 05:59 PM
  5. Can you read player names out of process?
    By sweeper18 in forum WoW Memory Editing
    Replies: 10
    Last Post: 07-06-2008, 08:54 PM
All times are GMT -5. The time now is 07:03 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search