Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fc2c7dab7f | |||
| 56455718be | |||
| 8d904ad02d | |||
| 8f135ba494 | |||
| b43c693353 | |||
| 3076660609 | |||
| f028b5aadc | |||
| f68fb493a4 | |||
| 82128bc35f | |||
| e109bf4bfd | |||
| b347b60491 | |||
| a277d08198 |
Vendored
+7
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"[lua]": {
|
||||||
|
"editor.defaultFormatter": "Koihik.vscode-lua-format"
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+30
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
|
// for the documentation about the tasks.json format
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "echo",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "echo Hello"
|
||||||
|
},{
|
||||||
|
"label": "cwd",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "${cwd}\\"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "localdeploy",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "Copy-Item",
|
||||||
|
"args": [
|
||||||
|
"-Force",
|
||||||
|
"-Recurse",
|
||||||
|
"-Verbose",
|
||||||
|
"-Path",
|
||||||
|
"${cwd}\\*",
|
||||||
|
"-Destination",
|
||||||
|
"D:\\Games\\Turtle WoW 1.12\\Interface\\AddOns\\CallOfElements"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+120
-82
@@ -8,25 +8,21 @@
|
|||||||
|
|
||||||
Totem Module Data
|
Totem Module Data
|
||||||
|
|
||||||
]]
|
]] --[[ ----------------------------------------------------------------
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
|
||||||
COE.TotemData contains a list of totem classes that are
|
COE.TotemData contains a list of totem classes that are
|
||||||
returned by COE:CreateTotem
|
returned by COE:CreateTotem
|
||||||
For every available totem the player has, one object is
|
For every available totem the player has, one object is
|
||||||
added to this list
|
added to this list
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]] COE["TotemData"] =
|
||||||
COE["TotemData"] = {};
|
{};
|
||||||
COE["TotemCount"] = 0;
|
COE["TotemCount"] = 0;
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
COE.MaxTotems stores the maximum number of totems per element
|
COE.MaxTotems stores the maximum number of totems per element
|
||||||
This is taken right from the current game content
|
This is taken right from the current game content
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
COE["MaxTotems"] = {Earth = 5, Fire = 5, Water = 7, Air = 7};
|
COE["MaxTotems"] = {Earth = 5, Fire = 5, Water = 7, Air = 7};
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
COE.TotemsAvailable contains the number of totems available
|
COE.TotemsAvailable contains the number of totems available
|
||||||
of each element
|
of each element
|
||||||
@@ -37,7 +33,6 @@ COE.TotemsAvailable["Fire"] = 0;
|
|||||||
COE.TotemsAvailable["Water"] = 0;
|
COE.TotemsAvailable["Water"] = 0;
|
||||||
COE.TotemsAvailable["Air"] = 0;
|
COE.TotemsAvailable["Air"] = 0;
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
COE.ActiveTotems contains a pointer to the active totem of
|
COE.ActiveTotems contains a pointer to the active totem of
|
||||||
each element
|
each element
|
||||||
@@ -52,7 +47,12 @@ COE.TotemsAvailable["Air"] = 0;
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
COE["ActiveTotems"] = {Earth = nil, Fire = nil, Water = nil, Air = nil};
|
COE["ActiveTotems"] = {Earth = nil, Fire = nil, Water = nil, Air = nil};
|
||||||
COE["TotemPending"] = {Totem = nil, UseRank = 0, Timeout = 0.75};
|
COE["TotemPending"] = {Totem = nil, UseRank = 0, Timeout = 0.75};
|
||||||
|
COE["PendingTotems"] = {
|
||||||
|
Earth = {Totem = nil, Rank = 0, TimeoutStartMS = 0},
|
||||||
|
Fire = {Totem = nil, Rank = 0, TimeoutStartMS = 0},
|
||||||
|
Water = {Totem = nil, Rank = 0, TimeoutStartMS = 0},
|
||||||
|
Air = {Totem = nil, Rank = 0, TimeoutStartMS = 0}
|
||||||
|
};
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
COE.CleansingTotems stores pointers to the buttons and totems
|
COE.CleansingTotems stores pointers to the buttons and totems
|
||||||
@@ -62,8 +62,8 @@ COE["TotemPending"] = { Totem = nil, UseRank = 0, Timeout = 0.75 };
|
|||||||
COE["CleansingTotems"] = {
|
COE["CleansingTotems"] = {
|
||||||
Poison = {Totem = nil, Button = nil, Warn = false},
|
Poison = {Totem = nil, Button = nil, Warn = false},
|
||||||
Disease = {Totem = nil, Button = nil, Warn = false},
|
Disease = {Totem = nil, Button = nil, Warn = false},
|
||||||
Tremor = { Totem = nil, Button = nil, Warn = false } };
|
Tremor = {Totem = nil, Button = nil, Warn = false}
|
||||||
|
};
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
COE.TotemSets contains the totem pointers for each set and
|
COE.TotemSets contains the totem pointers for each set and
|
||||||
@@ -72,21 +72,27 @@ Tremor = { Totem = nil, Button = nil, Warn = false } };
|
|||||||
COE["TotemSetCount"] = 0;
|
COE["TotemSetCount"] = 0;
|
||||||
COE["TotemSets"] = {}
|
COE["TotemSets"] = {}
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
COE.SetCycle stores which totem of the active set have
|
COE.SetCycle stores which totem of the active set have
|
||||||
already been thrown
|
already been thrown
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
COE["SetCycle"] = {Earth = false, Fire = false, Water = false, Air = false};
|
COE["SetCycle"] = {Earth = false, Fire = false, Water = false, Air = false};
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
COE.NoTotem is a placeholder for an empty anchor button
|
COE.NoTotem is a placeholder for an empty anchor button
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
COE["NoTotem"] = { SpellName = "", Element = "", Texture = "Interface\\Icons\\INV_Misc_Idol_03.blp",
|
COE["NoTotem"] = {
|
||||||
ToolPresent = false, Ranks = { SpellID = 0, Mana = 0, Duration = 0, Health = 0, Cooldown = 0 },
|
SpellName = "",
|
||||||
MaxRank = 1, isActive = false, CurDuration = 0, CurHealth = 0, CurCooldown = 0 };
|
Element = "",
|
||||||
|
Texture = "Interface\\Icons\\INV_Misc_Idol_03.blp",
|
||||||
|
ToolPresent = false,
|
||||||
|
Ranks = {SpellID = 0, Mana = 0, Duration = 0, Health = 0, Cooldown = 0},
|
||||||
|
MaxRank = 1,
|
||||||
|
isActive = false,
|
||||||
|
CurDuration = 0,
|
||||||
|
CurHealth = 0,
|
||||||
|
CurCooldown = 0
|
||||||
|
};
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:CreateTotem
|
METHOD: COE:CreateTotem
|
||||||
@@ -94,13 +100,22 @@ COE["NoTotem"] = { SpellName = "", Element = "", Texture = "Interface\\Icons\\IN
|
|||||||
PURPOSE: Returns the totem class for a new totem
|
PURPOSE: Returns the totem class for a new totem
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:CreateTotem()
|
function COE:CreateTotem()
|
||||||
return { SpellName = "", Element = "", Texture = "",
|
return {
|
||||||
ToolPresent = false, Ranks = {}, MaxRank = 0, isActive = false,
|
SpellName = "",
|
||||||
CurDuration = 0, CurHealth = 0, CurCooldown = 0,
|
Element = "",
|
||||||
isTrinket = false, TrinketSlot = nil };
|
Texture = "",
|
||||||
|
ToolPresent = false,
|
||||||
|
Ranks = {},
|
||||||
|
MaxRank = 0,
|
||||||
|
isActive = false,
|
||||||
|
CurDuration = 0,
|
||||||
|
CurHealth = 0,
|
||||||
|
CurCooldown = 0,
|
||||||
|
isTrinket = false,
|
||||||
|
TrinketSlot = nil
|
||||||
|
};
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:CreateTotemRank
|
METHOD: COE:CreateTotemRank
|
||||||
|
|
||||||
@@ -110,7 +125,6 @@ function COE:CreateTotemRank()
|
|||||||
return {SpellID = 0, Mana = 0, Duration = 0, Health = 0, Cooldown = 0};
|
return {SpellID = 0, Mana = 0, Duration = 0, Health = 0, Cooldown = 0};
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:ElementFromTool
|
METHOD: COE:ElementFromTool
|
||||||
|
|
||||||
@@ -132,7 +146,6 @@ function COE:ElementFromTool( element )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:LocalizedElement
|
METHOD: COE:LocalizedElement
|
||||||
|
|
||||||
@@ -152,7 +165,6 @@ function COE:LocalizedElement( element )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:ScanTotems
|
METHOD: COE:ScanTotems
|
||||||
|
|
||||||
@@ -174,17 +186,16 @@ function COE:ScanTotems()
|
|||||||
|
|
||||||
-- iterate over all spells in the spellbook
|
-- iterate over all spells in the spellbook
|
||||||
-- -----------------------------------------
|
-- -----------------------------------------
|
||||||
local i, k = 1;
|
local i = 1;
|
||||||
while true do
|
while true do
|
||||||
|
|
||||||
local SpellName, SpellRank = GetSpellName(i, BOOKTYPE_SPELL);
|
local SpellName, SpellRank = GetSpellName(i, BOOKTYPE_SPELL);
|
||||||
if not SpellName or SpellName == "Totemic Recall" then
|
if not SpellName then do break end end
|
||||||
do break end;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- is this a totem?
|
-- is this a totem?
|
||||||
-- -----------------
|
-- -----------------
|
||||||
if( string.find( SpellName, COESTR_SCANTOTEMS ) ~= nil ) then
|
if (SpellName ~= "Totemic Recall" and SpellName ~= "Totemic Slam" and
|
||||||
|
string.find(SpellName, COESTR_SCANTOTEMS) ~= nil) then
|
||||||
|
|
||||||
local newtotem = true;
|
local newtotem = true;
|
||||||
local totem = nil;
|
local totem = nil;
|
||||||
@@ -207,7 +218,7 @@ function COE:ScanTotems()
|
|||||||
-- --------------------------
|
-- --------------------------
|
||||||
totem = COE.TotemData[k];
|
totem = COE.TotemData[k];
|
||||||
newtotem = false;
|
newtotem = false;
|
||||||
break;
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -228,7 +239,8 @@ function COE:ScanTotems()
|
|||||||
local text = COETotemTTTextLeft4;
|
local text = COETotemTTTextLeft4;
|
||||||
if (text and text:GetText()) then
|
if (text and text:GetText()) then
|
||||||
|
|
||||||
local _,_, element = string.find( text:GetText(), COESTR_TOTEMTOOLS );
|
local _, _, element =
|
||||||
|
string.find(text:GetText(), COESTR_TOTEMTOOLS);
|
||||||
if (element) then
|
if (element) then
|
||||||
|
|
||||||
-- if element starts with a |, the player does
|
-- if element starts with a |, the player does
|
||||||
@@ -250,7 +262,8 @@ function COE:ScanTotems()
|
|||||||
-- ---------------
|
-- ---------------
|
||||||
if (COE.TotemsAvailable[element] ~= nil) then
|
if (COE.TotemsAvailable[element] ~= nil) then
|
||||||
totem.Element = element;
|
totem.Element = element;
|
||||||
COE.TotemsAvailable[element] = COE.TotemsAvailable[element] + 1;
|
COE.TotemsAvailable[element] =
|
||||||
|
COE.TotemsAvailable[element] + 1;
|
||||||
else
|
else
|
||||||
COE:Message(COESTR_INVALIDELEMENT .. SpellName);
|
COE:Message(COESTR_INVALIDELEMENT .. SpellName);
|
||||||
end
|
end
|
||||||
@@ -281,21 +294,18 @@ function COE:ScanTotems()
|
|||||||
if (text and text:GetText()) then
|
if (text and text:GetText()) then
|
||||||
|
|
||||||
local _, _, mana = string.find(text:GetText(), COESTR_TOTEMMANA);
|
local _, _, mana = string.find(text:GetText(), COESTR_TOTEMMANA);
|
||||||
if( mana ) then
|
if (mana) then totemrank.Mana = tonumber(mana); end
|
||||||
totemrank.Mana = tonumber( mana );
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- get totem duration and health
|
-- get totem duration and health
|
||||||
-- ------------------------------
|
-- ------------------------------
|
||||||
totemrank.Duration, totemrank.Health, totemrank.Cooldown = COE:GetTotemDurationAndHealth( i );
|
totemrank.Duration, totemrank.Health, totemrank.Cooldown =
|
||||||
|
COE:GetTotemDurationAndHealth(i);
|
||||||
|
|
||||||
-- store rank in totem
|
-- store rank in totem
|
||||||
-- --------------------
|
-- --------------------
|
||||||
totem.Ranks[rank] = totemrank;
|
totem.Ranks[rank] = totemrank;
|
||||||
if( rank > totem.MaxRank ) then
|
if (rank > totem.MaxRank) then totem.MaxRank = rank; end
|
||||||
totem.MaxRank = rank;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- is this a new totem?
|
-- is this a new totem?
|
||||||
-- ---------------------
|
-- ---------------------
|
||||||
@@ -305,7 +315,6 @@ function COE:ScanTotems()
|
|||||||
COE.TotemCount = COE.TotemCount + 1;
|
COE.TotemCount = COE.TotemCount + 1;
|
||||||
COE.TotemData[COE.TotemCount] = totem;
|
COE.TotemData[COE.TotemCount] = totem;
|
||||||
|
|
||||||
|
|
||||||
-- check if it's a cleansing totem
|
-- check if it's a cleansing totem
|
||||||
-- --------------------------------
|
-- --------------------------------
|
||||||
if (SpellName == COESTR_TOTEMPOISON) then
|
if (SpellName == COESTR_TOTEMPOISON) then
|
||||||
@@ -327,7 +336,11 @@ function COE:ScanTotems()
|
|||||||
-- perhaps a new totem. set it to default visible
|
-- perhaps a new totem. set it to default visible
|
||||||
-- and reorder it when the element count is known
|
-- and reorder it when the element count is known
|
||||||
-- -----------------------------------------------
|
-- -----------------------------------------------
|
||||||
COE_DisplayedTotems[SpellName] = { Order = 0, Element = totem.Element, Visible = true };
|
COE_DisplayedTotems[SpellName] = {
|
||||||
|
Order = 0,
|
||||||
|
Element = totem.Element,
|
||||||
|
Visible = true
|
||||||
|
};
|
||||||
else
|
else
|
||||||
-- update old saved variables versions by adding the element
|
-- update old saved variables versions by adding the element
|
||||||
-- ----------------------------------------------------------
|
-- ----------------------------------------------------------
|
||||||
@@ -377,9 +390,10 @@ function COE:ScanTotems()
|
|||||||
-- Finish
|
-- Finish
|
||||||
-- ===================================
|
-- ===================================
|
||||||
|
|
||||||
COE:DebugMessage( "Found " .. COE.TotemCount .. " totems in spellbook" ..
|
COE:DebugMessage(
|
||||||
"(" .. COE.TotemsAvailable.Earth .. " Earth, " ..
|
"Found " .. COE.TotemCount .. " totems in spellbook" .. "(" ..
|
||||||
COE.TotemsAvailable.Fire .. " Fire, " .. COE.TotemsAvailable.Water .. " Water, " ..
|
COE.TotemsAvailable.Earth .. " Earth, " .. COE.TotemsAvailable.Fire ..
|
||||||
|
" Fire, " .. COE.TotemsAvailable.Water .. " Water, " ..
|
||||||
COE.TotemsAvailable.Air .. " Air)");
|
COE.TotemsAvailable.Air .. " Air)");
|
||||||
|
|
||||||
-- reorder new totems
|
-- reorder new totems
|
||||||
@@ -388,7 +402,6 @@ function COE:ScanTotems()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:GetTotemDurationAndHealth
|
METHOD: COE:GetTotemDurationAndHealth
|
||||||
|
|
||||||
@@ -441,7 +454,8 @@ function COE:GetTotemDurationAndHealth( spellid )
|
|||||||
-- look if there are two second specifications
|
-- look if there are two second specifications
|
||||||
-- if so, take the greate one
|
-- if so, take the greate one
|
||||||
-- --------------------------------------------
|
-- --------------------------------------------
|
||||||
local _,_,sectext2 = string.find( string.sub( text, b ), COESTR_SECDURATION );
|
local _, _, sectext2 = string.find(string.sub(text, b),
|
||||||
|
COESTR_SECDURATION);
|
||||||
|
|
||||||
if (sectext2) then
|
if (sectext2) then
|
||||||
duration = math.max(tonumber(sectext1), tonumber(sectext2));
|
duration = math.max(tonumber(sectext1), tonumber(sectext2));
|
||||||
@@ -461,7 +475,7 @@ function COE:GetTotemDurationAndHealth( spellid )
|
|||||||
if (table.getn(match) >= 1) then
|
if (table.getn(match) >= 1) then
|
||||||
|
|
||||||
health = tonumber(match[1]);
|
health = tonumber(match[1]);
|
||||||
break;
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -491,7 +505,6 @@ function COE:GetTotemDurationAndHealth( spellid )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:IsToolPresent
|
METHOD: COE:IsToolPresent
|
||||||
|
|
||||||
@@ -518,16 +531,13 @@ function COE:IsToolPresent( spellid )
|
|||||||
-- if element doesn't start with a |, the player
|
-- if element doesn't start with a |, the player
|
||||||
-- possesses the needed totem for this spell
|
-- possesses the needed totem for this spell
|
||||||
-- ------------------------------------------------
|
-- ------------------------------------------------
|
||||||
if( string.sub( element, 1, 1 ) ~= "|" ) then
|
if (string.sub(element, 1, 1) ~= "|") then return true; end
|
||||||
return true;
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:IsTrinketPresent
|
METHOD: COE:IsTrinketPresent
|
||||||
|
|
||||||
@@ -556,7 +566,6 @@ function COE:IsTrinketPresent()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:ReorderNewTotems
|
METHOD: COE:ReorderNewTotems
|
||||||
|
|
||||||
@@ -565,32 +574,50 @@ end
|
|||||||
totems in this element
|
totems in this element
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:ReorderNewTotems()
|
function COE:ReorderNewTotems()
|
||||||
|
COE:DebugMessage("Executing ReorderNewTotems");
|
||||||
|
|
||||||
local nextslot = { Earth = COE.TotemsAvailable.Earth, Fire = COE.TotemsAvailable.Fire,
|
local nextslot = {
|
||||||
Water = COE.TotemsAvailable.Water, Air = COE.TotemsAvailable.Air };
|
Earth = COE.TotemsAvailable.Earth,
|
||||||
|
Fire = COE.TotemsAvailable.Fire,
|
||||||
|
Water = COE.TotemsAvailable.Water,
|
||||||
|
Air = COE.TotemsAvailable.Air
|
||||||
|
};
|
||||||
|
|
||||||
local used = {Earth = {}, Fire = {}, Water = {}, Air = {}};
|
local used = {Earth = {}, Fire = {}, Water = {}, Air = {}};
|
||||||
local bError = false;
|
local bError = false;
|
||||||
|
|
||||||
local k;
|
COE:DebugMessage("ReorderNewTotems COE.TotemCount: " .. COE.TotemCount);
|
||||||
|
|
||||||
for k = 1, COE.TotemCount do
|
for k = 1, COE.TotemCount do
|
||||||
|
|
||||||
local totem = COE.TotemData[k];
|
local totem = COE.TotemData[k];
|
||||||
|
COE:DebugMessage(
|
||||||
|
"ReorderNewTotems processing totem: " .. totem.Element .. " " ..
|
||||||
|
totem.SpellName);
|
||||||
|
|
||||||
if (COE_DisplayedTotems[totem.SpellName] ~= nil) then
|
if (COE_DisplayedTotems[totem.SpellName] ~= nil) then
|
||||||
if (COE_DisplayedTotems[totem.SpellName].Order == 0) then
|
if (COE_DisplayedTotems[totem.SpellName].Order == 0) then
|
||||||
|
|
||||||
-- this totem has just been added
|
-- this totem has just been added
|
||||||
-- assign the currently free slot
|
-- assign the currently free slot
|
||||||
-- -------------------------------
|
-- -------------------------------
|
||||||
COE_DisplayedTotems[totem.SpellName].Order = nextslot[totem.Element];
|
if (not nextslot[totem.Element]) then
|
||||||
|
COE:DebugMessage(
|
||||||
|
"ReorderNewTotems nextslot[totem.Element] is nil");
|
||||||
|
end
|
||||||
|
|
||||||
|
COE_DisplayedTotems[totem.SpellName].Order =
|
||||||
|
nextslot[totem.Element];
|
||||||
nextslot[totem.Element] = nextslot[totem.Element] - 1;
|
nextslot[totem.Element] = nextslot[totem.Element] - 1;
|
||||||
end
|
end
|
||||||
|
|
||||||
-- register that this slot of the element is now in use
|
-- register that this slot of the element is now in use
|
||||||
-- mark as error if already in use
|
-- mark as error if already in use
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
if( used[totem.Element][COE_DisplayedTotems[totem.SpellName].Order] == nil ) then
|
if (used[totem.Element][COE_DisplayedTotems[totem.SpellName].Order] ==
|
||||||
used[totem.Element][COE_DisplayedTotems[totem.SpellName].Order] = true;
|
nil) then
|
||||||
|
used[totem.Element][COE_DisplayedTotems[totem.SpellName].Order] =
|
||||||
|
true;
|
||||||
else
|
else
|
||||||
bError = true;
|
bError = true;
|
||||||
end
|
end
|
||||||
@@ -617,7 +644,6 @@ function COE:ReorderNewTotems()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:InitTotemSets
|
METHOD: COE:InitTotemSets
|
||||||
|
|
||||||
@@ -632,15 +658,18 @@ function COE:InitTotemSets()
|
|||||||
|
|
||||||
-- for each standard set
|
-- for each standard set
|
||||||
-- ----------------------
|
-- ----------------------
|
||||||
local set;
|
|
||||||
for set = 1, table.getn(COE_SavedTotemSets) do
|
for set = 1, table.getn(COE_SavedTotemSets) do
|
||||||
|
|
||||||
COE.TotemSets[set] = { Earth = nil, Fire = nil, Water = nil, Air = nil,
|
COE.TotemSets[set] = {
|
||||||
CastOrder = COE_SavedTotemSets[set].CastOrder };
|
Earth = nil,
|
||||||
|
Fire = nil,
|
||||||
|
Water = nil,
|
||||||
|
Air = nil,
|
||||||
|
CastOrder = COE_SavedTotemSets[set].CastOrder
|
||||||
|
};
|
||||||
|
|
||||||
-- for each element
|
-- for each element
|
||||||
-- -----------------
|
-- -----------------
|
||||||
local k, totem;
|
|
||||||
for k = 1, 4 do
|
for k = 1, 4 do
|
||||||
|
|
||||||
if (COE_SavedTotemSets[set][indices[k]] ~= "") then
|
if (COE_SavedTotemSets[set][indices[k]] ~= "") then
|
||||||
@@ -649,7 +678,8 @@ function COE:InitTotemSets()
|
|||||||
-- ------------------------
|
-- ------------------------
|
||||||
for totem in COE.TotemData do
|
for totem in COE.TotemData do
|
||||||
|
|
||||||
if( COE.TotemData[totem].SpellName == COE_SavedTotemSets[set][indices[k]] ) then
|
if (COE.TotemData[totem].SpellName ==
|
||||||
|
COE_SavedTotemSets[set][indices[k]]) then
|
||||||
COE.TotemSets[set][indices[k]] = COE.TotemData[totem];
|
COE.TotemSets[set][indices[k]] = COE.TotemData[totem];
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -661,8 +691,13 @@ function COE:InitTotemSets()
|
|||||||
-- --------------------
|
-- --------------------
|
||||||
for set = 1, table.getn(COE_CustomTotemSets) do
|
for set = 1, table.getn(COE_CustomTotemSets) do
|
||||||
|
|
||||||
COE.TotemSets[COESET_DEFAULT + set] = { Earth = nil, Fire = nil, Water = nil, Air = nil,
|
COE.TotemSets[COESET_DEFAULT + set] = {
|
||||||
CastOrder = COE_CustomTotemSets[set].CastOrder };
|
Earth = nil,
|
||||||
|
Fire = nil,
|
||||||
|
Water = nil,
|
||||||
|
Air = nil,
|
||||||
|
CastOrder = COE_CustomTotemSets[set].CastOrder
|
||||||
|
};
|
||||||
|
|
||||||
-- for each element
|
-- for each element
|
||||||
-- -----------------
|
-- -----------------
|
||||||
@@ -675,8 +710,10 @@ function COE:InitTotemSets()
|
|||||||
-- ------------------------
|
-- ------------------------
|
||||||
for totem in COE.TotemData do
|
for totem in COE.TotemData do
|
||||||
|
|
||||||
if( COE.TotemData[totem].SpellName == COE_CustomTotemSets[set][indices[k]] ) then
|
if (COE.TotemData[totem].SpellName ==
|
||||||
COE.TotemSets[COESET_DEFAULT + set][indices[k]] = COE.TotemData[totem];
|
COE_CustomTotemSets[set][indices[k]]) then
|
||||||
|
COE.TotemSets[COESET_DEFAULT + set][indices[k]] =
|
||||||
|
COE.TotemData[totem];
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -687,7 +724,6 @@ function COE:InitTotemSets()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ =============================================================================================
|
--[[ =============================================================================================
|
||||||
|
|
||||||
F I X E S
|
F I X E S
|
||||||
@@ -729,7 +765,6 @@ function COE:Fix_CastOrderLocalization()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:Fix_DisplayedTotems
|
METHOD: COE:Fix_DisplayedTotems
|
||||||
|
|
||||||
@@ -767,13 +802,10 @@ function COE:Fix_DisplayedTotems()
|
|||||||
|
|
||||||
-- notify user
|
-- notify user
|
||||||
-- ------------
|
-- ------------
|
||||||
if( fixed ) then
|
if (fixed) then COE:Message(COESTR_FIXEDDISPLAY); end
|
||||||
COE:Message( COESTR_FIXEDDISPLAY );
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:Fix_CastOrderLocalization2
|
METHOD: COE:Fix_CastOrderLocalization2
|
||||||
|
|
||||||
@@ -791,13 +823,16 @@ function COE:Fix_CastOrderLocalization2()
|
|||||||
if (COE_SavedTotemSets[set].CastOrder[k] == COESTR_TOTEMTOOLS_EARTH) then
|
if (COE_SavedTotemSets[set].CastOrder[k] == COESTR_TOTEMTOOLS_EARTH) then
|
||||||
COE_SavedTotemSets[set].CastOrder[k] = COESTR_ELEMENT_EARTH;
|
COE_SavedTotemSets[set].CastOrder[k] = COESTR_ELEMENT_EARTH;
|
||||||
|
|
||||||
elseif( COE_SavedTotemSets[set].CastOrder[k] == COESTR_TOTEMTOOLS_FIRE ) then
|
elseif (COE_SavedTotemSets[set].CastOrder[k] ==
|
||||||
|
COESTR_TOTEMTOOLS_FIRE) then
|
||||||
COE_SavedTotemSets[set].CastOrder[k] = COESTR_ELEMENT_FIRE;
|
COE_SavedTotemSets[set].CastOrder[k] = COESTR_ELEMENT_FIRE;
|
||||||
|
|
||||||
elseif( COE_SavedTotemSets[set].CastOrder[k] == COESTR_TOTEMTOOLS_WATER ) then
|
elseif (COE_SavedTotemSets[set].CastOrder[k] ==
|
||||||
|
COESTR_TOTEMTOOLS_WATER) then
|
||||||
COE_SavedTotemSets[set].CastOrder[k] = COESTR_ELEMENT_WATER;
|
COE_SavedTotemSets[set].CastOrder[k] = COESTR_ELEMENT_WATER;
|
||||||
|
|
||||||
elseif( COE_SavedTotemSets[set].CastOrder[k] == COESTR_TOTEMTOOLS_AIR ) then
|
elseif (COE_SavedTotemSets[set].CastOrder[k] ==
|
||||||
|
COESTR_TOTEMTOOLS_AIR) then
|
||||||
COE_SavedTotemSets[set].CastOrder[k] = COESTR_ELEMENT_AIR;
|
COE_SavedTotemSets[set].CastOrder[k] = COESTR_ELEMENT_AIR;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -811,13 +846,16 @@ function COE:Fix_CastOrderLocalization2()
|
|||||||
if (COE_CustomTotemSets[set].CastOrder[k] == COESTR_TOTEMTOOLS_EARTH) then
|
if (COE_CustomTotemSets[set].CastOrder[k] == COESTR_TOTEMTOOLS_EARTH) then
|
||||||
COE_CustomTotemSets[set].CastOrder[k] = COESTR_ELEMENT_EARTH;
|
COE_CustomTotemSets[set].CastOrder[k] = COESTR_ELEMENT_EARTH;
|
||||||
|
|
||||||
elseif( COE_CustomTotemSets[set].CastOrder[k] == COESTR_TOTEMTOOLS_FIRE ) then
|
elseif (COE_CustomTotemSets[set].CastOrder[k] ==
|
||||||
|
COESTR_TOTEMTOOLS_FIRE) then
|
||||||
COE_CustomTotemSets[set].CastOrder[k] = COESTR_ELEMENT_FIRE;
|
COE_CustomTotemSets[set].CastOrder[k] = COESTR_ELEMENT_FIRE;
|
||||||
|
|
||||||
elseif( COE_CustomTotemSets[set].CastOrder[k] == COESTR_TOTEMTOOLS_WATER ) then
|
elseif (COE_CustomTotemSets[set].CastOrder[k] ==
|
||||||
|
COESTR_TOTEMTOOLS_WATER) then
|
||||||
COE_CustomTotemSets[set].CastOrder[k] = COESTR_ELEMENT_WATER;
|
COE_CustomTotemSets[set].CastOrder[k] = COESTR_ELEMENT_WATER;
|
||||||
|
|
||||||
elseif( COE_CustomTotemSets[set].CastOrder[k] == COESTR_TOTEMTOOLS_AIR ) then
|
elseif (COE_CustomTotemSets[set].CastOrder[k] ==
|
||||||
|
COESTR_TOTEMTOOLS_AIR) then
|
||||||
COE_CustomTotemSets[set].CastOrder[k] = COESTR_ELEMENT_AIR;
|
COE_CustomTotemSets[set].CastOrder[k] = COESTR_ELEMENT_AIR;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+297
-143
@@ -8,18 +8,13 @@
|
|||||||
|
|
||||||
Totem Module / Logical
|
Totem Module / Logical
|
||||||
|
|
||||||
]]
|
]] if (not COE_Totem) then COE_Totem = {}; end
|
||||||
|
|
||||||
if( not COE_Totem ) then
|
|
||||||
COE_Totem = {};
|
|
||||||
end
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
stores the original functions hooked by SetupTimerHooks()
|
stores the original functions hooked by SetupTimerHooks()
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
COE_Totem["TimerHooks"] = {};
|
COE_Totem["TimerHooks"] = {};
|
||||||
|
|
||||||
|
|
||||||
--[[ =============================================================================================
|
--[[ =============================================================================================
|
||||||
|
|
||||||
L O G I C
|
L O G I C
|
||||||
@@ -37,10 +32,8 @@ function COE_Totem:Rescan()
|
|||||||
|
|
||||||
-- Reset all active totems
|
-- Reset all active totems
|
||||||
-- ------------------------
|
-- ------------------------
|
||||||
COE_Totem:DeactivateTimer( COE.ActiveTotems.Earth );
|
COE_Totem:ResetTimers();
|
||||||
COE_Totem:DeactivateTimer( COE.ActiveTotems.Fire );
|
|
||||||
COE_Totem:DeactivateTimer( COE.ActiveTotems.Water );
|
|
||||||
COE_Totem:DeactivateTimer( COE.ActiveTotems.Air );
|
|
||||||
COE.ActiveTotems.Earth = nil;
|
COE.ActiveTotems.Earth = nil;
|
||||||
COE.ActiveTotems.Fire = nil;
|
COE.ActiveTotems.Fire = nil;
|
||||||
COE.ActiveTotems.Water = nil;
|
COE.ActiveTotems.Water = nil;
|
||||||
@@ -50,23 +43,22 @@ function COE_Totem:Rescan()
|
|||||||
COETotemFrame.Reconfigure = true;
|
COETotemFrame.Reconfigure = true;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:ThrowTotem
|
METHOD: COE_Totem:ThrowTotem
|
||||||
|
|
||||||
PURPOSE: Throws the totem with the specified named id
|
PURPOSE: Throws the totem with the specified named id
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:ThrowTotem(element, id)
|
function COE_Totem:ThrowTotem(element, id)
|
||||||
|
COE:DebugMessage(
|
||||||
if( not COE.Initialized ) then
|
"COE_Totem:ThrowTotem element and id: " .. element .. " " .. id);
|
||||||
return;
|
if (not COE.Initialized) then return; end
|
||||||
end
|
|
||||||
|
|
||||||
-- get associated button
|
-- get associated button
|
||||||
-- ----------------------
|
-- ----------------------
|
||||||
local button = getglobal("COETotem" .. element .. id);
|
local button = getglobal("COETotem" .. element .. id);
|
||||||
if (button == nil) then
|
if (button == nil) then
|
||||||
COE:Message("Invalid Totem");
|
COE:Message("Invalid Totem");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -82,7 +74,6 @@ function COE_Totem:ThrowTotem( element, id )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:RankModifierDown
|
METHOD: COE_Totem:RankModifierDown
|
||||||
|
|
||||||
@@ -108,7 +99,6 @@ function COE_Totem:RankModifierDown()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COESched_AdviseTotem
|
METHOD: COESched_AdviseTotem
|
||||||
|
|
||||||
@@ -120,16 +110,17 @@ function COESched_AdviseTotem( totem, msg )
|
|||||||
if (COE_Config:GetSaved(COEOPT_ADVISOR) == 1 and totem.Warn) then
|
if (COE_Config:GetSaved(COEOPT_ADVISOR) == 1 and totem.Warn) then
|
||||||
-- issue warning
|
-- issue warning
|
||||||
-- --------------
|
-- --------------
|
||||||
COE:Notification( string.format( COESTR_CLEANSINGTOTEM, msg ), COECOL_TOTEMCLEANSING );
|
COE:Notification(string.format(COESTR_CLEANSINGTOTEM, msg),
|
||||||
|
COECOL_TOTEMCLEANSING);
|
||||||
|
|
||||||
-- reschedule
|
-- reschedule
|
||||||
-- -----------
|
-- -----------
|
||||||
Chronos.scheduleByName( "COEAdvise" .. msg, COE.AdvisorWarningInterval, COESched_AdviseTotem, totem, msg );
|
Chronos.scheduleByName("COEAdvise" .. msg, COE.AdvisorWarningInterval,
|
||||||
|
COESched_AdviseTotem, totem, msg);
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COESched_RunAdvisor
|
METHOD: COESched_RunAdvisor
|
||||||
|
|
||||||
@@ -140,9 +131,7 @@ function COESched_RunAdvisor()
|
|||||||
|
|
||||||
-- advisor still activated?
|
-- advisor still activated?
|
||||||
-- -------------------------
|
-- -------------------------
|
||||||
if( COE_Config:GetSaved( COEOPT_ADVISOR ) == 0 ) then
|
if (COE_Config:GetSaved(COEOPT_ADVISOR) == 0) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
local warnPoison, warnDisease, warnTremor = false, false, false;
|
local warnPoison, warnDisease, warnTremor = false, false, false;
|
||||||
local poison, disease, tremor;
|
local poison, disease, tremor;
|
||||||
@@ -159,9 +148,7 @@ function COESched_RunAdvisor()
|
|||||||
-- -----------
|
-- -----------
|
||||||
local i;
|
local i;
|
||||||
for i = 1, GetNumPartyMembers() do
|
for i = 1, GetNumPartyMembers() do
|
||||||
if( warnPoison and warnDisease and warnTremor ) then
|
if (warnPoison and warnDisease and warnTremor) then break end
|
||||||
break;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- scan party member
|
-- scan party member
|
||||||
-- ------------------
|
-- ------------------
|
||||||
@@ -174,7 +161,8 @@ function COESched_RunAdvisor()
|
|||||||
-- scan party member's pet
|
-- scan party member's pet
|
||||||
-- ------------------------
|
-- ------------------------
|
||||||
if (UnitExists("partypet" .. i)) then
|
if (UnitExists("partypet" .. i)) then
|
||||||
poison, disease, tremor = COE_Totem:ScanTargetForDebuff( "partypet" .. i );
|
poison, disease, tremor = COE_Totem:ScanTargetForDebuff(
|
||||||
|
"partypet" .. i);
|
||||||
|
|
||||||
warnPoison = warnPoison or poison;
|
warnPoison = warnPoison or poison;
|
||||||
warnDisease = warnDisease or disease;
|
warnDisease = warnDisease or disease;
|
||||||
@@ -202,7 +190,8 @@ function COESched_RunAdvisor()
|
|||||||
|
|
||||||
if (not COE.CleansingTotems.Disease.Warn) then
|
if (not COE.CleansingTotems.Disease.Warn) then
|
||||||
COE.CleansingTotems.Disease.Warn = true;
|
COE.CleansingTotems.Disease.Warn = true;
|
||||||
COESched_AdviseTotem( COE.CleansingTotems.Disease, COESTR_TOTEMDISEASE );
|
COESched_AdviseTotem(COE.CleansingTotems.Disease,
|
||||||
|
COESTR_TOTEMDISEASE);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
COE.CleansingTotems.Disease.Warn = false;
|
COE.CleansingTotems.Disease.Warn = false;
|
||||||
@@ -226,7 +215,6 @@ function COESched_RunAdvisor()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:ScanTargetForDebuff
|
METHOD: COE_Totem:ScanTargetForDebuff
|
||||||
|
|
||||||
@@ -287,7 +275,6 @@ function COE_Totem:ScanTargetForDebuff( target )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:ThrowAdvisedTotem
|
METHOD: COE_Totem:ThrowAdvisedTotem
|
||||||
|
|
||||||
@@ -318,7 +305,6 @@ function COE_Totem:ThrowAdvisedTotem()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:IsAdvisedTotem
|
METHOD: COE_Totem:IsAdvisedTotem
|
||||||
|
|
||||||
@@ -326,9 +312,12 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:IsAdvisedTotem(totem)
|
function COE_Totem:IsAdvisedTotem(totem)
|
||||||
|
|
||||||
if( (COE.CleansingTotems.Tremor.Warn and totem == COE.CleansingTotems.Tremor.Totem) or
|
if ((COE.CleansingTotems.Tremor.Warn and totem ==
|
||||||
(COE.CleansingTotems.Disease.Warn and totem == COE.CleansingTotems.Disease.Totem) or
|
COE.CleansingTotems.Tremor.Totem) or
|
||||||
(COE.CleansingTotems.Poison.Warn and totem == COE.CleansingTotems.Poison.Totem) ) then
|
(COE.CleansingTotems.Disease.Warn and totem ==
|
||||||
|
COE.CleansingTotems.Disease.Totem) or
|
||||||
|
(COE.CleansingTotems.Poison.Warn and totem ==
|
||||||
|
COE.CleansingTotems.Poison.Totem)) then
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
@@ -336,14 +325,12 @@ function COE_Totem:IsAdvisedTotem( totem )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ =============================================================================================
|
--[[ =============================================================================================
|
||||||
|
|
||||||
T O T E M - S E T S
|
T O T E M - S E T S
|
||||||
|
|
||||||
================================================================================================]]
|
================================================================================================]]
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:SwitchNamedSet
|
METHOD: COE_Totem:SwitchNamedSet
|
||||||
|
|
||||||
@@ -372,7 +359,6 @@ function COE_Totem:SwitchNamedSet()
|
|||||||
return false;
|
return false;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:SwitchPVPSet
|
METHOD: COE_Totem:SwitchPVPSet
|
||||||
|
|
||||||
@@ -399,7 +385,7 @@ function COE_Totem:SwitchPVPSet()
|
|||||||
COE_Totem:SwitchToSet(COE.LastActiveSet);
|
COE_Totem:SwitchToSet(COE.LastActiveSet);
|
||||||
else
|
else
|
||||||
COE_Totem:SwitchToSet(COEUI_DEFAULTSET);
|
COE_Totem:SwitchToSet(COEUI_DEFAULTSET);
|
||||||
end;
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -408,7 +394,6 @@ function COE_Totem:SwitchPVPSet()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:SwitchToNextSet
|
METHOD: COE_Totem:SwitchToNextSet
|
||||||
|
|
||||||
@@ -441,14 +426,14 @@ function COE_Totem:SwitchToNextSet()
|
|||||||
else
|
else
|
||||||
-- switch to next custom set
|
-- switch to next custom set
|
||||||
-- --------------------------
|
-- --------------------------
|
||||||
COE_Totem:SwitchToSet( COE_CustomTotemSets[activeset - COESET_DEFAULT + 1].Name );
|
COE_Totem:SwitchToSet(
|
||||||
|
COE_CustomTotemSets[activeset - COESET_DEFAULT + 1].Name);
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:SwitchToPriorSet
|
METHOD: COE_Totem:SwitchToPriorSet
|
||||||
|
|
||||||
@@ -470,7 +455,8 @@ function COE_Totem:SwitchToPriorSet()
|
|||||||
-- default set is active
|
-- default set is active
|
||||||
-- switch to last custom set
|
-- switch to last custom set
|
||||||
-- ---------------------------
|
-- ---------------------------
|
||||||
COE_Totem:SwitchToSet( COE_CustomTotemSets[COE.TotemSetCount - COESET_DEFAULT].Name );
|
COE_Totem:SwitchToSet(COE_CustomTotemSets[COE.TotemSetCount -
|
||||||
|
COESET_DEFAULT].Name);
|
||||||
|
|
||||||
elseif (activeset == COESET_DEFAULT + 1) then
|
elseif (activeset == COESET_DEFAULT + 1) then
|
||||||
-- first custom set is active
|
-- first custom set is active
|
||||||
@@ -481,14 +467,14 @@ function COE_Totem:SwitchToPriorSet()
|
|||||||
else
|
else
|
||||||
-- switch to prior custom set
|
-- switch to prior custom set
|
||||||
-- ---------------------------
|
-- ---------------------------
|
||||||
COE_Totem:SwitchToSet( COE_CustomTotemSets[activeset - COESET_DEFAULT - 1].Name );
|
COE_Totem:SwitchToSet(
|
||||||
|
COE_CustomTotemSets[activeset - COESET_DEFAULT - 1].Name);
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:SwitchToSet
|
METHOD: COE_Totem:SwitchToSet
|
||||||
|
|
||||||
@@ -496,9 +482,7 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:SwitchToSet(name)
|
function COE_Totem:SwitchToSet(name)
|
||||||
|
|
||||||
if( COE_Config:GetSaved( COEOPT_ENABLESETS ) == 0 ) then
|
if (COE_Config:GetSaved(COEOPT_ENABLESETS) == 0) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
local pvpset = false;
|
local pvpset = false;
|
||||||
|
|
||||||
@@ -511,7 +495,7 @@ function COE_Totem:SwitchToSet( name )
|
|||||||
-- ----------
|
-- ----------
|
||||||
set = i;
|
set = i;
|
||||||
pvpset = i ~= COESET_DEFAULT;
|
pvpset = i ~= COESET_DEFAULT;
|
||||||
break;
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -523,14 +507,12 @@ function COE_Totem:SwitchToSet( name )
|
|||||||
-- set found
|
-- set found
|
||||||
-- ----------
|
-- ----------
|
||||||
set = COESET_DEFAULT + i;
|
set = COESET_DEFAULT + i;
|
||||||
break;
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if( not set ) then
|
if (not set) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- activate set if not already active
|
-- activate set if not already active
|
||||||
-- chech this to stop notification spamming in a duel
|
-- chech this to stop notification spamming in a duel
|
||||||
@@ -538,9 +520,7 @@ function COE_Totem:SwitchToSet( name )
|
|||||||
if (COE_Config:GetSaved(COEOPT_ACTIVESET) ~= set) then
|
if (COE_Config:GetSaved(COEOPT_ACTIVESET) ~= set) then
|
||||||
COE_Config:ActivateSet(set);
|
COE_Config:ActivateSet(set);
|
||||||
|
|
||||||
if( not pvpset ) then
|
if (not pvpset) then COE.LastActiveSet = name; end
|
||||||
COE.LastActiveSet = name;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- reset set cycle
|
-- reset set cycle
|
||||||
-- ----------------
|
-- ----------------
|
||||||
@@ -553,7 +533,6 @@ function COE_Totem:SwitchToSet( name )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:ThrowSet
|
METHOD: COE_Totem:ThrowSet
|
||||||
|
|
||||||
@@ -561,6 +540,7 @@ end
|
|||||||
yet thrown
|
yet thrown
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:ThrowSet()
|
function COE_Totem:ThrowSet()
|
||||||
|
COE:DebugMessage("Method Executing: ThrowSet");
|
||||||
|
|
||||||
if (COE_Config:GetSaved(COEOPT_ENABLESETS) == 1) then
|
if (COE_Config:GetSaved(COEOPT_ENABLESETS) == 1) then
|
||||||
|
|
||||||
@@ -568,13 +548,19 @@ function COE_Totem:ThrowSet()
|
|||||||
-- check which totem to throw
|
-- check which totem to throw
|
||||||
-- =======================================================================
|
-- =======================================================================
|
||||||
local activeset = COE_Config:GetSaved(COEOPT_ACTIVESET);
|
local activeset = COE_Config:GetSaved(COEOPT_ACTIVESET);
|
||||||
|
COE:DebugMessage("ThrowSet activeset value: " .. activeset);
|
||||||
|
|
||||||
local k;
|
|
||||||
for k = 1, 4 do
|
for k = 1, 4 do
|
||||||
|
COE:DebugMessage("ThrowSet k value: " .. k);
|
||||||
|
|
||||||
|
local element = COE:LocalizedElement(
|
||||||
|
COE.TotemSets[activeset].CastOrder[k]);
|
||||||
|
COE:DebugMessage("ThrowSet element value: " .. element);
|
||||||
|
|
||||||
local element = COE:LocalizedElement( COE.TotemSets[activeset].CastOrder[k] );
|
|
||||||
local totem = COE.TotemSets[activeset][element];
|
local totem = COE.TotemSets[activeset][element];
|
||||||
|
|
||||||
|
COE:DebugMessage("ThrowSet COE.SetCycle[element] value: " ..
|
||||||
|
tostring(COE.SetCycle[element]));
|
||||||
if (COE.SetCycle[element] == false and totem) then
|
if (COE.SetCycle[element] == false and totem) then
|
||||||
|
|
||||||
if (totem.isTrinket) then
|
if (totem.isTrinket) then
|
||||||
@@ -582,7 +568,8 @@ function COE_Totem:ThrowSet()
|
|||||||
if (totem.TrinketSlot) then
|
if (totem.TrinketSlot) then
|
||||||
-- first check if the trinket is already usable
|
-- first check if the trinket is already usable
|
||||||
-- ---------------------------------------------
|
-- ---------------------------------------------
|
||||||
local start, duration = GetInventoryItemCooldown( "player", totem.TrinketSlot );
|
local start, duration =
|
||||||
|
GetInventoryItemCooldown("player", totem.TrinketSlot);
|
||||||
|
|
||||||
if (start == 0 and duration == 0) then
|
if (start == 0 and duration == 0) then
|
||||||
UseInventoryItem(totem.TrinketSlot);
|
UseInventoryItem(totem.TrinketSlot);
|
||||||
@@ -591,12 +578,24 @@ function COE_Totem:ThrowSet()
|
|||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
COE:DebugMessage("ThrowSet casting totem: " .. element);
|
||||||
-- first check if the totem is already usable
|
-- first check if the totem is already usable
|
||||||
-- -------------------------------------------
|
-- -------------------------------------------
|
||||||
local start, duration = GetSpellCooldown( totem.Ranks[totem.MaxRank].SpellID, BOOKTYPE_SPELL );
|
local start, duration = GetSpellCooldown(
|
||||||
|
totem.Ranks[totem.MaxRank]
|
||||||
|
.SpellID, BOOKTYPE_SPELL);
|
||||||
|
COE:DebugMessage("ThrowSet spell cooldown duration: " ..
|
||||||
|
duration);
|
||||||
|
|
||||||
if (start == 0 and duration == 0) then
|
if (start == 0 and duration == 0) then
|
||||||
CastSpellByName( COE.TotemSets[activeset][element].SpellName );
|
|
||||||
|
COE:DebugMessage(
|
||||||
|
"ThrowSet casting spell: " ..
|
||||||
|
COE.TotemSets[activeset][element].SpellName);
|
||||||
|
CastSpellByName(COE.TotemSets[activeset][element]
|
||||||
|
.SpellName);
|
||||||
|
-- COE_Totem:SetPendingTotem(totem, totem.MaxRank);
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -605,7 +604,6 @@ function COE_Totem:ThrowSet()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:ResetSetCycle
|
METHOD: COE_Totem:ResetSetCycle
|
||||||
|
|
||||||
@@ -618,7 +616,6 @@ function COE_Totem:ResetSetCycle()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ =============================================================================================
|
--[[ =============================================================================================
|
||||||
|
|
||||||
T I M E R - L O G I C
|
T I M E R - L O G I C
|
||||||
@@ -631,85 +628,247 @@ end
|
|||||||
PURPOSE: Sets up or clears a pending totem
|
PURPOSE: Sets up or clears a pending totem
|
||||||
The pending totem's timer is activated on the next
|
The pending totem's timer is activated on the next
|
||||||
successful SPELLCAST_STOP or removed if it times out first
|
successful SPELLCAST_STOP or removed if it times out first
|
||||||
|
|
||||||
|
PURPOSE: Sets up or clears a pending totem. The pending totem's
|
||||||
|
timer is activated when the spell is identified as cast. If
|
||||||
|
the spell is not identified as cast within 1 seconds, then
|
||||||
|
the pending status is removed.
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:SetPendingTotem(totem, rank)
|
function COE_Totem:SetPendingTotem(totem, rank)
|
||||||
|
COE:DebugMessage("Method Executing: SetPendingTotem");
|
||||||
|
|
||||||
if (totem) then
|
if (totem) then
|
||||||
COE:DebugMessage( "Setting pending totem: " .. totem.SpellName .. " with rank: " .. rank );
|
|
||||||
COE.TotemPending.Totem = totem;
|
|
||||||
COE.TotemPending.UseRank = rank;
|
|
||||||
|
|
||||||
-- get the current lag
|
-- Set PendingTotems for the given totem element type
|
||||||
|
COE:DebugMessage("SetPendingTotem PendingTotems being set: " ..
|
||||||
|
totem.SpellName .. " with rank: " .. rank);
|
||||||
|
COE.PendingTotems[totem.Element].Totem = totem;
|
||||||
|
COE.PendingTotems[totem.Element].Rank = rank;
|
||||||
|
-- COE.PendingTotems[totem.Element].TimeoutStartMS = GetTime();
|
||||||
|
|
||||||
|
-- get the current lag - Not used but saving if needed
|
||||||
-- --------------------
|
-- --------------------
|
||||||
local _,_,lag = GetNetStats();
|
-- local _, _, lag = GetNetStats();
|
||||||
local timeout = lag / 1000 + COE.TotemPending.Timeout;
|
-- local timeout = lag / 1000 + COE.TotemPending.Timeout;
|
||||||
|
local timeoutSec = 1;
|
||||||
|
|
||||||
-- use lag + 0.5 seconds as pending timeout
|
-- use lag + 0.5 seconds as pending timeout
|
||||||
-- -----------------------------------------
|
-- -----------------------------------------
|
||||||
COE:DebugMessage( "Setting pending timeout to: " .. timeout .. " msec" );
|
COE:DebugMessage("SetPendingTotem Setting pending timeout to: " ..
|
||||||
|
timeoutSec .. " seconds");
|
||||||
|
|
||||||
Chronos.scheduleByName( "COE_Pending", timeout, COESched_CheckPendingTotem );
|
Chronos.scheduleByName("COE_Pending", timeoutSec,
|
||||||
else
|
COESched_CheckPendingTotem, totem.Element);
|
||||||
COE.TotemPending.Totem = nil;
|
|
||||||
COE.TotemPending.UseRank = 0;
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COESched_CheckPendingTotem
|
METHOD: COESched_CheckPendingTotem
|
||||||
|
|
||||||
PURPOSE: Clears the pending totem if it is still active
|
PURPOSE: Clears the pending totem if it is still active
|
||||||
|
|
||||||
|
PURPOSE: Clears the pending totem if it is still pending.
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COESched_CheckPendingTotem()
|
function COESched_CheckPendingTotem(element)
|
||||||
|
COE:DebugMessage("Executing Method: COESched_CheckPendingTotem");
|
||||||
|
|
||||||
-- if there is still a pending totem it has timed out
|
if (element) then
|
||||||
-- ---------------------------------------------------
|
COE:DebugMessage("COESched_CheckPendingTotem for element: " .. element);
|
||||||
if( COE.TotemPending.Totem ) then
|
|
||||||
COE:DebugMessage( "Pending totem has timed out: " .. COE.TotemPending.Totem.SpellName );
|
COE_Totem:ClearPendingTotem(COE.PendingTotems[element]);
|
||||||
COE_Totem:SetPendingTotem( nil );
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
|
METHOD: ClearPendingTotem
|
||||||
|
|
||||||
|
PURPOSE: Clears the pending totem.
|
||||||
|
-------------------------------------------------------------------]]
|
||||||
|
function COE_Totem:ClearPendingTotem(pendingTotem)
|
||||||
|
COE:DebugMessage("Executing Method: ClearPendingTotem");
|
||||||
|
|
||||||
|
if (pendingTotem) then
|
||||||
|
pendingTotem.Totem = nil;
|
||||||
|
pendingTotem.Rank = nil;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--[[ ----------------------------------------------------------------
|
||||||
|
METHOD: COE_Totem:GetTotemFromText
|
||||||
|
|
||||||
|
PURPOSE: Identifies a totem from the text value passed in. Can
|
||||||
|
return a nil totem.
|
||||||
|
-------------------------------------------------------------------]]
|
||||||
|
function COE_Totem:GetTotemFromText(text)
|
||||||
|
local totem;
|
||||||
|
COE:DebugMessage("GetTotemFromText for text value: " .. text);
|
||||||
|
|
||||||
|
-- find the totem
|
||||||
|
for k = 1, COE.TotemCount do
|
||||||
|
if (string.find(text, COE.TotemData[k].SpellName)) then
|
||||||
|
-- use existing totem object
|
||||||
|
-- --------------------------
|
||||||
|
totem = COE.TotemData[k];
|
||||||
|
|
||||||
|
COE:DebugMessage("GetTotemFromText found totem: " .. totem.SpellName);
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return totem;
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--[[ ----------------------------------------------------------------
|
||||||
|
METHOD: COE_Totem:ActivateTotem
|
||||||
|
|
||||||
|
PURPOSE: Activates the totem timer and deactivates a
|
||||||
|
still active timer of the same element
|
||||||
|
-------------------------------------------------------------------]]
|
||||||
|
function COE_Totem:ActivateTotem(totem)
|
||||||
|
COE:DebugMessage("Method Executing: ActivateTotem with totem parameter " ..
|
||||||
|
totem.SpellName);
|
||||||
|
|
||||||
|
local pendingTotemObj = COE.PendingTotems[totem.Element];
|
||||||
|
|
||||||
|
if (pendingTotemObj and pendingTotemObj.Totem) then
|
||||||
|
COE:DebugMessage("ActivateTotem identified pending totem : " ..
|
||||||
|
pendingTotemObj.Totem.SpellName);
|
||||||
|
|
||||||
|
-- deactivate still active totem of the same element
|
||||||
|
-- --------------------------------------------------
|
||||||
|
local active = COE.ActiveTotems[totem.Element];
|
||||||
|
if (active) then COE_Totem:DeactivateTimer(active); end
|
||||||
|
|
||||||
|
local pendingTotem = pendingTotemObj.Totem;
|
||||||
|
local pendingTotemRank = pendingTotemObj.Rank;
|
||||||
|
|
||||||
|
-- activate timer
|
||||||
|
-- ---------------
|
||||||
|
Chronos.startTimer("COE" .. totem.SpellName);
|
||||||
|
totem.CurDuration = pendingTotem.Ranks[pendingTotemRank].Duration;
|
||||||
|
totem.CurHealth = pendingTotem.Ranks[pendingTotemRank].Health;
|
||||||
|
|
||||||
|
-- activate cooldown timer if this totem has a cooldown
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
if (pendingTotem.Ranks[pendingTotemRank].Cooldown > 0) then
|
||||||
|
totem.CurCooldown = pendingTotem.Ranks[pendingTotemRank].Cooldown;
|
||||||
|
Chronos.startTimer("COECooldown" .. totem.SpellName);
|
||||||
|
Chronos.scheduleByName("COECooldownSwitch" .. totem.SpellName,
|
||||||
|
totem.CurCooldown, COESched_CooldownEnd,
|
||||||
|
totem);
|
||||||
|
end
|
||||||
|
|
||||||
|
-- activate warning timers
|
||||||
|
-- ------------------------
|
||||||
|
if (totem.CurDuration >= 10) then
|
||||||
|
Chronos.scheduleByName("COEWarn10" .. totem.SpellName,
|
||||||
|
totem.CurDuration - 10,
|
||||||
|
COESched_ExpirationWarning, 10, totem);
|
||||||
|
end
|
||||||
|
Chronos.scheduleByName("COEWarn5" .. totem.SpellName,
|
||||||
|
totem.CurDuration - 5,
|
||||||
|
COESched_ExpirationWarning, 5, totem);
|
||||||
|
Chronos.scheduleByName("COEWarn0" .. totem.SpellName, totem.CurDuration,
|
||||||
|
COESched_ExpirationWarning, 0, totem);
|
||||||
|
|
||||||
|
-- mark totem as active
|
||||||
|
-- ---------------------
|
||||||
|
COE.ActiveTotems[pendingTotem.Element] = totem;
|
||||||
|
totem.isActive = true;
|
||||||
|
|
||||||
|
-- set totem in timer frame
|
||||||
|
-- -------------------------
|
||||||
|
if (COE_Config:GetSaved(COEOPT_TIMERFRAME) == 1) then
|
||||||
|
getglobal("COETimer" .. pendingTotem.Element).totem = totem;
|
||||||
|
COETimerFrame:Show();
|
||||||
|
end
|
||||||
|
|
||||||
|
-- mark totem as thrown if in current set
|
||||||
|
-- ---------------------------------------
|
||||||
|
local activeset = COE_Config:GetSaved(COEOPT_ACTIVESET);
|
||||||
|
|
||||||
|
if (COE.TotemSets[activeset][totem.Element] and
|
||||||
|
COE.TotemSets[activeset][totem.Element].SpellName == totem.SpellName) then
|
||||||
|
|
||||||
|
COE:DebugMessage("ActivateTotem Element " .. totem.Element ..
|
||||||
|
" in current cycle: SET");
|
||||||
|
COE.SetCycle[totem.Element] = true;
|
||||||
|
end
|
||||||
|
|
||||||
|
-- clear pending totem
|
||||||
|
-- --------------------
|
||||||
|
COE_Totem:ClearPendingTotem(pendingTotemObj);
|
||||||
|
|
||||||
|
-- if in timers only mode, reconfigure the totem bar
|
||||||
|
-- --------------------------------------------------
|
||||||
|
if (COE_Config:GetSaved(COEOPT_DISPLAYMODE) == COEMODE_TIMERSONLY) then
|
||||||
|
COE_Totem:Invalidate(getglobal("COE" .. totem.Element .. "Frame"),
|
||||||
|
true, true, true);
|
||||||
|
COETotemFrame.Reconfigure = true;
|
||||||
|
else
|
||||||
|
-- otherwise just invalidate the dynamic buttons
|
||||||
|
-- ----------------------------------------------
|
||||||
|
COE_Totem:Invalidate(getglobal("COE" .. totem.Element .. "Frame"),
|
||||||
|
false, false, true);
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--[[ ----------------------------------------------------------------
|
||||||
|
DEPRECATED: Use ActivateTotem
|
||||||
METHOD: COE_Totem:ActivatePendingTotem
|
METHOD: COE_Totem:ActivatePendingTotem
|
||||||
|
|
||||||
PURPOSE: Activates the pending totem timer and deactivates a
|
PURPOSE: Activates the pending totem timer and deactivates a
|
||||||
still active timer of the same element
|
still active timer of the same element
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:ActivatePendingTotem(totem)
|
function COE_Totem:ActivatePendingTotem(totem)
|
||||||
|
COE:DebugMessage(
|
||||||
|
"Method Executing: ActivatePendingTotem with totem parameter " ..
|
||||||
|
totem.SpellName);
|
||||||
|
|
||||||
-- deactivate still active totem of the same element
|
-- deactivate still active totem of the same element
|
||||||
-- --------------------------------------------------
|
-- --------------------------------------------------
|
||||||
|
COE:DebugMessage(
|
||||||
|
"ActivatePendingTotem - identifying active totems of type" ..
|
||||||
|
COE.TotemPending.Totem.Element);
|
||||||
local active = COE.ActiveTotems[COE.TotemPending.Totem.Element];
|
local active = COE.ActiveTotems[COE.TotemPending.Totem.Element];
|
||||||
if( active ) then
|
if (active) then COE_Totem:DeactivateTimer(active); end
|
||||||
COE_Totem:DeactivateTimer( active );
|
|
||||||
end
|
|
||||||
|
|
||||||
-- activate timer
|
-- activate timer
|
||||||
-- ---------------
|
-- ---------------
|
||||||
Chronos.startTimer("COE" .. totem.SpellName);
|
Chronos.startTimer("COE" .. totem.SpellName);
|
||||||
totem.CurDuration = COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank].Duration;
|
totem.CurDuration = COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank]
|
||||||
totem.CurHealth = COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank].Health;
|
.Duration;
|
||||||
|
totem.CurHealth = COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank]
|
||||||
|
.Health;
|
||||||
|
|
||||||
-- activate cooldown timer if this totem has a cooldown
|
-- activate cooldown timer if this totem has a cooldown
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
if (COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank].Cooldown > 0) then
|
if (COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank].Cooldown > 0) then
|
||||||
totem.CurCooldown = COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank].Cooldown;
|
totem.CurCooldown = COE.TotemPending.Totem.Ranks[COE.TotemPending
|
||||||
|
.UseRank].Cooldown;
|
||||||
Chronos.startTimer("COECooldown" .. totem.SpellName);
|
Chronos.startTimer("COECooldown" .. totem.SpellName);
|
||||||
Chronos.scheduleByName( "COECooldownSwitch" .. totem.SpellName, totem.CurCooldown, COESched_CooldownEnd, totem );
|
Chronos.scheduleByName("COECooldownSwitch" .. totem.SpellName,
|
||||||
|
totem.CurCooldown, COESched_CooldownEnd, totem);
|
||||||
end
|
end
|
||||||
|
|
||||||
-- activate warning timers
|
-- activate warning timers
|
||||||
-- ------------------------
|
-- ------------------------
|
||||||
if (totem.CurDuration >= 10) then
|
if (totem.CurDuration >= 10) then
|
||||||
Chronos.scheduleByName( "COEWarn10" .. totem.SpellName, totem.CurDuration - 10, COESched_ExpirationWarning, 10, totem );
|
Chronos.scheduleByName("COEWarn10" .. totem.SpellName,
|
||||||
|
totem.CurDuration - 10,
|
||||||
|
COESched_ExpirationWarning, 10, totem);
|
||||||
end
|
end
|
||||||
Chronos.scheduleByName( "COEWarn5" .. totem.SpellName, totem.CurDuration - 5, COESched_ExpirationWarning, 5, totem );
|
Chronos.scheduleByName("COEWarn5" .. totem.SpellName, totem.CurDuration - 5,
|
||||||
Chronos.scheduleByName( "COEWarn0" .. totem.SpellName, totem.CurDuration, COESched_ExpirationWarning, 0, totem );
|
COESched_ExpirationWarning, 5, totem);
|
||||||
|
Chronos.scheduleByName("COEWarn0" .. totem.SpellName, totem.CurDuration,
|
||||||
|
COESched_ExpirationWarning, 0, totem);
|
||||||
|
|
||||||
-- mark totem as active
|
-- mark totem as active
|
||||||
-- ---------------------
|
-- ---------------------
|
||||||
@@ -741,17 +900,18 @@ function COE_Totem:ActivatePendingTotem( totem )
|
|||||||
-- if in timers only mode, reconfigure the totem bar
|
-- if in timers only mode, reconfigure the totem bar
|
||||||
-- --------------------------------------------------
|
-- --------------------------------------------------
|
||||||
if (COE_Config:GetSaved(COEOPT_DISPLAYMODE) == COEMODE_TIMERSONLY) then
|
if (COE_Config:GetSaved(COEOPT_DISPLAYMODE) == COEMODE_TIMERSONLY) then
|
||||||
COE_Totem:Invalidate( getglobal( "COE" .. totem.Element .. "Frame" ), true, true, true );
|
COE_Totem:Invalidate(getglobal("COE" .. totem.Element .. "Frame"), true,
|
||||||
|
true, true);
|
||||||
COETotemFrame.Reconfigure = true;
|
COETotemFrame.Reconfigure = true;
|
||||||
else
|
else
|
||||||
-- otherwise just invalidate the dynamic buttons
|
-- otherwise just invalidate the dynamic buttons
|
||||||
-- ----------------------------------------------
|
-- ----------------------------------------------
|
||||||
COE_Totem:Invalidate( getglobal( "COE" .. totem.Element .. "Frame" ), false, false, true );
|
COE_Totem:Invalidate(getglobal("COE" .. totem.Element .. "Frame"),
|
||||||
|
false, false, true);
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:DeactivateTimer
|
METHOD: COE_Totem:DeactivateTimer
|
||||||
|
|
||||||
@@ -789,19 +949,20 @@ function COE_Totem:DeactivateTimer( totem )
|
|||||||
if (COE.TotemSets[activeset][totem.Element] and
|
if (COE.TotemSets[activeset][totem.Element] and
|
||||||
COE.TotemSets[activeset][totem.Element].SpellName == totem.SpellName) then
|
COE.TotemSets[activeset][totem.Element].SpellName == totem.SpellName) then
|
||||||
|
|
||||||
COE:DebugMessage( "Element " .. totem.Element .. " in current cycle: UNSET" );
|
COE:DebugMessage("DeactivateTimer Element " .. totem.Element ..
|
||||||
|
" in current cycle: UNSET");
|
||||||
COE.SetCycle[totem.Element] = false;
|
COE.SetCycle[totem.Element] = false;
|
||||||
end
|
end
|
||||||
|
|
||||||
-- invalidate dynamic buttons
|
-- invalidate dynamic buttons
|
||||||
-- ---------------------------
|
-- ---------------------------
|
||||||
COE_Totem:Invalidate( getglobal( "COE" .. totem.Element .. "Frame" ), false, false, true );
|
COE_Totem:Invalidate(getglobal("COE" .. totem.Element .. "Frame"),
|
||||||
|
false, false, true);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:IsTimerActive
|
METHOD: COE_Totem:IsTimerActive
|
||||||
|
|
||||||
@@ -809,16 +970,14 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:IsTimerActive(totem)
|
function COE_Totem:IsTimerActive(totem)
|
||||||
|
|
||||||
if( not totem ) then
|
if (not totem) then return false; end
|
||||||
return false;
|
|
||||||
end
|
|
||||||
|
|
||||||
return (totem.CurDuration > 0) and
|
return (totem.CurDuration > 0) and
|
||||||
(totem.CurDuration - Chronos.getTimer( "COE" .. totem.SpellName ) > 0);
|
(totem.CurDuration - Chronos.getTimer("COE" .. totem.SpellName) >
|
||||||
|
0);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:GetTimeLeft
|
METHOD: COE_Totem:GetTimeLeft
|
||||||
|
|
||||||
@@ -834,7 +993,6 @@ function COE_Totem:GetTimeLeft( totem )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:GetCooldownLeft
|
METHOD: COE_Totem:GetCooldownLeft
|
||||||
|
|
||||||
@@ -845,18 +1003,21 @@ function COE_Totem:GetCooldownLeft( totem )
|
|||||||
if (totem.CurCooldown == 0) then
|
if (totem.CurCooldown == 0) then
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return totem.CurCooldown - Chronos.getTimer( "COECooldown" .. totem.SpellName );
|
return totem.CurCooldown -
|
||||||
|
Chronos.getTimer("COECooldown" .. totem.SpellName);
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COESched_ExpirationWarning
|
METHOD: COESched_ExpirationWarning
|
||||||
|
|
||||||
PURPOSE: Issues an expiration warning for the specified totem
|
PURPOSE: Issues an expiration warning for the specified totem
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COESched_ExpirationWarning(timemark, totem)
|
function COESched_ExpirationWarning(timemark, totem)
|
||||||
|
COE:DebugMessage(
|
||||||
|
"Method Executing: COESched_ExpirationWarning with totem parameter " ..
|
||||||
|
totem.SpellName);
|
||||||
|
|
||||||
if (COE_Config:GetSaved(COEOPT_ENABLETOTEMBAR) == 1 and
|
if (COE_Config:GetSaved(COEOPT_ENABLETOTEMBAR) == 1 and
|
||||||
COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 1 and
|
COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 1 and
|
||||||
@@ -870,16 +1031,17 @@ function COESched_ExpirationWarning( timemark, totem )
|
|||||||
end
|
end
|
||||||
|
|
||||||
if (timemark > 0) then
|
if (timemark > 0) then
|
||||||
COE:Notification( string.format( COESTR_TOTEMWARNING, text, timemark ), COECOL_TOTEMWARNING );
|
COE:Notification(string.format(COESTR_TOTEMWARNING, text, timemark),
|
||||||
|
COECOL_TOTEMWARNING);
|
||||||
else
|
else
|
||||||
COE:Notification( string.format( COESTR_TOTEMEXPIRED, text ), COECOL_TOTEMDESTROYED );
|
COE:Notification(string.format(COESTR_TOTEMEXPIRED, text),
|
||||||
|
COECOL_TOTEMDESTROYED);
|
||||||
COE_Totem:DeactivateTimer(totem);
|
COE_Totem:DeactivateTimer(totem);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COESched_CooldownEnd
|
METHOD: COESched_CooldownEnd
|
||||||
|
|
||||||
@@ -893,7 +1055,6 @@ function COESched_CooldownEnd( totem )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:TotemDamage
|
METHOD: COE_Totem:TotemDamage
|
||||||
|
|
||||||
@@ -901,6 +1062,7 @@ end
|
|||||||
a notification if the totem is destroyed
|
a notification if the totem is destroyed
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:TotemDamage()
|
function COE_Totem:TotemDamage()
|
||||||
|
COE:DebugMessage("Method Executing: TotemDamage");
|
||||||
|
|
||||||
local num, regex, i;
|
local num, regex, i;
|
||||||
for num, regex in COESTR_TOTEMDAMAGE do
|
for num, regex in COESTR_TOTEMDAMAGE do
|
||||||
@@ -913,7 +1075,8 @@ function COE_Totem:TotemDamage()
|
|||||||
if (COE.TotemData[i].SpellName == match[1]) then
|
if (COE.TotemData[i].SpellName == match[1]) then
|
||||||
-- subtract damage
|
-- subtract damage
|
||||||
-- ----------------
|
-- ----------------
|
||||||
COE.TotemData[i].CurHealth = COE.TotemData[i].CurHealth - tonumber( match[2] );
|
COE.TotemData[i].CurHealth =
|
||||||
|
COE.TotemData[i].CurHealth - tonumber(match[2]);
|
||||||
|
|
||||||
-- totem destroyed?
|
-- totem destroyed?
|
||||||
-- -----------------
|
-- -----------------
|
||||||
@@ -921,34 +1084,38 @@ function COE_Totem:TotemDamage()
|
|||||||
if (COE.TotemData[i].CurHealth <= 0) then
|
if (COE.TotemData[i].CurHealth <= 0) then
|
||||||
COE:DebugMessage(match[1] .. " destroyed");
|
COE:DebugMessage(match[1] .. " destroyed");
|
||||||
|
|
||||||
if( COE_Config:GetSaved( COEOPT_TIMERNOTIFICATIONS ) == 1 ) then
|
if (COE_Config:GetSaved(COEOPT_TIMERNOTIFICATIONS) ==
|
||||||
COE:Notification( string.format( COESTR_TOTEMDESTROYED, COE.TotemData[i].SpellName ),
|
1) then
|
||||||
|
COE:Notification(string.format(
|
||||||
|
COESTR_TOTEMDESTROYED,
|
||||||
|
COE.TotemData[i].SpellName),
|
||||||
COECOL_TOTEMDESTROYED);
|
COECOL_TOTEMDESTROYED);
|
||||||
end
|
end
|
||||||
|
|
||||||
COE_Totem:DeactivateTimer(COE.TotemData[i]);
|
COE_Totem:DeactivateTimer(COE.TotemData[i]);
|
||||||
else
|
else
|
||||||
COE:DebugMessage( match[1] .. " took " .. match[2] .. " damage. " ..
|
COE:DebugMessage(
|
||||||
|
match[1] .. " took " .. match[2] .. " damage. " ..
|
||||||
COE.TotemData[i].CurHealth .. " health left");
|
COE.TotemData[i].CurHealth .. " health left");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
break;
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
break;
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:ResetTimers
|
METHOD: COE_Totem:ResetTimers
|
||||||
|
|
||||||
PURPOSE: Resets all active timers to zero
|
PURPOSE: Resets all active timers to zero
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:ResetTimers()
|
function COE_Totem:ResetTimers()
|
||||||
|
COE:DebugMessage("Method Executing: COE_Totem:ResetTimers");
|
||||||
|
|
||||||
local k;
|
local k;
|
||||||
for k = 1, 4 do
|
for k = 1, 4 do
|
||||||
@@ -957,11 +1124,8 @@ function COE_Totem:ResetTimers()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
COE:Message( COESTR_RESET );
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ =============================================================================================
|
--[[ =============================================================================================
|
||||||
|
|
||||||
T I M E R - H O O K S
|
T I M E R - H O O K S
|
||||||
@@ -977,6 +1141,7 @@ end
|
|||||||
original function afterwards
|
original function afterwards
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:SetupTimerHooks()
|
function COE_Totem:SetupTimerHooks()
|
||||||
|
COE:DebugMessage("Method Executing: SetupTimerHooks");
|
||||||
|
|
||||||
COE_Totem.TimerHooks["UseAction"] = UseAction;
|
COE_Totem.TimerHooks["UseAction"] = UseAction;
|
||||||
UseAction = function(id, book, onself)
|
UseAction = function(id, book, onself)
|
||||||
@@ -1004,7 +1169,6 @@ function COE_Totem:SetupTimerHooks()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:HookUseAction
|
METHOD: COE_Totem:HookUseAction
|
||||||
|
|
||||||
@@ -1012,12 +1176,10 @@ end
|
|||||||
a totem
|
a totem
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:HookUseAction(id, book)
|
function COE_Totem:HookUseAction(id, book)
|
||||||
|
COE:DebugMessage("Method Executing: HookUseAction");
|
||||||
-- use only when timers are enabled
|
-- use only when timers are enabled
|
||||||
-- ---------------------------------
|
-- ---------------------------------
|
||||||
if( COE_Config:GetSaved( COEOPT_ENABLETIMERS ) == 0 ) then
|
if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 0) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- get action tooltip
|
-- get action tooltip
|
||||||
-- -------------------
|
-- -------------------
|
||||||
@@ -1033,7 +1195,8 @@ function COE_Totem:HookUseAction( id, book )
|
|||||||
trinket = text == COESTR_TRINKET_TOOLTIP;
|
trinket = text == COESTR_TRINKET_TOOLTIP;
|
||||||
|
|
||||||
for i = 1, COE.TotemCount do
|
for i = 1, COE.TotemCount do
|
||||||
if( (trinket and COE.TotemData[i].isTrinket) or COE.TotemData[i].SpellName == text ) then
|
if ((trinket and COE.TotemData[i].isTrinket) or
|
||||||
|
COE.TotemData[i].SpellName == text) then
|
||||||
|
|
||||||
if (COE.TotemData[i].isTrinket) then
|
if (COE.TotemData[i].isTrinket) then
|
||||||
rank = 0;
|
rank = 0;
|
||||||
@@ -1065,14 +1228,12 @@ function COE_Totem:HookUseAction( id, book )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- no totem spell. remove pending totem if set
|
-- no totem spell. remove pending totem if set
|
||||||
-- --------------------------------------------
|
-- --------------------------------------------
|
||||||
COE_Totem:SetPendingTotem(nil);
|
COE_Totem:SetPendingTotem(nil);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:HookCastSpell
|
METHOD: COE_Totem:HookCastSpell
|
||||||
|
|
||||||
@@ -1080,12 +1241,11 @@ end
|
|||||||
a totem
|
a totem
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:HookCastSpell(id, book)
|
function COE_Totem:HookCastSpell(id, book)
|
||||||
|
COE:DebugMessage("Method Executing: HookCastSpell");
|
||||||
|
|
||||||
-- use only when timers are enabled
|
-- use only when timers are enabled
|
||||||
-- ---------------------------------
|
-- ---------------------------------
|
||||||
if( COE_Config:GetSaved( COEOPT_ENABLETIMERS ) == 0 ) then
|
if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 0) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- get the associated totem object
|
-- get the associated totem object
|
||||||
-- --------------------------------
|
-- --------------------------------
|
||||||
@@ -1108,7 +1268,6 @@ function COE_Totem:HookCastSpell( id, book )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:HookCastSpellByName
|
METHOD: COE_Totem:HookCastSpellByName
|
||||||
|
|
||||||
@@ -1116,12 +1275,11 @@ end
|
|||||||
a totem
|
a totem
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:HookCastSpellByName(SpellName)
|
function COE_Totem:HookCastSpellByName(SpellName)
|
||||||
|
COE:DebugMessage("Method Executing: HookCastSpellByName");
|
||||||
|
|
||||||
-- use only when timers are enabled
|
-- use only when timers are enabled
|
||||||
-- ---------------------------------
|
-- ---------------------------------
|
||||||
if( COE_Config:GetSaved( COEOPT_ENABLETIMERS ) == 0 ) then
|
if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 0) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- extract rank information
|
-- extract rank information
|
||||||
-- -------------------------
|
-- -------------------------
|
||||||
@@ -1153,7 +1311,6 @@ function COE_Totem:HookCastSpellByName( SpellName )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:HookUseInventoryItem
|
METHOD: COE_Totem:HookUseInventoryItem
|
||||||
|
|
||||||
@@ -1161,18 +1318,16 @@ end
|
|||||||
a totem
|
a totem
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:HookUseInventoryItem(slotid)
|
function COE_Totem:HookUseInventoryItem(slotid)
|
||||||
|
COE:DebugMessage("Method Executing: HookUseInventoryItem");
|
||||||
|
|
||||||
-- use only when timers are enabled
|
-- use only when timers are enabled
|
||||||
-- ---------------------------------
|
-- ---------------------------------
|
||||||
if( COE_Config:GetSaved( COEOPT_ENABLETIMERS ) == 0 ) then
|
if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 0) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- only use for trinket slots
|
-- only use for trinket slots
|
||||||
-- ---------------------------
|
-- ---------------------------
|
||||||
if( slotid ~= GetInventorySlotInfo( "Trinket0Slot" ) and slotid ~= GetInventorySlotInfo( "Trinket1Slot" ) ) then
|
if (slotid ~= GetInventorySlotInfo("Trinket0Slot") and slotid ~=
|
||||||
return;
|
GetInventorySlotInfo("Trinket1Slot")) then return; end
|
||||||
end
|
|
||||||
|
|
||||||
-- iterate through out totems and find the trinket totem
|
-- iterate through out totems and find the trinket totem
|
||||||
-- ------------------------------------------------------
|
-- ------------------------------------------------------
|
||||||
@@ -1197,4 +1352,3 @@ function COE_Totem:HookUseInventoryItem( slotid )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+151
-194
@@ -8,18 +8,18 @@
|
|||||||
|
|
||||||
Totem Module / Visual
|
Totem Module / Visual
|
||||||
|
|
||||||
]]
|
]] if (not COE_Totem) then COE_Totem = {}; end
|
||||||
|
|
||||||
if( not COE_Totem ) then
|
|
||||||
COE_Totem = {};
|
|
||||||
end
|
|
||||||
|
|
||||||
COEUI_BUTTONGAP = 4;
|
COEUI_BUTTONGAP = 4;
|
||||||
|
|
||||||
COE_Totem.FlexTime = 0.3;
|
COE_Totem.FlexTime = 0.3;
|
||||||
|
|
||||||
COEFramePositions = { Earth = { x = 0, y = 0 }, Fire = { x = 0, y = 0 },
|
COEFramePositions = {
|
||||||
Water = { x = 0, y = 0 }, Air = { x = 0, y = 0 } }
|
Earth = {x = 0, y = 0},
|
||||||
|
Fire = {x = 0, y = 0},
|
||||||
|
Water = {x = 0, y = 0},
|
||||||
|
Air = {x = 0, y = 0}
|
||||||
|
}
|
||||||
|
|
||||||
COEDynamic = {n = 7, nil, nil, nil, nil, nil, nil, nil};
|
COEDynamic = {n = 7, nil, nil, nil, nil, nil, nil, nil};
|
||||||
|
|
||||||
@@ -46,9 +46,7 @@ COEDynamic = { n = 7, nil, nil, nil, nil, nil, nil, nil };
|
|||||||
function COE_Totem:InitMainFrame()
|
function COE_Totem:InitMainFrame()
|
||||||
-- addon loaded?
|
-- addon loaded?
|
||||||
-- --------------
|
-- --------------
|
||||||
if( not COE.Initialized ) then
|
if (not COE.Initialized) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- init frame properties
|
-- init frame properties
|
||||||
-- ----------------------
|
-- ----------------------
|
||||||
@@ -73,7 +71,6 @@ function COE_Totem:InitMainFrame()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:OnMainFrameEvent
|
METHOD: COE_Totem:OnMainFrameEvent
|
||||||
|
|
||||||
@@ -94,7 +91,8 @@ function COE_Totem:OnMainFrameEvent( event )
|
|||||||
-- start advisor schedule
|
-- start advisor schedule
|
||||||
-- -----------------------
|
-- -----------------------
|
||||||
if (COE_Config:GetSaved(COEOPT_ADVISOR) == 1) then
|
if (COE_Config:GetSaved(COEOPT_ADVISOR) == 1) then
|
||||||
Chronos.scheduleByName( "COEAdvise", COE.AdvisorInterval, COESched_RunAdvisor );
|
Chronos.scheduleByName("COEAdvise", COE.AdvisorInterval,
|
||||||
|
COESched_RunAdvisor);
|
||||||
end
|
end
|
||||||
|
|
||||||
-- get current element frame coordinates
|
-- get current element frame coordinates
|
||||||
@@ -108,9 +106,7 @@ function COE_Totem:OnMainFrameEvent( event )
|
|||||||
|
|
||||||
elseif (event == "PLAYER_TARGET_CHANGED") then
|
elseif (event == "PLAYER_TARGET_CHANGED") then
|
||||||
|
|
||||||
if( COE_Config:GetSaved( COEOPT_ENABLETOTEMBAR ) == 0 ) then
|
if (COE_Config:GetSaved(COEOPT_ENABLETOTEMBAR) == 0) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Switch to named set if appropriate
|
-- Switch to named set if appropriate
|
||||||
-- -----------------------------------
|
-- -----------------------------------
|
||||||
@@ -126,14 +122,12 @@ function COE_Totem:OnMainFrameEvent( event )
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
COE_Totem:ResetTimers();
|
COE_Totem:ResetTimers();
|
||||||
|
|
||||||
elseif ( event == "CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE" or
|
elseif (event == "CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE" or event ==
|
||||||
event == "CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS" or
|
"CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS" or event ==
|
||||||
event == "CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE" or
|
"CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE" or event ==
|
||||||
event == "CHAT_MSG_COMBAT_HOSTILEPLAYER_HITS" ) then
|
"CHAT_MSG_COMBAT_HOSTILEPLAYER_HITS") then
|
||||||
|
|
||||||
if( COE_Config:GetSaved( COEOPT_ENABLETOTEMBAR ) == 0 ) then
|
if (COE_Config:GetSaved(COEOPT_ENABLETOTEMBAR) == 0) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Assign totem damage
|
-- Assign totem damage
|
||||||
-- --------------------
|
-- --------------------
|
||||||
@@ -142,7 +136,6 @@ function COE_Totem:OnMainFrameEvent( event )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:ConfigureTotemButtons
|
METHOD: COE_Totem:ConfigureTotemButtons
|
||||||
|
|
||||||
@@ -153,9 +146,7 @@ function COE_Totem:ConfigureTotemButtons()
|
|||||||
|
|
||||||
-- reconfiguration necessary?
|
-- reconfiguration necessary?
|
||||||
-- ---------------------------
|
-- ---------------------------
|
||||||
if( not COETotemFrame.Reconfigure ) then
|
if (not COETotemFrame.Reconfigure) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
local i;
|
local i;
|
||||||
local buttons = {Earth = 0, Fire = 0, Water = 0, Air = 0};
|
local buttons = {Earth = 0, Fire = 0, Water = 0, Air = 0};
|
||||||
@@ -213,7 +204,9 @@ function COE_Totem:ConfigureTotemButtons()
|
|||||||
-- check if this totem's order is before or after
|
-- check if this totem's order is before or after
|
||||||
-- the normal order of this element's active totem
|
-- the normal order of this element's active totem
|
||||||
-- ------------------------------------------------
|
-- ------------------------------------------------
|
||||||
local activeorder = COE_DisplayedTotems[COE.ActiveTotems[totem.Element].SpellName].Order;
|
local activeorder =
|
||||||
|
COE_DisplayedTotems[COE.ActiveTotems[totem.Element]
|
||||||
|
.SpellName].Order;
|
||||||
if (order < activeorder) then
|
if (order < activeorder) then
|
||||||
order = order + 1;
|
order = order + 1;
|
||||||
end
|
end
|
||||||
@@ -238,10 +231,10 @@ function COE_Totem:ConfigureTotemButtons()
|
|||||||
-- check if this totem's order is before or after
|
-- check if this totem's order is before or after
|
||||||
-- the normal order of this set's element totem
|
-- the normal order of this set's element totem
|
||||||
-- -----------------------------------------------
|
-- -----------------------------------------------
|
||||||
local activeorder = COE_DisplayedTotems[COE.TotemSets[activeset][totem.Element].SpellName].Order;
|
local activeorder =
|
||||||
if( order < activeorder ) then
|
COE_DisplayedTotems[COE.TotemSets[activeset][totem.Element]
|
||||||
order = order + 1;
|
.SpellName].Order;
|
||||||
end
|
if (order < activeorder) then order = order + 1; end
|
||||||
|
|
||||||
button = getglobal("COETotem" .. totem.Element .. order);
|
button = getglobal("COETotem" .. totem.Element .. order);
|
||||||
else
|
else
|
||||||
@@ -285,7 +278,6 @@ function COE_Totem:ConfigureTotemButtons()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateAllFrames
|
METHOD: COE_Totem:UpdateAllFrames
|
||||||
|
|
||||||
@@ -327,7 +319,6 @@ function COE_Totem:UpdateAllFrames()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:ResetFrames
|
METHOD: COE_Totem:ResetFrames
|
||||||
|
|
||||||
@@ -348,7 +339,6 @@ function COE_Totem:ResetFrames()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ =============================================================================================
|
--[[ =============================================================================================
|
||||||
|
|
||||||
F R A M E
|
F R A M E
|
||||||
@@ -379,7 +369,6 @@ end
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------------]]
|
------------------------------------------------------------------------------------------------]]
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:InitFrame
|
METHOD: COE_Totem:InitFrame
|
||||||
|
|
||||||
@@ -388,9 +377,7 @@ end
|
|||||||
function COE_Totem:InitFrame()
|
function COE_Totem:InitFrame()
|
||||||
-- addon loaded?
|
-- addon loaded?
|
||||||
-- --------------
|
-- --------------
|
||||||
if( not COE.Initialized ) then
|
if (not COE.Initialized) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- init update timer
|
-- init update timer
|
||||||
-- ------------------
|
-- ------------------
|
||||||
@@ -410,7 +397,6 @@ function COE_Totem:InitFrame()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:OnFrameEvent
|
METHOD: COE_Totem:OnFrameEvent
|
||||||
|
|
||||||
@@ -436,7 +422,6 @@ function COE_Totem:OnFrameEvent( event )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:Invalidate
|
METHOD: COE_Totem:Invalidate
|
||||||
|
|
||||||
@@ -449,21 +434,14 @@ function COE_Totem:Invalidate( frame, Anchor, Static, Dynamic )
|
|||||||
-- a previous call to Invaldiate with a true parameter
|
-- a previous call to Invaldiate with a true parameter
|
||||||
-- ----------------------------------------------------
|
-- ----------------------------------------------------
|
||||||
|
|
||||||
if( Anchor ) then
|
if (Anchor) then frame.Updates.Anchor = true; end
|
||||||
frame.Updates.Anchor = true;
|
|
||||||
end
|
|
||||||
|
|
||||||
if( Static ) then
|
if (Static) then frame.Updates.Static = true; end
|
||||||
frame.Updates.Static = true;
|
|
||||||
end
|
|
||||||
|
|
||||||
if( Dynamic ) then
|
if (Dynamic) then frame.Updates.Dynamic = true; end
|
||||||
frame.Updates.Dynamic = true;
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateFrame
|
METHOD: COE_Totem:UpdateFrame
|
||||||
|
|
||||||
@@ -474,9 +452,7 @@ function COE_Totem:UpdateFrame( elapsed )
|
|||||||
-- check if visual update is necessary
|
-- check if visual update is necessary
|
||||||
-- ------------------------------------
|
-- ------------------------------------
|
||||||
this.UpdateTime = this.UpdateTime + elapsed;
|
this.UpdateTime = this.UpdateTime + elapsed;
|
||||||
if( this.UpdateTime <= COE.UpdateInterval ) then
|
if (this.UpdateTime <= COE.UpdateInterval) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- show frame?
|
-- show frame?
|
||||||
-- ------------
|
-- ------------
|
||||||
@@ -494,9 +470,7 @@ function COE_Totem:UpdateFrame( elapsed )
|
|||||||
|
|
||||||
-- invalidate all if moving
|
-- invalidate all if moving
|
||||||
-- -------------------------
|
-- -------------------------
|
||||||
if( this.isMoving ) then
|
if (this.isMoving) then COE_Totem:Invalidate(this, true, true, true); end
|
||||||
COE_Totem:Invalidate( this, true, true, true );
|
|
||||||
end
|
|
||||||
|
|
||||||
-- configure buttons for this frame
|
-- configure buttons for this frame
|
||||||
-- ---------------------------------
|
-- ---------------------------------
|
||||||
@@ -504,9 +478,7 @@ function COE_Totem:UpdateFrame( elapsed )
|
|||||||
|
|
||||||
-- configure anchor button
|
-- configure anchor button
|
||||||
-- ------------------------
|
-- ------------------------
|
||||||
if( this.Updates.Anchor ) then
|
if (this.Updates.Anchor) then COE_Totem:UpdateAnchorButton(); end
|
||||||
COE_Totem:UpdateAnchorButton();
|
|
||||||
end
|
|
||||||
|
|
||||||
-- only update if at least the anchor
|
-- only update if at least the anchor
|
||||||
-- totem button has a totem assigned
|
-- totem button has a totem assigned
|
||||||
@@ -516,24 +488,18 @@ function COE_Totem:UpdateFrame( elapsed )
|
|||||||
|
|
||||||
-- update the static flex-totems
|
-- update the static flex-totems
|
||||||
-- ------------------------------
|
-- ------------------------------
|
||||||
if( this.Updates.Static ) then
|
if (this.Updates.Static) then COE_Totem:UpdateStatic(); end
|
||||||
COE_Totem:UpdateStatic();
|
|
||||||
end
|
|
||||||
|
|
||||||
-- update the dynamic flex-totems
|
-- update the dynamic flex-totems
|
||||||
-- -------------------------------
|
-- -------------------------------
|
||||||
if( this.Updates.Dynamic ) then
|
if (this.Updates.Dynamic) then COE_Totem:UpdateDynamic(); end
|
||||||
COE_Totem:UpdateDynamic();
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
this.AnchorTotem:Hide();
|
this.AnchorTotem:Hide();
|
||||||
end
|
end
|
||||||
|
|
||||||
-- adjust other frames when dragging
|
-- adjust other frames when dragging
|
||||||
-- ----------------------------------
|
-- ----------------------------------
|
||||||
if( this.IsMoving ) then
|
if (this.IsMoving) then COE_Totem:AdjustDraggedFrames(); end
|
||||||
COE_Totem:AdjustDraggedFrames();
|
|
||||||
end
|
|
||||||
|
|
||||||
-- reset invalidation flags
|
-- reset invalidation flags
|
||||||
-- -------------------------
|
-- -------------------------
|
||||||
@@ -547,7 +513,6 @@ function COE_Totem:UpdateFrame( elapsed )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateAnchorButton
|
METHOD: COE_Totem:UpdateAnchorButton
|
||||||
|
|
||||||
@@ -563,7 +528,8 @@ function COE_Totem:UpdateAnchorButton()
|
|||||||
this.AnchorTotem = getglobal("COETotem" .. this.Element .. "1");
|
this.AnchorTotem = getglobal("COETotem" .. this.Element .. "1");
|
||||||
|
|
||||||
elseif (mode == COEMODE_TIMERSONLY) then
|
elseif (mode == COEMODE_TIMERSONLY) then
|
||||||
if( COE.ActiveTotems[this.Element] or COE_TotemBars[this.Element].Mode == "Open" ) then
|
if (COE.ActiveTotems[this.Element] or COE_TotemBars[this.Element].Mode ==
|
||||||
|
"Open") then
|
||||||
this.AnchorTotem = getglobal("COETotem" .. this.Element .. "1");
|
this.AnchorTotem = getglobal("COETotem" .. this.Element .. "1");
|
||||||
else
|
else
|
||||||
this.AnchorTotem = getglobal("COETotem" .. this.Element .. "None");
|
this.AnchorTotem = getglobal("COETotem" .. this.Element .. "None");
|
||||||
@@ -571,7 +537,8 @@ function COE_Totem:UpdateAnchorButton()
|
|||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
if( COE.TotemSets[activeset][this.Element] or COE_TotemBars[this.Element].Mode == "Open" ) then
|
if (COE.TotemSets[activeset][this.Element] or
|
||||||
|
COE_TotemBars[this.Element].Mode == "Open") then
|
||||||
this.AnchorTotem = getglobal("COETotem" .. this.Element .. "1");
|
this.AnchorTotem = getglobal("COETotem" .. this.Element .. "1");
|
||||||
else
|
else
|
||||||
this.AnchorTotem = getglobal("COETotem" .. this.Element .. "None");
|
this.AnchorTotem = getglobal("COETotem" .. this.Element .. "None");
|
||||||
@@ -589,7 +556,6 @@ function COE_Totem:UpdateAnchorButton()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateStatic
|
METHOD: COE_Totem:UpdateStatic
|
||||||
|
|
||||||
@@ -597,7 +563,8 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:UpdateStatic()
|
function COE_Totem:UpdateStatic()
|
||||||
|
|
||||||
local inConfig = COE.ConfigureBarMode or COE.ConfigureOrderMode or COE.ConfigureSetsMode;
|
local inConfig = COE.ConfigureBarMode or COE.ConfigureOrderMode or
|
||||||
|
COE.ConfigureSetsMode;
|
||||||
|
|
||||||
if (this.Mode == "Closed" and not COE.ConfigureBarMode and
|
if (this.Mode == "Closed" and not COE.ConfigureBarMode and
|
||||||
not COE.ConfigureOrderMode and not COE.ConfigureSetsMode) then
|
not COE.ConfigureOrderMode and not COE.ConfigureSetsMode) then
|
||||||
@@ -632,8 +599,10 @@ function COE_Totem:UpdateStatic()
|
|||||||
|
|
||||||
-- only show button if it has a totem
|
-- only show button if it has a totem
|
||||||
-- -----------------------------------
|
-- -----------------------------------
|
||||||
if( button.totem and (COE_DisplayedTotems[button.totem.SpellName].Visible or inConfig) ) then
|
if (button.totem and
|
||||||
button:SetPoint( this.Point, lastvisible, this.RelPoint, this.XSpacing, this.YSpacing );
|
(COE_DisplayedTotems[button.totem.SpellName].Visible or inConfig)) then
|
||||||
|
button:SetPoint(this.Point, lastvisible, this.RelPoint,
|
||||||
|
this.XSpacing, this.YSpacing);
|
||||||
button:Show();
|
button:Show();
|
||||||
lastvisible = button;
|
lastvisible = button;
|
||||||
else
|
else
|
||||||
@@ -643,7 +612,6 @@ function COE_Totem:UpdateStatic()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateDynamic
|
METHOD: COE_Totem:UpdateDynamic
|
||||||
|
|
||||||
@@ -665,13 +633,15 @@ function COE_Totem:UpdateDynamic()
|
|||||||
|
|
||||||
if (this.AnchorTotem.totem == COE.NoTotem) then
|
if (this.AnchorTotem.totem == COE.NoTotem) then
|
||||||
if (this.FlexCount > 1) then
|
if (this.FlexCount > 1) then
|
||||||
lastvisible = getglobal( "COETotem" .. this.Element .. this.FlexCount - 1 );
|
lastvisible = getglobal("COETotem" .. this.Element ..
|
||||||
|
this.FlexCount - 1);
|
||||||
else
|
else
|
||||||
lastvisible = getglobal("COETotem" .. this.Element .. "None");
|
lastvisible = getglobal("COETotem" .. this.Element .. "None");
|
||||||
end
|
end
|
||||||
start = this.FlexCount;
|
start = this.FlexCount;
|
||||||
else
|
else
|
||||||
lastvisible = getglobal( "COETotem" .. this.Element .. this.FlexCount );
|
lastvisible =
|
||||||
|
getglobal("COETotem" .. this.Element .. this.FlexCount);
|
||||||
start = this.FlexCount + 1;
|
start = this.FlexCount + 1;
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -684,12 +654,15 @@ function COE_Totem:UpdateDynamic()
|
|||||||
button = getglobal("COETotem" .. this.Element .. i);
|
button = getglobal("COETotem" .. this.Element .. i);
|
||||||
button:ClearAllPoints();
|
button:ClearAllPoints();
|
||||||
|
|
||||||
if( button.totem and COE_DisplayedTotems[button.totem.SpellName].Visible ) then
|
if (button.totem and
|
||||||
if( COE.ActiveTotems[this.Element] == button.totem and COE_Totem:IsTimerActive( button.totem ) ) then
|
COE_DisplayedTotems[button.totem.SpellName].Visible) then
|
||||||
|
if (COE.ActiveTotems[this.Element] == button.totem and
|
||||||
|
COE_Totem:IsTimerActive(button.totem)) then
|
||||||
-- show button if it is active
|
-- show button if it is active
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
button:SetScale(0.8);
|
button:SetScale(0.8);
|
||||||
button:SetPoint( this.Point, lastvisible, this.RelPoint, this.XSpacing, this.YSpacing );
|
button:SetPoint(this.Point, lastvisible, this.RelPoint,
|
||||||
|
this.XSpacing, this.YSpacing);
|
||||||
button:Show();
|
button:Show();
|
||||||
lastvisible = button;
|
lastvisible = button;
|
||||||
|
|
||||||
@@ -697,7 +670,8 @@ function COE_Totem:UpdateDynamic()
|
|||||||
-- show button if it has a running cooldown
|
-- show button if it has a running cooldown
|
||||||
-- -----------------------------------------
|
-- -----------------------------------------
|
||||||
button:SetScale(0.8);
|
button:SetScale(0.8);
|
||||||
button:SetPoint( this.Point, lastvisible, this.RelPoint, this.XSpacing, this.YSpacing );
|
button:SetPoint(this.Point, lastvisible, this.RelPoint,
|
||||||
|
this.XSpacing, this.YSpacing);
|
||||||
button:Show();
|
button:Show();
|
||||||
lastvisible = button;
|
lastvisible = button;
|
||||||
|
|
||||||
@@ -705,7 +679,8 @@ function COE_Totem:UpdateDynamic()
|
|||||||
-- show button if it is advised
|
-- show button if it is advised
|
||||||
-- -----------------------------
|
-- -----------------------------
|
||||||
button:SetScale(0.8);
|
button:SetScale(0.8);
|
||||||
button:SetPoint( this.Point, lastvisible, this.RelPoint, this.XSpacing, this.YSpacing );
|
button:SetPoint(this.Point, lastvisible, this.RelPoint,
|
||||||
|
this.XSpacing, this.YSpacing);
|
||||||
button:Show();
|
button:Show();
|
||||||
lastvisible = button;
|
lastvisible = button;
|
||||||
|
|
||||||
@@ -732,7 +707,8 @@ function COE_Totem:UpdateDynamic()
|
|||||||
-- show button if it has a totem and the bar is expanded
|
-- show button if it has a totem and the bar is expanded
|
||||||
-- ------------------------------------------------------
|
-- ------------------------------------------------------
|
||||||
button:SetScale(0.8);
|
button:SetScale(0.8);
|
||||||
button:SetPoint( this.Point, lastvisible, this.RelPoint, this.XSpacing, this.YSpacing );
|
button:SetPoint(this.Point, lastvisible, this.RelPoint,
|
||||||
|
this.XSpacing, this.YSpacing);
|
||||||
button:Show();
|
button:Show();
|
||||||
lastvisible = button;
|
lastvisible = button;
|
||||||
|
|
||||||
@@ -759,7 +735,8 @@ function COE_Totem:UpdateDynamic()
|
|||||||
-- show button if it is active
|
-- show button if it is active
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
button:SetScale(0.8);
|
button:SetScale(0.8);
|
||||||
button:SetPoint( this.Point, lastvisible, this.RelPoint, this.XSpacing, this.YSpacing );
|
button:SetPoint(this.Point, lastvisible, this.RelPoint,
|
||||||
|
this.XSpacing, this.YSpacing);
|
||||||
button:Show();
|
button:Show();
|
||||||
lastvisible = button;
|
lastvisible = button;
|
||||||
|
|
||||||
@@ -767,7 +744,8 @@ function COE_Totem:UpdateDynamic()
|
|||||||
-- show button if it has a running cooldown
|
-- show button if it has a running cooldown
|
||||||
-- -----------------------------------------
|
-- -----------------------------------------
|
||||||
button:SetScale(0.8);
|
button:SetScale(0.8);
|
||||||
button:SetPoint( this.Point, lastvisible, this.RelPoint, this.XSpacing, this.YSpacing );
|
button:SetPoint(this.Point, lastvisible, this.RelPoint,
|
||||||
|
this.XSpacing, this.YSpacing);
|
||||||
button:Show();
|
button:Show();
|
||||||
lastvisible = button;
|
lastvisible = button;
|
||||||
|
|
||||||
@@ -775,7 +753,8 @@ function COE_Totem:UpdateDynamic()
|
|||||||
-- show button if it isa advised
|
-- show button if it isa advised
|
||||||
-- ------------------------------
|
-- ------------------------------
|
||||||
button:SetScale(0.8);
|
button:SetScale(0.8);
|
||||||
button:SetPoint( this.Point, lastvisible, this.RelPoint, this.XSpacing, this.YSpacing );
|
button:SetPoint(this.Point, lastvisible, this.RelPoint,
|
||||||
|
this.XSpacing, this.YSpacing);
|
||||||
button:Show();
|
button:Show();
|
||||||
lastvisible = button;
|
lastvisible = button;
|
||||||
|
|
||||||
@@ -789,7 +768,6 @@ function COE_Totem:UpdateDynamic()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:COESched_HideDynamicButtons
|
METHOD: COE_Totem:COESched_HideDynamicButtons
|
||||||
|
|
||||||
@@ -803,7 +781,6 @@ function COESched_HideDynamicButtons( frame )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:SetFrameDirection
|
METHOD: COE_Totem:SetFrameDirection
|
||||||
|
|
||||||
@@ -848,7 +825,6 @@ function COE_Totem:SetFrameDirection( frame, direction )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:AdjustDraggedFrames
|
METHOD: COE_Totem:AdjustDraggedFrames
|
||||||
|
|
||||||
@@ -858,9 +834,7 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:AdjustDraggedFrames()
|
function COE_Totem:AdjustDraggedFrames()
|
||||||
|
|
||||||
if( COE_Config:GetSaved( COEOPT_GROUPBARS ) == 0 ) then
|
if (COE_Config:GetSaved(COEOPT_GROUPBARS) == 0) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
local x, y, k, dx, dy;
|
local x, y, k, dx, dy;
|
||||||
|
|
||||||
@@ -884,7 +858,8 @@ function COE_Totem:AdjustDraggedFrames()
|
|||||||
-- the relative position to the frame being dragged
|
-- the relative position to the frame being dragged
|
||||||
-- -------------------------------------------------
|
-- -------------------------------------------------
|
||||||
frame:ClearAllPoints();
|
frame:ClearAllPoints();
|
||||||
frame:SetPoint( "TOPLEFT", UIParent, "BOTTOMLEFT", COEFramePositions[frame.Element].x + dx,
|
frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT",
|
||||||
|
COEFramePositions[frame.Element].x + dx,
|
||||||
COEFramePositions[frame.Element].y + dy);
|
COEFramePositions[frame.Element].y + dy);
|
||||||
|
|
||||||
-- invalidate all parts
|
-- invalidate all parts
|
||||||
@@ -896,7 +871,6 @@ function COE_Totem:AdjustDraggedFrames()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateFrameCoordinates
|
METHOD: COE_Totem:UpdateFrameCoordinates
|
||||||
|
|
||||||
@@ -918,7 +892,6 @@ function COE_Totem:UpdateFrameCoordinates()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ =============================================================================================
|
--[[ =============================================================================================
|
||||||
|
|
||||||
B U T T O N
|
B U T T O N
|
||||||
@@ -943,9 +916,7 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:OnTotemButtonLoad()
|
function COE_Totem:OnTotemButtonLoad()
|
||||||
|
|
||||||
if( not COE.Initialized ) then
|
if (not COE.Initialized) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- init properties
|
-- init properties
|
||||||
-- ----------------
|
-- ----------------
|
||||||
@@ -970,7 +941,6 @@ function COE_Totem:OnTotemButtonLoad()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:OnTotemButtonEvent
|
METHOD: COE_Totem:OnTotemButtonEvent
|
||||||
|
|
||||||
@@ -984,19 +954,13 @@ function COE_Totem:OnTotemButtonEvent( event )
|
|||||||
end
|
end
|
||||||
|
|
||||||
elseif (event == "ACTIONBAR_UPDATE_USABLE") then
|
elseif (event == "ACTIONBAR_UPDATE_USABLE") then
|
||||||
if( this.totem ) then
|
if (this.totem) then COE_Totem:UpdateTotemButtonIsUsable(); end
|
||||||
COE_Totem:UpdateTotemButtonIsUsable();
|
|
||||||
end
|
|
||||||
|
|
||||||
elseif (event == "ACTIONBAR_UPDATE_COOLDOWN") then
|
elseif (event == "ACTIONBAR_UPDATE_COOLDOWN") then
|
||||||
if( this.totem ) then
|
if (this.totem) then COE_Totem:UpdateTotemButtonCooldown(); end
|
||||||
COE_Totem:UpdateTotemButtonCooldown();
|
|
||||||
end
|
|
||||||
|
|
||||||
elseif (event == "UNIT_MANA" and arg1 == "player") then
|
elseif (event == "UNIT_MANA" and arg1 == "player") then
|
||||||
if( this.totem ) then
|
if (this.totem) then COE_Totem:UpdateTotemButtonIsUsable(); end
|
||||||
COE_Totem:UpdateTotemButtonIsUsable();
|
|
||||||
end
|
|
||||||
|
|
||||||
elseif (event == "UNIT_INVENTORY_CHANGED" or event == "BAG_UPDATE") then
|
elseif (event == "UNIT_INVENTORY_CHANGED" or event == "BAG_UPDATE") then
|
||||||
-- check for presence of totem tools
|
-- check for presence of totem tools
|
||||||
@@ -1008,13 +972,16 @@ function COE_Totem:OnTotemButtonEvent( event )
|
|||||||
local slot;
|
local slot;
|
||||||
totem.ToolPresent, slot = COE:IsTrinketPresent();
|
totem.ToolPresent, slot = COE:IsTrinketPresent();
|
||||||
|
|
||||||
if( slot and slot ~= totem.TrinketSlot and totem.CurCooldown < 30 ) then
|
if (slot and slot ~= totem.TrinketSlot and totem.CurCooldown <
|
||||||
|
30) then
|
||||||
-- trinket has been (re-)equipped
|
-- trinket has been (re-)equipped
|
||||||
-- start item cooldown
|
-- start item cooldown
|
||||||
-- -------------------------------
|
-- -------------------------------
|
||||||
totem.CurCooldown = 30;
|
totem.CurCooldown = 30;
|
||||||
Chronos.startTimer("COECooldown" .. totem.SpellName);
|
Chronos.startTimer("COECooldown" .. totem.SpellName);
|
||||||
Chronos.scheduleByName( "COECooldownSwitch" .. totem.SpellName, totem.CurCooldown, COESched_CooldownEnd, totem );
|
Chronos.scheduleByName(
|
||||||
|
"COECooldownSwitch" .. totem.SpellName,
|
||||||
|
totem.CurCooldown, COESched_CooldownEnd, totem);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1025,23 +992,21 @@ function COE_Totem:OnTotemButtonEvent( event )
|
|||||||
end
|
end
|
||||||
|
|
||||||
elseif (event == "UPDATE_BINDINGS") then
|
elseif (event == "UPDATE_BINDINGS") then
|
||||||
if( this.totem ) then
|
if (this.totem) then COE_Totem:UpdateTotemButtonHotKey(); end
|
||||||
COE_Totem:UpdateTotemButtonHotKey();
|
|
||||||
end
|
|
||||||
|
|
||||||
elseif( event == "SPELLCAST_STOP" ) then
|
-- UPDATED single totem pending logic to handle multiple pending and fire when totem cast is reported from event
|
||||||
-- activate timer if totem is pending
|
-- elseif (event == "SPELLCAST_STOP") then
|
||||||
-- -----------------------------------
|
-- -- activate timer if totem is pending
|
||||||
if( COE_Config:GetSaved( COEOPT_ENABLETIMERS ) == 1 and
|
-- -- -----------------------------------
|
||||||
this.totem and this.totem == COE.TotemPending.Totem ) then
|
-- if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 1 and this.totem and
|
||||||
COE_Totem:ActivatePendingTotem( this.totem );
|
-- this.totem == COE.TotemPending.Totem) then
|
||||||
end
|
-- COE_Totem:ActivatePendingTotem(this.totem);
|
||||||
|
-- end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateTotemButton
|
METHOD: COE_Totem:UpdateTotemButton
|
||||||
|
|
||||||
@@ -1052,9 +1017,7 @@ function COE_Totem:UpdateTotemButton( elapsed )
|
|||||||
-- check if visual update is necessary
|
-- check if visual update is necessary
|
||||||
-- ------------------------------------
|
-- ------------------------------------
|
||||||
this.UpdateTime = this.UpdateTime + elapsed;
|
this.UpdateTime = this.UpdateTime + elapsed;
|
||||||
if( this.UpdateTime <= COE.UpdateInterval ) then
|
if (this.UpdateTime <= COE.UpdateInterval) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
if (this.totem == nil) then
|
if (this.totem == nil) then
|
||||||
this:Hide();
|
this:Hide();
|
||||||
@@ -1107,7 +1070,8 @@ function COE_Totem:UpdateTotemButton( elapsed )
|
|||||||
end
|
end
|
||||||
|
|
||||||
elseif (COE_Config:GetSaved(COEOPT_ENABLESETS) == 1 and
|
elseif (COE_Config:GetSaved(COEOPT_ENABLESETS) == 1 and
|
||||||
COE.TotemSets[COE_Config:GetSaved( COEOPT_ACTIVESET )][this.totem.Element] == this.totem ) then
|
COE.TotemSets[COE_Config:GetSaved(COEOPT_ACTIVESET)][this.totem
|
||||||
|
.Element] == this.totem) then
|
||||||
|
|
||||||
-- set a red border when this totem
|
-- set a red border when this totem
|
||||||
-- belongs to the current totem set
|
-- belongs to the current totem set
|
||||||
@@ -1129,7 +1093,6 @@ function COE_Totem:UpdateTotemButton( elapsed )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateTotemButtonCooldown
|
METHOD: COE_Totem:UpdateTotemButtonCooldown
|
||||||
|
|
||||||
@@ -1137,9 +1100,7 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:UpdateTotemButtonCooldown()
|
function COE_Totem:UpdateTotemButtonCooldown()
|
||||||
|
|
||||||
if( this.totem == COE.NoTotem ) then
|
if (this.totem == COE.NoTotem) then return; end
|
||||||
return;
|
|
||||||
end;
|
|
||||||
|
|
||||||
local cooldown = getglobal(this:GetName() .. "Cooldown");
|
local cooldown = getglobal(this:GetName() .. "Cooldown");
|
||||||
|
|
||||||
@@ -1151,7 +1112,8 @@ function COE_Totem:UpdateTotemButtonCooldown()
|
|||||||
|
|
||||||
if (this.totem.isTrinket) then
|
if (this.totem.isTrinket) then
|
||||||
if (this.totem.ToolPresent) then
|
if (this.totem.ToolPresent) then
|
||||||
start, duration, enable = GetInventoryItemCooldown( "player", this.totem.TrinketSlot );
|
start, duration, enable =
|
||||||
|
GetInventoryItemCooldown("player", this.totem.TrinketSlot);
|
||||||
else
|
else
|
||||||
cooldown:Hide();
|
cooldown:Hide();
|
||||||
return;
|
return;
|
||||||
@@ -1168,7 +1130,6 @@ function COE_Totem:UpdateTotemButtonCooldown()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateTotemButtonIsUsable
|
METHOD: COE_Totem:UpdateTotemButtonIsUsable
|
||||||
|
|
||||||
@@ -1179,9 +1140,7 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:UpdateTotemButtonIsUsable()
|
function COE_Totem:UpdateTotemButtonIsUsable()
|
||||||
|
|
||||||
if( this.totem == COE.NoTotem ) then
|
if (this.totem == COE.NoTotem) then return; end
|
||||||
return;
|
|
||||||
end;
|
|
||||||
|
|
||||||
local icon = getglobal(this:GetName() .. "Icon");
|
local icon = getglobal(this:GetName() .. "Icon");
|
||||||
local normalTexture = getglobal(this:GetName() .. "NormalTexture");
|
local normalTexture = getglobal(this:GetName() .. "NormalTexture");
|
||||||
@@ -1216,7 +1175,6 @@ function COE_Totem:UpdateTotemButtonIsUsable()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateTotemButtonHotKey
|
METHOD: COE_Totem:UpdateTotemButtonHotKey
|
||||||
|
|
||||||
@@ -1224,14 +1182,14 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:UpdateTotemButtonHotKey()
|
function COE_Totem:UpdateTotemButtonHotKey()
|
||||||
|
|
||||||
if( this.totem == COE.NoTotem ) then
|
if (this.totem == COE.NoTotem) then return; end
|
||||||
return;
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- get the binding name
|
-- get the binding name
|
||||||
-- ---------------------
|
-- ---------------------
|
||||||
local binding = "TOTEM" .. string.upper(this.totem.Element);
|
local binding = "TOTEM" .. string.upper(this.totem.Element);
|
||||||
local id = this:GetID() - getglobal( "COETotem" .. this.totem.Element .. "1" ):GetID() + 1;
|
local id = this:GetID() -
|
||||||
|
getglobal("COETotem" .. this.totem.Element .. "1"):GetID() +
|
||||||
|
1;
|
||||||
binding = binding .. id;
|
binding = binding .. id;
|
||||||
|
|
||||||
-- get the binding text
|
-- get the binding text
|
||||||
@@ -1252,7 +1210,6 @@ function COE_Totem:UpdateTotemButtonHotKey()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateTotemButtonFlash
|
METHOD: COE_Totem:UpdateTotemButtonFlash
|
||||||
|
|
||||||
@@ -1261,14 +1218,15 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:UpdateTotemButtonFlash(elapsed)
|
function COE_Totem:UpdateTotemButtonFlash(elapsed)
|
||||||
|
|
||||||
if( (this.totem == COE.NoTotem) or this.totem.isTrinket ) then
|
if ((this.totem == COE.NoTotem) or this.totem.isTrinket) then return; end
|
||||||
return;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if (COE_Config:GetSaved(COEOPT_ADVISOR) == 1) then
|
if (COE_Config:GetSaved(COEOPT_ADVISOR) == 1) then
|
||||||
if( (this == COE.CleansingTotems.Tremor.Button and COE.CleansingTotems.Tremor.Warn) or
|
if ((this == COE.CleansingTotems.Tremor.Button and
|
||||||
(this == COE.CleansingTotems.Disease.Button and COE.CleansingTotems.Disease.Warn) or
|
COE.CleansingTotems.Tremor.Warn) or
|
||||||
(this == COE.CleansingTotems.Poison.Button and COE.CleansingTotems.Poison.Warn) ) then
|
(this == COE.CleansingTotems.Disease.Button and
|
||||||
|
COE.CleansingTotems.Disease.Warn) or
|
||||||
|
(this == COE.CleansingTotems.Poison.Button and
|
||||||
|
COE.CleansingTotems.Poison.Warn)) then
|
||||||
|
|
||||||
this.Flashtime = this.Flashtime - elapsed;
|
this.Flashtime = this.Flashtime - elapsed;
|
||||||
if (this.Flashtime <= 0) then
|
if (this.Flashtime <= 0) then
|
||||||
@@ -1294,7 +1252,6 @@ function COE_Totem:UpdateTotemButtonFlash( elapsed )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:OnEnterTotemButton
|
METHOD: COE_Totem:OnEnterTotemButton
|
||||||
|
|
||||||
@@ -1308,7 +1265,8 @@ function COE_Totem:OnEnterTotemButton()
|
|||||||
if (COEUI_TTALIGN[COE_Config:GetSaved(COEOPT_TTALIGNMENT)][1] ~= "DISABLED" and
|
if (COEUI_TTALIGN[COE_Config:GetSaved(COEOPT_TTALIGNMENT)][1] ~= "DISABLED" and
|
||||||
this.totem ~= COE.NoTotem) then
|
this.totem ~= COE.NoTotem) then
|
||||||
|
|
||||||
GameTooltip:SetOwner( this, COEUI_TTALIGN[COE_Config:GetSaved( COEOPT_TTALIGNMENT )][1] );
|
GameTooltip:SetOwner(this, COEUI_TTALIGN[COE_Config:GetSaved(
|
||||||
|
COEOPT_TTALIGNMENT)][1]);
|
||||||
|
|
||||||
if (this.totem.isTrinket) then
|
if (this.totem.isTrinket) then
|
||||||
-- show item tooltip if equipped
|
-- show item tooltip if equipped
|
||||||
@@ -1337,7 +1295,6 @@ function COE_Totem:OnEnterTotemButton()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:OnLeaveTotemButton
|
METHOD: COE_Totem:OnLeaveTotemButton
|
||||||
|
|
||||||
@@ -1354,11 +1311,12 @@ function COE_Totem:OnLeaveTotemButton()
|
|||||||
-- schedule hiding of the dynamic buttons
|
-- schedule hiding of the dynamic buttons
|
||||||
-- ---------------------------------------
|
-- ---------------------------------------
|
||||||
if (this.ElementFrame.Mode == "Flex") then
|
if (this.ElementFrame.Mode == "Flex") then
|
||||||
Chronos.scheduleByName( "COEFlex" .. this.ElementFrame.Element, COE_Totem.FlexTime, COESched_HideDynamicButtons, this.ElementFrame );
|
Chronos.scheduleByName("COEFlex" .. this.ElementFrame.Element,
|
||||||
|
COE_Totem.FlexTime, COESched_HideDynamicButtons,
|
||||||
|
this.ElementFrame);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:OnTotemButtonClick
|
METHOD: COE_Totem:OnTotemButtonClick
|
||||||
|
|
||||||
@@ -1367,9 +1325,7 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:OnTotemButtonClick()
|
function COE_Totem:OnTotemButtonClick()
|
||||||
|
|
||||||
if( this.totem == COE.NoTotem ) then
|
if (this.totem == COE.NoTotem) then return; end
|
||||||
return;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if (COE.ConfigureBarMode) then
|
if (COE.ConfigureBarMode) then
|
||||||
|
|
||||||
@@ -1398,13 +1354,15 @@ function COE_Totem:OnTotemButtonClick()
|
|||||||
else
|
else
|
||||||
-- swap this totem with the first one
|
-- swap this totem with the first one
|
||||||
-- -----------------------------------
|
-- -----------------------------------
|
||||||
local swap = COE_DisplayedTotems[COE_Config.ConfigureOrderTotem.SpellName].Order;
|
local swap = COE_DisplayedTotems[COE_Config.ConfigureOrderTotem
|
||||||
COE_DisplayedTotems[COE_Config.ConfigureOrderTotem.SpellName].Order = COE_DisplayedTotems[this.totem.SpellName].Order;
|
.SpellName].Order;
|
||||||
|
COE_DisplayedTotems[COE_Config.ConfigureOrderTotem.SpellName].Order =
|
||||||
|
COE_DisplayedTotems[this.totem.SpellName].Order;
|
||||||
COE_DisplayedTotems[this.totem.SpellName].Order = swap;
|
COE_DisplayedTotems[this.totem.SpellName].Order = swap;
|
||||||
|
|
||||||
COE_Config.ConfigureOrderTotem = nil;
|
COE_Config.ConfigureOrderTotem = nil;
|
||||||
|
|
||||||
end;
|
end
|
||||||
|
|
||||||
-- reconfigure totem bar
|
-- reconfigure totem bar
|
||||||
-- ----------------------
|
-- ----------------------
|
||||||
@@ -1420,16 +1378,19 @@ function COE_Totem:OnTotemButtonClick()
|
|||||||
if (activeset <= COESET_DEFAULT) then
|
if (activeset <= COESET_DEFAULT) then
|
||||||
COE_SavedTotemSets[activeset][this.totem.Element] = "";
|
COE_SavedTotemSets[activeset][this.totem.Element] = "";
|
||||||
else
|
else
|
||||||
COE_CustomTotemSets[activeset - COESET_DEFAULT][this.totem.Element] = "";
|
COE_CustomTotemSets[activeset - COESET_DEFAULT][this.totem
|
||||||
|
.Element] = "";
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- store in set
|
-- store in set
|
||||||
-- -------------
|
-- -------------
|
||||||
COE.TotemSets[activeset][this.totem.Element] = this.totem;
|
COE.TotemSets[activeset][this.totem.Element] = this.totem;
|
||||||
if (activeset <= COESET_DEFAULT) then
|
if (activeset <= COESET_DEFAULT) then
|
||||||
COE_SavedTotemSets[activeset][this.totem.Element] = this.totem.SpellName;
|
COE_SavedTotemSets[activeset][this.totem.Element] = this.totem
|
||||||
|
.SpellName;
|
||||||
else
|
else
|
||||||
COE_CustomTotemSets[activeset - COESET_DEFAULT][this.totem.Element] = this.totem.SpellName;
|
COE_CustomTotemSets[activeset - COESET_DEFAULT][this.totem
|
||||||
|
.Element] = this.totem.SpellName;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1441,9 +1402,7 @@ function COE_Totem:OnTotemButtonClick()
|
|||||||
|
|
||||||
-- if the ctrl key is down, make this totem the anchor totem
|
-- if the ctrl key is down, make this totem the anchor totem
|
||||||
-- ----------------------------------------------------------
|
-- ----------------------------------------------------------
|
||||||
if( IsControlKeyDown() ) then
|
if (IsControlKeyDown()) then COE_Totem:MakeAnchorTotem(this); end
|
||||||
COE_Totem:MakeAnchorTotem( this );
|
|
||||||
end
|
|
||||||
|
|
||||||
if (this.totem.isTrinket) then
|
if (this.totem.isTrinket) then
|
||||||
|
|
||||||
@@ -1469,7 +1428,6 @@ function COE_Totem:OnTotemButtonClick()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:ButtonStartDrag
|
METHOD: COE_Totem:ButtonStartDrag
|
||||||
|
|
||||||
@@ -1484,7 +1442,8 @@ function COE_Totem:ButtonStartDrag()
|
|||||||
-- Additionally holding the control key while doing so
|
-- Additionally holding the control key while doing so
|
||||||
-- picks up Rank 1.
|
-- picks up Rank 1.
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
elseif( (this.totem ~= COE.NoTotem) and (not this.totem.isTrinket) and IsShiftKeyDown() ) then
|
elseif ((this.totem ~= COE.NoTotem) and (not this.totem.isTrinket) and
|
||||||
|
IsShiftKeyDown()) then
|
||||||
local rank;
|
local rank;
|
||||||
if (IsControlKeyDown()) then
|
if (IsControlKeyDown()) then
|
||||||
rank = 1;
|
rank = 1;
|
||||||
@@ -1495,14 +1454,14 @@ function COE_Totem:ButtonStartDrag()
|
|||||||
local SpellID = this.totem.Ranks[rank].SpellID;
|
local SpellID = this.totem.Ranks[rank].SpellID;
|
||||||
PickupSpell(SpellID, BOOKTYPE_SPELL);
|
PickupSpell(SpellID, BOOKTYPE_SPELL);
|
||||||
|
|
||||||
elseif( COE_Config:GetSaved( COEOPT_FIXBAR ) == 0 and this == this.ElementFrame.AnchorTotem ) then
|
elseif (COE_Config:GetSaved(COEOPT_FIXBAR) == 0 and this ==
|
||||||
|
this.ElementFrame.AnchorTotem) then
|
||||||
this:GetParent():StartMoving();
|
this:GetParent():StartMoving();
|
||||||
this:GetParent().IsMoving = true;
|
this:GetParent().IsMoving = true;
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:ButtonStopDrag
|
METHOD: COE_Totem:ButtonStopDrag
|
||||||
|
|
||||||
@@ -1519,7 +1478,6 @@ function COE_Totem:ButtonStopDrag()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:MakeAnchorTotem
|
METHOD: COE_Totem:MakeAnchorTotem
|
||||||
|
|
||||||
@@ -1539,13 +1497,15 @@ function COE_Totem:MakeAnchorTotem( button )
|
|||||||
-- swap this totem with the anchor totem
|
-- swap this totem with the anchor totem
|
||||||
-- --------------------------------------
|
-- --------------------------------------
|
||||||
local swap = COE_DisplayedTotems[anchor.SpellName].Order;
|
local swap = COE_DisplayedTotems[anchor.SpellName].Order;
|
||||||
COE_DisplayedTotems[anchor.SpellName].Order = COE_DisplayedTotems[totem.SpellName].Order;
|
COE_DisplayedTotems[anchor.SpellName].Order =
|
||||||
|
COE_DisplayedTotems[totem.SpellName].Order;
|
||||||
COE_DisplayedTotems[totem.SpellName].Order = swap;
|
COE_DisplayedTotems[totem.SpellName].Order = swap;
|
||||||
|
|
||||||
elseif (mode == COEMODE_ACTIVESET) then
|
elseif (mode == COEMODE_ACTIVESET) then
|
||||||
-- replace the set totem with this one
|
-- replace the set totem with this one
|
||||||
-- ------------------------------------
|
-- ------------------------------------
|
||||||
COE.TotemSets[COE_Config:GetSaved( COEOPT_ACTIVESET )][totem.Element] = totem;
|
COE.TotemSets[COE_Config:GetSaved(COEOPT_ACTIVESET)][totem.Element] =
|
||||||
|
totem;
|
||||||
end
|
end
|
||||||
|
|
||||||
COE_Totem:Invalidate(button.ElementFrame, true, true, true);
|
COE_Totem:Invalidate(button.ElementFrame, true, true, true);
|
||||||
@@ -1554,7 +1514,6 @@ function COE_Totem:MakeAnchorTotem( button )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:SetTimerText
|
METHOD: COE_Totem:SetTimerText
|
||||||
|
|
||||||
@@ -1562,22 +1521,19 @@ end
|
|||||||
associated totem has an active timer
|
associated totem has an active timer
|
||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE_Totem:SetTimerText()
|
function COE_Totem:SetTimerText()
|
||||||
|
if (this.totem == COE.NoTotem) then return; end
|
||||||
if( this.totem == COE.NoTotem ) then
|
|
||||||
return;
|
|
||||||
end;
|
|
||||||
|
|
||||||
local timertext = getglobal(this:GetName() .. "Text");
|
local timertext = getglobal(this:GetName() .. "Text");
|
||||||
local overlaytex = getglobal(this:GetName() .. "OverlayTex");
|
local overlaytex = getglobal(this:GetName() .. "OverlayTex");
|
||||||
|
|
||||||
-- show timers only in timerframe and this is a bar button?
|
-- show timers only in timerframe and this is a bar button?
|
||||||
-- ---------------------------------------------------------
|
-- ---------------------------------------------------------
|
||||||
if( COE_Config:GetSaved( COEOPT_FRAMETIMERSONLY ) == 1 and
|
if (COE_Config:GetSaved(COEOPT_FRAMETIMERSONLY) == 1 and this:GetParent() ~=
|
||||||
this:GetParent() ~= COETimerFrame ) then
|
COETimerFrame) then
|
||||||
timertext:Hide();
|
timertext:Hide();
|
||||||
overlaytex:Hide();
|
overlaytex:Hide();
|
||||||
return;
|
return;
|
||||||
end;
|
end
|
||||||
|
|
||||||
if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 1) then
|
if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 1) then
|
||||||
if (COE_Totem:IsTimerActive(this.totem)) then
|
if (COE_Totem:IsTimerActive(this.totem)) then
|
||||||
@@ -1641,7 +1597,9 @@ function COE_Totem:SetTimerText()
|
|||||||
-- if timer has just expired, deactivate it
|
-- if timer has just expired, deactivate it
|
||||||
-- if it isn't active anyway, the call doesn't hurt
|
-- if it isn't active anyway, the call doesn't hurt
|
||||||
-- -------------------------------------------------
|
-- -------------------------------------------------
|
||||||
COE_Totem:DeactivateTimer( this.totem );
|
-- TODO: I'm removing this as it appears entirely unnecessary to be done in this method
|
||||||
|
-- COE:DebugMessage("Calling DeactivateTimer with totem: ".. this.totem.SpellName);
|
||||||
|
-- COE_Totem:DeactivateTimer( this.totem );
|
||||||
|
|
||||||
timertext:Hide();
|
timertext:Hide();
|
||||||
overlaytex:Hide();
|
overlaytex:Hide();
|
||||||
@@ -1653,7 +1611,6 @@ function COE_Totem:SetTimerText()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ =============================================================================================
|
--[[ =============================================================================================
|
||||||
|
|
||||||
T I M E R F R A M E
|
T I M E R F R A M E
|
||||||
@@ -1668,15 +1625,12 @@ end
|
|||||||
function COE_Totem:InitTimerFrame()
|
function COE_Totem:InitTimerFrame()
|
||||||
-- addon loaded?
|
-- addon loaded?
|
||||||
-- --------------
|
-- --------------
|
||||||
if( not COE.Initialized ) then
|
if (not COE.Initialized) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
this.UpdateTime = 0;
|
this.UpdateTime = 0;
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE_Totem:UpdateTimerFrame
|
METHOD: COE_Totem:UpdateTimerFrame
|
||||||
|
|
||||||
@@ -1687,15 +1641,12 @@ function COE_Totem:UpdateTimerFrame( elapsed )
|
|||||||
-- check if visual update is necessary
|
-- check if visual update is necessary
|
||||||
-- ------------------------------------
|
-- ------------------------------------
|
||||||
this.UpdateTime = this.UpdateTime + elapsed;
|
this.UpdateTime = this.UpdateTime + elapsed;
|
||||||
if( this.UpdateTime <= COE.UpdateInterval ) then
|
if (this.UpdateTime <= COE.UpdateInterval) then return; end
|
||||||
return;
|
|
||||||
end
|
|
||||||
|
|
||||||
-- set scaling
|
-- set scaling
|
||||||
-- ------------
|
-- ------------
|
||||||
this:SetScale(COE_Config:GetSaved(COEOPT_SCALING));
|
this:SetScale(COE_Config:GetSaved(COEOPT_SCALING));
|
||||||
|
|
||||||
|
|
||||||
local k;
|
local k;
|
||||||
local lastbutton = nil;
|
local lastbutton = nil;
|
||||||
local count = 0;
|
local count = 0;
|
||||||
@@ -1709,17 +1660,23 @@ function COE_Totem:UpdateTimerFrame( elapsed )
|
|||||||
if (lastbutton) then
|
if (lastbutton) then
|
||||||
if (COE_Config:GetSaved(COEOPT_DISPLAYALIGN) == COEMODE_BOX) then
|
if (COE_Config:GetSaved(COEOPT_DISPLAYALIGN) == COEMODE_BOX) then
|
||||||
if (count == 2) then
|
if (count == 2) then
|
||||||
button:SetPoint( "TOPRIGHT", lastbutton:GetName(), "BOTTOMLEFT", -COEUI_BUTTONGAP, -COEUI_BUTTONGAP );
|
button:SetPoint("TOPRIGHT", lastbutton:GetName(),
|
||||||
|
"BOTTOMLEFT", -COEUI_BUTTONGAP,
|
||||||
|
-COEUI_BUTTONGAP);
|
||||||
lastbutton = button;
|
lastbutton = button;
|
||||||
else
|
else
|
||||||
button:SetPoint( "TOPLEFT", lastbutton:GetName(), "TOPRIGHT", COEUI_BUTTONGAP, 0 );
|
button:SetPoint("TOPLEFT", lastbutton:GetName(),
|
||||||
|
"TOPRIGHT", COEUI_BUTTONGAP, 0);
|
||||||
lastbutton = button;
|
lastbutton = button;
|
||||||
end
|
end
|
||||||
elseif( COE_Config:GetSaved( COEOPT_DISPLAYALIGN ) == COEMODE_VERTICAL ) then
|
elseif (COE_Config:GetSaved(COEOPT_DISPLAYALIGN) ==
|
||||||
button:SetPoint( "TOPLEFT", lastbutton:GetName(), "BOTTOMLEFT", 0, -COEUI_BUTTONGAP );
|
COEMODE_VERTICAL) then
|
||||||
|
button:SetPoint("TOPLEFT", lastbutton:GetName(),
|
||||||
|
"BOTTOMLEFT", 0, -COEUI_BUTTONGAP);
|
||||||
lastbutton = button;
|
lastbutton = button;
|
||||||
else
|
else
|
||||||
button:SetPoint( "TOPLEFT", lastbutton:GetName(), "TOPRIGHT", COEUI_BUTTONGAP, 0 );
|
button:SetPoint("TOPLEFT", lastbutton:GetName(), "TOPRIGHT",
|
||||||
|
COEUI_BUTTONGAP, 0);
|
||||||
lastbutton = button;
|
lastbutton = button;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
+51
-24
@@ -5,11 +5,7 @@
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
@@ -23,6 +19,12 @@ COECOL_TOTEMCLEANSING = 3;
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
COE["DebugMode"] = false;
|
COE["DebugMode"] = false;
|
||||||
|
|
||||||
|
--[[ ----------------------------------------------------------------
|
||||||
|
When EventPrintMode is set to true, all event calls not caught
|
||||||
|
will write to a debug message into the chat frame. Requires
|
||||||
|
DebugMode enabled
|
||||||
|
-------------------------------------------------------------------]]
|
||||||
|
COE["EventPrintMode"] = false;
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
These variables control frame updates
|
These variables control frame updates
|
||||||
@@ -34,7 +36,6 @@ COE["DebugMode"] = false;
|
|||||||
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
|
||||||
scanned for debuffs that are curable by totems
|
scanned for debuffs that are curable by totems
|
||||||
@@ -44,7 +45,6 @@ COE["ForceUpdate"] = COE.UpdateInterval * 2;
|
|||||||
COE["AdvisorInterval"] = 1;
|
COE["AdvisorInterval"] = 1;
|
||||||
COE["AdvisorWarningInterval"] = 7;
|
COE["AdvisorWarningInterval"] = 7;
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:Init
|
METHOD: COE:Init
|
||||||
|
|
||||||
@@ -63,6 +63,7 @@ function COE:Init()
|
|||||||
COE.Initialized = true;
|
COE.Initialized = true;
|
||||||
|
|
||||||
this:RegisterEvent("VARIABLES_LOADED");
|
this:RegisterEvent("VARIABLES_LOADED");
|
||||||
|
this:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF");
|
||||||
|
|
||||||
-- register shell command
|
-- register shell command
|
||||||
-- -----------------------
|
-- -----------------------
|
||||||
@@ -70,9 +71,24 @@ function COE:Init()
|
|||||||
SLASH_COE1 = "/coe";
|
SLASH_COE1 = "/coe";
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[ ----------------------------------------------------------------
|
||||||
|
METHOD: COE:FindSpellId
|
||||||
|
|
||||||
|
PURPOSE: Utility function that can provide spell ID from name.
|
||||||
|
Run in client chat with '/script COE:FindSpellName("a_spell_name")'.
|
||||||
|
-------------------------------------------------------------------]]
|
||||||
|
function COE:FindSpellId(spellNameTarget)
|
||||||
|
local spellName;
|
||||||
|
for i = 1, 1000 do
|
||||||
|
spellName = GetSpellName(i, BOOKTYPE_SPELL);
|
||||||
|
if (spellName == spellNameTarget) then
|
||||||
|
print(spellName .. "is id: " .. i);
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:OnEvent
|
METHOD: COE:OnEvent
|
||||||
@@ -80,14 +96,29 @@ end
|
|||||||
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();
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
elseif (event == "CHAT_MSG_SPELL_SELF_BUFF") then
|
||||||
|
-- resolve Totemic Recall event
|
||||||
|
if (string.find(arg1, "Mana from Totemic Recall")) then
|
||||||
|
COE:DebugMessage("Totemic Recall initiating reset of timers.");
|
||||||
|
COE_Totem:ResetTimers();
|
||||||
|
|
||||||
|
-- Resolve Totem cast event
|
||||||
|
elseif (string.find(arg1, "Totem")) then
|
||||||
|
local totem = COE_Totem:GetTotemFromText(arg1);
|
||||||
|
if (totem) then COE_Totem:ActivateTotem(totem); end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:Message
|
METHOD: COE:Message
|
||||||
@@ -96,8 +127,7 @@ end
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
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
|
||||||
@@ -107,10 +137,9 @@ end;
|
|||||||
-------------------------------------------------------------------]]
|
-------------------------------------------------------------------]]
|
||||||
function COE:DebugMessage(msg)
|
function COE:DebugMessage(msg)
|
||||||
if (COE.DebugMode) then
|
if (COE.DebugMode) then
|
||||||
DEFAULT_CHAT_FRAME:AddMessage( "[COE] " .. msg, 0.5, 0.5, 0.5 );
|
DEFAULT_CHAT_FRAME:AddMessage("[COE] " .. msg, 1, 0, 0);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:Notification
|
METHOD: COE:Notification
|
||||||
@@ -138,8 +167,7 @@ function COE:Notification( msg, color )
|
|||||||
-- ------------
|
-- ------------
|
||||||
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
|
||||||
@@ -158,7 +186,6 @@ function COE:ToggleConfigFrame()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COEProcessShellCommand
|
METHOD: COEProcessShellCommand
|
||||||
|
|
||||||
@@ -169,9 +196,12 @@ function COEProcessShellCommand( msg )
|
|||||||
if (msg == "" or msg == "config") then
|
if (msg == "" or msg == "config") then
|
||||||
COE:ToggleConfigFrame();
|
COE:ToggleConfigFrame();
|
||||||
|
|
||||||
elseif( msg == "list" ) then
|
elseif (msg == "list" or msg == "help") then
|
||||||
COE:DisplayShellCommands();
|
COE:DisplayShellCommands();
|
||||||
|
|
||||||
|
elseif (msg == "debug") then
|
||||||
|
COE["DebugMode"] = not COE.DebugMode;
|
||||||
|
COE:Message(tostring(COE.DebugMode));
|
||||||
elseif (msg == "nextset") then
|
elseif (msg == "nextset") then
|
||||||
COE_Totem:SwitchToNextSet();
|
COE_Totem:SwitchToNextSet();
|
||||||
|
|
||||||
@@ -208,14 +238,11 @@ function COEProcessShellCommand( msg )
|
|||||||
|
|
||||||
else
|
else
|
||||||
local _, _, arg = string.find(msg, "set (.*)");
|
local _, _, arg = string.find(msg, "set (.*)");
|
||||||
if( arg ) then
|
if (arg) then COE_Totem:SwitchToSet(arg); end
|
||||||
COE_Totem:SwitchToSet( arg );
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ----------------------------------------------------------------
|
--[[ ----------------------------------------------------------------
|
||||||
METHOD: COE:DisplayShellCommands
|
METHOD: COE:DisplayShellCommands
|
||||||
|
|
||||||
@@ -237,10 +264,10 @@ function COE:DisplayShellCommands()
|
|||||||
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
|
||||||
|
|
||||||
|
|||||||
+82
-80
@@ -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";
|
||||||
@@ -51,6 +46,10 @@ 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
|
||||||
|
-- ----------------
|
||||||
|
COESTR_TOTEMICRECALL = "Totemic Recall";
|
||||||
|
COESTR_TOTEMICRECALLID = 35;
|
||||||
|
|
||||||
-- Totem Advisor
|
-- Totem Advisor
|
||||||
-- --------------
|
-- --------------
|
||||||
@@ -62,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";
|
||||||
@@ -75,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";
|
||||||
@@ -83,63 +81,61 @@ 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";
|
||||||
@@ -148,21 +144,21 @@ 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_DISPLAYALIGN = {"Box", "Vertical", "Horizontal"}
|
||||||
|
|
||||||
COEUI_PVPSETS = { "[PVP] Druid", "[PVP] Hunter", "[PVP] Mage", "[PVP] Paladin", "[PVP] Priest",
|
COEUI_PVPSETS = {
|
||||||
"[PVP] Rogue", "[PVP] Shaman", "[PVP] Warlock", "[PVP] Warrior" }
|
"[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"};
|
||||||
@@ -173,7 +169,6 @@ COEUI_DIRECTION = { "Up", "Down", "Left", "Right" };
|
|||||||
|
|
||||||
COEUI_FRAMEMODE = {"Closed", "Open", "Flex", "Hidden"};
|
COEUI_FRAMEMODE = {"Closed", "Open", "Flex", "Hidden"};
|
||||||
|
|
||||||
|
|
||||||
-- Key bindings
|
-- Key bindings
|
||||||
-- -------------
|
-- -------------
|
||||||
BINDING_HEADER_CALLOFELEMENTS = "Call Of Elements";
|
BINDING_HEADER_CALLOFELEMENTS = "Call Of Elements";
|
||||||
@@ -208,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";
|
||||||
@@ -220,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)";
|
||||||
|
|||||||
@@ -1,2 +1,7 @@
|
|||||||
# turtle-wow-call-of-elements
|
# turtle-wow-call-of-elements
|
||||||
Shaman totem addon for turtle wow. Based on https://github.com/laytya/CallOfElements, using an older version for vanilla client.
|
Shaman totem addon for turtle wow. Based on https://github.com/laytya/CallOfElements, using an older version for vanilla client.
|
||||||
|
|
||||||
|
To use the addon:
|
||||||
|
* download repo or release
|
||||||
|
* extract folder named "turtle-wow-call-of-elements-xxxx" from zip to turtle wow Interface/Addons folder path
|
||||||
|
* rename folder to "CallOfElements", make sure files are in CallOfElements folder
|
||||||
|
|||||||
Reference in New Issue
Block a user