[Classic] 1.13.2.32421 Is there any way to know if the items are in the backpack? menu

User Tag List

Results 1 to 4 of 4
  1. #1
    garbled's Avatar Member
    Reputation
    4
    Join Date
    Jan 2011
    Posts
    27
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Classic] 1.13.2.32421 Is there any way to know if the items are in the backpack?

    Is there any way to know if the items are in the backpack?

    need some tips

    [Classic] 1.13.2.32421 Is there any way to know if the items are in the backpack?
  2. #2
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1511
    Join Date
    May 2008
    Posts
    2,432
    Thanks G/R
    81/333
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    For starters, backpack and bags are handled differently. Your backpack items (24 slots) are stored alongside your gear, equipped bags, etc. These are stored in the form of a GUID and to gather any useful information you will have to obtain the address of the object associated with it. You can do so through the object manager.

    You can read the item GUIDs contained in your backpack from your player's InvSlots array. This is a typical object field in BFA, and a descriptor in classic - see here (Explanation of release info dumps).

    Code:
    public enum InventorySlot : byte {
        // Equipment.
        Head,     Neck,     Shoulders, Shirt,
        Chest,    Waist,    Legs,      Feet,
        Wrists,   Hands,    Finger1,   Finger2,
        Trinket1, Trinket2, Back,      MainHand,
        OffHand,  Ranged,   Tabard,
        
        // Bags, backpack, etc.
        Bags     =            InventorySlotCount.Equipment,
        Backpack = Bags     + InventorySlotCount.Bags,
        Bank     = Backpack + InventorySlotCount.Backpack,
        BankBags = Bank     + InventorySlotCount.Bank,
        BuyBack  = BankBags + InventorySlotCount.BankBags,
    
        #if WOW_RETAIL
        ReagentBank    = BuyBack     + InventorySlotCount.BuyBack,
        ChildEquipment = ReagentBank + InventorySlotCount.ReagentBank
        #endif
    }
    For bags, you need to read the GUID of the bag from the player object (just as you would read items from your backpack, but using the 'Bags' index instead.) From there, get the object for that bag's GUID, and read the "Slots" array from it (again, typical object field in BFA, descriptor in classic.) These are also in the form of GUID, so you'll once again have to obtain the object address to gather anything useful.

    Same goes for bank bags.

    Let me know if you need any more info.
    Last edited by Jadd; 11-11-2019 at 05:51 PM.

  3. #3
    garbled's Avatar Member
    Reputation
    4
    Join Date
    Jan 2011
    Posts
    27
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    For starters, backpack and bags are handled differently. Your backpack items (24 slots) are stored alongside your gear, equipped bags, etc. These are stored in the form of a GUID and to gather any useful information you will have to obtain the address of the object associated with it. You can do so through the object manager.

    You can read the item GUIDs contained in your backpack from your player's InvSlots array. This is a typical object field in BFA, and a descriptor in classic - see here (Explanation of release info dumps).

    Code:
    public enum InventorySlot : byte {
        // Equipment.
        Head,     Neck,     Shoulders, Shirt,
        Chest,    Waist,    Legs,      Feet,
        Wrists,   Hands,    Finger1,   Finger2,
        Trinket1, Trinket2, Back,      MainHand,
        OffHand,  Ranged,   Tabard,
        
        // Bags, backpack, etc.
        Bags     =            InventorySlotCount.Equipment,
        Backpack = Bags     + InventorySlotCount.Bags,
        Bank     = Backpack + InventorySlotCount.Backpack,
        BankBags = Bank     + InventorySlotCount.Bank,
        BuyBack  = BankBags + InventorySlotCount.BankBags,
    
        #if WOW_RETAIL
        ReagentBank    = BuyBack     + InventorySlotCount.BuyBack,
        ChildEquipment = ReagentBank + InventorySlotCount.ReagentBank
        #endif
    }
    For bags, you need to read the GUID of the bag from the player object (just as you would read items from your backpack, but using the 'Bags' index instead.) From there, get the object for that bag's GUID, and read the "Slots" array from it (again, typical object field in BFA, descriptor in classic.) These are also in the form of GUID, so you'll once again have to obtain the object address to gather anything useful.

    Same goes for bank bags.

    Let me know if you need any more info.
    thank you , solved


    uint32_t GetBackpackNumSlots()
    {
    return GCC::Read<uint32_t>(UnitFields + Offset_Unit_NumBackpackSlots);
    }

    uint32_t GetBackpackEmptyNumSlots()
    {
    auto EmptyNumSlots = 0;

    auto BackpackNumSlots = GetBackpackNumSlots();

    if (BackpackNumSlots)
    {
    auto pInvSlots = UnitFields + Offset_Unit_InvSlots;
    for (int i = 0; i < BackpackNumSlots; i++)
    {
    auto ItemGuid = GCC::Read<UGuid>(pInvSlots + 0x10 * i);
    if (ItemGuid.IsZero()) { EmptyNumSlots++; }
    }
    }

    return EmptyNumSlots;
    }

    uint32_t GetContainerNumSlots()
    {
    return GCC::Read<uint32_t>(UnitFields + CGContainerData::CGContainerData_NumSlots * 0x4);
    }

    uint32_t GetContainerEmptyNumSlots()
    {
    auto EmptyNumSlots = 0;

    auto ContainerNumSlots = GetContainerNumSlots();

    if (ContainerNumSlots)
    {
    auto pContainerSlots = UnitFields + CGContainerData::CGContainerData_Slots * 0x4;
    for (int i = 0; i < ContainerNumSlots; i++)
    {
    auto ItemGuid = GCC::Read<UGuid>(pContainerSlots + 0x10 * i);
    if (ItemGuid.IsZero()) { EmptyNumSlots++; }
    }
    }

    return EmptyNumSlots;
    }

  4. #4
    Vialet's Avatar Member
    Reputation
    13
    Join Date
    Feb 2010
    Posts
    11
    Thanks G/R
    7/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey there,
    i've a problem reading the NumBackpackSlots Offset of my Toons Discriptor.
    Things like the CGActivePlayerData_XP Offset work pretty well but when asking for the CGActivePlayerData_NumBackpackSlots Offset i always receive "0".

    Code:
    uint32_t GetBackpackNumSlots()
    {
    	return readGen<uint32_t>(player.desc + NumBackpackSlots);
    }

Similar Threads

  1. [Request] Is there any way to know who Banner is?
    By SeaDragon in forum TurboHUD Support
    Replies: 0
    Last Post: 05-02-2017, 03:47 AM
  2. Is there a way to check if gamecard codes are valid without using them?
    By epic twig in forum World of Warcraft General
    Replies: 4
    Last Post: 04-09-2011, 02:40 PM
  3. is there a way to know if botting is safe
    By jereminion in forum WoW Bots Questions & Requests
    Replies: 3
    Last Post: 01-29-2011, 06:02 AM
  4. Is there any way to make a website event if verizon blocks port 80?
    By project anthrax in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 06-13-2008, 11:54 PM
  5. Is there any way to race swap without the use of .M2 files?
    By Nemefist in forum WoW ME Questions and Requests
    Replies: 9
    Last Post: 10-23-2007, 07:33 AM
All times are GMT -5. The time now is 08:00 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search