fix: SMSG_IGNORE_LIST read phantom string field after each GUID

The packet only contains uint8 count + count×uint64 GUIDs, but the
handler called readString() after each GUID. This consumed raw bytes of
subsequent GUIDs as a string, corrupting all entries after the first.
Now stores GUIDs in ignoreListGuids_ and resolves names asynchronously
via SMSG_NAME_QUERY_RESPONSE, matching the friends list pattern.

Also fixes unsafe static_pointer_cast in ready check (no type guard)
and removes redundant packetHasRemaining wrapper (duplicates Packet API).
This commit is contained in:
Kelsi 2026-03-29 18:11:29 -07:00
parent 0e814e9c4a
commit 35b952bc6f
3 changed files with 27 additions and 15 deletions

View file

@ -1996,6 +1996,12 @@ void EntityController::handleNameQueryResponse(network::Packet& packet) {
owner_.friendsCache[data.name] = data.guid;
}
// Backfill ignore list: SMSG_IGNORE_LIST only contains GUIDs, so
// ignoreCache (name→guid for UI) is populated here once names resolve.
if (owner_.ignoreListGuids_.count(data.guid)) {
owner_.ignoreCache[data.name] = data.guid;
}
// Fire UNIT_NAME_UPDATE so nameplate/unit frame addons know the name is available
if (owner_.addonEventCallback_) {
std::string unitId;