Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fcc3fe6915 | |||
| fc2c7dab7f | |||
| b19325489a | |||
| 56455718be | |||
| 8d904ad02d | |||
| 8f135ba494 | |||
| b43c693353 | |||
| 3076660609 | |||
| f028b5aadc |
Vendored
+7
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"[lua]": {
|
||||||
|
"editor.defaultFormatter": "Koihik.vscode-lua-format"
|
||||||
|
}
|
||||||
|
}
|
||||||
+647
-609
File diff suppressed because it is too large
Load Diff
+1047
-893
File diff suppressed because it is too large
Load Diff
+1272
-1316
File diff suppressed because it is too large
Load Diff
+187
-191
@@ -2,14 +2,10 @@
|
|||||||
|
|
||||||
CALL OF ELEMENTS
|
CALL OF ELEMENTS
|
||||||
The All-In-One Shaman Addon
|
The All-In-One Shaman Addon
|
||||||
|
|
||||||
by Wyverex (2006)
|
by Wyverex (2006)
|
||||||
|
|
||||||
]]
|
]] if (not COE) then COE = {}; end
|
||||||
|
|
||||||
if( not COE ) then
|
|
||||||
COE = {};
|
|
||||||
end
|
|
||||||
|
|
||||||
COE_VERSION = 2.6
|
COE_VERSION = 2.6
|
||||||
|
|
||||||
@@ -32,14 +28,13 @@ COE["EventPrintMode"] = false;
|
|||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
These variables control frame updates
|
These variables control frame updates
|
||||||
UpdateInterval sets the interval in seconds after which a
|
UpdateInterval sets the interval in seconds after which a
|
||||||
frame is updated
|
frame is updated
|
||||||
ForceUpdate can be used as input into Update handlers to force
|
ForceUpdate can be used as input into Update handlers to force
|
||||||
an update regardless of the current timer
|
an update regardless of the current timer
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
COE["UpdateInterval"] = 0.1;
|
COE["UpdateInterval"] = 0.1;
|
||||||
COE["ForceUpdate"] = COE.UpdateInterval * 2;
|
COE["ForceUpdate"] = COE.UpdateInterval * 2;
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
The AdvisorInterval controls how often the party/raid is
|
The AdvisorInterval controls how often the party/raid is
|
||||||
@@ -50,270 +45,271 @@ COE["ForceUpdate"] = COE.UpdateInterval * 2;
|
|||||||
COE["AdvisorInterval"] = 1;
|
COE["AdvisorInterval"] = 1;
|
||||||
COE["AdvisorWarningInterval"] = 7;
|
COE["AdvisorWarningInterval"] = 7;
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:Init
|
METHOD: COE:Init
|
||||||
|
|
||||||
PURPOSE: Loads submodules and initializes data
|
PURPOSE: Loads submodules and initializes data
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:Init()
|
function COE:Init()
|
||||||
COE:Message( "Call of Elements v" .. COE_VERSION );
|
COE:Message("Call of Elements v" .. COE_VERSION);
|
||||||
|
|
||||||
-- load only for shamans
|
|
||||||
-- ----------------------
|
|
||||||
local _, EnglishClass = UnitClass( "player" );
|
|
||||||
if( EnglishClass ~= "SHAMAN" ) then
|
|
||||||
COE:Message( COESTR_NOTASHAMAN );
|
|
||||||
COE.Initialized = false;
|
|
||||||
else
|
|
||||||
COE.Initialized = true;
|
|
||||||
|
|
||||||
this:RegisterEvent( "VARIABLES_LOADED" );
|
-- load only for shamans
|
||||||
this:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF");
|
-- ----------------------
|
||||||
|
local _, EnglishClass = UnitClass("player");
|
||||||
-- register shell command
|
if (EnglishClass ~= "SHAMAN") then
|
||||||
-- -----------------------
|
COE:Message(COESTR_NOTASHAMAN);
|
||||||
SlashCmdList["COE"] = COEProcessShellCommand;
|
COE.Initialized = false;
|
||||||
SLASH_COE1="/coe";
|
else
|
||||||
|
COE.Initialized = true;
|
||||||
end
|
|
||||||
|
this:RegisterEvent("VARIABLES_LOADED");
|
||||||
|
this:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF");
|
||||||
|
|
||||||
|
-- register shell command
|
||||||
|
-- -----------------------
|
||||||
|
SlashCmdList["COE"] = COEProcessShellCommand;
|
||||||
|
SLASH_COE1 = "/coe";
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:FindSpellId
|
METHOD: COE:FindSpellId
|
||||||
|
|
||||||
PURPOSE: Utility function that can provide spell ID from name.
|
PURPOSE: Utility function that can provide spell ID from name.
|
||||||
Run in client chat with '/script COE:FindSpellName("a_spell_name")'.
|
Run in client chat with '/script COE:FindSpellName("a_spell_name")'.
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:FindSpellId(spellNameTarget)
|
function COE:FindSpellId(spellNameTarget)
|
||||||
local spellName;
|
local spellName;
|
||||||
for i = 1, 1000 do
|
for i = 1, 1000 do
|
||||||
spellName = GetSpellName(i, BOOKTYPE_SPELL);
|
spellName = GetSpellName(i, BOOKTYPE_SPELL);
|
||||||
if (spellName == spellNameTarget) then
|
if (spellName == spellNameTarget) then
|
||||||
print(spellName .. "is id: " .. i);
|
print(spellName .. "is id: " .. i);
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:OnEvent
|
METHOD: COE:OnEvent
|
||||||
|
|
||||||
PURPOSE: Handles frame events
|
PURPOSE: Handles frame events
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:OnEvent( event )
|
function COE:OnEvent(event)
|
||||||
|
if (COE.EventPrintMode) then
|
||||||
|
COE:DebugMessage("Event: " .. event);
|
||||||
|
if (arg1) then COE:DebugMessage("arg1: " .. arg1); end
|
||||||
|
end
|
||||||
|
|
||||||
if( event == "VARIABLES_LOADED" ) then
|
if (event == "VARIABLES_LOADED") then
|
||||||
-- fix saved variables if this update has to do so
|
-- fix saved variables if this update has to do so
|
||||||
-- ------------------------------------------------
|
-- ------------------------------------------------
|
||||||
COE:FixSavedVariables();
|
COE:FixSavedVariables();
|
||||||
|
|
||||||
elseif (event == "CHAT_MSG_SPELL_SELF_BUFF") then
|
elseif (event == "CHAT_MSG_SPELL_SELF_BUFF") then
|
||||||
if (string.find(arg1, "Mana from Totemic Recall")) then
|
-- resolve Totemic Recall event
|
||||||
COE:DebugMessage("Totemic Recall initiating reset of timers.");
|
if (string.find(arg1, "Mana from Totemic Recall")) then
|
||||||
COE_Totem:ResetTimers();
|
COE:DebugMessage("Totemic Recall initiating reset of timers.");
|
||||||
end
|
COE_Totem:ResetTimers();
|
||||||
|
|
||||||
elseif (COE.EventPrintMode) then
|
-- Resolve Totem cast event
|
||||||
COE:DebugMessage(event);
|
elseif (string.find(arg1, "Totem")) then
|
||||||
|
local totem = COE_Totem:GetTotemFromText(arg1);
|
||||||
end
|
if (totem) then COE_Totem:ActivateTotem(totem); end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:Message
|
METHOD: COE:Message
|
||||||
|
|
||||||
PURPOSE: Adds a message to the default chat frame
|
PURPOSE: Adds a message to the default chat frame
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:Message( msg )
|
function COE:Message(msg)
|
||||||
DEFAULT_CHAT_FRAME:AddMessage( "[COE] " .. msg, 0.93, 0.83, 0.45 );
|
DEFAULT_CHAT_FRAME:AddMessage("[COE] " .. msg, 0.93, 0.83, 0.45);
|
||||||
end;
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:DebugMessage
|
METHOD: COE:DebugMessage
|
||||||
|
|
||||||
PURPOSE: Adds a debug message to the default chat frame if
|
PURPOSE: Adds a debug message to the default chat frame if
|
||||||
debug mode is enabled
|
debug mode is enabled
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:DebugMessage( msg )
|
function COE:DebugMessage(msg)
|
||||||
if( COE.DebugMode ) then
|
if (COE.DebugMode) then
|
||||||
DEFAULT_CHAT_FRAME:AddMessage( "[COE] " .. msg, 1, 0, 0 );
|
DEFAULT_CHAT_FRAME:AddMessage("[COE] " .. msg, 1, 0, 0);
|
||||||
end
|
end
|
||||||
end;
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:Notification
|
METHOD: COE:Notification
|
||||||
|
|
||||||
PURPOSE: Adds a message to the error frame in the upper
|
PURPOSE: Adds a message to the error frame in the upper
|
||||||
screen center
|
screen center
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:Notification( msg, color )
|
function COE:Notification(msg, color)
|
||||||
|
|
||||||
local col;
|
local col;
|
||||||
|
|
||||||
-- choose color
|
-- choose color
|
||||||
-- -------------
|
-- -------------
|
||||||
if( color == COECOL_TOTEMWARNING ) then
|
if (color == COECOL_TOTEMWARNING) then
|
||||||
col = { r = 0, g = 0.6, b = 1 };
|
col = {r = 0, g = 0.6, b = 1};
|
||||||
elseif( color == COECOL_TOTEMDESTROYED ) then
|
elseif (color == COECOL_TOTEMDESTROYED) then
|
||||||
col = { r = 1, g = 0.4, b = 0 };
|
col = {r = 1, g = 0.4, b = 0};
|
||||||
elseif( color == COECOL_TOTEMCLEANSING ) then
|
elseif (color == COECOL_TOTEMCLEANSING) then
|
||||||
col = { r = 0, g = 1, b = 0.4 };
|
col = {r = 0, g = 1, b = 0.4};
|
||||||
else
|
else
|
||||||
col = { r = 1, g = 1, b = 1 };
|
col = {r = 1, g = 1, b = 1};
|
||||||
end
|
end
|
||||||
|
|
||||||
-- add message
|
-- add message
|
||||||
-- ------------
|
-- ------------
|
||||||
UIErrorsFrame:AddMessage( msg, col.r, col.g, col.b, 1.0, UIERRORS_HOLD_TIME );
|
UIErrorsFrame:AddMessage(msg, col.r, col.g, col.b, 1.0, UIERRORS_HOLD_TIME);
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:ToggleConfigFrame
|
METHOD: COE:ToggleConfigFrame
|
||||||
|
|
||||||
PURPOSE: Toggles the configuration dialog
|
PURPOSE: Toggles the configuration dialog
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:ToggleConfigFrame()
|
function COE:ToggleConfigFrame()
|
||||||
|
|
||||||
if( COE_ConfigFrame:IsVisible() ) then
|
|
||||||
COE_Config:CloseDialog()
|
|
||||||
else
|
|
||||||
COE_ConfigFrame:Show();
|
|
||||||
end
|
|
||||||
|
|
||||||
PlaySound( "igMainMenuOption" );
|
if (COE_ConfigFrame:IsVisible()) then
|
||||||
|
COE_Config:CloseDialog()
|
||||||
|
else
|
||||||
|
COE_ConfigFrame:Show();
|
||||||
|
end
|
||||||
|
|
||||||
|
PlaySound("igMainMenuOption");
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COEProcessShellCommand
|
METHOD: COEProcessShellCommand
|
||||||
|
|
||||||
PURPOSE: Executes the entered shell command
|
PURPOSE: Executes the entered shell command
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COEProcessShellCommand( msg )
|
function COEProcessShellCommand(msg)
|
||||||
|
|
||||||
if( msg == "" or msg == "config" ) then
|
if (msg == "" or msg == "config") then
|
||||||
COE:ToggleConfigFrame();
|
COE:ToggleConfigFrame();
|
||||||
|
|
||||||
elseif( msg == "list" ) then
|
|
||||||
COE:DisplayShellCommands();
|
|
||||||
|
|
||||||
elseif( msg == "nextset" ) then
|
|
||||||
COE_Totem:SwitchToNextSet();
|
|
||||||
|
|
||||||
elseif( msg == "priorset" ) then
|
|
||||||
COE_Totem:SwitchToPriorSet();
|
|
||||||
|
|
||||||
elseif( msg == "throwset" ) then
|
elseif (msg == "list" or msg == "help") then
|
||||||
COE_Totem:ThrowSet();
|
COE:DisplayShellCommands();
|
||||||
|
|
||||||
elseif( msg == "restartset" ) then
|
|
||||||
COE_Totem:ResetSetCycle();
|
|
||||||
|
|
||||||
elseif( msg == "reset" ) then
|
|
||||||
COE_Totem:ResetTimers();
|
|
||||||
|
|
||||||
elseif( msg == "reload" ) then
|
|
||||||
COE_Totem:Rescan();
|
|
||||||
|
|
||||||
elseif( msg == "resetframes" ) then
|
|
||||||
COE_Totem:ResetFrames();
|
|
||||||
|
|
||||||
elseif( msg == "advised" ) then
|
elseif (msg == "debug") then
|
||||||
COE_Totem:ThrowAdvisedTotem();
|
COE["DebugMode"] = not COE.DebugMode;
|
||||||
|
COE:Message(tostring(COE.DebugMode));
|
||||||
elseif( msg == "resetordering" ) then
|
elseif (msg == "nextset") then
|
||||||
COE_DisplayedTotems = {};
|
COE_Totem:SwitchToNextSet();
|
||||||
COE_Totem:Rescan();
|
|
||||||
|
|
||||||
elseif( msg == "bestheal" ) then
|
|
||||||
COE_Heal:BestHeal();
|
|
||||||
|
|
||||||
elseif( msg == "battleheal" ) then
|
|
||||||
COE_Heal:BattleHeal();
|
|
||||||
|
|
||||||
else
|
elseif (msg == "priorset") then
|
||||||
local _,_,arg = string.find( msg, "set (.*)" );
|
COE_Totem:SwitchToPriorSet();
|
||||||
if( arg ) then
|
|
||||||
COE_Totem:SwitchToSet( arg );
|
elseif (msg == "throwset") then
|
||||||
end
|
COE_Totem:ThrowSet();
|
||||||
end
|
|
||||||
|
elseif (msg == "restartset") then
|
||||||
|
COE_Totem:ResetSetCycle();
|
||||||
|
|
||||||
|
elseif (msg == "reset") then
|
||||||
|
COE_Totem:ResetTimers();
|
||||||
|
|
||||||
|
elseif (msg == "reload") then
|
||||||
|
COE_Totem:Rescan();
|
||||||
|
|
||||||
|
elseif (msg == "resetframes") then
|
||||||
|
COE_Totem:ResetFrames();
|
||||||
|
|
||||||
|
elseif (msg == "advised") then
|
||||||
|
COE_Totem:ThrowAdvisedTotem();
|
||||||
|
|
||||||
|
elseif (msg == "resetordering") then
|
||||||
|
COE_DisplayedTotems = {};
|
||||||
|
COE_Totem:Rescan();
|
||||||
|
|
||||||
|
elseif (msg == "bestheal") then
|
||||||
|
COE_Heal:BestHeal();
|
||||||
|
|
||||||
|
elseif (msg == "battleheal") then
|
||||||
|
COE_Heal:BattleHeal();
|
||||||
|
|
||||||
|
else
|
||||||
|
local _, _, arg = string.find(msg, "set (.*)");
|
||||||
|
if (arg) then COE_Totem:SwitchToSet(arg); end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:DisplayShellCommands
|
METHOD: COE:DisplayShellCommands
|
||||||
|
|
||||||
PURPOSE: Shows a list of all shell commands
|
PURPOSE: Shows a list of all shell commands
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:DisplayShellCommands()
|
function COE:DisplayShellCommands()
|
||||||
|
|
||||||
COE:Message( COESHELL_INTRO );
|
COE:Message(COESHELL_INTRO);
|
||||||
COE:Message( COESHELL_CONFIG );
|
COE:Message(COESHELL_CONFIG);
|
||||||
COE:Message( COESHELL_LIST );
|
COE:Message(COESHELL_LIST);
|
||||||
COE:Message( COESHELL_NEXTSET );
|
COE:Message(COESHELL_NEXTSET);
|
||||||
COE:Message( COESHELL_PRIORSET );
|
COE:Message(COESHELL_PRIORSET);
|
||||||
COE:Message( COESHELL_SET );
|
COE:Message(COESHELL_SET);
|
||||||
COE:Message( COESHELL_RESTARTSET );
|
COE:Message(COESHELL_RESTARTSET);
|
||||||
COE:Message( COESHELL_RESET );
|
COE:Message(COESHELL_RESET);
|
||||||
COE:Message( COESHELL_RESETFRAMES );
|
COE:Message(COESHELL_RESETFRAMES);
|
||||||
COE:Message( COESHELL_RESETORDERING );
|
COE:Message(COESHELL_RESETORDERING);
|
||||||
COE:Message( COESHELL_RELOAD );
|
COE:Message(COESHELL_RELOAD);
|
||||||
COE:Message( COESHELL_MACRONOTE );
|
COE:Message(COESHELL_MACRONOTE);
|
||||||
COE:Message( COESHELL_THROWSET );
|
COE:Message(COESHELL_THROWSET);
|
||||||
COE:Message( COESHELL_ADVISED );
|
COE:Message(COESHELL_ADVISED);
|
||||||
|
COE:Message(COESHELL_DEBUG);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:FixSavedVariables
|
METHOD: COE:FixSavedVariables
|
||||||
|
|
||||||
PURPOSE: If this addon version is higher than the one in
|
PURPOSE: If this addon version is higher than the one in
|
||||||
the saved variables, check if we have to fix the
|
the saved variables, check if we have to fix the
|
||||||
saved variables due to fixed bugs
|
saved variables due to fixed bugs
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:FixSavedVariables()
|
function COE:FixSavedVariables()
|
||||||
|
|
||||||
-- is the version stored in the saved variables?
|
-- is the version stored in the saved variables?
|
||||||
-- ----------------------------------------------
|
-- ----------------------------------------------
|
||||||
if( not COE_Config:GetSaved( COEOPT_VERSION ) ) then
|
if (not COE_Config:GetSaved(COEOPT_VERSION)) then
|
||||||
-- this is version <= v1.6
|
-- this is version <= v1.6
|
||||||
-- ------------------------
|
-- ------------------------
|
||||||
COE_Config:SetOption( COEOPT_VERSION, 1.6 );
|
COE_Config:SetOption(COEOPT_VERSION, 1.6);
|
||||||
end
|
end
|
||||||
|
|
||||||
local version = COE_Config:GetSaved( COEOPT_VERSION );
|
|
||||||
|
|
||||||
if( version == 1.6 ) then
|
|
||||||
-- fix localized cast order in 1.7
|
|
||||||
-- --------------------------------
|
|
||||||
COE:Fix_CastOrderLocalization();
|
|
||||||
|
|
||||||
COE:Message( COESTR_UDATEDSAVED .. "1.7" );
|
|
||||||
COE_Config:SetOption( COEOPT_VERSION, 1.7 );
|
|
||||||
version = COE_Config:GetSaved( COEOPT_VERSION );
|
|
||||||
end
|
|
||||||
|
|
||||||
if( version == 1.7 ) then
|
local version = COE_Config:GetSaved(COEOPT_VERSION);
|
||||||
-- fix cast order again to due to a typo
|
|
||||||
-- --------------------------------------
|
|
||||||
COE:Fix_CastOrderLocalization();
|
|
||||||
|
|
||||||
COE:Message( COESTR_UDATEDSAVED .. "1.8" );
|
|
||||||
COE_Config:SetOption( COEOPT_VERSION, 1.8 );
|
|
||||||
version = COE_Config:GetSaved( COEOPT_VERSION );
|
|
||||||
end
|
|
||||||
|
|
||||||
-- fix totem set element strings
|
|
||||||
-- ------------------------------
|
|
||||||
COE:Fix_CastOrderLocalization2();
|
|
||||||
|
|
||||||
COE_Config:SetOption( COEOPT_VERSION, 2.1 );
|
if (version == 1.6) then
|
||||||
|
-- fix localized cast order in 1.7
|
||||||
|
-- --------------------------------
|
||||||
|
COE:Fix_CastOrderLocalization();
|
||||||
|
|
||||||
|
COE:Message(COESTR_UDATEDSAVED .. "1.7");
|
||||||
|
COE_Config:SetOption(COEOPT_VERSION, 1.7);
|
||||||
|
version = COE_Config:GetSaved(COEOPT_VERSION);
|
||||||
|
end
|
||||||
|
|
||||||
|
if (version == 1.7) then
|
||||||
|
-- fix cast order again to due to a typo
|
||||||
|
-- --------------------------------------
|
||||||
|
COE:Fix_CastOrderLocalization();
|
||||||
|
|
||||||
|
COE:Message(COESTR_UDATEDSAVED .. "1.8");
|
||||||
|
COE_Config:SetOption(COEOPT_VERSION, 1.8);
|
||||||
|
version = COE_Config:GetSaved(COEOPT_VERSION);
|
||||||
|
end
|
||||||
|
|
||||||
|
-- fix totem set element strings
|
||||||
|
-- ------------------------------
|
||||||
|
COE:Fix_CastOrderLocalization2();
|
||||||
|
|
||||||
|
COE_Config:SetOption(COEOPT_VERSION, 2.1);
|
||||||
end
|
end
|
||||||
|
|||||||
+89
-93
@@ -1,18 +1,14 @@
|
|||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
|
|
||||||
E N G L I S H
|
E N G L I S H
|
||||||
|
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]] -- Errors
|
||||||
|
|
||||||
-- Errors
|
|
||||||
-- -------
|
-- -------
|
||||||
COESTR_NOTASHAMAN = "You are not a shaman. Unloading Call Of Elements";
|
COESTR_NOTASHAMAN = "You are not a shaman. Unloading Call Of Elements";
|
||||||
COESTR_NOTOTEM = "No totem available yet";
|
COESTR_NOTOTEM = "No totem available yet";
|
||||||
COESTR_UI_NOTASSIGNED = "<No text assigned>";
|
COESTR_UI_NOTASSIGNED = "<No text assigned>";
|
||||||
COESTR_INVALIDELEMENT = "Invalid element found in totem: ";
|
COESTR_INVALIDELEMENT = "Invalid element found in totem: ";
|
||||||
|
|
||||||
|
|
||||||
-- Notifications
|
-- Notifications
|
||||||
-- --------------
|
-- --------------
|
||||||
COESTR_TOTEMWARNING = "%s expires in %d seconds";
|
COESTR_TOTEMWARNING = "%s expires in %d seconds";
|
||||||
@@ -31,7 +27,6 @@ COESTR_HEALING = "Healing %s with %s (Rank %d)";
|
|||||||
COESTR_HEALLOWERRANK = "Not enough mana. Using rank %d instead";
|
COESTR_HEALLOWERRANK = "Not enough mana. Using rank %d instead";
|
||||||
COESTR_HEALOOM = "Out of mana!";
|
COESTR_HEALOOM = "Out of mana!";
|
||||||
|
|
||||||
|
|
||||||
-- String patterns
|
-- String patterns
|
||||||
-- ----------------
|
-- ----------------
|
||||||
COESTR_SCANTOTEMS = "Totem";
|
COESTR_SCANTOTEMS = "Totem";
|
||||||
@@ -42,22 +37,20 @@ COESTR_MINUTEDURATION = "(%d%.%d%d) min";
|
|||||||
COESTR_MINUTEDURATION_INT = "(%d) min";
|
COESTR_MINUTEDURATION_INT = "(%d) min";
|
||||||
COESTR_SECDURATION = "(%d%d?) sec";
|
COESTR_SECDURATION = "(%d%d?) sec";
|
||||||
COESTR_CASTBYNAME = "%(Rank (%d)%)";
|
COESTR_CASTBYNAME = "%(Rank (%d)%)";
|
||||||
COESTR_TOTEMDAMAGE = { ".+ [crh]+its (.+ Totem) ?%u* for (%d+).*" };
|
COESTR_TOTEMDAMAGE = {".+ [crh]+its (.+ Totem) ?%u* for (%d+).*"};
|
||||||
COESTR_TOTEMHEALTH = { "(%d*) health" };
|
COESTR_TOTEMHEALTH = {"(%d*) health"};
|
||||||
COESTR_SHOCKSPELL = "(%a* Shock)";
|
COESTR_SHOCKSPELL = "(%a* Shock)";
|
||||||
COESTR_HEALINGWAVE = "Healing Wave";
|
COESTR_HEALINGWAVE = "Healing Wave";
|
||||||
COESTR_LESSERWAVE = "Lesser Healing Wave";
|
COESTR_LESSERWAVE = "Lesser Healing Wave";
|
||||||
COESTR_MINAMOUNT = "(%d*) to";
|
COESTR_MINAMOUNT = "(%d*) to";
|
||||||
COESTR_MAXAMOUNT = "to (%d*)";
|
COESTR_MAXAMOUNT = "to (%d*)";
|
||||||
COESTR_TRINKET = "^.*%[Enamored Water Spirit%].*$";
|
COESTR_TRINKET = "^.*%[Enamored Water Spirit%].*$";
|
||||||
|
|
||||||
|
|
||||||
-- Spell Names and IDs
|
-- Spell Names and IDs
|
||||||
-- ----------------
|
-- ----------------
|
||||||
COESTR_TOTEMICRECALL = "Totemic Recall";
|
COESTR_TOTEMICRECALL = "Totemic Recall";
|
||||||
COESTR_TOTEMICRECALLID = 35;
|
COESTR_TOTEMICRECALLID = 35;
|
||||||
|
|
||||||
|
|
||||||
-- Totem Advisor
|
-- Totem Advisor
|
||||||
-- --------------
|
-- --------------
|
||||||
COESTR_POISON = "Poison";
|
COESTR_POISON = "Poison";
|
||||||
@@ -68,12 +61,12 @@ COESTR_TOTEMTREMOR = "Tremor Totem";
|
|||||||
COESTR_CLEANSINGTOTEM = "Throw %s now!";
|
COESTR_CLEANSINGTOTEM = "Throw %s now!";
|
||||||
|
|
||||||
COESTR_TREMOR = {
|
COESTR_TREMOR = {
|
||||||
"Sleep", "Terrify", "Psychic Scream", "Mind Control", "Bellowing Roar", "Fear",
|
"Sleep", "Terrify", "Psychic Scream", "Mind Control", "Bellowing Roar",
|
||||||
"Intimidating Shout", "Panic", "Terrifying Screech", "Seduction",
|
"Fear", "Intimidating Shout", "Panic", "Terrifying Screech", "Seduction",
|
||||||
"Howl of Terror", "Intimidating Growl", "Crystalline Slumber", "Druid's Slumber"
|
"Howl of Terror", "Intimidating Growl", "Crystalline Slumber",
|
||||||
|
"Druid's Slumber"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Tools
|
-- Tools
|
||||||
-- ---------
|
-- ---------
|
||||||
COESTR_TOTEMTOOLS_EARTH = "Earth";
|
COESTR_TOTEMTOOLS_EARTH = "Earth";
|
||||||
@@ -81,7 +74,6 @@ COESTR_TOTEMTOOLS_FIRE = "Fire";
|
|||||||
COESTR_TOTEMTOOLS_WATER = "Water";
|
COESTR_TOTEMTOOLS_WATER = "Water";
|
||||||
COESTR_TOTEMTOOLS_AIR = "Air";
|
COESTR_TOTEMTOOLS_AIR = "Air";
|
||||||
|
|
||||||
|
|
||||||
-- Elements
|
-- Elements
|
||||||
-- ---------
|
-- ---------
|
||||||
COESTR_ELEMENT_EARTH = "Earth";
|
COESTR_ELEMENT_EARTH = "Earth";
|
||||||
@@ -89,96 +81,93 @@ COESTR_ELEMENT_FIRE = "Fire";
|
|||||||
COESTR_ELEMENT_WATER = "Water";
|
COESTR_ELEMENT_WATER = "Water";
|
||||||
COESTR_ELEMENT_AIR = "Air";
|
COESTR_ELEMENT_AIR = "Air";
|
||||||
|
|
||||||
|
|
||||||
-- UI elements
|
-- UI elements
|
||||||
-- ------------
|
-- ------------
|
||||||
COEUI_STRINGS = {
|
COEUI_STRINGS = {
|
||||||
COE_ConfigClose = "Close";
|
COE_ConfigClose = "Close",
|
||||||
COE_ConfigTotemTabPanel = "Totem Options";
|
COE_ConfigTotemTabPanel = "Totem Options",
|
||||||
COE_ConfigHealingTabPanel = "Healing Options";
|
COE_ConfigHealingTabPanel = "Healing Options",
|
||||||
COE_ConfigDebuffTabPanel = "Debuff Options";
|
COE_ConfigDebuffTabPanel = "Debuff Options",
|
||||||
COE_ConfigTotemTotemBar = "Totem Bars";
|
COE_ConfigTotemTotemBar = "Totem Bars",
|
||||||
COE_ConfigTotemTotemOptions = "Options";
|
COE_ConfigTotemTotemOptions = "Options",
|
||||||
COE_ConfigTotemTotemSets = "Totem Sets";
|
COE_ConfigTotemTotemSets = "Totem Sets",
|
||||||
COE_OptionEnableTotemBar = "Enable Totem Bar";
|
COE_OptionEnableTotemBar = "Enable Totem Bar",
|
||||||
COE_OptionHideBackdrop = "Hide background when inactive";
|
COE_OptionHideBackdrop = "Hide background when inactive",
|
||||||
COE_OptionEnableTimers = "Enable totem timers";
|
COE_OptionEnableTimers = "Enable totem timers",
|
||||||
COE_OptionEnableTimerNotifications = "Enable notifications";
|
COE_OptionEnableTimerNotifications = "Enable notifications",
|
||||||
COE_OptionTTAlignment = "Tooltip Alignment";
|
COE_OptionTTAlignment = "Tooltip Alignment",
|
||||||
COE_OptionDisplayMode = "Anchor Button";
|
COE_OptionDisplayMode = "Anchor Button",
|
||||||
COE_OptionDisplayAlignment = "Button Alignment";
|
COE_OptionDisplayAlignment = "Button Alignment",
|
||||||
COE_OptionAdvisor = "Enable totem advisor";
|
COE_OptionAdvisor = "Enable totem advisor",
|
||||||
COE_OptionEnableSets = "Enable totem sets";
|
COE_OptionEnableSets = "Enable totem sets",
|
||||||
COE_OptionEnableAutoSwitch = "Autoswitch sets in PVP";
|
COE_OptionEnableAutoSwitch = "Autoswitch sets in PVP",
|
||||||
COE_OptionActiveSet = "Active totem set";
|
COE_OptionActiveSet = "Active totem set",
|
||||||
COE_OptionNewSet = "New set";
|
COE_OptionNewSet = "New set",
|
||||||
COE_OptionDeleteSet = "Delete set";
|
COE_OptionDeleteSet = "Delete set",
|
||||||
COE_OptionConfigureSet = "Configure set";
|
COE_OptionConfigureSet = "Configure set",
|
||||||
COE_OptionStopConfigureSet = "OK";
|
COE_OptionStopConfigureSet = "OK",
|
||||||
COE_OptionCastOrderString = "Cast Order";
|
COE_OptionCastOrderString = "Cast Order",
|
||||||
COE_OptionConfigureBar = "Configure Totems";
|
COE_OptionConfigureBar = "Configure Totems",
|
||||||
COE_OptionFixBar = "Fix totem bar positions";
|
COE_OptionFixBar = "Fix totem bar positions",
|
||||||
COE_OptionConfigureOrder = "Configure Order";
|
COE_OptionConfigureOrder = "Configure Order",
|
||||||
COE_OptionScanTotems = "Reload Totems";
|
COE_OptionScanTotems = "Reload Totems",
|
||||||
COE_OptionCurrentFrame = "Configure Bar";
|
COE_OptionCurrentFrame = "Configure Bar",
|
||||||
COE_OptionDirection = "Direction";
|
COE_OptionDirection = "Direction",
|
||||||
COE_OptionFrameMode = "Bar mode";
|
COE_OptionFrameMode = "Bar mode",
|
||||||
COE_OptionFlexCount = "Static buttons";
|
COE_OptionFlexCount = "Static buttons",
|
||||||
COE_OptionScaling = "Scaling";
|
COE_OptionScaling = "Scaling",
|
||||||
COE_OptionEnableTimerFrame = "Show separate timer frame";
|
COE_OptionEnableTimerFrame = "Show separate timer frame",
|
||||||
COE_OptionGroupBars = "Move bars as group";
|
COE_OptionGroupBars = "Move bars as group",
|
||||||
COE_OptionOverrideRank = "Rank 1 modifier";
|
COE_OptionOverrideRank = "Rank 1 modifier",
|
||||||
COE_OptionFrameTimersOnly = "Show timers ONLY in timer frame";
|
COE_OptionFrameTimersOnly = "Show timers ONLY in timer frame"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Tooltips
|
-- Tooltips
|
||||||
-- ---------
|
-- ---------
|
||||||
COEUI_TOOLTIPS = {
|
COEUI_TOOLTIPS = {
|
||||||
COE_ConfigTotemTab = "Shows the totem options";
|
COE_ConfigTotemTab = "Shows the totem options",
|
||||||
COE_ConfigHealingTab = "Shows the healing options";
|
COE_ConfigHealingTab = "Shows the healing options",
|
||||||
COE_ConfigDebuffTab = "Shows the debuff options";
|
COE_ConfigDebuffTab = "Shows the debuff options",
|
||||||
COE_OptionEnableTotemBar = "Enables and shows the totem bar\nwhich holds all of your available\ntotems for quick use";
|
COE_OptionEnableTotemBar = "Enables and shows the totem bar\nwhich holds all of your available\ntotems for quick use",
|
||||||
COE_OptionHideBackdrop = "Hides the background when the mouse\nis not above the totem bar";
|
COE_OptionHideBackdrop = "Hides the background when the mouse\nis not above the totem bar",
|
||||||
COE_OptionEnableTimers = "Enables the display of\nthe remaining totem time\nshown inside the totem button";
|
COE_OptionEnableTimers = "Enables the display of\nthe remaining totem time\nshown inside the totem button",
|
||||||
COE_OptionEnableTimerNotifications = "Displays warnings when a totem\nexpires or is destroyed";
|
COE_OptionEnableTimerNotifications = "Displays warnings when a totem\nexpires or is destroyed",
|
||||||
COE_OptionAdvisor = "Displays notifications when you\nor a member of your party/raid\nhas a debuff that can be cured\nby one of your totems";
|
COE_OptionAdvisor = "Displays notifications when you\nor a member of your party/raid\nhas a debuff that can be cured\nby one of your totems",
|
||||||
COE_OptionEnableAutoSwitch = "Automatically switches to the\nclass totem set when targetting an\nenemy player";
|
COE_OptionEnableAutoSwitch = "Automatically switches to the\nclass totem set when targetting an\nenemy player",
|
||||||
COE_OptionFixBar = "Fixes the totem bar position\nto prevent dragging it accidentally";
|
COE_OptionFixBar = "Fixes the totem bar position\nto prevent dragging it accidentally",
|
||||||
COE_OptionGroupBars = "When you drag one bar,\nthe other bars will follow";
|
COE_OptionGroupBars = "When you drag one bar,\nthe other bars will follow"
|
||||||
}
|
}
|
||||||
|
|
||||||
COESTR_TRINKET_TOOLTIP = "Enamored Water Spirit";
|
COESTR_TRINKET_TOOLTIP = "Enamored Water Spirit";
|
||||||
COESTR_TRINKET_TOTEM = "Ancient Mana Spring Totem";
|
COESTR_TRINKET_TOTEM = "Ancient Mana Spring Totem";
|
||||||
|
|
||||||
-- Combo boxes
|
-- Combo boxes
|
||||||
-- ------------
|
-- ------------
|
||||||
COEUI_TTALIGN = {
|
COEUI_TTALIGN = {
|
||||||
{ "ANCHOR_TOPLEFT"; "Top Left" };
|
{"ANCHOR_TOPLEFT", "Top Left"}, {"ANCHOR_LEFT", "Left"},
|
||||||
{ "ANCHOR_LEFT"; "Left" };
|
{"ANCHOR_BOTTOMLEFT", "Bottom Left"}, {"ANCHOR_TOPRIGHT", "Top Right"},
|
||||||
{ "ANCHOR_BOTTOMLEFT"; "Bottom Left" };
|
{"ANCHOR_RIGHT", "Right"}, {"ANCHOR_BOTTOMRIGHT", "Bottom Right"},
|
||||||
{ "ANCHOR_TOPRIGHT"; "Top Right" };
|
{"DISABLED", "Disabled"}
|
||||||
{ "ANCHOR_RIGHT"; "Right" };
|
|
||||||
{ "ANCHOR_BOTTOMRIGHT"; "Bottom Right" };
|
|
||||||
{ "DISABLED"; "Disabled" };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
COEUI_DISPLAYMODE = { "Customize", "Timers Only", "Active Set" }
|
COEUI_DISPLAYMODE = {"Customize", "Timers Only", "Active Set"}
|
||||||
|
|
||||||
COEUI_DISPLAYALIGN = { "Box", "Vertical", "Horizontal" }
|
|
||||||
|
|
||||||
COEUI_PVPSETS = { "[PVP] Druid", "[PVP] Hunter", "[PVP] Mage", "[PVP] Paladin", "[PVP] Priest",
|
COEUI_DISPLAYALIGN = {"Box", "Vertical", "Horizontal"}
|
||||||
"[PVP] Rogue", "[PVP] Shaman", "[PVP] Warlock", "[PVP] Warrior" }
|
|
||||||
|
COEUI_PVPSETS = {
|
||||||
|
"[PVP] Druid", "[PVP] Hunter", "[PVP] Mage", "[PVP] Paladin",
|
||||||
|
"[PVP] Priest", "[PVP] Rogue", "[PVP] Shaman", "[PVP] Warlock",
|
||||||
|
"[PVP] Warrior"
|
||||||
|
}
|
||||||
COEUI_DEFAULTSET = "Default";
|
COEUI_DEFAULTSET = "Default";
|
||||||
|
|
||||||
COEUI_OVERRIDERANK = { "No key", "Use SHIFT", "Use ALT", "Use CTRL" };
|
COEUI_OVERRIDERANK = {"No key", "Use SHIFT", "Use ALT", "Use CTRL"};
|
||||||
|
|
||||||
COEUI_CURRENTFRAME = { "Earth", "Fire", "Water", "Air" };
|
COEUI_CURRENTFRAME = {"Earth", "Fire", "Water", "Air"};
|
||||||
|
|
||||||
COEUI_DIRECTION = { "Up", "Down", "Left", "Right" };
|
COEUI_DIRECTION = {"Up", "Down", "Left", "Right"};
|
||||||
|
|
||||||
COEUI_FRAMEMODE = { "Closed", "Open", "Flex", "Hidden" };
|
|
||||||
|
|
||||||
|
COEUI_FRAMEMODE = {"Closed", "Open", "Flex", "Hidden"};
|
||||||
|
|
||||||
-- Key bindings
|
-- Key bindings
|
||||||
-- -------------
|
-- -------------
|
||||||
@@ -214,7 +203,6 @@ BINDING_NAME_TOTEMAIR5 = "Air Totem #5";
|
|||||||
BINDING_NAME_TOTEMAIR6 = "Air Totem #6";
|
BINDING_NAME_TOTEMAIR6 = "Air Totem #6";
|
||||||
BINDING_NAME_TOTEMAIR7 = "Air Totem #7";
|
BINDING_NAME_TOTEMAIR7 = "Air Totem #7";
|
||||||
|
|
||||||
|
|
||||||
-- Key modifiers
|
-- Key modifiers
|
||||||
-- --------------
|
-- --------------
|
||||||
COEMODIFIER_ALT = "ALT";
|
COEMODIFIER_ALT = "ALT";
|
||||||
@@ -226,20 +214,28 @@ COEMODIFIER_SHIFT_SHORT = "S";
|
|||||||
COEMODIFIER_NUMPAD = "Num Pad";
|
COEMODIFIER_NUMPAD = "Num Pad";
|
||||||
COEMODIFIER_NUMPAD_SHORT = "NP";
|
COEMODIFIER_NUMPAD_SHORT = "NP";
|
||||||
|
|
||||||
|
|
||||||
-- Shell commands
|
-- Shell commands
|
||||||
-- ---------------
|
-- ---------------
|
||||||
COESHELL_INTRO = "Available shell commands for Call Of Elements:";
|
COESHELL_INTRO = "Available shell commands for Call Of Elements:";
|
||||||
COESHELL_CONFIG = "'/coe' or '/coe config' - Shows the configuration dialog";
|
COESHELL_CONFIG = "'/coe' or '/coe config' - Shows the configuration dialog";
|
||||||
COESHELL_LIST = "'/coe list' - Shows this list";
|
COESHELL_LIST = "'/coe list' or '/coe help' - Shows this list";
|
||||||
COESHELL_NEXTSET = "'/coe nexset' - Switches to the next custom totem set or the default set";
|
COESHELL_NEXTSET =
|
||||||
COESHELL_PRIORSET = "'/coe priorset' - Switches to the prior custom totem set or the default set";
|
"'/coe nexset' - Switches to the next custom totem set or the default set";
|
||||||
COESHELL_SET = "'/coe set <name>' - Switches to set with the specified name. <name> is case-sensitive";
|
COESHELL_PRIORSET =
|
||||||
COESHELL_RESTARTSET = "'/coe restartset' - Next time you throw the active set, it recasts all totems";
|
"'/coe priorset' - Switches to the prior custom totem set or the default set";
|
||||||
|
COESHELL_SET =
|
||||||
|
"'/coe set <name>' - Switches to set with the specified name. <name> is case-sensitive";
|
||||||
|
COESHELL_RESTARTSET =
|
||||||
|
"'/coe restartset' - Next time you throw the active set, it recasts all totems";
|
||||||
COESHELL_RESET = "'/coe reset' - Resets all timers and the active set";
|
COESHELL_RESET = "'/coe reset' - Resets all timers and the active set";
|
||||||
COESHELL_RESETFRAMES = "'/coe resetframes' - Returns all element bars to the screen center";
|
COESHELL_RESETFRAMES =
|
||||||
COESHELL_RESETORDERING = "'/coe resetordering' - Resets the ordering of your totem bars";
|
"'/coe resetframes' - Returns all element bars to the screen center";
|
||||||
|
COESHELL_RESETORDERING =
|
||||||
|
"'/coe resetordering' - Resets the ordering of your totem bars";
|
||||||
COESHELL_RELOAD = "'/coe reload' - Reloads all totems and sets";
|
COESHELL_RELOAD = "'/coe reload' - Reloads all totems and sets";
|
||||||
COESHELL_MACRONOTE = "The following commands only work as macros dragged to your action bars:";
|
COESHELL_MACRONOTE =
|
||||||
|
"The following commands only work as macros dragged to your action bars:";
|
||||||
COESHELL_THROWSET = "'/coe throwset' - Throws the active totem set";
|
COESHELL_THROWSET = "'/coe throwset' - Throws the active totem set";
|
||||||
COESHELL_ADVISED = "'/coe advised' - Throws the next advised totem";
|
COESHELL_ADVISED = "'/coe advised' - Throws the next advised totem";
|
||||||
|
COESHELL_DEBUG =
|
||||||
|
"'/coe debug' - Toggles debug message printing (disable by default)";
|
||||||
|
|||||||
@@ -3,5 +3,8 @@ Shaman totem addon for turtle wow. Based on https://github.com/laytya/CallOfElem
|
|||||||
|
|
||||||
To use the addon:
|
To use the addon:
|
||||||
* download repo or release
|
* download repo or release
|
||||||
* extract files to folder in turtle wow Interface/Addons folder path
|
* extract folder named "turtle-wow-call-of-elements-xxxx" from zip to turtle wow Interface/Addons folder path
|
||||||
* rename folder to "CallOfElements"
|
* rename folder to "CallOfElements", make sure files are in CallOfElements folder
|
||||||
|
|
||||||
|
Dependencies:
|
||||||
|
* COE requires the addon Chronos. It can be found in this repository of addons https://github.com/refaim/Vanilla-WoW-1.12-Addon-Development-Libraries-Archive. Download the repository and copy the "Chronos" file into the addons folder located at turtle_wow_folder\Interface\AddOns\.
|
||||||
|
|||||||
Reference in New Issue
Block a user