Formatting changes

This commit is contained in:
MDGitHubRepo
2024-12-14 13:38:00 -05:00
parent b43c693353
commit 8f135ba494
3 changed files with 1235 additions and 1257 deletions
+106 -122
View File
@@ -8,18 +8,13 @@
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()
-------------------------------------------------------------------]]
COE_Totem["TimerHooks"] = {};
--[[ =============================================================================================
L O G I C
@@ -55,9 +50,7 @@ end
-------------------------------------------------------------------]]
function COE_Totem:ThrowTotem(element, id)
if( not COE.Initialized ) then
return;
end
if (not COE.Initialized) then return; end
-- get associated button
-- ----------------------
@@ -79,7 +72,6 @@ function COE_Totem:ThrowTotem( element, id )
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:RankModifierDown
@@ -105,7 +97,6 @@ function COE_Totem:RankModifierDown()
end
--[[ ----------------------------------------------------------------
METHOD: COESched_AdviseTotem
@@ -117,16 +108,17 @@ function COESched_AdviseTotem( totem, msg )
if (COE_Config:GetSaved(COEOPT_ADVISOR) == 1 and totem.Warn) then
-- issue warning
-- --------------
COE:Notification( string.format( COESTR_CLEANSINGTOTEM, msg ), COECOL_TOTEMCLEANSING );
COE:Notification(string.format(COESTR_CLEANSINGTOTEM, msg),
COECOL_TOTEMCLEANSING);
-- reschedule
-- -----------
Chronos.scheduleByName( "COEAdvise" .. msg, COE.AdvisorWarningInterval, COESched_AdviseTotem, totem, msg );
Chronos.scheduleByName("COEAdvise" .. msg, COE.AdvisorWarningInterval,
COESched_AdviseTotem, totem, msg);
end
end
--[[ ----------------------------------------------------------------
METHOD: COESched_RunAdvisor
@@ -137,9 +129,7 @@ function COESched_RunAdvisor()
-- advisor still activated?
-- -------------------------
if( COE_Config:GetSaved( COEOPT_ADVISOR ) == 0 ) then
return;
end
if (COE_Config:GetSaved(COEOPT_ADVISOR) == 0) then return; end
local warnPoison, warnDisease, warnTremor = false, false, false;
local poison, disease, tremor;
@@ -156,9 +146,7 @@ function COESched_RunAdvisor()
-- -----------
local i;
for i = 1, GetNumPartyMembers() do
if( warnPoison and warnDisease and warnTremor ) then
break;
end
if (warnPoison and warnDisease and warnTremor) then break end
-- scan party member
-- ------------------
@@ -171,7 +159,8 @@ function COESched_RunAdvisor()
-- scan party member's pet
-- ------------------------
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;
warnDisease = warnDisease or disease;
@@ -199,7 +188,8 @@ function COESched_RunAdvisor()
if (not COE.CleansingTotems.Disease.Warn) then
COE.CleansingTotems.Disease.Warn = true;
COESched_AdviseTotem( COE.CleansingTotems.Disease, COESTR_TOTEMDISEASE );
COESched_AdviseTotem(COE.CleansingTotems.Disease,
COESTR_TOTEMDISEASE);
end
else
COE.CleansingTotems.Disease.Warn = false;
@@ -223,7 +213,6 @@ function COESched_RunAdvisor()
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:ScanTargetForDebuff
@@ -284,7 +273,6 @@ function COE_Totem:ScanTargetForDebuff( target )
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:ThrowAdvisedTotem
@@ -315,7 +303,6 @@ function COE_Totem:ThrowAdvisedTotem()
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:IsAdvisedTotem
@@ -323,9 +310,12 @@ end
-------------------------------------------------------------------]]
function COE_Totem:IsAdvisedTotem(totem)
if( (COE.CleansingTotems.Tremor.Warn and totem == COE.CleansingTotems.Tremor.Totem) or
(COE.CleansingTotems.Disease.Warn and totem == COE.CleansingTotems.Disease.Totem) or
(COE.CleansingTotems.Poison.Warn and totem == COE.CleansingTotems.Poison.Totem) ) then
if ((COE.CleansingTotems.Tremor.Warn and totem ==
COE.CleansingTotems.Tremor.Totem) or
(COE.CleansingTotems.Disease.Warn and totem ==
COE.CleansingTotems.Disease.Totem) or
(COE.CleansingTotems.Poison.Warn and totem ==
COE.CleansingTotems.Poison.Totem)) then
return true;
else
return false;
@@ -333,14 +323,12 @@ function COE_Totem:IsAdvisedTotem( totem )
end
--[[ =============================================================================================
T O T E M - S E T S
================================================================================================]]
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:SwitchNamedSet
@@ -369,7 +357,6 @@ function COE_Totem:SwitchNamedSet()
return false;
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:SwitchPVPSet
@@ -396,7 +383,7 @@ function COE_Totem:SwitchPVPSet()
COE_Totem:SwitchToSet(COE.LastActiveSet);
else
COE_Totem:SwitchToSet(COEUI_DEFAULTSET);
end;
end
end
end
@@ -405,7 +392,6 @@ function COE_Totem:SwitchPVPSet()
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:SwitchToNextSet
@@ -438,14 +424,14 @@ function COE_Totem:SwitchToNextSet()
else
-- 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
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:SwitchToPriorSet
@@ -467,7 +453,8 @@ function COE_Totem:SwitchToPriorSet()
-- default set is active
-- 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
-- first custom set is active
@@ -478,14 +465,14 @@ function COE_Totem:SwitchToPriorSet()
else
-- 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
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:SwitchToSet
@@ -493,9 +480,7 @@ end
-------------------------------------------------------------------]]
function COE_Totem:SwitchToSet(name)
if( COE_Config:GetSaved( COEOPT_ENABLESETS ) == 0 ) then
return;
end
if (COE_Config:GetSaved(COEOPT_ENABLESETS) == 0) then return; end
local pvpset = false;
@@ -508,7 +493,7 @@ function COE_Totem:SwitchToSet( name )
-- ----------
set = i;
pvpset = i ~= COESET_DEFAULT;
break;
break
end
end
@@ -520,14 +505,12 @@ function COE_Totem:SwitchToSet( name )
-- set found
-- ----------
set = COESET_DEFAULT + i;
break;
break
end
end
end
if( not set ) then
return;
end
if (not set) then return; end
-- activate set if not already active
-- chech this to stop notification spamming in a duel
@@ -535,9 +518,7 @@ function COE_Totem:SwitchToSet( name )
if (COE_Config:GetSaved(COEOPT_ACTIVESET) ~= set) then
COE_Config:ActivateSet(set);
if( not pvpset ) then
COE.LastActiveSet = name;
end
if (not pvpset) then COE.LastActiveSet = name; end
-- reset set cycle
-- ----------------
@@ -550,7 +531,6 @@ function COE_Totem:SwitchToSet( name )
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:ThrowSet
@@ -569,7 +549,8 @@ function COE_Totem:ThrowSet()
local k;
for k = 1, 4 do
local element = COE:LocalizedElement( COE.TotemSets[activeset].CastOrder[k] );
local element = COE:LocalizedElement(
COE.TotemSets[activeset].CastOrder[k]);
local totem = COE.TotemSets[activeset][element];
if (COE.SetCycle[element] == false and totem) then
@@ -579,7 +560,8 @@ function COE_Totem:ThrowSet()
if (totem.TrinketSlot) then
-- 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
UseInventoryItem(totem.TrinketSlot);
@@ -590,10 +572,13 @@ function COE_Totem:ThrowSet()
else
-- 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);
if (start == 0 and duration == 0) then
CastSpellByName( COE.TotemSets[activeset][element].SpellName );
CastSpellByName(COE.TotemSets[activeset][element]
.SpellName);
return;
end
end
@@ -602,7 +587,6 @@ function COE_Totem:ThrowSet()
end
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:ResetSetCycle
@@ -615,7 +599,6 @@ function COE_Totem:ResetSetCycle()
end
--[[ =============================================================================================
T I M E R - L O G I C
@@ -632,7 +615,8 @@ end
function COE_Totem:SetPendingTotem(totem, rank)
if (totem) then
COE:DebugMessage( "Setting pending totem: " .. totem.SpellName .. " with rank: " .. rank );
COE:DebugMessage("Setting pending totem: " .. totem.SpellName ..
" with rank: " .. rank);
COE.TotemPending.Totem = totem;
COE.TotemPending.UseRank = rank;
@@ -645,7 +629,8 @@ function COE_Totem:SetPendingTotem( totem, rank )
-- -----------------------------------------
COE:DebugMessage("Setting pending timeout to: " .. timeout .. " msec");
Chronos.scheduleByName( "COE_Pending", timeout, COESched_CheckPendingTotem );
Chronos.scheduleByName("COE_Pending", timeout,
COESched_CheckPendingTotem);
else
COE.TotemPending.Totem = nil;
COE.TotemPending.UseRank = 0;
@@ -653,7 +638,6 @@ function COE_Totem:SetPendingTotem( totem, rank )
end
--[[ ----------------------------------------------------------------
METHOD: COESched_CheckPendingTotem
@@ -664,13 +648,13 @@ function COESched_CheckPendingTotem()
-- if there is still a pending totem it has timed out
-- ---------------------------------------------------
if (COE.TotemPending.Totem) then
COE:DebugMessage( "Pending totem has timed out: " .. COE.TotemPending.Totem.SpellName );
COE:DebugMessage("Pending totem has timed out: " ..
COE.TotemPending.Totem.SpellName);
COE_Totem:SetPendingTotem(nil);
end
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:ActivatePendingTotem
@@ -678,37 +662,47 @@ end
still active timer of the same element
-------------------------------------------------------------------]]
function COE_Totem:ActivatePendingTotem(totem)
COE:DebugMessage("Method Executing: ActivatePendingTotem with totem parameter ".. totem.SpellName);
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);
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 );
end
if (active) then COE_Totem:DeactivateTimer(active); end
-- activate timer
-- ---------------
Chronos.startTimer("COE" .. totem.SpellName);
totem.CurDuration = COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank].Duration;
totem.CurHealth = COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank].Health;
totem.CurDuration = COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank]
.Duration;
totem.CurHealth = COE.TotemPending.Totem.Ranks[COE.TotemPending.UseRank]
.Health;
-- activate cooldown timer if this totem has a cooldown
-- -----------------------------------------------------
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.scheduleByName( "COECooldownSwitch" .. totem.SpellName, totem.CurCooldown, COESched_CooldownEnd, totem );
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 );
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 );
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
-- ---------------------
@@ -740,17 +734,18 @@ function COE_Totem:ActivatePendingTotem( totem )
-- 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 );
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 );
COE_Totem:Invalidate(getglobal("COE" .. totem.Element .. "Frame"),
false, false, true);
end
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:DeactivateTimer
@@ -788,19 +783,20 @@ function COE_Totem:DeactivateTimer( totem )
if (COE.TotemSets[activeset][totem.Element] and
COE.TotemSets[activeset][totem.Element].SpellName == totem.SpellName) then
COE:DebugMessage( "Element " .. totem.Element .. " in current cycle: UNSET" );
COE:DebugMessage("Element " .. totem.Element ..
" in current cycle: UNSET");
COE.SetCycle[totem.Element] = false;
end
-- 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
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:IsTimerActive
@@ -808,16 +804,14 @@ end
-------------------------------------------------------------------]]
function COE_Totem:IsTimerActive(totem)
if( not totem ) then
return false;
end
if (not totem) then return false; end
return (totem.CurDuration > 0) and
(totem.CurDuration - Chronos.getTimer( "COE" .. totem.SpellName ) > 0);
(totem.CurDuration - Chronos.getTimer("COE" .. totem.SpellName) >
0);
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:GetTimeLeft
@@ -833,7 +827,6 @@ function COE_Totem:GetTimeLeft( totem )
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:GetCooldownLeft
@@ -844,19 +837,21 @@ function COE_Totem:GetCooldownLeft( totem )
if (totem.CurCooldown == 0) then
return 0;
else
return totem.CurCooldown - Chronos.getTimer( "COECooldown" .. totem.SpellName );
return totem.CurCooldown -
Chronos.getTimer("COECooldown" .. totem.SpellName);
end
end
--[[ ----------------------------------------------------------------
METHOD: COESched_ExpirationWarning
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);
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
@@ -870,16 +865,17 @@ function COESched_ExpirationWarning( timemark, totem )
end
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
COE:Notification( string.format( COESTR_TOTEMEXPIRED, text ), COECOL_TOTEMDESTROYED );
COE:Notification(string.format(COESTR_TOTEMEXPIRED, text),
COECOL_TOTEMDESTROYED);
COE_Totem:DeactivateTimer(totem);
end
end
end
--[[ ----------------------------------------------------------------
METHOD: COESched_CooldownEnd
@@ -893,7 +889,6 @@ function COESched_CooldownEnd( totem )
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:TotemDamage
@@ -914,7 +909,8 @@ function COE_Totem:TotemDamage()
if (COE.TotemData[i].SpellName == match[1]) then
-- 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?
-- -----------------
@@ -922,28 +918,31 @@ function COE_Totem:TotemDamage()
if (COE.TotemData[i].CurHealth <= 0) then
COE:DebugMessage(match[1] .. " destroyed");
if( COE_Config:GetSaved( COEOPT_TIMERNOTIFICATIONS ) == 1 ) then
COE:Notification( string.format( COESTR_TOTEMDESTROYED, COE.TotemData[i].SpellName ),
if (COE_Config:GetSaved(COEOPT_TIMERNOTIFICATIONS) ==
1) then
COE:Notification(string.format(
COESTR_TOTEMDESTROYED,
COE.TotemData[i].SpellName),
COECOL_TOTEMDESTROYED);
end
COE_Totem:DeactivateTimer(COE.TotemData[i]);
else
COE:DebugMessage( match[1] .. " took " .. match[2] .. " damage. " ..
COE:DebugMessage(
match[1] .. " took " .. match[2] .. " damage. " ..
COE.TotemData[i].CurHealth .. " health left");
end
end
break;
break
end
end
break;
break
end
end
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:ResetTimers
@@ -961,7 +960,6 @@ function COE_Totem:ResetTimers()
end
--[[ =============================================================================================
T I M E R - H O O K S
@@ -1004,7 +1002,6 @@ function COE_Totem:SetupTimerHooks()
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:HookUseAction
@@ -1015,9 +1012,7 @@ function COE_Totem:HookUseAction( id, book )
-- use only when timers are enabled
-- ---------------------------------
if( COE_Config:GetSaved( COEOPT_ENABLETIMERS ) == 0 ) then
return;
end
if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 0) then return; end
-- get action tooltip
-- -------------------
@@ -1033,7 +1028,8 @@ function COE_Totem:HookUseAction( id, book )
trinket = text == COESTR_TRINKET_TOOLTIP;
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
rank = 0;
@@ -1065,14 +1061,12 @@ function COE_Totem:HookUseAction( id, book )
end
-- no totem spell. remove pending totem if set
-- --------------------------------------------
COE_Totem:SetPendingTotem(nil);
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:HookCastSpell
@@ -1083,9 +1077,7 @@ function COE_Totem:HookCastSpell( id, book )
-- use only when timers are enabled
-- ---------------------------------
if( COE_Config:GetSaved( COEOPT_ENABLETIMERS ) == 0 ) then
return;
end
if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 0) then return; end
-- get the associated totem object
-- --------------------------------
@@ -1108,7 +1100,6 @@ function COE_Totem:HookCastSpell( id, book )
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:HookCastSpellByName
@@ -1119,9 +1110,7 @@ function COE_Totem:HookCastSpellByName( SpellName )
-- use only when timers are enabled
-- ---------------------------------
if( COE_Config:GetSaved( COEOPT_ENABLETIMERS ) == 0 ) then
return;
end
if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 0) then return; end
-- extract rank information
-- -------------------------
@@ -1153,7 +1142,6 @@ function COE_Totem:HookCastSpellByName( SpellName )
end
--[[ ----------------------------------------------------------------
METHOD: COE_Totem:HookUseInventoryItem
@@ -1164,15 +1152,12 @@ function COE_Totem:HookUseInventoryItem( slotid )
-- use only when timers are enabled
-- ---------------------------------
if( COE_Config:GetSaved( COEOPT_ENABLETIMERS ) == 0 ) then
return;
end
if (COE_Config:GetSaved(COEOPT_ENABLETIMERS) == 0) then return; end
-- only use for trinket slots
-- ---------------------------
if( slotid ~= GetInventorySlotInfo( "Trinket0Slot" ) and slotid ~= GetInventorySlotInfo( "Trinket1Slot" ) ) then
return;
end
if (slotid ~= GetInventorySlotInfo("Trinket0Slot") and slotid ~=
GetInventorySlotInfo("Trinket1Slot")) then return; end
-- iterate through out totems and find the trinket totem
-- ------------------------------------------------------
@@ -1197,4 +1182,3 @@ function COE_Totem:HookUseInventoryItem( slotid )
end
+75 -81
View File
@@ -1,18 +1,14 @@
--[[ ----------------------------------------------------------------
E N G L I S H
-------------------------------------------------------------------]]
-- Errors
-------------------------------------------------------------------]] -- Errors
-- -------
COESTR_NOTASHAMAN = "You are not a shaman. Unloading Call Of Elements";
COESTR_NOTOTEM = "No totem available yet";
COESTR_UI_NOTASSIGNED = "<No text assigned>";
COESTR_INVALIDELEMENT = "Invalid element found in totem: ";
-- Notifications
-- --------------
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_HEALOOM = "Out of mana!";
-- String patterns
-- ----------------
COESTR_SCANTOTEMS = "Totem";
@@ -51,13 +46,11 @@ COESTR_MINAMOUNT = "(%d*) to";
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";
@@ -68,12 +61,12 @@ COESTR_TOTEMTREMOR = "Tremor Totem";
COESTR_CLEANSINGTOTEM = "Throw %s now!";
COESTR_TREMOR = {
"Sleep", "Terrify", "Psychic Scream", "Mind Control", "Bellowing Roar", "Fear",
"Intimidating Shout", "Panic", "Terrifying Screech", "Seduction",
"Howl of Terror", "Intimidating Growl", "Crystalline Slumber", "Druid's Slumber"
"Sleep", "Terrify", "Psychic Scream", "Mind Control", "Bellowing Roar",
"Fear", "Intimidating Shout", "Panic", "Terrifying Screech", "Seduction",
"Howl of Terror", "Intimidating Growl", "Crystalline Slumber",
"Druid's Slumber"
}
-- Tools
-- ---------
COESTR_TOTEMTOOLS_EARTH = "Earth";
@@ -81,7 +74,6 @@ COESTR_TOTEMTOOLS_FIRE = "Fire";
COESTR_TOTEMTOOLS_WATER = "Water";
COESTR_TOTEMTOOLS_AIR = "Air";
-- Elements
-- ---------
COESTR_ELEMENT_EARTH = "Earth";
@@ -89,63 +81,61 @@ COESTR_ELEMENT_FIRE = "Fire";
COESTR_ELEMENT_WATER = "Water";
COESTR_ELEMENT_AIR = "Air";
-- UI elements
-- ------------
COEUI_STRINGS = {
COE_ConfigClose = "Close";
COE_ConfigTotemTabPanel = "Totem Options";
COE_ConfigHealingTabPanel = "Healing Options";
COE_ConfigDebuffTabPanel = "Debuff Options";
COE_ConfigTotemTotemBar = "Totem Bars";
COE_ConfigTotemTotemOptions = "Options";
COE_ConfigTotemTotemSets = "Totem Sets";
COE_OptionEnableTotemBar = "Enable Totem Bar";
COE_OptionHideBackdrop = "Hide background when inactive";
COE_OptionEnableTimers = "Enable totem timers";
COE_OptionEnableTimerNotifications = "Enable notifications";
COE_OptionTTAlignment = "Tooltip Alignment";
COE_OptionDisplayMode = "Anchor Button";
COE_OptionDisplayAlignment = "Button Alignment";
COE_OptionAdvisor = "Enable totem advisor";
COE_OptionEnableSets = "Enable totem sets";
COE_OptionEnableAutoSwitch = "Autoswitch sets in PVP";
COE_OptionActiveSet = "Active totem set";
COE_OptionNewSet = "New set";
COE_OptionDeleteSet = "Delete set";
COE_OptionConfigureSet = "Configure set";
COE_OptionStopConfigureSet = "OK";
COE_OptionCastOrderString = "Cast Order";
COE_OptionConfigureBar = "Configure Totems";
COE_OptionFixBar = "Fix totem bar positions";
COE_OptionConfigureOrder = "Configure Order";
COE_OptionScanTotems = "Reload Totems";
COE_OptionCurrentFrame = "Configure Bar";
COE_OptionDirection = "Direction";
COE_OptionFrameMode = "Bar mode";
COE_OptionFlexCount = "Static buttons";
COE_OptionScaling = "Scaling";
COE_OptionEnableTimerFrame = "Show separate timer frame";
COE_OptionGroupBars = "Move bars as group";
COE_OptionOverrideRank = "Rank 1 modifier";
COE_OptionFrameTimersOnly = "Show timers ONLY in timer frame";
COE_ConfigClose = "Close",
COE_ConfigTotemTabPanel = "Totem Options",
COE_ConfigHealingTabPanel = "Healing Options",
COE_ConfigDebuffTabPanel = "Debuff Options",
COE_ConfigTotemTotemBar = "Totem Bars",
COE_ConfigTotemTotemOptions = "Options",
COE_ConfigTotemTotemSets = "Totem Sets",
COE_OptionEnableTotemBar = "Enable Totem Bar",
COE_OptionHideBackdrop = "Hide background when inactive",
COE_OptionEnableTimers = "Enable totem timers",
COE_OptionEnableTimerNotifications = "Enable notifications",
COE_OptionTTAlignment = "Tooltip Alignment",
COE_OptionDisplayMode = "Anchor Button",
COE_OptionDisplayAlignment = "Button Alignment",
COE_OptionAdvisor = "Enable totem advisor",
COE_OptionEnableSets = "Enable totem sets",
COE_OptionEnableAutoSwitch = "Autoswitch sets in PVP",
COE_OptionActiveSet = "Active totem set",
COE_OptionNewSet = "New set",
COE_OptionDeleteSet = "Delete set",
COE_OptionConfigureSet = "Configure set",
COE_OptionStopConfigureSet = "OK",
COE_OptionCastOrderString = "Cast Order",
COE_OptionConfigureBar = "Configure Totems",
COE_OptionFixBar = "Fix totem bar positions",
COE_OptionConfigureOrder = "Configure Order",
COE_OptionScanTotems = "Reload Totems",
COE_OptionCurrentFrame = "Configure Bar",
COE_OptionDirection = "Direction",
COE_OptionFrameMode = "Bar mode",
COE_OptionFlexCount = "Static buttons",
COE_OptionScaling = "Scaling",
COE_OptionEnableTimerFrame = "Show separate timer frame",
COE_OptionGroupBars = "Move bars as group",
COE_OptionOverrideRank = "Rank 1 modifier",
COE_OptionFrameTimersOnly = "Show timers ONLY in timer frame"
}
-- Tooltips
-- ---------
COEUI_TOOLTIPS = {
COE_ConfigTotemTab = "Shows the totem options";
COE_ConfigHealingTab = "Shows the healing 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_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_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_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_OptionGroupBars = "When you drag one bar,\nthe other bars will follow";
COE_ConfigTotemTab = "Shows the totem options",
COE_ConfigHealingTab = "Shows the healing 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_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_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_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_OptionGroupBars = "When you drag one bar,\nthe other bars will follow"
}
COESTR_TRINKET_TOOLTIP = "Enamored Water Spirit";
@@ -154,21 +144,21 @@ COESTR_TRINKET_TOTEM = "Ancient Mana Spring Totem";
-- Combo boxes
-- ------------
COEUI_TTALIGN = {
{ "ANCHOR_TOPLEFT"; "Top Left" };
{ "ANCHOR_LEFT"; "Left" };
{ "ANCHOR_BOTTOMLEFT"; "Bottom Left" };
{ "ANCHOR_TOPRIGHT"; "Top Right" };
{ "ANCHOR_RIGHT"; "Right" };
{ "ANCHOR_BOTTOMRIGHT"; "Bottom Right" };
{ "DISABLED"; "Disabled" };
{"ANCHOR_TOPLEFT", "Top Left"}, {"ANCHOR_LEFT", "Left"},
{"ANCHOR_BOTTOMLEFT", "Bottom Left"}, {"ANCHOR_TOPRIGHT", "Top Right"},
{"ANCHOR_RIGHT", "Right"}, {"ANCHOR_BOTTOMRIGHT", "Bottom Right"},
{"DISABLED", "Disabled"}
}
COEUI_DISPLAYMODE = {"Customize", "Timers Only", "Active Set"}
COEUI_DISPLAYALIGN = {"Box", "Vertical", "Horizontal"}
COEUI_PVPSETS = { "[PVP] Druid", "[PVP] Hunter", "[PVP] Mage", "[PVP] Paladin", "[PVP] Priest",
"[PVP] Rogue", "[PVP] Shaman", "[PVP] Warlock", "[PVP] Warrior" }
COEUI_PVPSETS = {
"[PVP] Druid", "[PVP] Hunter", "[PVP] Mage", "[PVP] Paladin",
"[PVP] Priest", "[PVP] Rogue", "[PVP] Shaman", "[PVP] Warlock",
"[PVP] Warrior"
}
COEUI_DEFAULTSET = "Default";
COEUI_OVERRIDERANK = {"No key", "Use SHIFT", "Use ALT", "Use CTRL"};
@@ -179,7 +169,6 @@ COEUI_DIRECTION = { "Up", "Down", "Left", "Right" };
COEUI_FRAMEMODE = {"Closed", "Open", "Flex", "Hidden"};
-- Key bindings
-- -------------
BINDING_HEADER_CALLOFELEMENTS = "Call Of Elements";
@@ -214,7 +203,6 @@ BINDING_NAME_TOTEMAIR5 = "Air Totem #5";
BINDING_NAME_TOTEMAIR6 = "Air Totem #6";
BINDING_NAME_TOTEMAIR7 = "Air Totem #7";
-- Key modifiers
-- --------------
COEMODIFIER_ALT = "ALT";
@@ -226,20 +214,26 @@ COEMODIFIER_SHIFT_SHORT = "S";
COEMODIFIER_NUMPAD = "Num Pad";
COEMODIFIER_NUMPAD_SHORT = "NP";
-- Shell commands
-- ---------------
COESHELL_INTRO = "Available shell commands for Call Of Elements:";
COESHELL_CONFIG = "'/coe' or '/coe config' - Shows the configuration dialog";
COESHELL_LIST = "'/coe list' - Shows this list";
COESHELL_NEXTSET = "'/coe nexset' - Switches to the next custom totem set or the default set";
COESHELL_PRIORSET = "'/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_NEXTSET =
"'/coe nexset' - Switches to the next custom totem set or the default set";
COESHELL_PRIORSET =
"'/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_RESETFRAMES = "'/coe resetframes' - Returns all element bars to the screen center";
COESHELL_RESETORDERING = "'/coe resetordering' - Resets the ordering of your totem bars";
COESHELL_RESETFRAMES =
"'/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_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_ADVISED = "'/coe advised' - Throws the next advised totem";