--Widget Handlers local OPTION_TABLE_NONE = {} BOSS_DEBUFF_SIZE_INCREASE = 9 CUF_READY_CHECK_DECAY_TIME = 11 DISTANCE_THRESHOLD_SQUARED = 250*250 CUF_NAME_SECTION_SIZE = 15 CUF_AURA_BOTTOM_OFFSET = 2 -- Global -> Local performance increase local wipe, tinsert = wipe, tinsert local max, min = max, min local ipairs, pairs, select, error = ipairs, pairs, select, error local C_CVar_GetNumber = C_CVar.GetNumber local GroupUtil_IsInGroup = IsInGroup local CastingBarFrame_OnLoad = CastingBarFrame_OnLoad local CooldownFrame_SetTimer = CooldownFrame_SetTimer local CooldownFrame_Clear = CooldownFrame_Clear local CreateFrame = CreateFrame local UnitExists = UnitExists local UnitHasVehicleUI = UnitHasVehicleUI local UnitInRaid = UnitInRaid local UnitTargetsVehicleInRaidUI = UnitTargetsVehicleInRaidUI local UnitPlayerControlled = UnitPlayerControlled local UnitIsTapped = UnitIsTapped local UnitIsTappedByPlayer = UnitIsTappedByPlayer local UnitDetailedThreatSituation = UnitDetailedThreatSituation local UnitIsConnected = UnitIsConnected local UnitClass = UnitClass local RAID_CLASS_COLORS = RAID_CLASS_COLORS local UnitIsPlayer = UnitIsPlayer local UnitIsFriend = UnitIsFriend local UnitIsPVP = UnitIsPVP local UnitSelectionColor = UnitSelectionColor -- UnitSelectionColor, guarded against the client's own shutdown order. -- -- CGGameUI::GetSelectionColor asserts ERROR #134 on exactly one combination: -- the unit resolves but the local player does not. That happens at exit - the -- client destroys the player, then ClearTarget fires PLAYER_TARGET_CHANGED, -- every plate answers, and a nameplate token is the only kind still resolving -- at that point. Both call sites below sit on that path. -- -- The real fix is in the DLL, which now makes the same check the client makes -- one instruction before it asserts. This guard is here anyway: it costs one -- comparison, and it protects anyone running an older realm.dll. A white name -- for the one frame during teardown is not a visible outcome. local function SafeSelectionColor(unit, extended) if not unit or not UnitExists("player") then return 1, 1, 1 end return UnitSelectionColor(unit, extended) end local UnitHealth = UnitHealth local UnitHealthMax = UnitHealthMax local UnitPowerType = UnitPowerType local UnitPowerMax = UnitPowerMax local UnitPower = UnitPower local UnitIsUnit = UnitIsUnit local UnitInVehicle = UnitInVehicle local UnitIsDeadOrGhost = UnitIsDeadOrGhost local UnitDistanceSquared = UnitDistanceSquared local UnitInRange = UnitInRange local PowerBarColor = PowerBarColor local GetUnitName = GetUnitName local GetThreatStatusColor = GetThreatStatusColor local UnitGroupRolesAssignedKey = UnitGroupRolesAssignedKey local UnitClassification = UnitClassification local UnitInParty = UnitInParty local GetRaidRosterInfo = GetRaidRosterInfo local GetTexCoordsForRoleSmallCircle = GetTexCoordsForRoleSmallCircle local GetReadyCheckTimeLeft = GetReadyCheckTimeLeft local GetReadyCheckStatus = GetReadyCheckStatus local UnitBuff = UnitBuff local UnitDebuff = UnitDebuff local AuraUtil_UnitShouldShowBuff = AuraUtil.UnitShouldShowBuff local AuraUtil_IsPriorityDebuff = AuraUtil.IsPriorityDebuff local AuraUtil_UnitShouldShowDebuff = AuraUtil.UnitShouldShowDebuff local DebuffTypeColor = DebuffTypeColor -- UnitHealthPercent / UnitMissingHealth, computed rather than captured. -- -- Both were in the localisation block above as "local X = X", and both bound -- nil. They are Ascension globals, and this is the presence-is-not-reachability -- trap in its purest form: they ARE defined on this client, in -- Interface\FrameXML\Util\GlobalFunctions.lua, and that file IS in the -- archives, so a grep finds them and reports them present. No TOC loads it. -- Walking FrameXML.toc transitively through every