[C# snippet] Get player info by GUID (name, race and class) menu

User Tag List

Results 1 to 2 of 2
  1. #1
    T@rget's Avatar Contributor
    Reputation
    91
    Join Date
    Nov 2006
    Posts
    223
    Thanks G/R
    2/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C# snippet] Get player info by GUID (name, race and class)

    Hey guys, whilst looking for a way to get the player name I came across a few old examples but here's another one using Process.NET
    It iterates over the GUIDs until it finds what you're looking for.

    Enjoy.

    Oh btw, offsets are for 7.0.3.22522 courtesy of Torpedoes

    Code:
    using System;
    using System.Text;
    using Process.NET;
    
    
    namespace Modules.Games.WoW.Data
    {
        public class WoWNameCache
        {
            public WoWNameCache(ProcessSharp process, IntPtr baseAddress)
            {
                Process = process;
                CurrentCacheAddress = process.Native.MainModule.BaseAddress + baseAddress.ToInt32(); // 0x151BA88
            }
    
    
            public ProcessSharp Process { get; set; }
    
    
            public IntPtr CurrentCacheAddress { get; set; }
    
    
            public WoWName GetNameByGuid(Guid searchGuid)
            {
                var current = Process.Memory.Read<IntPtr>(CurrentCacheAddress);
                while (current != IntPtr.Zero)
                {
                    var guid = Process.Memory.Read<Guid>(current + 0x20);
                    if (guid.Equals(searchGuid))
                    {
                        var pRace = Process.Memory.Read<int>(current + 0x88);
                        var pClass = Process.Memory.Read<int>(current + 0x90);
                        var pName = Process.Memory.Read(current + 0x31, Encoding.ASCII, 48);
    
    
                        var name = new WoWName(guid, pRace, pClass, pName);
                        return name;
                    }
    
    
                    current = Process.Memory.Read<IntPtr>(current);
                }
                return null;
            }
    
        public class WoWName
        {
            public WoWName(Guid guid, int race, int @class, string name)
            {
                Guid = guid;
                Race = (WoWEnums.WoWRace) race;
                Class = (WoWEnums.WoWClass) @class;
                Name = name;
            }
    
    
            public Guid Guid { get; set; }
            public WoWEnums.WoWRace Race { get; set; }
            public WoWEnums.WoWClass Class { get; set; }
            public string Name { get; set; }
        }
    }
    Last edited by T@rget; 09-06-2016 at 05:42 AM. Reason: Removed pointless additions

    [C# snippet] Get player info by GUID (name, race and class)
  2. Thanks Miksu, Mysta187, Cyxi (3 members gave Thanks to T@rget for this useful post)
  3. #2
    Torpedoes's Avatar ★ Elder ★ Doomsayer
    Authenticator enabled
    Reputation
    1147
    Join Date
    Sep 2013
    Posts
    956
    Thanks G/R
    148/415
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's always (Writing Bots with Robot-js)this as well.

Similar Threads

  1. [Guide-4.0.6a] Getting currency info...
    By Tanaris4 in forum WoW Memory Editing
    Replies: 2
    Last Post: 06-23-2016, 01:14 PM
  2. how to get the corpse's guid around player
    By j_clairol in forum WoW Memory Editing
    Replies: 9
    Last Post: 02-25-2010, 08:11 AM
  3. Changing Race and Class names?
    By Deafrunner in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 08-31-2009, 06:09 PM
  4. how to get player tradition chinese name
    By j121780im in forum WoW Memory Editing
    Replies: 8
    Last Post: 01-16-2009, 05:59 AM
All times are GMT -5. The time now is 10:39 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