Skip to content

Commit

Permalink
Merge pull request #166 from ennvina/sod-only
Browse files Browse the repository at this point in the history
More SoD dev
  • Loading branch information
ennvina authored Dec 13, 2023
2 parents ec43e07 + b827703 commit f38f624
Show file tree
Hide file tree
Showing 27 changed files with 393 additions and 94 deletions.
11 changes: 8 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"GetTime",
"WOW_PROJECT_ID",
"WOW_PROJECT_CLASSIC",
"WOW_PROJECT_BURNING_CRUSADE_CLASSIC",
"WOW_PROJECT_WRATH_CLASSIC",
"Ambiguate",
"C_ChatInfo",
"RegisterAddonMessagePrefix",
Expand Down Expand Up @@ -138,6 +140,7 @@
"SpellActivationOverlayOptionsPanelSpellAlertOffsetSlider",
"SpellActivationOverlayOptionsPanelSpellAlertTimerSlider",
"SpellActivationOverlayOptionsPanelSpellAlertTestButton",
"SpellActivationOverlayOptionsPanelSpellAlertDebugButton",
"SpellActivationOverlayFrame",
"SpellActivationOverlayOptionsPanelGlowingButtons",
"SpellActivationOverlayContainerFrame",
Expand Down Expand Up @@ -173,7 +176,6 @@
"STATUS_TEXT_BOTH",
"ACTION_SPELL_AURA_APPLIED_DOSE",
"GetFileIDFromPath",
"WOW_PROJECT_WRATH_CLASSIC",
"RACE_CLASS_ONLY",
"DEFAULT",
"UnitCanAttack",
Expand All @@ -185,10 +187,13 @@
"Settings",
"UnitExists",
"GetItemInfo",
"SAO_DEBUG",
"DISABLE",
"ENABLE",
"IsPlayerSpell"
"IsPlayerSpell",
"C_Engraving",
"COMBATLOG_HIGHLIGHT_ABILITY",
"AVAILABLE",
"ON_COOLDOWN"
],
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#4f71dc",
Expand Down
8 changes: 5 additions & 3 deletions SpellActivationOverlay.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Interface: 30403
## Title: |TInterface/Icons/Spell_Frost_Stun:16:16:0:0:512:512:64:448:64:448|t SpellActivationOverlay |cffa2f3ff1.1.1|r
## Title: |TInterface/Icons/Spell_Frost_Stun:16:16:0:0:512:512:64:448:64:448|t SpellActivationOverlay |cffa2f3ff1.1.2|r
## Notes: Mimic Spell Activation Overlays from Retail
## Author: Vinny
## Version: 1.1.1
## Author: Vinny/Ennvina
## Version: 1.1.2
## SavedVariables: SpellActivationOverlayDB

# SpellActivationOverlay.lua, SpellActivationOverlay.xml and all textures
Expand All @@ -23,6 +23,8 @@ components\events.lua
components\glow.lua
components\item.lua
components\overlay.lua
components\project.lua
components\rune.lua
components\spell.lua
components\util.lua

Expand Down
16 changes: 16 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
## SpellActivationOverlay Changelog

#### v1.1.2 (2023-12-12)

- Seasonal effects are no longer displayed as options in non-Seasonal realms
- Updated SAO: Rogue's Riposte can now trigger independently of cooldown
- Updated GAB: Rogue's Riposte can now trigger independently of cooldown
- Rogue's new options are independent; make sure to enable both, if needed
- Rogue new options are disabled by default, similar to Warrior stance options
- Mage's Arcane Blast should now trigger correctly (Season of Discovery only)
- Season of Discovery action counters should now glow correctly

The action counter fix includes the following spells and abilities:
- Hunter's Flanking Strike
- Shaman's Molten Blast
- Warrior's Raging Blow
- Warrior's Victory Rush (fixed for Season of Discovery only, Wrath was fine)

#### v1.1.1 (2023-12-05)

- New SAO: Mage's Arcane Blast
Expand Down
24 changes: 10 additions & 14 deletions classes/druid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ local function lazyCreateNaturesGraceVariants(self)
local textureVariant1 = "serendipity";
local textureVariant2 = "fury_of_stormrage";

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC or GetSpellInfo(spellID) then
if not SAO.IsEra() or GetSpellInfo(spellID) then
self:MarkTexture(textureVariant1);
self:MarkTexture(textureVariant2);
end
Expand All @@ -256,7 +256,7 @@ local function registerClass(self)
-- Track Eclipses with a custom CLEU function, so that eclipses can coexist with Omen of Clarity
-- self:RegisterAura("eclipse_lunar", 0, lunarSpellID, "eclipse_moon", "Left", 1, 255, 255, 255, true);
-- self:RegisterAura("eclipse_solar", 0, solarSpellID, "eclipse_sun", "Right (Flipped)", 1, 255, 255, 255, true);
if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then -- Must exclude Eclipses for Classic Era, because there are no Eclipses, but the fake spell IDs would be accepted
if not self.IsEra() then -- Must exclude Eclipses for Classic Era, because there are no Eclipses, but the fake spell IDs would be accepted
self:RegisterAura("eclipse_lunar", 0, lunarSpellID+1000000, "eclipse_moon", "Left", 1, 255, 255, 255, true); -- Fake spell ID, for option testing
self:RegisterAura("eclipse_solar", 0, solarSpellID+1000000, "eclipse_sun", "Right (Flipped)", 1, 255, 255, 255, true); -- Fake spell ID, for option testing
end
Expand Down Expand Up @@ -300,8 +300,8 @@ local function registerClass(self)
self:RegisterAura("elunes_wrath", 0, 64823, "shooting_stars", "Top", 1, 255, 255, 255, true, { starfire }); -- PvE tier 8

-- Fury of Stormrage (Season of Discovery)
local furyOfStormrage = 414800;
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC and GetSpellInfo(furyOfStormrage) then
if self.IsSoD() then
local furyOfStormrage = 414800;
self:RegisterAura("fury_of_stormrage", 0, furyOfStormrage, "fury_of_stormrage", "Top", 1, 255, 255, 255, true, { healingTouch });
end

Expand All @@ -313,14 +313,10 @@ local function registerClass(self)
local omenTextureResto = "natures_grace";
local lunarTexture = "eclipse_moon";
local solarTexture = "eclipse_sun";
if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC or GetSpellInfo(omenSpellID) then
self:MarkTexture(omenTextureFeral);
self:MarkTexture(omenTextureResto);
end
if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC or GetSpellInfo(lunarSpellID) then
self:MarkTexture(omenTextureFeral);
self:MarkTexture(omenTextureResto);
if not self.IsEra() then
self:MarkTexture(lunarTexture);
end
if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC or GetSpellInfo(solarSpellID) then
self:MarkTexture(solarTexture);
end
end
Expand Down Expand Up @@ -368,7 +364,7 @@ local function loadOptions(self)
self:AddOverlayOption(solarEclipseTalent, solarSpellID, 0, nil, nil, nil, solarSpellID+1000000); -- Spell ID not used by ActivateOverlay like typical overlays
self:AddOverlayOption(wrathOfEluneTalent, wrathOfEluneBuff);
self:AddOverlayOption(elunesWrathTalent, elunesWrathBuff);
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC and GetSpellInfo(furyOfStormrageBuff) then
if self.IsSoD() then
self:AddOverlayOption(furyOfStormrageTalent, furyOfStormrageBuff);
end
self:AddOverlayOption(naturesGraceTalent, naturesGraceBuff, 0, nil, naturesGraceVariants);
Expand All @@ -379,10 +375,10 @@ local function loadOptions(self)
self:AddGlowingOption(solarEclipseTalent, wrath, wrath);
self:AddGlowingOption(wrathOfEluneTalent, wrathOfEluneBuff, starfire);
self:AddGlowingOption(elunesWrathTalent, elunesWrathBuff, starfire);
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC and GetSpellInfo(furyOfStormrageBuff) then
if self.IsSoD() then
self:AddGlowingOption(furyOfStormrageTalent, furyOfStormrageBuff, healingTouch);
end
if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then -- Must exclude this option specifically for Classic Era, because the talent exists in Era but it has no proc
if not self.IsEra() then -- Must exclude this option specifically for Classic Era, because the talent exists in Era but it has no proc
self:AddGlowingOption(predatoryStrikesTalent, predatoryStrikesBuff, regrowth);
self:AddGlowingOption(predatoryStrikesTalent, predatoryStrikesBuff, healingTouch);
self:AddGlowingOption(predatoryStrikesTalent, predatoryStrikesBuff, nourish);
Expand Down
14 changes: 10 additions & 4 deletions classes/hunter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ local function registerClass(self)
self:RegisterAura("kill_shot", 0, killShot, nil, "", 0, 0, 0, 0, false, { (GetSpellInfo(killShot)) });
self:RegisterCounter("kill_shot");

if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then
-- Mongoose Bite, Classic Era only because there is no longer a proc since Wrath
if self.IsEra() or self.IsTBC() then
-- Mongoose Bite, before Wrath because there is no longer a proc since Wrath
local mongooseBite = 1495;
self:RegisterAura("mongoose_bite", 0, mongooseBite, nil, "", 0, 0, 0, 0, false, { (GetSpellInfo(mongooseBite)) });
self:RegisterCounter("mongoose_bite");
end

if self.IsSoD() then
-- Flanking Strike (Season of Discovery)
local flankingStrike = 415320;
self:RegisterAura("flanking_strike", 0, flankingStrike, "tooth_and_claw", "Left + Right (Flipped)", 1, 255, 255, 255, true, { flankingStrike });
self:RegisterCounter("flanking_strike");

-- Cobra Strikes (Season of Discovery)
local cobraStrikes = 425714;
self:RegisterAura("cobra_strikes_1", 1, cobraStrikes, "monk_serpent", "Left", 0.7, 255, 255, 255, true);
self:RegisterAura("cobra_strikes_2", 2, cobraStrikes, "monk_serpent", "Left + Right (Flipped)", 0.7, 255, 255, 255, true);
Expand All @@ -62,15 +66,17 @@ local function loadOptions(self)

self:AddOverlayOption(improvedSteadyShotTalent, improvedSteadyShotBuff);
self:AddOverlayOption(lockAndLoadTalent, lockAndLoadBuff, 0, nil, nil, 2); -- setup any stacks, test with 2 stacks
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then
if self.IsSoD() then
self:AddOverlayOption(flankingStrike, flankingStrike);
self:AddOverlayOption(cobraStrikes, cobraStrikes, 0, nil, nil, 2); -- setup any stacks, test with 2 stacks
end

self:AddGlowingOption(nil, killShot, killShot);
self:AddGlowingOption(nil, counterattack, counterattack);
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then
if self.IsEra() or self.IsTBC() then
self:AddGlowingOption(nil, mongooseBite, mongooseBite);
end
if self.IsSoD() then
self:AddGlowingOption(nil, flankingStrike, flankingStrike);
end
self:AddGlowingOption(improvedSteadyShotTalent, improvedSteadyShotBuff, aimedShot);
Expand Down
32 changes: 15 additions & 17 deletions classes/mage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ local FrozenHandler = {
fakeSpellID = 5276+1000000, -- For option testing

saoTexture = "frozen_fingers",
saoScaleFactor = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC and 1 or 0.75, -- Scaling down on Wrath because of conflict
saoScaleFactor = (SAO.IsEra() or SAO.IsTBC()) and 1 or 0.75, -- Scaling down on Wrath because of conflict

-- Constants that will be initialized at init()
allSpellIDs = {},
Expand Down Expand Up @@ -462,10 +462,8 @@ local function lazyCreateClearcastingVariants(self)
local textureVariant1 = "genericarc_05";
local textureVariant2 = "genericarc_02";

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC or GetSpellInfo(spellID) then
self:MarkTexture(textureVariant1);
self:MarkTexture(textureVariant2);
end
self:MarkTexture(textureVariant1);
self:MarkTexture(textureVariant2);

local weakText = PET_BATTLE_COMBAT_LOG_DAMAGE_WEAK:gsub("[ ()]","");
local strongText = PET_BATTLE_COMBAT_LOG_DAMAGE_STRONG:gsub("[ ()]","");
Expand All @@ -489,11 +487,11 @@ local function registerClass(self)
-- Please look at HotStreakHandler and customCLEU for more information

-- Frost Procs
if WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC then
if self.IsWrath() then
local iceLanceAndDeepFreeze = { (GetSpellInfo(FrozenHandler.ice_lance[1])), (GetSpellInfo(FrozenHandler.deep_freeze[1])) };
self:RegisterAura("fingers_of_frost_1", 1, 74396, "frozen_fingers", "Left", 1, 255, 255, 255, true, iceLanceAndDeepFreeze);
self:RegisterAura("fingers_of_frost_2", 2, 74396, "frozen_fingers", "Left + Right (Flipped)", 1, 255, 255, 255, true, iceLanceAndDeepFreeze);
elseif GetSpellInfo(FrozenHandler.ice_lance_sod[1]) then
elseif self.IsSoD() then
local iceLanceSoD = { (GetSpellInfo(FrozenHandler.ice_lance_sod[1])) };
self:RegisterAura("fingers_of_frost_1_sod", 1, 400670, "frozen_fingers", "Left", 1, 255, 255, 255, true, iceLanceSoD);
self:RegisterAura("fingers_of_frost_2_sod", 2, 400670, "frozen_fingers", "Left + Right (Flipped)", 1, 255, 255, 255, true, iceLanceSoD);
Expand All @@ -507,8 +505,8 @@ local function registerClass(self)
lazyCreateClearcastingVariants(self);
self:RegisterAura("clearcasting", 0, 12536, clearcastingVariants.textureFunc, "Left + Right (Flipped)", 1.5, 192, 192, 192, false);

local arcaneBlastSoDBuff = 400573;
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC and GetSpellInfo(arcaneBlastSoDBuff) then
if self.IsSoD() then
local arcaneBlastSoDBuff = 400573;
local arcaneMissiles = 5143;
local arcaneExplosion = 1449;
-- local arcaneHealingSpellTBD = ...; -- @todo add healing spell that resets stacks, which might exist, according to the in-game tooltip
Expand Down Expand Up @@ -600,7 +598,7 @@ local function loadOptions(self)

self:AddOverlayOption(clearcastingTalent, clearcastingBuff, 0, nil, clearcastingVariants);
self:AddOverlayOption(missileBarrageTalent, missileBarrageBuff);
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC and GetSpellInfo(arcaneBlastSoDBuff) then
if self.IsSoD() then
self:AddOverlayOption(arcaneBlastSoDBuff, arcaneBlastSoDBuff, 0, oneToThreeStacks, nil, 3); -- setup any stacks, test with 3 stacks
self:AddOverlayOption(arcaneBlastSoDBuff, arcaneBlastSoDBuff, 4); -- setup 4 stacks
end
Expand All @@ -609,33 +607,33 @@ local function loadOptions(self)
self:AddOverlayOption(hotStreakTalent, hotStreakHeatingUpBuff, 0, hotStreakHeatingUpDetails);
self:AddOverlayOption(firestarterTalent, firestarterBuff);
self:AddOverlayOption(impactTalent, impactBuff);
if WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC then
if self.IsWrath() then
self:AddOverlayOption(fingersOfFrostTalent, fingersOfFrostBuff, 0, nil, nil, 2); -- setup any stacks, test with 2 stacks
elseif GetSpellInfo(fingersOfFrostSoDBuff) then
elseif self.IsSoD() then
self:AddOverlayOption(fingersOfFrostSoDTalent, fingersOfFrostSoDBuff, 0, nil, nil, 2); -- setup any stacks, test with 2 stacks
end
self:AddOverlayOption(FrozenHandler.freezeTalent, FrozenHandler.freezeID, 0, nil, nil, nil, FrozenHandler.fakeSpellID);
self:AddOverlayOption(brainFreezeTalent, brainFreezeBuff);

self:AddGlowingOption(missileBarrageTalent, missileBarrageBuff, arcaneMissiles);
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC and GetSpellInfo(arcaneBlastSoDBuff) then
if self.IsSoD() then
self:AddGlowingOption(arcaneBlastSoDBuff, arcaneBlastSoDBuff, arcaneMissiles, fourStacks);
self:AddGlowingOption(arcaneBlastSoDBuff, arcaneBlastSoDBuff, arcaneExplosion, fourStacks);
end
self:AddGlowingOption(hotStreakTalent, hotStreakBuff, pyroblast);
self:AddGlowingOption(firestarterTalent, firestarterBuff, flamestrike);
if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then -- Must exclude this option specifically for Classic Era, because the talent exists in Era but the proc is passive
if not self.IsEra() then -- Must exclude this option specifically for Classic Era, because the talent exists in Era but the proc is passive
self:AddGlowingOption(impactTalent, impactBuff, fireBlast);
end
self:AddGlowingOption(brainFreezeTalent, brainFreezeBuff, fireball);
self:AddGlowingOption(brainFreezeTalent, brainFreezeBuff, frostfireBolt);
if WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC then
if self.IsWrath() then
self:AddGlowingOption(fingersOfFrostTalent, fingersOfFrostBuff, iceLance);
self:AddGlowingOption(fingersOfFrostTalent, fingersOfFrostBuff, deepFreeze);
-- self:AddGlowingOption(fingersOfFrostTalent, fingersOfFrostBuff, ...); -- Maybe add more spell options for Fingers of Frost
self:AddGlowingOption(FrozenHandler.freezeTalent, FrozenHandler.freezeID, iceLance);
self:AddGlowingOption(FrozenHandler.freezeTalent, FrozenHandler.freezeID, deepFreeze);
elseif GetSpellInfo(fingersOfFrostSoDBuff) and GetSpellInfo(iceLanceSoD) then
elseif self.IsSoD() then
self:AddGlowingOption(fingersOfFrostSoDTalent, fingersOfFrostSoDBuff, iceLanceSoD);
self:AddGlowingOption(FrozenHandler.freezeTalent, FrozenHandler.freezeID, iceLanceSoD);
end
Expand All @@ -649,5 +647,5 @@ SAO.Class["MAGE"] = {
["CHARACTER_POINTS_CHANGED"] = recheckTalents,
["PLAYER_TARGET_CHANGED"] = retarget,
["UNIT_HEALTH"] = unitHealth,
["PLAYER_TALENT_UPDATE"] = WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC and recheckTalents or nil, -- This event was introduced in Wrath, and causes errors before
[SAO.IsWrath() and "PLAYER_TALENT_UPDATE" or "CHARACTER_POINTS_CHANGED"] = recheckTalents, -- Event changed in Wrath
}
11 changes: 5 additions & 6 deletions classes/priest.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local AddonName, SAO = ...

local function registerClass(self)
if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
if not self.IsEra() then
local smite = GetSpellInfo(585);
local flashHeal = GetSpellInfo(2061);

Expand Down Expand Up @@ -33,10 +33,9 @@ local function registerClass(self)

-- Healing Trance / Soul Preserver
self:RegisterAuraSoulPreserver("soul_preserver_priest", 60514); -- 60514 = Priest buff
end

local serendipityBuff = 413247;
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC and GetSpellInfo(serendipityBuff) then
elseif self.IsSoD() then
local serendipityBuff = 413247;
local lesserHeal = 2050;
local heal = 2054;
local greaterHeal = 2060;
Expand Down Expand Up @@ -69,7 +68,7 @@ local function loadOptions(self)
local oneOrTwoStacks = string.format(CALENDAR_TOOLTIP_DATE_RANGE, "1", string.format(STACKS, 2));
local threeStacks = string.format(STACKS, 3);

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
if not self.IsEra() then
self:AddOverlayOption(surgeOfLightTalent, surgeOfLightBuff);
self:AddOverlayOption(serendipityTalent, serendipityBuff3, 0, oneOrTwoStacks, nil, 2); -- setup any stacks, test with 2 stacks
self:AddOverlayOption(serendipityTalent, serendipityBuff3, 3); -- setup 3 stacks
Expand All @@ -79,7 +78,7 @@ local function loadOptions(self)
self:AddGlowingOption(surgeOfLightTalent, surgeOfLightBuff, flashHeal);
self:AddGlowingOption(serendipityTalent, serendipityBuff3, greaterHeal, threeStacks);
self:AddGlowingOption(serendipityTalent, serendipityBuff3, prayerOfHealing, threeStacks);
elseif GetSpellInfo(serendipitySoDBuff) then
elseif self.IsSoD() then
self:AddOverlayOption(serendipitySoDBuff, serendipitySoDBuff, 0, oneOrTwoStacks, nil, 2); -- setup any stacks, test with 2 stacks
self:AddOverlayOption(serendipitySoDBuff, serendipitySoDBuff, 3); -- setup 3 stacks

Expand Down
Loading

0 comments on commit f38f624

Please sign in to comment.