Update tooltip when pressing Shift

When the tooltip is showing a breakable item and the player presses/releases Shift, update the tooltip. This is so that disenchantable items can more easily show what the player currently has equipped.
This commit is contained in:
Parnic
2016-10-11 17:17:29 -05:00
parent 1b3533e9f6
commit 09d8e16e07

View File

@ -310,6 +310,8 @@ function Breakables:RegisterEvents()
self:RegisterEvent("PLAYER_REGEN_DISABLED", "OnEnterCombat")
self:RegisterEvent("PLAYER_REGEN_ENABLED", "OnLeaveCombat")
self:RegisterEvent("MODIFIER_STATE_CHANGED", "FindBreakables")
if CanDisenchant then
self:RegisterEvent("TRADE_SKILL_UPDATE", "OnTradeSkillUpdate")
end
@ -319,6 +321,12 @@ function Breakables:RegisterEvents()
end
end
function Breakables:OnModifierChanged()
if showingTooltip ~= nil and not self.bCombat then
self:OnEnterBreakableButton(showingTooltip)
end
end
function Breakables:OnDisable()
self:UnregisterAllEvents()
self.frame:SetScript("OnUpdate", nil)