diff --git a/Auras.lua b/Auras.lua index 50ae862..f300c27 100644 --- a/Auras.lua +++ b/Auras.lua @@ -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 = {} diff --git a/GUI.lua b/GUI.lua index f332271..5c6c3cf 100644 --- a/GUI.lua +++ b/GUI.lua @@ -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) @@ -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) diff --git a/Init.lua b/Init.lua index 7c7da33..f274a48 100644 --- a/Init.lua +++ b/Init.lua @@ -1,5 +1,5 @@ CreateFrame("Frame", "MPOWA", UIParent) -MPOWA.Build = 57 +MPOWA.Build = 58 MPOWA.Cloaded = false MPOWA.loaded = false MPOWA.selected = 1