Skip to content

Commit

Permalink
Freeze issue and lua error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tdymel committed Jul 25, 2017
1 parent 25b0303 commit d27c561
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
7 changes: 7 additions & 0 deletions Auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,21 @@ function MPOWA:GetCooldown(buff)
end

function MPOWA:GetSpellSlot(buff)
if not buff then
return 0
end
local i = 1
while true do
local name, rank = GetSpellName(i, "spell")
if (not name) or strfind(strlower(name), strlower(buff)) then
return i
end
if i > 1000 then
return 0 -- Lets give up at this point
end
i = i + 1
end
return 0
end

local BuffExist = {}
Expand Down
18 changes: 9 additions & 9 deletions GUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1065,15 +1065,15 @@ function MPOWA:OptionsFrame_SetColor()
frame.g = g
frame.b = b

self.SAVE[MPOWA.CurEdit][name.."_r"] = r
self.SAVE[MPOWA.CurEdit][name.."_g"] = g
self.SAVE[MPOWA.CurEdit][name.."_b"] = b
MPOWA.SAVE[MPOWA.CurEdit][name.."_r"] = r
MPOWA.SAVE[MPOWA.CurEdit][name.."_g"] = g
MPOWA.SAVE[MPOWA.CurEdit][name.."_b"] = b

if name == "fontcolor" then
if self.SAVE[MPOWA.CurEdit].usefontcolor then
_G("TextureFrame"..MPOWA.CurEdit.."_Timer"):SetTextColor(r,g,b,self.SAVE[MPOWA.CurEdit].fontalpha)
if MPOWA.SAVE[MPOWA.CurEdit].usefontcolor then
_G("TextureFrame"..MPOWA.CurEdit.."_Timer"):SetTextColor(r,g,b,MPOWA.SAVE[MPOWA.CurEdit].fontalpha)
else
_G("TextureFrame"..MPOWA.CurEdit.."_Timer"):SetTextColor(1,1,1,self.SAVE[MPOWA.CurEdit].fontalpha)
_G("TextureFrame"..MPOWA.CurEdit.."_Timer"):SetTextColor(1,1,1,MPOWA.SAVE[MPOWA.CurEdit].fontalpha)
end
elseif name == "icon" then
MPowa_ConfigFrame_Container_1_Icon_Texture:SetVertexColor(r,g,b)
Expand All @@ -1094,10 +1094,10 @@ function MPOWA:OptionsFrame_CancelColor()
frame.b = b

if name == "fontcolor" then
if self.SAVE[MPOWA.CurEdit].usefontcolor then
_G("TextureFrame"..MPOWA.CurEdit.."_Timer"):SetTextColor(r,g,b,self.SAVE[MPOWA.CurEdit].fontalpha)
if MPOWA.SAVE[MPOWA.CurEdit].usefontcolor then
_G("TextureFrame"..MPOWA.CurEdit.."_Timer"):SetTextColor(r,g,b,MPOWA.SAVE[MPOWA.CurEdit].fontalpha)
else
_G("TextureFrame"..MPOWA.CurEdit.."_Timer"):SetTextColor(1,1,1,self.SAVE[MPOWA.CurEdit].fontalpha)
_G("TextureFrame"..MPOWA.CurEdit.."_Timer"):SetTextColor(1,1,1,MPOWA.SAVE[MPOWA.CurEdit].fontalpha)
end
elseif name == "icon" then
MPowa_ConfigFrame_Container_1_Icon_Texture:SetVertexColor(r,g,b)
Expand Down
2 changes: 1 addition & 1 deletion Init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CreateFrame("Frame", "MPOWA", UIParent)
MPOWA.Build = 57
MPOWA.Build = 58
MPOWA.Cloaded = false
MPOWA.loaded = false
MPOWA.selected = 1
Expand Down

0 comments on commit d27c561

Please sign in to comment.