From 781f8668e6bee527c8555ca71318bd7f55b6ad70 Mon Sep 17 00:00:00 2001 From: Aethys256 Date: Mon, 20 Feb 2017 21:40:35 +0100 Subject: [PATCH] [Core] Fixed CmdHandler --- AethysRotation/Core.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/AethysRotation/Core.lua b/AethysRotation/Core.lua index e41d96a3d..2fe3ca069 100644 --- a/AethysRotation/Core.lua +++ b/AethysRotation/Core.lua @@ -74,18 +74,19 @@ function AR.Cast (Object, OffGCD) return false; end +local Argument; function AR.CmdHandler (Message) - _T.Argument = stringlower(Message); - if _T.Argument == "cds" then + Argument = stringlower(Message); + if Argument == "cds" then AethysRotationDB.Toggles[1] = not AethysRotationDB.Toggles[1]; AR.Print("CDs are now "..(AethysRotationDB.Toggles[1] and "|cff00ff00enabled|r." or "|cffff0000disabled|r.")); - elseif _T.Argument == "aoe" then + elseif Argument == "aoe" then AethysRotationDB.Toggles[2] = not AethysRotationDB.Toggles[2]; AR.Print("AoE is now "..(AethysRotationDB.Toggles[2] and "|cff00ff00enabled|r." or "|cffff0000disabled|r.")); - elseif _T.Argument == "toggle" then + elseif Argument == "toggle" then AethysRotationDB.Toggles[3] = not AethysRotationDB.Toggles[3]; AR.Print("AethysRotation is now "..(AethysRotationDB.Toggles[3] and "|cff00ff00enabled|r." or "|cffff0000disabled|r.")); - elseif _T.Argument == "help" then + elseif Argument == "help" then AR.Print("CDs : /eraid cds | AoE : /eraid cds | Toggle : /eraid toggle"); end end