mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
4.3.4's selection colour is one ladder over a GUID with an extended flag: the unit's virtual calls it with 1, Script_UnitSelectionColor with 0. Retail exposes the flag as useExtendedColors and names each rung (UnitSelectionType 0 Hostile .. 9 Dead). 1.12 inlines the extended ladder into CGUnit_C::GetSelectionHighlightColor and has no Lua surface. Both globals walk that ladder rung for rung with the engine's own predicates (CanAttack, IsPVPUI, CGPartyInfo::IsMember, UnitReaction, health) plus the friend rung, so the extended colour is the one the circle and the name draw. A GUID with no unit object takes 4.3.4's no-object branch, with the PvP bit from the group stats block that Script_UnitIsPVP reads. FriendNameColor.cpp becomes SelectionColor.cpp so the engine-side friend patches and the Lua ladder share one colour table.