Read PlayerName again menu

User Tag List

Results 1 to 4 of 4
  1. #1
    attn's Avatar Member
    Reputation
    13
    Join Date
    Sep 2009
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Read PlayerName again

    This is the "reincarnation" of old topic from here http://www.mmowned.com/forums/wow-me...layername.html. Sorry repeating but looks like structure of that list get changed and all my attempts understand new structure failed

    I found that PlayerNames list in the memory.
    If offset for GUID = "A" than
    Pointer on next record has offset "A" + 0x10,
    Pointer on Player name has offset "A" + 0x20

    But code below can't find address of first element in the list.

    Be exact doesn't work for 3.2.2a

    NameStorePointer = 0x12541C8

    Code:
    uint nameStorePtr = ProcessManager.GlobalOffsets.NameStorePointer + 0x8; // Player name database
                const uint nameMaskOffset = 0x24; // Offset for the mask used with GUID to select a linked list
                const uint nameBaseOffset = 0x1C; // Offset for the start of the name linked list
                const uint nameStringOffset = 0x20; // Offset to the C string in a name structure
    
                uint base_addr, offset, current, testGUID;
    
                uint mask = ProcessManager.WowProcess.ReadUInt(nameStorePtr + nameMaskOffset);
                base_addr = ProcessManager.WowProcess.ReadUInt(nameStorePtr + nameBaseOffset);
    
                uint shortGUID = (uint) guid & 0xffffffff; // Only half the guid is used to check for a hit
                uint x = (mask & shortGUID);
                offset = 12*x; // select the appropriate linked list
    
                current = ProcessManager.WowProcess.ReadUInt(base_addr + offset + 8);
                offset = ProcessManager.WowProcess.ReadUInt(base_addr + offset); // next-4 ?
                
                if ((current == 0) || (current & 0x1) == 0x1)
                    return "";
    
                testGUID = ProcessManager.WowProcess.ReadUInt((uint) (current));
    
                while (testGUID != shortGUID)
                {
                    current = ProcessManager.WowProcess.ReadUInt(current + offset + 4);
    
                    if ((current == 0) || (current & 0x1) == 0x1)
                        return "";
    
                    testGUID = ProcessManager.WowProcess.ReadUInt(current);
                }
    
                // Found the guid in the name list...
                return ProcessManager.WowProcess.ReadASCIIString(current + nameStringOffset, 40);
    Does structure really changed or I'm doing something wrong ?

    Read PlayerName again
  2. #2
    attn's Avatar Member
    Reputation
    13
    Join Date
    Sep 2009
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is working version.
    Looks like PlayerName list moved out of that linked list and got permanent "address"

    Code:
             /// <summary>
            /// Search thru linked list for given player GUID
            /// Works for local user as well
            /// </summary>
            /// <param name="guid">Player GUID</param>
            /// <returns></returns>
            public string GetPlayerNameFromGuid(ulong guid)
            {
                uint base_addr = ProcessManager.GlobalOffsets.NameStorePointer + 0x11C;
    
                // Offset to the C string in a name structure
                const uint name_offset = 0x20; 
    
                // Only half the guid is used to check for a hit
                uint short_guid = (uint) guid & 0xffffffff; 
    
                // First element
                uint current = ProcessManager.
                            WowProcess.ReadUInt(base_addr + 8);
                // Offset between elements in linked list
                uint offset = ProcessManager.
                            WowProcess.ReadUInt(base_addr);
    
                if ((current == 0) || (current & 1) == 1)
                    return "";
    
                uint test_guid = ProcessManager.WowProcess.ReadUInt(current);
    
                while (test_guid != short_guid)
                {
                    current = ProcessManager.WowProcess.ReadUInt(current + offset + 4);
    
                    if ((current == 0) || (current & 1) == 1)
                            return "";
    
                    test_guid = ProcessManager.WowProcess.ReadUInt(current);
                }
    
                    
                return ProcessManager.WowProcess.
                    ReadASCIIString(current + name_offset, 40);
            }
    For 3.2.2a works fine. I restarted few times wow.exe but base_addr works always on each run. Would be good if someone can confirm it works for 3.3.0 too but not sure that the base offset is correct.

  3. #3
    RoKFenris's Avatar Member
    Reputation
    16
    Join Date
    Jun 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My currently working code is almost the same, although you are not using the GUID mask in order to select the correct linked list. Look at nameMaskOffset and the offset variable calculation using mask and shortGUID:
    Code:
    class RE_Data
    {
      public:
        static const unsigned long nameStorePtr        = 0x00C76018 + 0x8;
        static const unsigned long nameMaskOffset      = 0x024;
        static const unsigned long nameBaseOffset      = 0x01c;
        static const unsigned long nameStringOffset    = 0x020;
    }
    
    bool ProgHelper::getPlayerName(const GUID guid, QString * const nome)
    {
      unsigned long mask, base, offset, current, shortGUID, testGUID;
      if (C.peek(RE_Data::nameStorePtr + RE_Data::nameMaskOffset, &mask) and C.peek(RE_Data::nameStorePtr + RE_Data::nameBaseOffset, &base))
      {
        shortGUID = guid & 0xffffffff;  // Only half the guid used to check for a cache hit
        if (mask == 0xffffffff) {*nome = ""; return false;}
        offset = 12 * (mask & shortGUID);  // select the appropriate linked list
        C.peek(base + offset + 8, &current);  // first element
        if (!C.peek(base + offset, &offset)) {*nome = ""; return false;}  // offset for the next element
        if (current == 0 or (current & 0x1)) {*nome = ""; return false;}
        if (!C.peek(current, &testGUID)) {*nome = ""; return false;}
        while (testGUID != shortGUID)
        {
          C.peek(current + offset + 4, &current);
          if (current == 0 or (current & 0x1)) {*nome = ""; return false;}
          if (!C.peek(current, &testGUID)) {*nome = ""; return false;}
        }
        return C.peekQString(current + RE_Data::nameStringOffset, nome);
      }
      *nome = ""; return false;
    }
    Your code might work under limited circunstances, but should break depending on the GUID of the player you are trying to search the name for.

  4. #4
    attn's Avatar Member
    Reputation
    13
    Join Date
    Sep 2009
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is "nameStorePtr" offset for 3.3.0 ? I guess my offset for 3.2.2a initially was wrong ... shoud've do check first.
    Last edited by attn; 01-08-2010 at 12:18 PM. Reason: Correct grammar

Similar Threads

  1. "accounts" table parameters(read, never ask again:))
    By x6x6x6x in forum WoW EMU General Releases
    Replies: 8
    Last Post: 12-15-2008, 12:44 PM
  2. [Help] Read Playername
    By 1814 in forum WoW Memory Editing
    Replies: 22
    Last Post: 10-23-2008, 04:59 AM
All times are GMT -5. The time now is 12:20 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