Skip to content

Commit

Permalink
Unify BuffGroup definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
raethkcj committed Dec 13, 2023
1 parent 0ee2b60 commit d088ded
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 188 deletions.
66 changes: 30 additions & 36 deletions libs/StatLogic/Cata_Logic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,6 @@ addon.DodgePerAgi = {
},
}

local BuffGroup = {
MOD_AP = 1,
MOD_STATS = 2,
MOD_SP = 3,
}

StatLogic.StatModTable = {}
if addon.class == "DRUID" then
StatLogic.StatModTable["DRUID"] = {
Expand Down Expand Up @@ -1538,35 +1532,35 @@ StatLogic.StatModTable["ALL"] = {
{
["value"] = 0.1,
["buff"] = 53646,
["group"] = BuffGroup.MOD_SP,
["group"] = addon.BuffGroup.SpellPower,
},
-- Shaman: Totemic Wrath - Buff: 77747
-- 4.0.1: Spell Power increased by 10%.
{
["value"] = 0.1,
["buff"] = 77747,
["group"] = BuffGroup.MOD_SP,
["group"] = addon.BuffGroup.SpellPower,
},
-- Shaman: Flametongue Totem - Buff: 52109
-- 4.0.1: Spell Power increased by 6%.
{
["value"] = 0.06,
["buff"] = 52109,
["group"] = BuffGroup.MOD_SP,
["group"] = addon.BuffGroup.SpellPower,
},
-- Mage: Arcane Brilliance - Buff: 79058
-- 4.0.1: Spell Power increased by 6%.
{
["value"] = 0.06,
["buff"] = 79058,
["group"] = BuffGroup.MOD_SP,
["group"] = addon.BuffGroup.SpellPower,
},
-- Mage: Dalaran Brilliance - Buff: 61316
-- 4.0.1: Spell Power increased by 6%.
{
["value"] = 0.06,
["buff"] = 61316,
["group"] = BuffGroup.MOD_SP,
["group"] = addon.BuffGroup.SpellPower,
},
},
["MOD_HEAL"] = {
Expand All @@ -1575,35 +1569,35 @@ StatLogic.StatModTable["ALL"] = {
{
["value"] = 0.1,
["buff"] = 53646,
["group"] = BuffGroup.MOD_SP,
["group"] = addon.BuffGroup.SpellPower,
},
-- Shaman: Totemic Wrath - Buff: 77747
-- 4.0.1: Spell Power increased by 10%.
{
["value"] = 0.1,
["buff"] = 77747,
["group"] = BuffGroup.MOD_SP,
["group"] = addon.BuffGroup.SpellPower,
},
-- Shaman: Flametongue Totem - Buff: 52109
-- 4.0.1: Spell Power increased by 6%.
{
["value"] = 0.06,
["buff"] = 52109,
["group"] = BuffGroup.MOD_SP,
["group"] = addon.BuffGroup.SpellPower,
},
-- Mage: Arcane Brilliance - Buff: 79058
-- 4.0.1: Spell Power increased by 6%.
{
["value"] = 0.06,
["buff"] = 79058,
["group"] = BuffGroup.MOD_SP,
["group"] = addon.BuffGroup.SpellPower,
},
-- Mage: Dalaran Brilliance - Buff: 61316
-- 4.0.1: Spell Power increased by 6%.
{
["value"] = 0.06,
["buff"] = 61316,
["group"] = BuffGroup.MOD_SP,
["group"] = addon.BuffGroup.SpellPower,
},
},
["ADD_BLOCK_REDUCTION"] = {
Expand Down Expand Up @@ -1646,7 +1640,7 @@ StatLogic.StatModTable["ALL"] = {
{
["value"] = 0.1,
["buff"] = 19506,
["group"] = BuffGroup.MOD_AP,
["group"] = addon.BuffGroup.AttackPower,
},
-- Death Knight: Abomination's Might - Buff: 55972
-- 4.0.1: Attack power increased by 5/10%.
Expand All @@ -1655,7 +1649,7 @@ StatLogic.StatModTable["ALL"] = {
0.05, 0.1,
},
["buff"] = 55972,
["group"] = BuffGroup.MOD_AP,
["group"] = addon.BuffGroup.AttackPower,
},
-- Shaman: Unleashed Rage - Buff: 30809
-- 4.0.1: Melee attack power increased by 4/7/10%.
Expand All @@ -1664,14 +1658,14 @@ StatLogic.StatModTable["ALL"] = {
0.04, 0.07, 0.1,
},
["buff"] = 30809,
["group"] = BuffGroup.MOD_AP,
["group"] = addon.BuffGroup.AttackPower,
},
-- Paladin: Blessing of Might - Buff: 19740
-- 4.0.1: Increasing attack power by 10%.
{
["value"] = 0.1,
["buff"] = 19740,
["group"] = BuffGroup.MOD_AP,
["group"] = addon.BuffGroup.AttackPower,
},
},
["MOD_MANA"] = {
Expand Down Expand Up @@ -1706,28 +1700,28 @@ StatLogic.StatModTable["ALL"] = {
{
["value"] = 0.05,
["buff"] = 20217,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Druid: Mark of the Wild - Buff: 79061
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%.
{
["value"] = 0.05,
["buff"] = 79061,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Hunter: Embrace of the Shale Spider - Buff: 90363
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%.
{
["value"] = 0.05,
["buff"] = 90363,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Leatherworking: Blessing of Forgotten Kings - Buff: 69378
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 4%.
{
["value"] = 0.04,
["buff"] = 69378,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
},
["MOD_AGI"] = {
Expand All @@ -1736,28 +1730,28 @@ StatLogic.StatModTable["ALL"] = {
{
["value"] = 0.05,
["buff"] = 20217,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Druid: Mark of the Wild - Buff: 79061
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%.
{
["value"] = 0.05,
["buff"] = 79061,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Hunter: Embrace of the Shale Spider - Buff: 90363
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%.
{
["value"] = 0.05,
["buff"] = 90363,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Leatherworking: Blessing of Forgotten Kings - Buff: 69378
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 4%.
{
["value"] = 0.04,
["buff"] = 69378,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
},
["MOD_STA"] = {
Expand All @@ -1766,28 +1760,28 @@ StatLogic.StatModTable["ALL"] = {
{
["value"] = 0.05,
["buff"] = 20217,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Druid: Mark of the Wild - Buff: 79061
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%.
{
["value"] = 0.05,
["buff"] = 79061,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Hunter: Embrace of the Shale Spider - Buff: 90363
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%.
{
["value"] = 0.05,
["buff"] = 90363,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Leatherworking: Blessing of Forgotten Kings - Buff: 69378
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 4%.
{
["value"] = 0.04,
["buff"] = 69378,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
},
--[[
Expand Down Expand Up @@ -1843,28 +1837,28 @@ StatLogic.StatModTable["ALL"] = {
{
["value"] = 0.05,
["buff"] = 20217,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Druid: Mark of the Wild - Buff: 79061
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%.
{
["value"] = 0.05,
["buff"] = 79061,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Hunter: Embrace of the Shale Spider - Buff: 90363
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%.
{
["value"] = 0.05,
["buff"] = 90363,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
-- Leatherworking: Blessing of Forgotten Kings - Buff: 69378
-- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 4%.
{
["value"] = 0.04,
["buff"] = 69378,
["group"] = BuffGroup.MOD_STATS,
["group"] = addon.BuffGroup.AllStats,
},
},
["MOD_SPI"] = {
Expand Down
6 changes: 6 additions & 0 deletions libs/StatLogic/StatLogic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,12 @@ do
end

do
addon.BuffGroup = {
AllStats = 1,
AttackPower = 2,
SpellPower = 3,
Armor = 4,
}
local BuffGroupCache = {}

local function ApplyMod(mod, value, initialValue)
Expand Down
Loading

0 comments on commit d088ded

Please sign in to comment.