diff --git a/modules/tracking.lua b/modules/tracking.lua index 9caaa9ff..ba05e1ca 100644 --- a/modules/tracking.lua +++ b/modules/tracking.lua @@ -72,26 +72,7 @@ pfUI:RegisterModule("tracking", "vanilla", function () end this:RefreshSpells() - local texture = GetTrackingTexture() - if texture and texture ~= state.texture then - state.texture = texture - this.pulse = nil - this.icon:SetTexture(texture) - this.icon:SetVertexColor(1,1,1,1) - this:Show() - elseif not texture then - state.texture = nil - - if pulse and HasEntries(state.spells) then - this.pulse = true - this.icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark") - this.icon:SetVertexColor(1,1,1,1) - this:Show() - else - this.pulse = nil - this:Hide() - end - end + this:RefreshMenu() end) pfUI.tracking:SetScript("OnUpdate", function() @@ -174,6 +155,29 @@ pfUI:RegisterModule("tracking", "vanilla", function () end end + function pfUI.tracking:RefreshMenu() + local texture = GetTrackingTexture() + if texture and texture ~= state.texture then + state.texture = texture + pfUI.tracking.pulse = nil + pfUI.tracking.icon:SetTexture(texture) + pfUI.tracking.icon:SetVertexColor(1,1,1,1) + pfUI.tracking:Show() + elseif not texture then + state.texture = nil + + if pulse and HasEntries(state.spells) then + pfUI.tracking.pulse = true + pfUI.tracking.icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark") + pfUI.tracking.icon:SetVertexColor(1,1,1,1) + pfUI.tracking:Show() + else + pfUI.tracking.pulse = nil + pfUI.tracking:Hide() + end + end + end + function pfUI.tracking:PlayerIsDruidInCatForm(playerClass) if playerClass == "DRUID" then for i = 0, 31 do