Skip to content

Commit

Permalink
Show modified armor values
Browse files Browse the repository at this point in the history
  • Loading branch information
raethkcj committed Nov 14, 2024
1 parent 89be833 commit 5d4a052
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
14 changes: 10 additions & 4 deletions RatingBuster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2710,11 +2710,17 @@ do
end
elseif statID == StatLogic.Stats.Armor then
local base, bonus = StatLogic:GetArmorDistribution(link, value, color)
value = base * statModContext("MOD_ARMOR") + bonus
local mod = statModContext("MOD_ARMOR")
value = base * mod + bonus
if isBaseStat and mod ~= 1 and db.profile.showModifiedArmor then
infoTable["Decimal"] = value
end
self:ProcessStat(StatLogic.Stats.BonusArmor, value, infoTable, link, color, statModContext, false)
elseif db.profile.showAPFromArmor and statID == StatLogic.Stats.BonusArmor then
local effect = value * statModContext("ADD_AP_MOD_ARMOR") * statModContext("MOD_AP")
infoTable[StatLogic.Stats.AttackPower] = infoTable[StatLogic.Stats.AttackPower] + effect
elseif statID == StatLogic.Stats.BonusArmor then
if db.profile.showAPFromArmor then
local effect = value * statModContext("ADD_AP_MOD_ARMOR") * statModContext("MOD_AP")
infoTable[StatLogic.Stats.AttackPower] = infoTable[StatLogic.Stats.AttackPower] + effect
end
elseif statID == StatLogic.Stats.AttackPower then
local mod = statModContext("MOD_AP")
value = value * mod
Expand Down
8 changes: 4 additions & 4 deletions libs/StatLogic/StatLogic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,6 @@ StatLogic.StatModInfo = {
initialValue = 0,
finalAdjust = 0,
},
["MOD_ARMOR"] = {
initialValue = 1,
finalAdjust = 0,
},
["MOD_BLOCK_VALUE"] = {
initialValue = 0,
finalAdjust = 1,
Expand Down Expand Up @@ -655,6 +651,10 @@ local addedInfoMods = {
mod = "AP",
finalAdjust = 1,
},
{
mod = "ARMOR",
initialValue = 1,
},
{
mod = "INT",
initialValue = 1,
Expand Down
9 changes: 3 additions & 6 deletions libs/StatLogic/Vanilla_Logic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1419,26 +1419,23 @@ StatLogic.StatModTable["ALL"] = {
},
},
["MOD_ARMOR"] = {
-- Paladin: Lay on Hands (Rank 1/2) - Buff
-- Armor increased by 15%/30%.
-- Buff: Lay on Hands
{
["rank"] = {
0.15, 0.30,
},
["aura"] = 20236,
["spellid"] = 20235,
},
-- Priest: Inspiration (Rank 1/2/3) - Buff
-- Increases armor by 8%/16%/25%.
-- Buff: Inspiration
{
["rank"] = {
0.08, 0.16, 0.25,
},
["aura"] = 15363,
["group"] = addon.ExclusiveGroup.Armor,
},
-- Shaman: Ancestral Fortitude (Rank 1/2/3) - Buff
-- Increases your armor value by 8%/16%/25%.
-- Buff: Ancestral Fortitude
{
["rank"] = {
0.08, 0.16, 0.25,
Expand Down

0 comments on commit 5d4a052

Please sign in to comment.