mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-15 22:30:13 -05:00
- Round 1 of WoW 5.0 fixes.
This commit is contained in:
@ -307,7 +307,7 @@ end
|
||||
-- blizzard interface options
|
||||
local blizOptionsPanel = CreateFrame("FRAME", "IceHUDConfigPanel", UIParent)
|
||||
blizOptionsPanel.name = "IceHUD"
|
||||
blizOptionsPanel.button = CreateFrame("BUTTON", "IceHUDOpenConfigButton", blizOptionsPanel, "UIPanelButtonTemplate2")
|
||||
blizOptionsPanel.button = CreateFrame("BUTTON", "IceHUDOpenConfigButton", blizOptionsPanel, IceHUD.WowVer >= 50000 and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
|
||||
blizOptionsPanel.button:SetText("Open IceHUD configuration")
|
||||
blizOptionsPanel.button:SetWidth(240)
|
||||
blizOptionsPanel.button:SetHeight(30)
|
||||
|
@ -74,7 +74,11 @@ function PlayerHealth.prototype:Enable(core)
|
||||
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckCombat")
|
||||
|
||||
self:RegisterEvent("PARTY_LEADER_CHANGED", "CheckLeader")
|
||||
self:RegisterEvent("PARTY_MEMBERS_CHANGED", "CheckLeader")
|
||||
if IceHUD.WowVer >= 50000 then
|
||||
self:RegisterEvent("GROUP_ROSTER_UPDATE", "CheckLeader")
|
||||
else
|
||||
self:RegisterEvent("PARTY_MEMBERS_CHANGED", "CheckLeader")
|
||||
end
|
||||
self:RegisterEvent("LFG_PROPOSAL_UPDATE", "CheckPartyRole")
|
||||
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
|
||||
self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole")
|
||||
@ -1091,7 +1095,13 @@ function PlayerHealth.prototype:CheckPartyRole()
|
||||
end
|
||||
|
||||
function PlayerHealth.prototype:CheckLeader()
|
||||
if configMode or IsPartyLeader() then
|
||||
local isLeader
|
||||
if IceHUD.WowVer >= 50000 then
|
||||
isLeader = UnitIsGroupLeader("player")
|
||||
else
|
||||
isLeader = IsPartyLeader()
|
||||
end
|
||||
if configMode or isLeader then
|
||||
if (configMode or self.moduleSettings.showLeaderIcon) and not self.frame.leaderIcon then
|
||||
self.frame.leaderIcon = self:CreateTexCoord(self.frame.leaderIcon, "Interface\\GroupFrame\\UI-Group-LeaderIcon", 20, 20,
|
||||
self.moduleSettings.leaderIconScale, 0, 1, 0, 1)
|
||||
@ -1338,7 +1348,11 @@ function PlayerHealth.prototype:ShowBlizzardParty()
|
||||
if frame then
|
||||
frame.Show = nil
|
||||
frame:GetScript("OnLoad")(frame)
|
||||
frame:GetScript("OnEvent")(frame, "PARTY_MEMBERS_CHANGED")
|
||||
if IceHUD.WowVer >= 50000 then
|
||||
frame:GetScript("OnEvent")(frame, "GROUP_ROSTER_UPDATE")
|
||||
else
|
||||
frame:GetScript("OnEvent")(frame, "PARTY_MEMBERS_CHANGED")
|
||||
end
|
||||
|
||||
PartyMemberFrame_UpdateMember(frame)
|
||||
end
|
||||
|
@ -333,7 +333,10 @@ function SliceAndDice.prototype:GetMaxBuffTime(numComboPoints)
|
||||
maxduration = maxduration + glyphBonusSec
|
||||
end
|
||||
|
||||
_, _, _, _, rank = GetTalentInfo(impSndTalentPage, impSndTalentIdx)
|
||||
local rank = 0
|
||||
if IceHUD.WowVer < 50000 then
|
||||
_, _, _, _, rank = GetTalentInfo(impSndTalentPage, impSndTalentIdx)
|
||||
end
|
||||
|
||||
maxduration = maxduration * (1 + (rank * impSndBonusPerRank))
|
||||
|
||||
|
@ -1552,7 +1552,11 @@ function IceTargetInfo.prototype:TargetName(event, unit)
|
||||
end
|
||||
|
||||
|
||||
self.leader = UnitIsPartyLeader(self.unit) and " |cffcccc11Leader|r" or ""
|
||||
if IceHUD.WowVer < 50000 then
|
||||
self.leader = UnitIsPartyLeader(self.unit) and " |cffcccc11Leader|r" or ""
|
||||
else
|
||||
self.leader = UnitIsGroupLeader(self.unit) and " |cffcccc11Leader|r" or ""
|
||||
end
|
||||
self:Update(unit)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user