mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
74d7e969ab
commit
f99f4a732a
1 changed files with 10 additions and 0 deletions
|
|
@ -8060,6 +8060,11 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
LOG_INFO("SMSG_INSPECT (Classic): ", playerName, " has gear in ",
|
||||
std::count_if(items.begin(), items.end(),
|
||||
[](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;
|
||||
}
|
||||
|
||||
|
|
@ -15245,6 +15250,11 @@ void GameHandler::handleInspectResults(network::Packet& packet) {
|
|||
|
||||
LOG_INFO("Inspect results for ", playerName, ": ", totalTalents, " talents, ",
|
||||
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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue