Eumerating the object list. menu

User Tag List

Results 1 to 5 of 5
  1. #1
    raindog's Avatar Active Member
    Reputation
    68
    Join Date
    Dec 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Eumerating the object list.

    There are 2 lists, an active object list, and a more detailed list that contains thousands of records. The 'short' list is most important because you can use it to find units surrounding your player.

    The object store is basically a hash table that uses a linked list to store the underlying data, hence enumerating it is really easy once you find a pointer to the head of the list.

    The nodes of this list are in the following format:

    Code:
    struct WOW_LIST_ENTRY
    {
        WOW_LIST_ENTRY *pPrev;
        struct ObjectListNode *pNext;
    };
    
    struct ObjectListNode
    {
        /*0x000*/ void *__vftable;
        /*0x004*/ void *pData;  //useful for some other objects.
        /*0x008*/ void* pDescriptor;   //points to a struct detailed in the previous post of mine
        /*0x00c*/ QWORD Unk3;
        /*0x014*/ int Type;
        /*0x018*/ DWORD Unk4;
        
        /*0x01c*/ WOW_LIST_ENTRY BucketList; //enumate the list of stuff.
        /*0x024*/ WOW_LIST_ENTRY FullList;
        
        /*0x02c*/ DWORD pad3;
        /*0x030*/ QWORD Id;
        /*0x038*/ DWORD pad4[0x3C];
    };
    Code:
    int LoadVisibleObjectData()
    {
        CWowObjectIteratorHandlers::InitHandlers(Enumerators, 8);
    
        ObjectListNode *ObjListHead = 0;
        Unk1 *pUnk = GetWowObjectBuffer();
    
        if(pUnk == NULL)
            return 0;
    
        POBJECT_BUCKET pBucketHead = pUnk->pBucketHead;
    
        if(pBucketHead == NULL)
            return 0;
    
        int Count = 0;
        for(DWORD i = 0; i < pUnk->BucketLength; i++)
        {
            ObjectListNode *Cur = pBucketHead[i].pObject;
            while (IsValidWowPtr((void*)Cur) )
            {
                //Ensure item type is something we can handle and is the requested type.
                if( (Cur->Type >= 0 && Cur->Type < 8) )
                {
                    Enumerators[Cur->Type](Cur);
                }
                //Point to the next item in list.
                Cur = Cur->BucketList.pNext;
                Count++;
            }
        }
        return 0;
    }

    Eumerating the object list.
  2. #2
    Froogle's Avatar Legendary
    Reputation
    690
    Join Date
    Jan 2007
    Posts
    787
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've got the pointer but I fail at coding, where would I put it? XD


  3. #3
    raindog's Avatar Active Member
    Reputation
    68
    Join Date
    Dec 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think that I will be able to help you really.

    What pointer do you have? I don't have any of the pointers hard coded, I created a script that would scan opcodes and find the pointers automatically.

    One note: This code comes from an injected dll, so there is no memory reading.

  4. #4
    Froogle's Avatar Legendary
    Reputation
    690
    Join Date
    Jan 2007
    Posts
    787
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's the pointer to the object array :0 Why have you posted this if it isn't exactly helpful?


  5. #5
    raindog's Avatar Active Member
    Reputation
    68
    Join Date
    Dec 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is helpful. Depending on what your pointer is, it may or may not be one of these:

    Code:
    struct ObjectListNode
    {
        /*0x000*/ void *__vftable;
        /*0x004*/ void *pData;  //useful for some other objects.
        /*0x008*/ void* pDescriptor;   //points to a struct detailed in the previous post of mine
        /*0x00c*/ QWORD Unk3;
        /*0x014*/ int Type;
        /*0x018*/ DWORD Unk4;
        
        /*0x01c*/ WOW_LIST_ENTRY BucketList; //enumate the list of stuff.
        /*0x024*/ WOW_LIST_ENTRY FullList;
        
        /*0x02c*/ DWORD pad3;
        /*0x030*/ QWORD Id;
        /*0x038*/ DWORD pad4[0x3C];
    If it is one of those, then all you have to do is walk the linked list. Otherwise what you will have to do is analyze the layout of the datastructure you have the pointer to. I won't post that data.
    };

Similar Threads

  1. [Mac][3.2] Finding the object list & reading object names
    By flukes1 in forum WoW Memory Editing
    Replies: 12
    Last Post: 09-22-2009, 09:47 PM
  2. 2 Realms on the same list
    By deathomen in forum WoW EMU Guides & Tutorials
    Replies: 11
    Last Post: 03-30-2008, 11:33 AM
  3. [Release] Finally the Full list of 2.3 Items
    By Matis02 in forum World of Warcraft Emulator Servers
    Replies: 13
    Last Post: 12-09-2007, 12:09 AM
  4. [INFO] Halloween Game Object List
    By Hellgawd in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 11-06-2007, 10:45 PM
All times are GMT -5. The time now is 03:28 AM. 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