Skip to content
91 changes: 91 additions & 0 deletions Modules/Data/Constants.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-- keep-sorted start case=no
local IsClassic = ECS.IsClassic
local IsWotlk = ECS.IsWotlk
-- keep-sorted end

---@class Data
local Data = ECSLoader:ImportModule("Data")

Expand All @@ -21,6 +26,7 @@ Data.WARLOCK = 9
Data.DRUID = 11

Data.Aura = {
-- keep-sorted start block=yes case=no
AllowCastingManaRegeneration = {
[6117] = (ECS.IsWotlk and 0.5 or 0.3), -- Mage Armor rank 1
[12051] = 1, -- Evocation
Expand Down Expand Up @@ -293,7 +299,11 @@ Data.Aura = {
[51470] = 5, -- Elemental Oath Rank 2
},
SpellHaste = {
-- keep-sorted start numeric=yes
[1098] = -30, -- Subjugate Demon
[1714] = -50, -- Curse of Tongues Rank 1
[2825] = 30, -- Bloodlust
[2895] = (IsWotlk and 5 or nil), -- Wrath of Air Totem
[3603] = -35, -- Distracting Pain
[5760] = -40, -- Mind-numbing Poison Rank 1
[7102] = -25, -- Contagion of Rot
Expand All @@ -303,22 +313,28 @@ Data.Aura = {
[8215] = 100, -- Rapid Cast
[8272] = -20, -- Mind Tremor
[8692] = -50, -- Mind-numbing Poison II Rank 2
[10060] = ((not IsClassic) and 20 or nil), -- Power Infusion
[10348] = 100, -- Tune Up
[10651] = -20, -- Curse of the Eye
[10653] = -20, -- Curse of the Eye
[11398] = -60, -- Mind-numbing Poison III Rank 3
[11719] = -60, -- Curse of Tongues Rank 2
[11725] = -30, -- Subjugate Demon
[11726] = (IsWotlk and -20 or -30), -- Subjugate Demon
[12255] = -15, -- Curse of Tuten'kash
[12472] = ((not IsClassic) and 20 or nil), -- Icy Veins
[12889] = -50, -- Curse of Tongues
[13338] = -50, -- Curse of Tongues
[14538] = -35, -- Aural Shock
[15470] = -50, -- Curse of Tongues
[16886] = (IsWotlk and 20 or nil), -- Nature's Grace (holy,nature)
[17331] = -10, -- Fang of the Crystal Spider
[17633] = 66, -- Arcane Focus
[18173] = 100000, -- Burning Adrenaline
[18803] = 100000, -- Focus
[19365] = -50, -- Ancient Dread
[19779] = 26, -- Inspire
[20882] = -30, -- Subjugate Demon
[22247] = -80, -- Suppression Aura
[22642] = -50, -- Brood Power: Bronze
[22710] = 100, -- Enlarge
Expand All @@ -332,13 +348,86 @@ Data.Aura = {
[25516] = 11, -- Aura of Command
[25773] = 300, -- Will of Weavil
[25810] = -50, -- Mind-numbing Poison
[28732] = -25, -- Widow's Embrace
[30531] = 10, --Soul Transfer
[30887] = 50, -- Devotion
[30939] = 30, -- Rage of Magtheridon
[31948] = -50, -- Ensnaring Moss
[32002] = 25, -- Lingering Presence
[32013] = -50, -- Mucky Sludge
[32182] = 30, -- Heroism
[32317] = -50, -- Mucky Sludge
[32693] = 50, -- Arcane Haste
[32940] = -30, -- Shadow Rush
[33299] = 100000, -- Enslave Humanoid
[33925] = -50, -- Phantom Strike
[34352] = -25, -- Mind Shock
[34615] = -50, -- Mind-numbing Poison
[34828] = -30, -- Water Shield
[35329] = -10, -- Vibrant Blood
[36699] = -20, -- Wavering Will
[39036] = -50, -- Brood Power: Bronze
[39261] = 50, -- Gusting Winds
[39332] = -50, -- Phantom Strike
[39530] = 100, -- Focus
[41190] = -50, -- Mind-numbing Poison
[41978] = -50, -- Debilitating Poison
[42006] = 75, -- Chaos Form
[43242] = 300, --Haste
[43507] = -30, -- Corrupted Magic
[44605] = 10, -- Spell Haste
[46102] = 999999, -- Spell Fury
[46299] = -45, -- Wavering Will
[47791] = 15, -- Arcane Haste
[47940] = 20, -- Mind Twisting
[48394] = 20, -- Moonkin's Blessing
[49725] = 25, -- Breath: Haste
[50182] = 15, -- Aura of Arcane Haste
[50336] = 300, -- Fast Cast
[51170] = 100, -- Enraged Assault
[51605] = 20, -- Zeal
[51676] = -20, -- Wavering Will
[51777] = 30, -- Arcane Focus
[52430] = -75, -- Warped Mind
[54097] = -25, -- Widow's Embrace
[54312] = 100, -- Frenzy
[54792] = 20, -- Icy Veins
[55100] = -50, -- Numbing Roar
[55106] = -25, -- Numbing Shout
[56707] = -25, -- Contagion of Rot
[56708] = -25, -- Contagion of Rot
[56716] = -50, -- Icy Winds
[56827] = 50, -- Aura of Arcane Haste
[59887] = 5, -- Borrowed Time (fire,holy,nature)
[59888] = 10, -- Borrowed Time (fire,holy,nature)
[59889] = 15, -- Borrowed Time (fire,holy,nature)
[59890] = 20, -- Borrowed Time (fire,holy,nature)
[59891] = 25, -- Borrowed Time (fire,holy,nature)
[61191] = -20, -- Subjugate Demon
[64368] = 6, -- Eradication (holy,nature)
[64370] = 12, -- Eradication (holy,nature)
[64371] = 20, -- Eradication (holy,nature)
[64570] = -50, -- Flame Suppressant
[64694] = 10, -- Lava Flows (fire,physical)
[64701] = 15, -- Elemental Mastery (frost,nature)
[65192] = -50, -- Flame Suppressant
[65210] = -300, -- Destabilization Matrix
[65263] = 20, -- Lava Flows (fire,physical)
[65264] = 30, -- Lava Flows (fire,physical)
[65269] = 100, -- Shadow Crash (nature,physical)
[68933] = 100, -- Wrath of Air Totem
[70227] = 100000, -- Empowered Blood
[70320] = 100000, -- Empowered Blood
[70753] = 12, -- Pushing the Limit
[70806] = 20, -- Rapid Currents
[367987] = 101, -- Burning Adrenaline
[368615] = 30, -- Pulse Lightning
[370066] = 51, -- Visions of Madness
[370767] = 11, -- Essence of C'Thun
[370832] = 15, -- Gift of the Spider
[371206] = 100, -- Servant of Chaos
[402794] = -60, -- Curse of Tongues
[413118] = -300, -- Destabilization
[425121] = 20, -- Icy Veins
[427714] = 30, -- Backdraft
[429125] = 20, -- Icy Veins
Expand All @@ -354,7 +443,9 @@ Data.Aura = {
[1226451] = 20, -- Emergency
[1227200] = 20, -- Wickedness
[1236220] = -50, -- Slow
-- keep-sorted end
},
-- keep-sorted end
}
Data.Enchant = {
BlockValue = {
Expand Down
30 changes: 30 additions & 0 deletions Modules/Data/SpellDamage.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
-- keep-sorted start case=no
local IsWotlk = ECS.IsWotlk
local UnitClass = UnitClass
-- keep-sorted end

---@class Data
local Data = ECSLoader:ImportModule("Data")
---@type DataUtils
local DataUtils = ECSLoader:ImportModule("DataUtils")

-- keep-sorted start case=no
local _, _, classId = UnitClass("player")
local _SpellHaste = {}
-- keep-sorted end

---@param school number
---@return number
function Data:GetSpellDamage(school)
Expand Down Expand Up @@ -33,6 +43,7 @@ end
---@return string
function Data:GetSpellHasteBonus()
local hasteBonus = GetHaste()
hasteBonus = hasteBonus + _SpellHaste:GetTalentSpellHaste()

-- items
if ECS.IsSoD then
Expand Down Expand Up @@ -60,6 +71,9 @@ function Data:GetSpellHasteBonus()
local aura = C_UnitAuras.GetDebuffDataByIndex("player", i)
if aura and aura.spellId then
hasteBonus = hasteBonus + (Data.Aura.SpellHaste[aura.spellId] or 0)
if aura.spellId == 32264 then
mod = mod -50 * aura.applications -- Inhibit Magic
end
end
i = i + 1
until (not aura)
Expand All @@ -74,3 +88,19 @@ function Data:GetSpellHasteBonus()

return DataUtils:Round(hasteBonus, 2) .. "%"
end

---@return number
function _SpellHaste:GetTalentSpellHaste()
local bonus = 0
if IsWotlk then
if classId == Data.DRUID then
bonus = bonus + 1 * DataUtils:GetActiveTalentSpell({16850,16923,16924}) -- Celestial Focus
bonus = bonus + 2 * DataUtils:GetActiveTalentSpell({51179,51180,51181,51182,51183}) -- Gift of the Earthmother
elseif classId == Data.MAGE then
bonus = bonus + 2 * DataUtils:GetActiveTalentSpell({44400,44402,44403}) -- Netherwind Presence
elseif classId == Data.PRIEST then
bonus = bonus + 2 * DataUtils:GetActiveTalentSpell({34908,34909,34910}) -- Enlightenment
end
end
return bonus
end
Loading