5 Commits

Author SHA1 Message Date
MDGitHubRepo f68fb493a4 Rewrote totemic recall trigger to a different event.
Rewrote the totemic recall trigger logic and removed resent message in method.
2024-12-02 16:37:49 -05:00
MDGitHubRepo 82128bc35f Added improvement for when Totemic Recall
When clicked very quickly after CD ends, the timers would not remove. This should fix it.
2024-12-01 16:24:31 -05:00
MDGitHubRepo e109bf4bfd Fixed totemic recall reset logic.
Totemic recall needs to reset totem timers.
2024-12-01 16:05:15 -05:00
MDGitHubRepo b347b60491 Update README.md 2024-11-29 13:31:45 -05:00
MDGitHubRepo a277d08198 Update README.md 2024-11-29 13:29:31 -05:00
6 changed files with 89 additions and 16 deletions
+30
View File
@@ -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"
]
}
]
}
+7 -7
View File
@@ -37,10 +37,8 @@ function COE_Totem:Rescan()
-- Reset all active totems
-- ------------------------
COE_Totem:DeactivateTimer( COE.ActiveTotems.Earth );
COE_Totem:DeactivateTimer( COE.ActiveTotems.Fire );
COE_Totem:DeactivateTimer( COE.ActiveTotems.Water );
COE_Totem:DeactivateTimer( COE.ActiveTotems.Air );
COE_Totem:ResetTimers();
COE.ActiveTotems.Earth = nil;
COE.ActiveTotems.Fire = nil;
COE.ActiveTotems.Water = nil;
@@ -50,7 +48,6 @@ function COE_Totem:Rescan()
COETotemFrame.Reconfigure = true;
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:ThrowTotem
@@ -681,9 +678,11 @@ end
still active timer of the same element
-------------------------------------------------------------------]]
function COE_Totem:ActivatePendingTotem( totem )
COE:DebugMessage("Method Executing: ActivatePendingTotem with totem parameter ".. totem.SpellName);
-- deactivate still active totem of the same element
-- --------------------------------------------------
COE:DebugMessage("Method Executing: ActivatePendingTotem - identifying active totems of type".. COE.TotemPending.Totem.Element);
local active = COE.ActiveTotems[COE.TotemPending.Totem.Element];
if( active ) then
COE_Totem:DeactivateTimer( active );
@@ -857,6 +856,7 @@ end
PURPOSE: Issues an expiration warning for the specified 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
COE_Config:GetSaved( COEOPT_ENABLETIMERS ) == 1 and
@@ -901,6 +901,7 @@ end
a notification if the totem is destroyed
-------------------------------------------------------------------]]
function COE_Totem:TotemDamage()
COE:DebugMessage("Method Executing: TotemDamage");
local num, regex, i;
for num, regex in COESTR_TOTEMDAMAGE do
@@ -949,6 +950,7 @@ end
PURPOSE: Resets all active timers to zero
-------------------------------------------------------------------]]
function COE_Totem:ResetTimers()
COE:DebugMessage("Method Executing: COE_Totem:ResetTimers");
local k;
for k = 1, 4 do
@@ -957,8 +959,6 @@ function COE_Totem:ResetTimers()
end
end
COE:Message( COESTR_RESET );
end
+3 -2
View File
@@ -1562,7 +1562,6 @@ end
associated totem has an active timer
-------------------------------------------------------------------]]
function COE_Totem:SetTimerText()
if( this.totem == COE.NoTotem ) then
return;
end;
@@ -1641,7 +1640,9 @@ function COE_Totem:SetTimerText()
-- if timer has just expired, deactivate it
-- 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();
overlaytex:Hide();
+34 -3
View File
@@ -23,6 +23,12 @@ COECOL_TOTEMCLEANSING = 3;
-------------------------------------------------------------------]]
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
@@ -63,6 +69,7 @@ function COE:Init()
COE.Initialized = true;
this:RegisterEvent( "VARIABLES_LOADED" );
this:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF");
-- register shell command
-- -----------------------
@@ -70,9 +77,24 @@ function COE:Init()
SLASH_COE1="/coe";
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
@@ -85,10 +107,19 @@ function COE:OnEvent( event )
-- fix saved variables if this update has to do so
-- ------------------------------------------------
COE:FixSavedVariables();
elseif (event == "CHAT_MSG_SPELL_SELF_BUFF") then
if (string.find(arg1, "Mana from Totemic Recall")) then
COE:DebugMessage("Totemic Recall initiating reset of timers.");
COE_Totem:ResetTimers();
end
elseif (COE.EventPrintMode) then
COE:DebugMessage(event);
end
end
--[[ ----------------------------------------------------------------
METHOD: COE:Message
@@ -107,7 +138,7 @@ end;
-------------------------------------------------------------------]]
function COE:DebugMessage( msg )
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;
+6
View File
@@ -52,6 +52,12 @@ COESTR_MAXAMOUNT = "to (%d*)";
COESTR_TRINKET = "^.*%[Enamored Water Spirit%].*$";
-- Spell Names and IDs
-- ----------------
COESTR_TOTEMICRECALL = "Totemic Recall";
COESTR_TOTEMICRECALLID = 35;
-- Totem Advisor
-- --------------
COESTR_POISON = "Poison";
+5
View File
@@ -1,2 +1,7 @@
# 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.
To use the addon:
* download repo or release
* extract files to folder in turtle wow Interface/Addons folder path
* rename folder to "CallOfElements"