Skip to content

Commit 25b0303

Browse files
committed
Recent issues
1 parent fa63d96 commit 25b0303

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

Auras.lua

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -253,18 +253,19 @@ function MPOWA:Iterate(unit)
253253

254254
for cat, val in pairs(self.SAVE) do
255255
if (val["buffname"] == "unitpower") then
256-
local tarid = 44
257-
if unit then
258-
if (unit == "target") then
259-
tarid = 45
260-
elseif (string.find(unit,"raid")) then
261-
--local a,b = string.find(unit,"raid")
262-
tarid = tonumber(string.sub(unit, 5))+45
263-
elseif (string.find(unit,"party")) then
264-
--local a,b = string.find(unit,"party")
265-
tarid = tonumber(string.sub(unit, 6))+45
256+
local unit = arg1
257+
if (unit == "target") then
258+
self:Push("unitpower", unit, 45, false)
259+
elseif (string.find(unit,"raid")) then
260+
local st = string.sub(unit, 5)
261+
if st and tonumber(st) then
262+
self:Push("unitpower", unit, (tonumber(st) or 0)+45, false)
263+
end
264+
elseif (string.find(unit,"party")) then
265+
local st = string.sub(unit, 6)
266+
if st and tonumber(st) then
267+
self:Push("unitpower", unit, (tonumber(st) or 0)+45, false)
266268
end
267-
self:Push("unitpower", unit, tarid, false)
268269
end
269270
end
270271
end
@@ -317,9 +318,9 @@ function MPOWA:Push(aura, unit, i, isdebuff, castbyme)
317318
end
318319
tex = strlower(strsub(tex, strfind(tex, "Icons")+6))
319320
end
321+
BuffExist[val] = true
320322
if (not path["castbyme"] or (path["castbyme"] and castbyme)) and path["isdebuff"]==isdebuff and ((path["secondspecifier"] and (strlower(path["secondspecifiertext"])==tex)) or not path["secondspecifier"]) then
321323
if self:TernaryReturn(val, "alive", self:Reverse(UnitIsDeadOrGhost("player"))) and self:TernaryReturn(val, "mounted", self.mounted) and self:TernaryReturn(val, "incombat", UnitAffectingCombat("player")) and self:TernaryReturn(val, "inparty", self.party) and self:TernaryReturn(val, "inraid", UnitInRaid("player")) and self:TernaryReturn(val, "inbattleground", self.bg) and self:TernaryReturn(val, "inraidinstance", self.instance) and not path["cooldown"] and self:IsStacks(GetComboPoints("player", "target"), val, "cpstacks") then
322-
BuffExist[val] = true
323324
if path["enemytarget"] and unit == "target" then
324325
self.active[val] = {unit, i, isdebuff}
325326
elseif path["friendlytarget"] and unit == "target" then

GUI.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ function MPOWA:ScrollFrame_Update()
13141314
local line -- 1 through 5 of our window to scroll
13151315
local lineplusoffset -- an index into our data calculated from the scroll offset
13161316
local FRAME = MPowa_ProfileFrame_ScrollFrame
1317-
FauxScrollFrame_Update(FRAME,self:GetTableLength(MPOWA_PROFILE),7,40)
1317+
FauxScrollFrame_Update(FRAME,MPOWA:GetTableLength(MPOWA_PROFILE),7,40)
13181318
for line=1,7 do
13191319
lineplusoffset = line + FauxScrollFrame_GetOffset(FRAME)
13201320
if MPOWA_PROFILE[lineplusoffset] ~= nil then

Init.lua

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CreateFrame("Frame", "MPOWA", UIParent)
2-
MPOWA.Build = 56
2+
MPOWA.Build = 57
33
MPOWA.Cloaded = false
44
MPOWA.loaded = false
55
MPOWA.selected = 1
@@ -143,19 +143,21 @@ function MPOWA:OnEvent(event, arg1)
143143
self:Iterate("player")
144144
end
145145
elseif event == "UNIT_MANA" or event == "UNIT_RAGE" or event == "UNIT_ENERGY" then
146-
local tarid = 44
147146
if arg1 then
148147
local unit = arg1
149148
if (unit == "target") then
150-
tarid = 45
149+
self:Push("unitpower", unit, 45, false)
151150
elseif (string.find(unit,"raid")) then
152-
--local a,b = string.find(unit,"raid")
153-
tarid = tonumber(string.sub(unit, 5))+45
151+
local st = string.sub(unit, 5)
152+
if st and tonumber(st) then
153+
self:Push("unitpower", unit, (tonumber(st) or 0)+45, false)
154+
end
154155
elseif (string.find(unit,"party")) then
155-
--local a,b = string.find(unit,"party")
156-
tarid = tonumber(string.sub(unit, 6))+45
156+
local st = string.sub(unit, 6)
157+
if st and tonumber(st) then
158+
self:Push("unitpower", unit, (tonumber(st) or 0)+45, false)
159+
end
157160
end
158-
self:Push("unitpower", unit, tarid, false)
159161
end
160162
elseif event == "PLAYER_LOGOUT" then
161163
MPOWA_SAVE = table.copy(self.SAVE, true)

0 commit comments

Comments
 (0)