Extracting guild names menu

User Tag List

Results 1 to 3 of 3
  1. #1
    fhuisema's Avatar Private
    Reputation
    1
    Join Date
    Mar 2011
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Extracting guild names

    I've recently been playing with WoW reverse engineering, but I'm still a bit of a noob, so bear with me. I just thought I'd share my findings since I've been using other people's work and it's always good to give back. If this is the wrong place for this, feel free to flame me appropriately.

    I'm using the BlackrainObjects fork from WRadar, but unfortunately it doesn't allow you to get guild names for players. Looking at the code for getting player names it seems that WoW uses a generic hash map thingie (STL? I'm no C++ coder) with truncated GUIDs as keys. I found the offsets for the guild name cache in this post by TOM_RUS:

    http://www.mmowned.com/forums/world-...ml#post2072895

    I first wrote some code to dump all guild strings by iterating over all the objects in all the bins in the hashmap and scanning for alphanumeric characters in the linked data. I found that the strings are located at 0x28.

    I then tried to cross-reference the guids from the guild map with the player objects, and found that storage field 0x5 holds the guild name guid.

    I wrote a quick helper class to get strings from cache objects. It can also be used to get other strings such as pet names and whatnot, but I've just put in the name and guild name caches for now.

    #2074076 - Pastie

    You'll need to modify Offsets.cs and add the offsets for the guild cache:

    /// <summary>
    /// Memory locations specific to the WowPlayer type.
    /// </summary>
    public enum WowPlayer : uint
    {
    NameStore = 0x8DD9A8 + 0x8,
    NameMask = 0x024,
    NameBase = 0x01c,
    NameString = 0x020,

    GuildNameStore = 0x8DDA38 + 0x8,
    GuildNameMask = 0x024,
    GuildNameBase = 0x01c,
    GuildNameString = 40
    }
    The Name and Guild properties of the WowPlayer class can now simply read

    /// <summary>
    /// The name of the player.
    /// </summary>
    public override string Name
    {
    get
    {
    return StringStore.NameStore.getString((uint)GUID);
    }
    }

    public string Guild
    {
    get
    {
    return StringStore.GuildNameStore.getString(GetStorageField<uint>((uint)5));
    }
    }

    Extracting guild names
  2. #2
    xalcon's Avatar Contributor ふたなり
    Authenticator enabled
    Reputation
    198
    Join Date
    Oct 2008
    Posts
    291
    Thanks G/R
    20/58
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hmm, looks interesting, thanks for sharing. I didn't know that the guildnames are saved in the same way than playernames. My Playername-Lookup-Code is a bit different, and it seems it is doing his work in less than 5 loops but I will look into yours. Maybe I can optimise mine even more

    Well, for those who are interested in it, this is the code I'm currently using for my Player-Name lookups (which is an optimised version of this one *click*)... But it could also be some very bad piece of code
    Code:
    public override string name
            {
                get
                {
                    string cname = "";
                    int mask = Core.Memory.ReadInt((uint)Offsets.Name.NameStorePtr + (uint)Core.Memory.MainModule.BaseAddress + (uint)Offsets.Name.NameMaskOffset);
                    if (mask == -1)
                    {
                        cname = "UNKNOWN";
                    }
                    else
                    {
                        UInt64 guid = this.GUID;
    
                        int nameStoreBasePtr = Core.Memory.ReadInt((uint)Offsets.Name.NameBaseOffset + (uint)Offsets.Name.NameStorePtr + (uint)Core.Memory.MainModule.BaseAddress);
                        int maskedGUID = mask & (int)guid;
                        maskedGUID += maskedGUID * 2;
                        int ptr = Core.Memory.ReadInt((uint)(nameStoreBasePtr + (maskedGUID * 4) + 4) + 4);
    
                        while (Core.Memory.ReadUInt((uint)ptr) != (uint)guid)
                        {
                            int maskedGUID2 = (int)this.GUID & mask;
                            maskedGUID2 += maskedGUID2 * 2;
                            int ptr2 = Core.Memory.ReadInt((uint)nameStoreBasePtr + ((uint)maskedGUID2 * 4));
                            ptr2 += ptr;
                            ptr = Core.Memory.ReadInt((uint)ptr2 + 4);
                        }
    
                        cname = Core.Memory.ReadASCIIString((uint)ptr + (uint)Offsets.Name.NameStringOffset, 64);
                    }
                    return cname;
                }
            }
    Last edited by xalcon; 06-16-2011 at 01:36 AM.

  3. #3
    lionsq's Avatar Private
    Reputation
    2
    Join Date
    May 2011
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I updated this code to 4.2.2{14545}. Guild is stored in 0x2 of player object.
    Code:
    public enum WowPlayer : uint
            {   //0xD59EE0
                //CACHE_NAME at 0xD59EE0, opcode 0x586A
                NameStore = 0x959EE0 + 0x8,
    
    //            NameStore = 0x9573D8 + 0x8,
    //            NameStore = 0x8DD9A8 + 0x8,
                NameMask = 0x024,
                NameBase = 0x01c,
                NameString = 0x020,
                //CACHE_GUILD at 0xD59F70, opcode 0x8E57
                GuildNameStore = 0x959F70 + 0x8,
    //            GuildNameStore = 0x957468 + 0x8,
                //       GuildNameStore = 0x8DDA38 + 0x8,
                GuildNameMask = 0x024,
                GuildNameBase = 0x01c,
                GuildNameString = 40
            }

    Code:
     public string Guild
            {
                get
                {
                    return StringStore.GuildNameStore.getString(GetStorageField<uint>((uint)2));
                }
            }

Similar Threads

  1. Guild name (Help please)
    By Onemore in forum World of Warcraft General
    Replies: 24
    Last Post: 05-29-2007, 02:44 PM
  2. Guild name ratings!
    By druidofthenight in forum Community Chat
    Replies: 4
    Last Post: 05-03-2007, 07:34 PM
  3. Realm:Azgalor, Good guild name?
    By richardsonc in forum World of Warcraft General
    Replies: 3
    Last Post: 04-07-2007, 12:00 PM
  4. Guild name suggestions :D
    By Zentek in forum World of Warcraft General
    Replies: 0
    Last Post: 03-03-2007, 04:49 PM
  5. Funny Guild Name for us. XD
    By samishii23 in forum World of Warcraft General
    Replies: 15
    Last Post: 07-27-2006, 03:56 PM
All times are GMT -5. The time now is 03:08 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