Skip to content

Commit

Permalink
Don't run the tsu trigger function to decide CanHaveTooltip
Browse files Browse the repository at this point in the history
The Icon's modify function checks CanHaveTooltip in modify,
which is called for all auras whether loaded or not.

Thus, the init and trigger functions of unloaded tsus were run.

So instead just assume that tsu auras can have tooltips.
  • Loading branch information
InfusOnWoW authored and Stanzilla committed Aug 13, 2018
1 parent fbec219 commit bb452b8
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions WeakAuras/GenericTrigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2818,15 +2818,7 @@ function GenericTrigger.CanHaveTooltip(data, triggernum)

if (trigger.type == "custom") then
if (trigger.custom_type == "stateupdate") then
local allStates = {};
WeakAuras.ActivateAuraEnvironment(data.id);
RunTriggerFunc(allStates, events[data.id][triggernum], data.id, triggernum, "OPTIONS");
WeakAuras.ActivateAuraEnvironment(nil);
for id, state in pairs(allStates) do
if (state.spellId or state.itemId or (state.unit and (state.unitBuffIndex or state.unitDebuffIndex))) then
return "custom";
end
end
return true;
end
end

Expand Down

0 comments on commit bb452b8

Please sign in to comment.