Quantcast

UNIT_AURA is very greedy, so choose when to answer it.

Michael Tindal [09-10-16 - 05:32]
UNIT_AURA is very greedy, so choose when to answer it.
Filename
ElvUI_SLE/modules/equipmanager.lua
diff --git a/ElvUI_SLE/modules/equipmanager.lua b/ElvUI_SLE/modules/equipmanager.lua
index a351a1e..3a3e6c4 100644
--- a/ElvUI_SLE/modules/equipmanager.lua
+++ b/ElvUI_SLE/modules/equipmanager.lua
@@ -96,6 +96,13 @@ local function Equip(event)
 	end

 	local spec, equipSet = EM:GetData()
+
+	local shouldHandleUnitAura = E.private.sle.equip.FishingRaft.enable and (EM:HasFishingRaftAura() and equipSet ~= E.private.sle.equip.FishingRaft.set) or (not EM:HasFishingRaftAura() and equipSet == E.private.sle.equip.FishingRaft.set);
+
+	if (event == "UNIT_AURA" and not shouldHandleUnitAura) then
+		return
+	end
+
 	if spec ~= nil then --In case you don't have spec
 		local isWrong, trueSet = EM:WrongSet(equipSet, SpecTable[spec], inCombat)
 		if isWrong and not T.UnitInVehicle("player") then