- fixed default rune frame showing up sometimes when the player has the "hide blizzard frame" option disabled in the runes module

- fixed default runes from being incorrect (showing 6 blood runes) after re-enabling them from the runes module while the game is running
This commit is contained in:
Parnic
2010-10-14 22:56:48 +00:00
parent 6a74e70845
commit de880222b0

View File

@ -192,9 +192,13 @@ end
function Runes.prototype:Enable(core) function Runes.prototype:Enable(core)
Runes.super.prototype.Enable(self, core) Runes.super.prototype.Enable(self, core)
self:RegisterEvent("RUNE_POWER_UPDATE", "UpdateRunePower"); self:RegisterEvent("RUNE_POWER_UPDATE", "UpdateRunePower")
self:RegisterEvent("RUNE_TYPE_UPDATE", "UpdateRuneType"); self:RegisterEvent("RUNE_TYPE_UPDATE", "UpdateRuneType")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "ResetRuneAvailability"); self:RegisterEvent("PLAYER_ENTERING_WORLD", "ResetRuneAvailability")
if (self.moduleSettings.hideBlizz) then
self:HideBlizz()
end
end end
function Runes.prototype:Disable(core) function Runes.prototype:Disable(core)
@ -209,10 +213,6 @@ function Runes.prototype:ResetRuneAvailability()
for i=1, self.numRunes do for i=1, self.numRunes do
self:UpdateRunePower(nil, i, true) self:UpdateRunePower(nil, i, true)
end end
if (self.moduleSettings.hideBlizz) then
self:HideBlizz()
end
end end
-- simply shows/hides the foreground rune when it becomes usable/unusable. this allows the background transparent rune to show only -- simply shows/hides the foreground rune when it becomes usable/unusable. this allows the background transparent rune to show only
@ -389,6 +389,7 @@ function Runes.prototype:ShowBlizz()
RuneFrame:Show() RuneFrame:Show()
RuneFrame:GetScript("OnLoad")(RuneFrame) RuneFrame:GetScript("OnLoad")(RuneFrame)
RuneFrame:GetScript("OnEvent")(frame, "PLAYER_ENTERING_WORLD")
for i=1, self.numRunes do for i=1, self.numRunes do
local frame = _G["RuneButtonIndividual"..i] local frame = _G["RuneButtonIndividual"..i]
if frame then if frame then