-
Member
[Classic] How to get the name of the unit.
I had found the name base of the player , but after iterate all of the name, I found that all of them are the player name. I search the name of the current target, yes, I found out the target unit name, I also found the address of the targetUnitObject, but anyway, I can't found out the relationship of them. In the data struct of unit object, I can't find any link information between them.
I'm a newcomer, Thanks for help.
-
Contributor
The easiest way is to find the ObjectName Vtable function and call it. There are also examples of using some NameCache on here as well but im not familiar with that.
-
Member
thanks for your replay, I have tried to find the examples of name cache, but failed. I can only find the example of PlayerNameCache.
-
Contributor
string unitName = ReadUtf8String(ReadInt64(ReadInt64(objectBase + UnitCache) + NameOff));
UnitCache = 0x17B8, NameOff = 0xE0 // for 36035
-
Post Thanks / Like - 1 Thanks
aeo (1 members gave Thanks to Mr.Sergey for this useful post)
-
Member
Originally Posted by
Mr.Sergey
string unitName = ReadUtf8String(ReadInt64(ReadInt64(objectBase + UnitCache) + NameOff));
UnitCache = 0x17B8, NameOff = 0xE0 // for 36035
Aha! this is the right address, I have tried!!!!
Thanks a lot!