feat: fire INSPECT_READY event from both WotLK and Classic inspect paths

Fire INSPECT_READY with the inspected player's GUID when inspection
results are received. Fires from both:
- WotLK SMSG_TALENTS_INFO type=1 (talent + gear inspect)
- Classic SMSG_INSPECT (gear-only inspect)

Used by GearScore, TacoTip, and other inspection addons that need
to know when inspect data is available for a specific player.
This commit is contained in:
Kelsi 2026-03-21 04:53:08 -07:00
parent 74d7e969ab
commit f99f4a732a

View file

@ -8060,6 +8060,11 @@ void GameHandler::handlePacket(network::Packet& packet) {
LOG_INFO("SMSG_INSPECT (Classic): ", playerName, " has gear in ", LOG_INFO("SMSG_INSPECT (Classic): ", playerName, " has gear in ",
std::count_if(items.begin(), items.end(), std::count_if(items.begin(), items.end(),
[](uint32_t e) { return e != 0; }), "/19 slots"); [](uint32_t e) { return e != 0; }), "/19 slots");
if (addonEventCallback_) {
char guidBuf[32];
snprintf(guidBuf, sizeof(guidBuf), "0x%016llX", (unsigned long long)guid);
addonEventCallback_("INSPECT_READY", {guidBuf});
}
break; break;
} }
@ -15245,6 +15250,11 @@ void GameHandler::handleInspectResults(network::Packet& packet) {
LOG_INFO("Inspect results for ", playerName, ": ", totalTalents, " talents, ", LOG_INFO("Inspect results for ", playerName, ": ", totalTalents, " talents, ",
unspentTalents, " unspent, ", (int)talentGroupCount, " specs"); unspentTalents, " unspent, ", (int)talentGroupCount, " specs");
if (addonEventCallback_) {
char guidBuf[32];
snprintf(guidBuf, sizeof(guidBuf), "0x%016llX", (unsigned long long)guid);
addonEventCallback_("INSPECT_READY", {guidBuf});
}
} }
uint64_t GameHandler::resolveOnlineItemGuid(uint32_t itemId) const { uint64_t GameHandler::resolveOnlineItemGuid(uint32_t itemId) const {