From 5d4a05237b3feec8789255e0fbfba566af4cea18 Mon Sep 17 00:00:00 2001 From: Casey Raethke Date: Wed, 13 Nov 2024 20:47:45 -0600 Subject: [PATCH] Show modified armor values --- RatingBuster.lua | 14 ++++++++++---- libs/StatLogic/StatLogic.lua | 8 ++++---- libs/StatLogic/Vanilla_Logic.lua | 9 +++------ 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/RatingBuster.lua b/RatingBuster.lua index c0ed18b..abd6706 100644 --- a/RatingBuster.lua +++ b/RatingBuster.lua @@ -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 diff --git a/libs/StatLogic/StatLogic.lua b/libs/StatLogic/StatLogic.lua index 92b0b1c..3e82596 100644 --- a/libs/StatLogic/StatLogic.lua +++ b/libs/StatLogic/StatLogic.lua @@ -372,10 +372,6 @@ StatLogic.StatModInfo = { initialValue = 0, finalAdjust = 0, }, - ["MOD_ARMOR"] = { - initialValue = 1, - finalAdjust = 0, - }, ["MOD_BLOCK_VALUE"] = { initialValue = 0, finalAdjust = 1, @@ -655,6 +651,10 @@ local addedInfoMods = { mod = "AP", finalAdjust = 1, }, + { + mod = "ARMOR", + initialValue = 1, + }, { mod = "INT", initialValue = 1, diff --git a/libs/StatLogic/Vanilla_Logic.lua b/libs/StatLogic/Vanilla_Logic.lua index 8542371..ace4d3e 100644 --- a/libs/StatLogic/Vanilla_Logic.lua +++ b/libs/StatLogic/Vanilla_Logic.lua @@ -1419,8 +1419,7 @@ 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, @@ -1428,8 +1427,7 @@ StatLogic.StatModTable["ALL"] = { ["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, @@ -1437,8 +1435,7 @@ StatLogic.StatModTable["ALL"] = { ["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,