diff --git a/IceHUD.lua b/IceHUD.lua index b436557..2d9c71e 100644 --- a/IceHUD.lua +++ b/IceHUD.lua @@ -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) diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua index e58f81c..80e25fa 100644 --- a/modules/PlayerHealth.lua +++ b/modules/PlayerHealth.lua @@ -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 diff --git a/modules/SliceAndDice.lua b/modules/SliceAndDice.lua index db51262..4ab9420 100644 --- a/modules/SliceAndDice.lua +++ b/modules/SliceAndDice.lua @@ -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)) diff --git a/modules/TargetInfo.lua b/modules/TargetInfo.lua index c7e66d8..fd07389 100644 --- a/modules/TargetInfo.lua +++ b/modules/TargetInfo.lua @@ -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