feat: add RAID_TARGET_UPDATE event and GetRaidTargetIndex/SetRaidTarget

Fire RAID_TARGET_UPDATE event when raid markers (skull, cross, etc.)
are set or cleared on targets. Add two Lua API functions:
- GetRaidTargetIndex(unit) returns marker index 1-8 (or nil)
- SetRaidTarget(unit, index) sets marker 1-8 (or 0 to clear)

Enables raid marking addons and nameplate addons that display raid
icons to react to marker changes in real-time.
This commit is contained in:
Kelsi 2026-03-21 04:43:42 -07:00
parent 8e51754615
commit 1f3e362512
2 changed files with 36 additions and 0 deletions

View file

@ -5022,6 +5022,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
}
}
LOG_DEBUG("MSG_RAID_TARGET_UPDATE: type=", static_cast<int>(rtuType));
if (addonEventCallback_)
addonEventCallback_("RAID_TARGET_UPDATE", {});
break;
}
case Opcode::SMSG_BUY_ITEM: {