mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Add a friends-list fallback to UnitNameFromGUID, between the object manager and the persistent name cache. The friend list keeps name + GUID for online AND offline friends (SMSG_FRIEND_LIST), so a friend's GUID now resolves to a name even when the unit is not synced and was never seen in chat -- the case that previously returned nil. Only UnitNameFromGUID uses this: it returns name + realm, and the friend entry has the name. GetPlayerInfoByGUID is left unchanged because it also returns race and sex, which the friend entry does not carry. Add FriendList::NameForGuid helper. Document the lookup order in docs/API.md.