diff --git a/Modules/Data/Constants.lua b/Modules/Data/Constants.lua index 072c87c..9899cfc 100755 --- a/Modules/Data/Constants.lua +++ b/Modules/Data/Constants.lua @@ -374,6 +374,13 @@ Data.Enchant.MP5 = { [3836] = 8, -- Master's Inscription of the Crag [7099] = 12, -- Blackfathom Mana Oil. This effect only applies within Blackfathom Deeps. } +Data.Enchant.BlockValue = { + ["2583"] = 15, -- Presence of Might + ["2653"] = 18, -- Enchant Shield - Tough Shield + ["2655"] = 15, -- Enchant Shield - Shield Block + ["3849"] = 81, -- Titanium Plating + ["7633"] = 15, -- Presence of Valor +} Data.Gem = {} Data.Gem.MP5 = { [23106] = 1, @@ -398,7 +405,6 @@ Data.Gem.MP5 = { } Data.setNames = { AUGURS_REGALIA = "Augur's Regalia", - BATTLEGEAR_OF_MIGHT = "Battlegear of Might", BLOODSOUL_EMBRACE = "Bloodsoul Embrace", DAWN_OF_TRANSCENDENCE = "Dawn of Transcendence", FEL_IRON_CHAIN = "Fel Iron Chain", diff --git a/Modules/Data/Defense.lua b/Modules/Data/Defense.lua index faf17b3..d64054a 100755 --- a/Modules/Data/Defense.lua +++ b/Modules/Data/Defense.lua @@ -222,9 +222,10 @@ end ---@return number function Data:GetBlockValue() - local setBonus = _Defense:GetItemModifierBlockValue() - local blockValue = GetShieldBlock() + setBonus - + local blockValue = 0 + if C_SpellBook.IsSpellKnown(107) and C_PaperDollInfo.OffhandHasShield() then + blockValue = blockValue + GetShieldBlock() + _Defense:GetEnchantsBlockValue() + end return DataUtils:Round(blockValue, 2) end @@ -233,12 +234,17 @@ function Data:GetResilienceRating() return DataUtils:Round(GetCombatRating(15), 2) end -function _Defense:GetItemModifierBlockValue() +---@return number +function _Defense:GetEnchantsBlockValue() local mod = 0 - - if Data:HasSetBonusModifierBlockValue() then - mod = mod + 30 + for i = 1, 18 do + local itemLink = GetInventoryItemLink("player", i) + if itemLink then + local enchant = DataUtils:GetEnchantFromItemLink(itemLink) + if enchant then + mod = mod + (Data.Enchant.BlockValue[itemLink] or 0) + end + end end - return mod end diff --git a/Modules/Data/ItemSets.lua b/Modules/Data/ItemSets.lua index 30c44e0..cabd680 100755 --- a/Modules/Data/ItemSets.lua +++ b/Modules/Data/ItemSets.lua @@ -12,16 +12,6 @@ local itemSets = { [19830] = true, [19956] = true }, - [setNames.BATTLEGEAR_OF_MIGHT] = { - [16861] = true, - [16862] = true, - [16863] = true, - [16864] = true, - [16865] = true, - [16866] = true, - [16867] = true, - [16868] = true - }, [setNames.BLOODSOUL_EMBRACE] = { [19690] = true, [19691] = true, @@ -198,14 +188,6 @@ function Data:HasNatureCritBonusModifier() return false end -function Data:HasSetBonusModifierBlockValue() - if classId == Data.WARRIOR then - return Data:IsSetBonusActive(setNames.BATTLEGEAR_OF_MIGHT, 3) - end - - return false -end - function Data:IsSetBonusActive(setName, bonusLevel) local setItems = itemSets[setName] if (not setItems) then