fix: skip all-zero equipment emit, broaden BG announcer filter

Equipment: the first emitOtherPlayerEquipment call fired before any item
queries returned, sending all-zero displayIds that stripped players naked.
Now skips the callback when resolved=0 (waiting for queries). Equipment
only applies once at least one item resolves, preventing the naked flash.

BG announcer: broadened filter to match ALL chat types (not just SYSTEM),
and added more patterns: "BGAnnouncer", "[H: N, A: N]" with spaces.

Also added diagnostic logging in setOnlinePlayerEquipment to trace
displayId counts reaching the renderer.
This commit is contained in:
Kelsi 2026-03-28 15:09:52 -07:00
parent 12f5aaf286
commit 615db79819
3 changed files with 24 additions and 5 deletions

View file

@ -7574,7 +7574,18 @@ void Application::setOnlinePlayerEquipment(uint64_t guid,
if (!charRenderer) return;
if (st.instanceId == 0 || st.modelId == 0) return;
if (st.bodySkinPath.empty()) return;
if (st.bodySkinPath.empty()) {
LOG_WARNING("setOnlinePlayerEquipment: bodySkinPath empty for guid=0x", std::hex, guid, std::dec,
" instanceId=", st.instanceId, " — skipping equipment");
return;
}
int nonZeroDisplay = 0;
for (uint32_t d : displayInfoIds) if (d != 0) nonZeroDisplay++;
LOG_WARNING("setOnlinePlayerEquipment: guid=0x", std::hex, guid, std::dec,
" instanceId=", st.instanceId, " nonZeroDisplayIds=", nonZeroDisplay,
" head=", displayInfoIds[0], " chest=", displayInfoIds[4],
" legs=", displayInfoIds[6], " mainhand=", displayInfoIds[15]);
auto displayInfoDbc = assetManager->loadDBC("ItemDisplayInfo.dbc");
if (!displayInfoDbc) return;