Beispiel #1
0
        public WoWDetails GetNameByGuid(Guid searchGuid)
        {
            var current = Process.Memory.Read<IntPtr>(CurrentCacheAddress);
            var index = 0;
            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 WoWDetails(guid, pRace, pClass, WoWEnums.WoWType.Player, pName);
                    return name;
                }

                if (index > 20000)
                    return null;

                index++;
                current = Process.Memory.Read<IntPtr>(current);
            }
            return null;
        }
Beispiel #2
0
        public WoWDetails GetNameByGuid(Guid searchGuid)
        {
            var current = Process.Memory.Read <IntPtr>(CurrentCacheAddress);
            var index   = 0;

            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 WoWDetails(guid, pRace, pClass, WoWEnums.WoWType.Player, pName);
                    return(name);
                }

                if (index > 20000)
                {
                    return(null);
                }

                index++;
                current = Process.Memory.Read <IntPtr>(current);
            }
            return(null);
        }
Beispiel #3
0
 public void UpdateDetails(WoWNameCache nameCache)
 {
     Details = GetNpcDetails() ?? nameCache.GetNameByGuid(Guid);
 }
Beispiel #4
0
 public void UpdateDetails(WoWNameCache nameCache)
 {
     Details = GetNpcDetails() ?? nameCache.GetNameByGuid(Guid);
 }