mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
Update Party hide feature for 10.0 compatibility
This commit is contained in:
@ -10,6 +10,7 @@ PlayerHealth.prototype.absorbAmount = 0
|
|||||||
local configMode = false
|
local configMode = false
|
||||||
local HealComm
|
local HealComm
|
||||||
local incomingHealAmt = 0
|
local incomingHealAmt = 0
|
||||||
|
local groupEvent = IceHUD.EventExistsGroupRosterUpdate and "GROUP_ROSTER_UPDATE" or "PARTY_MEMBERS_CHANGED"
|
||||||
|
|
||||||
-- Constructor --
|
-- Constructor --
|
||||||
function PlayerHealth.prototype:init()
|
function PlayerHealth.prototype:init()
|
||||||
@ -81,11 +82,7 @@ function PlayerHealth.prototype:Enable(core)
|
|||||||
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckCombat")
|
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckCombat")
|
||||||
|
|
||||||
self:RegisterEvent("PARTY_LEADER_CHANGED", "CheckLeader")
|
self:RegisterEvent("PARTY_LEADER_CHANGED", "CheckLeader")
|
||||||
if IceHUD.EventExistsGroupRosterUpdate then
|
self:RegisterEvent(groupEvent, "CheckLeader")
|
||||||
self:RegisterEvent("GROUP_ROSTER_UPDATE", "CheckLeader")
|
|
||||||
else
|
|
||||||
self:RegisterEvent("PARTY_MEMBERS_CHANGED", "CheckLeader")
|
|
||||||
end
|
|
||||||
if GetLFGProposal then
|
if GetLFGProposal then
|
||||||
self:RegisterEvent("LFG_PROPOSAL_UPDATE", "CheckPartyRole")
|
self:RegisterEvent("LFG_PROPOSAL_UPDATE", "CheckPartyRole")
|
||||||
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
|
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
|
||||||
@ -1427,39 +1424,34 @@ function PlayerHealth.prototype:HideBlizzardParty()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Both Pitbull 4 and Xperl use these exact code, so we use it too.
|
if PartyFrame then
|
||||||
for i = 1, MAX_PARTY_MEMBERS do
|
PartyFrame:Hide()
|
||||||
local party = _G['PartyMemberFrame'..i]
|
PartyFrame:UnregisterEvent(groupEvent)
|
||||||
if party then
|
else
|
||||||
party:UnregisterAllEvents()
|
for i = 1, MAX_PARTY_MEMBERS do
|
||||||
party:Hide()
|
local frame = _G["PartyMemberFrame" .. i]
|
||||||
party.Show = function() end
|
frame:SetAttribute("statehidden", true)
|
||||||
|
hook_frames(frame)
|
||||||
end
|
end
|
||||||
|
UIParent:UnregisterEvent(groupEvent)
|
||||||
end
|
end
|
||||||
|
|
||||||
UIParent:UnregisterEvent('RAID_ROSTER_UPDATE')
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function PlayerHealth.prototype:ShowBlizzardParty()
|
function PlayerHealth.prototype:ShowBlizzardParty()
|
||||||
-- Both Pitbull 4 and Xperl use these exact code, so we use it too.
|
if PartyFrame then
|
||||||
for i = 1, MAX_PARTY_MEMBERS do
|
PartyFrame:Show()
|
||||||
local frame = _G["PartyMemberFrame"..i]
|
PartyFrame:Layout()
|
||||||
if frame then
|
PartyFrame:RegisterEvent(groupEvent)
|
||||||
frame.Show = nil
|
else
|
||||||
frame:GetScript("OnLoad")(frame)
|
for i = 1, MAX_PARTY_MEMBERS do
|
||||||
if IceHUD.WowVer >= 50000 then
|
local frame = _G["PartyMemberFrame" .. i]
|
||||||
frame:GetScript("OnEvent")(frame, "GROUP_ROSTER_UPDATE")
|
frame:SetAttribute("statehidden", nil)
|
||||||
else
|
unhook_frames(frame)
|
||||||
frame:GetScript("OnEvent")(frame, "PARTY_MEMBERS_CHANGED")
|
frame:GetScript("OnEvent")(frame, groupEvent)
|
||||||
end
|
|
||||||
|
|
||||||
PartyMemberFrame_UpdateMember(frame)
|
|
||||||
end
|
end
|
||||||
|
UIParent:RegisterEvent(groupEvent)
|
||||||
end
|
end
|
||||||
|
|
||||||
UIParent:RegisterEvent("RAID_ROSTER_UPDATE")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--function PlayerHealth.prototype:ShowBlizzParty()
|
--function PlayerHealth.prototype:ShowBlizzParty()
|
||||||
|
Reference in New Issue
Block a user