diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index e9b8541..2138b82 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -89,11 +89,10 @@ function PerfectRaid:Enable()
self.db.global.sv_version = self.rev
self:RegisterEvent("GROUP_ROSTER_UPDATE")
- self:RegisterEvent("PARTY_MEMBERS_CHANGED", "GROUP_ROSTER_UPDATE")
self:RegisterEvent("UNIT_DISPLAYPOWER")
self:RegisterEvent("UNIT_HEALTH")
self:RegisterEvent("UNIT_MAXHEALTH")
- self:RegisterEvent("UNIT_POWER", "UNIT_POWER")
+ self:RegisterEvent("UNIT_POWER_UPDATE")
self:RegisterEvent("UNIT_MAXPOWER", "UNIT_MAXPOWER")
self:RegisterEvent("CHAT_MSG_SYSTEM")
self:RegisterEvent("PLAYER_ALIVE", function() self:UNIT_HEALTH("UNIT_HEALTH", "player") end)
@@ -402,7 +401,7 @@ function PerfectRaid:UNIT_HEALTH(event, unit)
end
end
-function PerfectRaid:UNIT_POWER(event, unit, powerType)
+function PerfectRaid:UNIT_POWER_UPDATE(event, unit, powerType)
if not frames[unit] then return end
local currentType, currentToken = UnitPowerType(unit)
if currentToken == powerType then
@@ -422,7 +421,7 @@ function PerfectRaid:UNIT_MAXPOWER(event, unit, powerType)
local mana = UnitPower(unit, currentType)
for frame in pairs(frames[unit]) do
frame.manabar:SetMinMaxValues(0, max)
- self:UNIT_POWER(nil, unit, powerType)
+ self:UNIT_POWER_UPDATE(nil, unit, powerType)
end
end
end
@@ -519,8 +518,8 @@ function OnAttributeChanged(frame, name, value)
local color = frame.manacolor
frame.manabar:SetStatusBarColor(color.r, color.g, color.b)
- frame.manabar:SetMinMaxValues(0, UnitManaMax(unit))
- frame.manabar:SetValue(UnitMana(unit))
+ frame.manabar:SetMinMaxValues(0, UnitPowerMax(unit))
+ frame.manabar:SetValue(UnitPower(unit))
-- Show/Hide the mana bar depending on unit power type
local manaheight = frame.options.manaheight or 0
@@ -539,7 +538,7 @@ function OnAttributeChanged(frame, name, value)
end
self:UNIT_HEALTH(nil, unit)
- self:UNIT_POWER(nil, unit)
+ self:UNIT_POWER_UPDATE(nil, unit)
self:TriggerMessage("PERFECTRAID_FRAME_LAYOUT_CHANGED");
end
@@ -716,8 +715,8 @@ function PerfectRaid:UNIT_DISPLAYPOWER(event, unit)
if not frames[unit] then return end
local color = PowerBarColor[UnitPowerType(unit)]
local show = UnitPowerType(unit) == 0
- local max = UnitManaMax(unit)
- local mana = UnitMana(unit)
+ local max = UnitPowerMax(unit)
+ local mana = UnitPower(unit)
local manaonly = self.db.profile.showmanaonly
for frame in pairs(frames[unit]) do
@@ -739,7 +738,7 @@ local updateMethods = {
"UNIT_DISPLAYPOWER",
"UNIT_HEALTH",
"UNIT_MAXHEALTH",
- "UNIT_POWER",
+ "UNIT_POWER_UPDATE",
"UNIT_MAXPOWER",
}
diff --git a/PerfectRaid.toc b/PerfectRaid.toc
index 1586c8f..1a23969 100644
--- a/PerfectRaid.toc
+++ b/PerfectRaid.toc
@@ -1,4 +1,4 @@
-## Interface: 70000
+## Interface: 80000
## Title: PerfectRaid
## Version: @project-version@
## Author: Cladhaire
diff --git a/PerfectRaid_Buffs.lua b/PerfectRaid_Buffs.lua
index 8d587c0..0aa7ef6 100644
--- a/PerfectRaid_Buffs.lua
+++ b/PerfectRaid_Buffs.lua
@@ -192,6 +192,8 @@ function Buffs:UNIT_AURA(event, unit)
buffexpiry[name] = expires
end
+ count = count and count or 0
+
buffcache[name] = (buffcache[name] or 0) + 1
buffstacks[name] = (buffstacks[name] or 0) + count
end
@@ -1047,7 +1049,7 @@ end
StaticPopupDialogs["PR_BUFF_SAVE_ERROR"] = {
text = "",
- button1 = TEXT(OKAY),
+ button1 = OKAY and OKAY or "Okay",
OnAccept = function()
end,
timeout = 0,
diff --git a/PerfectRaid_Config.lua b/PerfectRaid_Config.lua
index aea0116..74c07b8 100644
--- a/PerfectRaid_Config.lua
+++ b/PerfectRaid_Config.lua
@@ -202,7 +202,7 @@ function Config:PartyVisibility()
for i=1,4 do
local f = getglobal("PartyMemberFrame"..i)
f:RegisterEvent("PLAYER_ENTERING_WORLD");
- f:RegisterEvent("PARTY_MEMBERS_CHANGED");
+ f:RegisterEvent("GROUP_ROSTER_UPDATE");
f:RegisterEvent("PARTY_LEADER_CHANGED");
f:RegisterEvent("PARTY_MEMBER_ENABLE");
f:RegisterEvent("PARTY_MEMBER_DISABLE");
diff --git a/PerfectRaid_Frames.lua b/PerfectRaid_Frames.lua
index a2b9a03..d2648db 100644
--- a/PerfectRaid_Frames.lua
+++ b/PerfectRaid_Frames.lua
@@ -716,7 +716,7 @@ end
StaticPopupDialogs["PR_FRAME_SAVE_ERROR"] = {
text = "",
- button1 = TEXT(OKAY),
+ button1 = OKAY and OKAY or "Okay",
OnAccept = function()
end,
timeout = 0,