ArtOfShred / LuiExtended

Lui Extended addon for ESO
http://www.esoui.com/downloads/fileinfo.php?id=818
Other
36 stars 21 forks source link

UI Error in CC tracker Break Free Encountered due to ACTION_RESULT_EFFECT_GAINED_DURATION #281

Open ACastanza opened 5 months ago

ACastanza commented 5 months ago

Lua Error

bad argument #1 to 'unpack' (table/struct expected, got nil)
stack traceback:
[C]: in function 'unpack'
user:/AddOns/LuiExtended/modules/CombatInfo/CrowdControlTracker.lua:1185: in function 'CrowdControlTracker:StopDrawBreakFree'
<Locals> self = [table:1]{addonEnabled = T, Timer = 15465.731445312, currentCC = 8}, currentCCIcon = "LuiExtended/media/icons/abilit...", currentCC = 8, currentResult = 2245, currentAbilityId = 83072 </Locals>
user:/AddOns/LuiExtended/modules/CombatInfo/CrowdControlTracker.lua:370: in function 'CrowdControlTracker:OnCombat'
<Locals> self = [table:1], eventCode = 131108, result = 2245, isError = F, abilityName = "Break Free", abilityGraphic = 4565, abilityActionSlotType = 3, sourceName = "my_character_name", sourceType = 1, targetName = "my_character_name", targetType = 1, hitValue = 250, powerType = 0, damageType = 1, combat_log = F, sourceUnitId = 35984, targetUnitId = 35984, abilityId = 16565, abilityIcon = "/esoui/art/icons/ability_debuf...", StringEnd = user:/AddOns/LuiExtended/modules/CombatInfo/CrowdControlTracker.lua:351 </Locals>
user:/AddOns/LuiExtended/modules/CombatInfo/CrowdControlTracker.lua:112: in function '(anonymous)'

This seems to have occurred because an event with result type ACTION_RESULT_EFFECT_GAINED_DURATION slipped through to the StopDrawBreakFree function which caused an error with LUIE_CCTracker_BreakFreeFrame_Left_IconBG:SetColor(unpack(currentColor)) because ACTION_RESULT_EFFECT_GAINED_DURATION doesn't have a color code defined in CombatInfo.SV.cct.colors[currentResult]

I think the easiest fix is probably to define a fallback color to use when CombatInfo.SV.cct.colors[currentResult]==nil since I haven't been able to reproduce the actual cause of this action type making it to this stage of the tracker.

[ACTION_RESULT_EFFECT_GAINED_DURATION] = { 0, 0, 0, 0 }, to the cct.colors table on L271 in modules/CombatInfo/CombatInfo.lua Not sure if { 0, 0, 0, 0 } is the right way to go though.

I think this might've occurred due to some edge case interaction between snares and roots since it was triggered by Frozen Edge, with the cctype =8 (snare) but a snare shouldn't be playing the break free animation, and definitely not with that ACTION_RESULT.

DakJaniels commented 5 months ago

Added a grey fallback color for ACTION_RESULT_EFFECT_GAINED_DURATION