mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- fixed reported taint issue from people joining or leaving a party in combat with the "hide blizzard party frames" option set on the PlayerHealth module
This commit is contained in:
@ -3,6 +3,7 @@ local AceOO = AceLibrary("AceOO-2.0")
|
|||||||
local PlayerHealth = AceOO.Class(IceUnitBar)
|
local PlayerHealth = AceOO.Class(IceUnitBar)
|
||||||
|
|
||||||
PlayerHealth.prototype.resting = nil
|
PlayerHealth.prototype.resting = nil
|
||||||
|
PlayerHealth.prototype.pendingBlizzardPartyHide = false
|
||||||
|
|
||||||
local configMode = false
|
local configMode = false
|
||||||
local HealComm
|
local HealComm
|
||||||
@ -944,7 +945,17 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function PlayerHealth.prototype:CheckCombat()
|
function PlayerHealth.prototype:CheckCombat()
|
||||||
|
local preCombatValue = self.combat
|
||||||
PlayerHealth.super.prototype.CheckCombat(self)
|
PlayerHealth.super.prototype.CheckCombat(self)
|
||||||
|
local postCombatValue = self.combat
|
||||||
|
|
||||||
|
if preCombatValue ~= postCombatValue then
|
||||||
|
if postCombatValue then
|
||||||
|
self:InCombat()
|
||||||
|
else
|
||||||
|
self:OutCombat()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if self.combat then
|
if self.combat then
|
||||||
if self.moduleSettings.allowMouseInteraction and not self.moduleSettings.allowMouseInteractionCombat then
|
if self.moduleSettings.allowMouseInteraction and not self.moduleSettings.allowMouseInteractionCombat then
|
||||||
@ -1313,6 +1324,11 @@ function PlayerHealth.prototype:HideBlizz()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PlayerHealth.prototype:HideBlizzardParty()
|
function PlayerHealth.prototype:HideBlizzardParty()
|
||||||
|
if self.combat then
|
||||||
|
self.pendingBlizzardPartyHide = true
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- 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, MAX_PARTY_MEMBERS do
|
for i = 1, MAX_PARTY_MEMBERS do
|
||||||
local party = _G['PartyMemberFrame'..i]
|
local party = _G['PartyMemberFrame'..i]
|
||||||
@ -1391,5 +1407,14 @@ function PlayerHealth.prototype:UpdateBar(scale, color, alpha)
|
|||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function PlayerHealth.prototype:OutCombat()
|
||||||
|
PlayerHealth.super.prototype.OutCombat(self)
|
||||||
|
|
||||||
|
if self.pendingBlizzardPartyHide then
|
||||||
|
self.pendingBlizzardPartyHide = false
|
||||||
|
self:HideBlizzardParty()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Load us up
|
-- Load us up
|
||||||
IceHUD.PlayerHealth = PlayerHealth:new()
|
IceHUD.PlayerHealth = PlayerHealth:new()
|
||||||
|
Reference in New Issue
Block a user