game,ui: implement MSG_RAID_TARGET_UPDATE and display raid marks

Parse the full and single-update variants of MSG_RAID_TARGET_UPDATE to
track which guid carries each of the 8 raid icons (Star/Circle/Diamond/
Triangle/Moon/Square/Cross/Skull). Marks are cleared on world transfer.

The target frame now shows the Unicode symbol for the target's raid mark
in its faction color to the left of the name. Nameplates show the same
symbol to the left of the unit name for all nearby marked units.
This commit is contained in:
Kelsi 2026-03-10 06:10:29 -07:00
parent 90b8cccac5
commit a2dd8ee5b5
3 changed files with 86 additions and 2 deletions

View file

@ -888,6 +888,21 @@ public:
return (slot < kMaxEncounterSlots) ? encounterUnitGuids_[slot] : 0;
}
// Raid target markers (MSG_RAID_TARGET_UPDATE)
// Icon indices 0-7: Star, Circle, Diamond, Triangle, Moon, Square, Cross, Skull
static constexpr uint32_t kRaidMarkCount = 8;
// Returns the GUID marked with the given icon (0 = no mark)
uint64_t getRaidMarkGuid(uint32_t icon) const {
return (icon < kRaidMarkCount) ? raidTargetGuids_[icon] : 0;
}
// Returns the raid mark icon for a given guid (0xFF = no mark)
uint8_t getEntityRaidMark(uint64_t guid) const {
if (guid == 0) return 0xFF;
for (uint32_t i = 0; i < kRaidMarkCount; ++i)
if (raidTargetGuids_[i] == guid) return static_cast<uint8_t>(i);
return 0xFF;
}
// ---- LFG / Dungeon Finder ----
enum class LfgState : uint8_t {
None = 0,
@ -1864,6 +1879,9 @@ private:
uint32_t instanceDifficulty_ = 0;
bool instanceIsHeroic_ = false;
// Raid target markers (icon 0-7 -> guid; 0 = empty slot)
std::array<uint64_t, kRaidMarkCount> raidTargetGuids_ = {};
// Mirror timers (0=fatigue, 1=breath, 2=feigndeath)
MirrorTimer mirrorTimers_[3];