mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- fixed up several "hide blizzard frame" options to re-display when the module is disabled and to call blizzard's OnLoad for the frame instead of manually entering every event to re-register
- fixed "show incoming heals" option to be properly toggleable on 4.0 (bad conditional on the 'disabled' option) - hid "cooldown mode" option on the totems module since there was never more than one choice
This commit is contained in:
@ -234,6 +234,14 @@ function IceClassPowerCounter.prototype:Enable(core)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function IceClassPowerCounter.prototype:Disable(core)
|
||||||
|
IceClassPowerCounter.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
|
if self.moduleSettings.hideBlizz then
|
||||||
|
self:ShowBlizz()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function IceClassPowerCounter.prototype:UpdateRunePower()
|
function IceClassPowerCounter.prototype:UpdateRunePower()
|
||||||
local numReady = UnitPower("player", self.unitPower)
|
local numReady = UnitPower("player", self.unitPower)
|
||||||
|
|
||||||
|
@ -313,6 +313,10 @@ end
|
|||||||
|
|
||||||
function FocusHealth.prototype:Disable(core)
|
function FocusHealth.prototype:Disable(core)
|
||||||
FocusHealth.super.prototype.Disable(self, core)
|
FocusHealth.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
|
if self.moduleSettings.hideBlizz then
|
||||||
|
self:ShowBlizz()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function FocusHealth.prototype:UpdateEvent(event, unit)
|
function FocusHealth.prototype:UpdateEvent(event, unit)
|
||||||
@ -445,16 +449,7 @@ end
|
|||||||
function FocusHealth.prototype:ShowBlizz()
|
function FocusHealth.prototype:ShowBlizz()
|
||||||
FocusFrame:Show()
|
FocusFrame:Show()
|
||||||
|
|
||||||
FocusFrame:RegisterEvent("PLAYER_ENTERING_WORLD");
|
FocusFrame:GetScript("OnLoad")(FocusFrame)
|
||||||
FocusFrame:RegisterEvent("PLAYER_FOCUS_CHANGED");
|
|
||||||
FocusFrame:RegisterEvent("UNIT_HEALTH");
|
|
||||||
FocusFrame:RegisterEvent("UNIT_LEVEL");
|
|
||||||
FocusFrame:RegisterEvent("UNIT_FACTION");
|
|
||||||
FocusFrame:RegisterEvent("UNIT_CLASSIFICATION_CHANGED");
|
|
||||||
FocusFrame:RegisterEvent("UNIT_AURA");
|
|
||||||
FocusFrame:RegisterEvent("PLAYER_FLAGS_CHANGED");
|
|
||||||
FocusFrame:RegisterEvent("PARTY_MEMBERS_CHANGED");
|
|
||||||
FocusFrame:RegisterEvent("RAID_TARGET_UPDATE");
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,10 +37,7 @@ end
|
|||||||
function HolyPower.prototype:ShowBlizz()
|
function HolyPower.prototype:ShowBlizz()
|
||||||
PaladinPowerBar:Show()
|
PaladinPowerBar:Show()
|
||||||
|
|
||||||
PaladinPowerBar:RegisterEvent("UNIT_POWER");
|
PaladinPowerBar:GetScript("OnLoad")(PaladinPowerBar)
|
||||||
PaladinPowerBar:RegisterEvent("PLAYER_ENTERING_WORLD");
|
|
||||||
PaladinPowerBar:RegisterEvent("UNIT_DISPLAYPOWER");
|
|
||||||
PaladinPowerBar:RegisterEvent("UNIT_AURA");
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function HolyPower.prototype:HideBlizz()
|
function HolyPower.prototype:HideBlizz()
|
||||||
|
@ -113,6 +113,14 @@ function PlayerHealth.prototype:Enable(core)
|
|||||||
--self:Update(self.unit)
|
--self:Update(self.unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function PlayerHealth.prototype:Disable(core)
|
||||||
|
PlayerHealth.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
|
if self.moduleSettings.hideBlizz then
|
||||||
|
self:ShowBlizz()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function PlayerHealth.prototype:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...)
|
function PlayerHealth.prototype:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...)
|
||||||
local bFoundMe = false
|
local bFoundMe = false
|
||||||
for i=1, select("#", ...) do
|
for i=1, select("#", ...) do
|
||||||
@ -288,7 +296,7 @@ function PlayerHealth.prototype:GetOptions()
|
|||||||
self:Update()
|
self:Update()
|
||||||
end,
|
end,
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled or not HealComm
|
return not (self.moduleSettings.enabled and (IceHUD.WowVer >= 40000 or HealComm))
|
||||||
end,
|
end,
|
||||||
order = 43.6
|
order = 43.6
|
||||||
}
|
}
|
||||||
@ -1303,22 +1311,7 @@ end
|
|||||||
|
|
||||||
function PlayerHealth.prototype:ShowBlizz()
|
function PlayerHealth.prototype:ShowBlizz()
|
||||||
PlayerFrame:Show()
|
PlayerFrame:Show()
|
||||||
|
PlayerFrame:GetScript("OnLoad")(PlayerFrame)
|
||||||
PlayerFrame:RegisterEvent("UNIT_LEVEL")
|
|
||||||
PlayerFrame:RegisterEvent("UNIT_COMBAT")
|
|
||||||
PlayerFrame:RegisterEvent("UNIT_FACTION")
|
|
||||||
PlayerFrame:RegisterEvent("UNIT_MAXMANA")
|
|
||||||
PlayerFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
|
|
||||||
PlayerFrame:RegisterEvent("PLAYER_ENTER_COMBAT")
|
|
||||||
PlayerFrame:RegisterEvent("PLAYER_LEAVE_COMBAT")
|
|
||||||
PlayerFrame:RegisterEvent("PLAYER_REGEN_DISABLED")
|
|
||||||
PlayerFrame:RegisterEvent("PLAYER_REGEN_ENABLED")
|
|
||||||
PlayerFrame:RegisterEvent("PLAYER_UPDATE_RESTING")
|
|
||||||
PlayerFrame:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
|
||||||
PlayerFrame:RegisterEvent("PARTY_LEADER_CHANGED")
|
|
||||||
PlayerFrame:RegisterEvent("PARTY_LOOT_METHOD_CHANGED")
|
|
||||||
PlayerFrame:RegisterEvent("RAID_ROSTER_UPDATE")
|
|
||||||
PlayerFrame:RegisterEvent("PLAYTIME_CHANGED")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -1349,18 +1342,20 @@ end
|
|||||||
|
|
||||||
function PlayerHealth.prototype:ShowBlizzardParty()
|
function PlayerHealth.prototype:ShowBlizzardParty()
|
||||||
-- Both Pitbull 4 and Xperl use these exact code, so we use it too.
|
-- Both Pitbull 4 and Xperl use these exact code, so we use it too.
|
||||||
for i = 1, 4 do
|
for i = 1, MAX_PARTY_MEMBERS do
|
||||||
local frame = _G["PartyMemberFrame"..i]
|
local frame = _G["PartyMemberFrame"..i]
|
||||||
frame.Show = nil
|
if frame then
|
||||||
frame:GetScript("OnLoad")(frame)
|
frame.Show = nil
|
||||||
frame:GetScript("OnEvent")(frame, "PARTY_MEMBERS_CHANGED")
|
frame:GetScript("OnLoad")(frame)
|
||||||
|
frame:GetScript("OnEvent")(frame, "PARTY_MEMBERS_CHANGED")
|
||||||
|
|
||||||
PartyMemberFrame_UpdateMember(frame)
|
PartyMemberFrame_UpdateMember(frame)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
UIParent:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||||
end
|
end
|
||||||
|
|
||||||
UIParent:RegisterEvent("RAID_ROSTER_UPDATE")
|
|
||||||
--function PlayerHealth.prototype:ShowBlizzParty()
|
--function PlayerHealth.prototype:ShowBlizzParty()
|
||||||
-- This loop exists because we need to unregister for events in case the party composition changes.
|
-- This loop exists because we need to unregister for events in case the party composition changes.
|
||||||
-- for i = 1, MAX_PARTY_MEMBERS do
|
-- for i = 1, MAX_PARTY_MEMBERS do
|
||||||
|
@ -45,7 +45,7 @@ function PlayerInfo.prototype:GetOptions()
|
|||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
end,
|
end,
|
||||||
order = 41
|
order = 33.1,
|
||||||
}
|
}
|
||||||
|
|
||||||
return opts
|
return opts
|
||||||
@ -116,7 +116,7 @@ function PlayerInfo.prototype:ShowBlizz()
|
|||||||
BuffFrame:Show()
|
BuffFrame:Show()
|
||||||
TemporaryEnchantFrame:Show()
|
TemporaryEnchantFrame:Show()
|
||||||
|
|
||||||
BuffFrame:RegisterEvent("UNIT_AURA");
|
BuffFrame:GetScript("OnLoad")(BuffFrame)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -202,6 +202,14 @@ function Runes.prototype:Enable(core)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Runes.prototype:Disable(core)
|
||||||
|
Runes.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
|
if self.moduleSettings.hideBlizz then
|
||||||
|
self:ShowBlizz()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function Runes.prototype:ResetRuneAvailability()
|
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)
|
||||||
@ -381,10 +389,13 @@ end
|
|||||||
function Runes.prototype:ShowBlizz()
|
function Runes.prototype:ShowBlizz()
|
||||||
RuneFrame:Show()
|
RuneFrame:Show()
|
||||||
|
|
||||||
RuneFrame:RegisterEvent("RUNE_POWER_UPDATE");
|
RuneFrame:GetScript("OnLoad")(RuneFrame)
|
||||||
RuneFrame:RegisterEvent("RUNE_TYPE_UPDATE");
|
for i=1, self.numRunes do
|
||||||
RuneFrame:RegisterEvent("RUNE_REGEN_UPDATE");
|
local frame = _G["RuneButtonIndividual"..i]
|
||||||
RuneFrame:RegisterEvent("PLAYER_ENTERING_WORLD");
|
if frame then
|
||||||
|
frame:GetScript("OnLoad")(frame)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,9 +39,7 @@ end
|
|||||||
function ShardCounter.prototype:ShowBlizz()
|
function ShardCounter.prototype:ShowBlizz()
|
||||||
ShardBarFrame:Show()
|
ShardBarFrame:Show()
|
||||||
|
|
||||||
ShardBarFrame:RegisterEvent("UNIT_POWER");
|
ShardBarFrame:GetScript("OnLoad")(ShardBarFrame)
|
||||||
ShardBarFrame:RegisterEvent("PLAYER_ENTERING_WORLD");
|
|
||||||
ShardBarFrame:RegisterEvent("UNIT_DISPLAYPOWER");
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function ShardCounter.prototype:HideBlizz()
|
function ShardCounter.prototype:HideBlizz()
|
||||||
|
@ -549,6 +549,10 @@ function IceTargetHealth.prototype:Disable(core)
|
|||||||
IceTargetHealth.super.prototype.Disable(self, core)
|
IceTargetHealth.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
UnregisterUnitWatch(self.frame)
|
UnregisterUnitWatch(self.frame)
|
||||||
|
|
||||||
|
if self.moduleSettings.hideBlizz then
|
||||||
|
self:ShowBlizz()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -878,19 +882,10 @@ end
|
|||||||
|
|
||||||
function IceTargetHealth.prototype:ShowBlizz()
|
function IceTargetHealth.prototype:ShowBlizz()
|
||||||
TargetFrame:Show()
|
TargetFrame:Show()
|
||||||
TargetFrame:RegisterEvent("PLAYER_TARGET_CHANGED")
|
TargetFrame:GetScript("OnLoad")(TargetFrame)
|
||||||
TargetFrame:RegisterEvent("UNIT_HEALTH")
|
|
||||||
TargetFrame:RegisterEvent("UNIT_LEVEL")
|
|
||||||
TargetFrame:RegisterEvent("UNIT_FACTION")
|
|
||||||
TargetFrame:RegisterEvent("UNIT_CLASSIFICATION_CHANGED")
|
|
||||||
TargetFrame:RegisterEvent("UNIT_AURA")
|
|
||||||
TargetFrame:RegisterEvent("PLAYER_FLAGS_CHANGED")
|
|
||||||
TargetFrame:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
|
||||||
TargetFrame:RegisterEvent("RAID_TARGET_UPDATE")
|
|
||||||
|
|
||||||
ComboFrame:Show()
|
ComboFrame:Show()
|
||||||
ComboFrame:RegisterEvent("PLAYER_TARGET_CHANGED");
|
ComboFrame:GetScript("OnLoad")(ComboFrame)
|
||||||
ComboFrame:RegisterEvent("PLAYER_COMBO_POINTS");
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ function Totems.prototype:GetOptions()
|
|||||||
end,
|
end,
|
||||||
order = 35
|
order = 35
|
||||||
}
|
}
|
||||||
|
--[[
|
||||||
opts["cooldownMode"] = {
|
opts["cooldownMode"] = {
|
||||||
type = 'select',
|
type = 'select',
|
||||||
name = 'Totem cooldown mode',
|
name = 'Totem cooldown mode',
|
||||||
@ -142,7 +142,7 @@ function Totems.prototype:GetOptions()
|
|||||||
end,
|
end,
|
||||||
order = 36
|
order = 36
|
||||||
}
|
}
|
||||||
|
]]--
|
||||||
opts["totemGap"] = {
|
opts["totemGap"] = {
|
||||||
type = 'range',
|
type = 'range',
|
||||||
name = 'Totem gap',
|
name = 'Totem gap',
|
||||||
@ -198,11 +198,19 @@ function Totems.prototype:Enable(core)
|
|||||||
self:RegisterEvent("PLAYER_TOTEM_UPDATE", "UpdateTotem");
|
self:RegisterEvent("PLAYER_TOTEM_UPDATE", "UpdateTotem");
|
||||||
self:RegisterEvent("PLAYER_ENTERING_WORLD", "ResetTotemAvailability");
|
self:RegisterEvent("PLAYER_ENTERING_WORLD", "ResetTotemAvailability");
|
||||||
|
|
||||||
if (self.moduleSettings.hideBlizz) then
|
if self.moduleSettings.hideBlizz then
|
||||||
self:HideBlizz()
|
self:HideBlizz()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Totems.prototype:Disable(core)
|
||||||
|
Totems.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
|
if self.moduleSettings.hideBlizz then
|
||||||
|
self:ShowBlizz()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function Totems.prototype:ResetTotemAvailability()
|
function Totems.prototype:ResetTotemAvailability()
|
||||||
for i=1, self.numTotems do
|
for i=1, self.numTotems do
|
||||||
self:UpdateTotem(nil, totem)
|
self:UpdateTotem(nil, totem)
|
||||||
@ -267,8 +275,7 @@ end
|
|||||||
|
|
||||||
function Totems.prototype:ShowBlizz()
|
function Totems.prototype:ShowBlizz()
|
||||||
TotemFrame:Show()
|
TotemFrame:Show()
|
||||||
TotemFrame:RegisterEvent("PLAYER_TOTEM_UPDATE");
|
TotemFrame:GetScript("OnLoad")(TotemFrame)
|
||||||
TotemFrame:RegisterEvent("PLAYER_ENTERING_WORLD");
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user