-
Elite User
Avid Ailurophile


Originally Posted by
qop1832
I'm browsing the memory in the 0x2AAF8A0 area and haven't found string information about guid and name yet.
Code:
internal bool ReloadNames()
{
try
{
var Count = Memory.Read<int>(BaseAddress + NameCacheBase + 0x18);
var Array = Memory.Read<IntPtr>((BaseAddress + NameCacheBase) + 0x10);
for (var i = 0; i < Count; i++)
{
var Entry = Memory.Read<IntPtr>(Array + (0x8 * i));
var GUID = Memory.Read<GUID>(Entry + 0x8);
var Name = Memory.ReadString(Entry + 0x19);
if (GUID.IsEmpty() || string.IsNullOrEmpty(Name)) continue;
if (!PlayerNames.ContainsKey(GUID))
PlayerNames.Add(GUID, Name);
}
return PlayerNames.Count > 0;
}
catch (Exception e)
{
return false;
}
}
Last edited by Razzue; 01-08-2022 at 01:27 PM.
-
What is VMT, I don't quite understand~
I spent some time using CE to find something useful at the location of WowClassic.exe + 2AAF8A0 + 8, after repeated observation, I found the pattern. GUID=0X8 NAME=0X19 and every increment of 8 is the next cache Is that right? If correct. I'll start writing code to confirm. Then add this functionality to my object manager.
name.png
-
Originally Posted by
Razzue
Code:
internal bool ReloadNames()
{
try
{
var Count = Memory.Read<int>(BaseAddress + NameCacheBase + 0x18);
var Array = Memory.Read<IntPtr>((BaseAddress + NameCacheBase) + 0x10);
for (var i = 0; i < Count; i++)
{
var Entry = Memory.Read<IntPtr>(Array + (0x8 * i));
var GUID = Memory.Read<GUID>(Entry + 0x8);
var Name = Memory.ReadString(Entry + 0x19);
if (GUID.IsEmpty() || string.IsNullOrEmpty(Name)) continue;
if (!PlayerNames.ContainsKey(GUID))
PlayerNames.Add(GUID, Name);
}
return PlayerNames.Count > 0;
}
catch (Exception e)
{
return false;
}
}
Thanks for the code, it's more confirmation that what I just found in CE is correct. awesome~
-
-
Originally Posted by
Razzue
i do sometimes have issues with some names not actually showing up that way but.. idek :shrug: xD
I seem to have the same problem as you.
This is the code I wrote with autoit. The effect is shown in the figure. Many people can't get it~
Code:
Func _Get_Player_Name($Player_Guid)
Local $NameCacheBase = 0x2AAF8A0
Local $n = ''
$Count = $DM.ReadIntaddr($ProcessId, ($BaseAddr + $NameCacheBase + 0x18), 0)
$Array = $DM.ReadIntaddr($ProcessId, ($BaseAddr + $NameCacheBase + 0x10), 3)
For $i = 0 To $Count
$e = $DM.ReadIntaddr($ProcessId, ($Array + 0x8 * $i), 3)
If $e <> 0 Then
$g = $DM.ReadIntaddr($ProcessId, ($e + 0x8), 0)
If $Player_Guid == $g Then
$n = $DM.ReadStringaddr($ProcessId, ($e + 0x19), 2, 0)
ExitLoop
EndIf
EndIf
Next
Return $n
EndFunc ;==>_Get_Player_Name
name.png
-
Contributor
Last edited by ChrisIsMe; 11-01-2023 at 05:07 PM.
-
Elite User
Avid Ailurophile


Originally Posted by
ChrisIsMe
I assume it's because the namecache is using blizzards uint128 hashing which I don't see being accommodated for here, external name reading should be as
Code:
std::string PlayerName(GUID search)
{
int LENGTH = *(int*)((base + CACHE_BASE_PTR) + 0x8);
uintptr_t TABLE = *(uintptr_t*)((base + CACHE_BASE_PTR) + 0x10);
unsigned int INDEX = (unsigned int)(LENGTH - 1) & (0xA2AA033B * search.low + 0xD6D018F5 * search.high);
NameCacheEntry* entry = (NameCacheEntry*)(*(uintptr_t*)(TABLE + 0x8 * INDEX));
while (entry) {
if (entry != 0) {
if (entry->guid.high == search.high && entry->guid.low == search.low) {
return entry->name;
}
}
entry = entry->next;
}
return "Unknown";
}
Is that similar to how retail OM and stuff works? Ie if browsing around in the structs, one entry may have a pointer to the next and so on ? 🤔
-
I don't think this should be a problem with uint128. Because I just traversed the entire cache and I found that there are no such names in it~ so that's why.
-
Contributor
Last edited by ChrisIsMe; 11-01-2023 at 05:07 PM.
-
Post Thanks / Like - 1 Thanks
Razzue (1 members gave Thanks to ChrisIsMe for this useful post)
-
-
Post Thanks / Like - 1 Thanks
qop1832 (1 members gave Thanks to Razzue for this useful post)
-
I seem to find out why so many names are missed~ It turns out that there are some hidden ones that have not been found 
name0.png
name8.png
-
Contributor
Last edited by ChrisIsMe; 11-01-2023 at 05:07 PM.
-
Post Thanks / Like - 1 Thanks
qop1832 (1 members gave Thanks to ChrisIsMe for this useful post)
-
I modified my code. Now that everyone's player names can be read completely, then next, I plan to get the item names. I checked the old articles and it seems that there are two ways~
1. Use the itemsearchname table of wow.tools to make a local database of all item names, and then look up this library by item ID to get the name. This is relatively easy to do~ Because I have already done a good job of getting the item ID.
2. The same as getting the player name, look up through the cache.
But when I searched the old articles in the forum, I found that few people seem to use the cache to get the item name~ I want to try this method to get the item name. come on~
-
Contributor
Last edited by ChrisIsMe; 11-01-2023 at 05:07 PM.
-
Ok, thank you very much for your help~
I think I should figure out what vmt is first~