mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: show grey nameplates for mobs tapped by other players
Check UNIT_DYNFLAG_TAPPED_BY_PLAYER (0x0004) on hostile NPC nameplates. Mobs tagged by another player now show grey health bars instead of red, matching WoW's visual indication that the mob won't yield loot/XP. Mobs with TAPPED_BY_ALL_THREAT_LIST (0x0008) still show red since those are shared-tag mobs that give loot to everyone.
This commit is contained in:
parent
82990f5891
commit
586e9e74ff
1 changed files with 10 additions and 2 deletions
|
|
@ -11695,8 +11695,16 @@ void GameScreen::renderNameplates(game::GameHandler& gameHandler) {
|
||||||
barColor = IM_COL32(140, 140, 140, A(200));
|
barColor = IM_COL32(140, 140, 140, A(200));
|
||||||
bgColor = IM_COL32(70, 70, 70, A(160));
|
bgColor = IM_COL32(70, 70, 70, A(160));
|
||||||
} else if (unit->isHostile()) {
|
} else if (unit->isHostile()) {
|
||||||
barColor = IM_COL32(220, 60, 60, A(200));
|
// Check if mob is tapped by another player (grey nameplate)
|
||||||
bgColor = IM_COL32(100, 25, 25, A(160));
|
uint32_t dynFlags = unit->getDynamicFlags();
|
||||||
|
bool tappedByOther = (dynFlags & 0x0004) != 0 && (dynFlags & 0x0008) == 0; // TAPPED but not TAPPED_BY_ALL_THREAT_LIST
|
||||||
|
if (tappedByOther) {
|
||||||
|
barColor = IM_COL32(160, 160, 160, A(200));
|
||||||
|
bgColor = IM_COL32(80, 80, 80, A(160));
|
||||||
|
} else {
|
||||||
|
barColor = IM_COL32(220, 60, 60, A(200));
|
||||||
|
bgColor = IM_COL32(100, 25, 25, A(160));
|
||||||
|
}
|
||||||
} else if (isPlayer) {
|
} else if (isPlayer) {
|
||||||
// Player nameplates: use class color for easy identification
|
// Player nameplates: use class color for easy identification
|
||||||
uint8_t cid = entityClassId(unit);
|
uint8_t cid = entityClassId(unit);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue