Skip to content

Commit

Permalink
use slot concatenation rather than checking specific slot (#5866)
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle authored Apr 3, 2023
1 parent ead8e1c commit 7a65352
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,7 @@ function calcs.defence(env, actor)
})
end
else
if slot == "Body Armour" then
energyShield = energyShield + energyShieldBase * calcLib.mod(modDB, slotCfg, "EnergyShield", "Defences", "Body ArmourESAndArmour")
else
energyShield = energyShield + energyShieldBase * calcLib.mod(modDB, slotCfg, "EnergyShield", "Defences")
end
energyShield = energyShield + energyShieldBase * calcLib.mod(modDB, slotCfg, "EnergyShield", "Defences", slot.."ESAndArmour")
gearEnergyShield = gearEnergyShield + energyShieldBase
if breakdown then
breakdown.slot(slot, nil, slotCfg, energyShieldBase, nil, "EnergyShield", "Defences")
Expand All @@ -496,11 +492,7 @@ function calcs.defence(env, actor)
if slot == "Body Armour" and modDB:Flag(nil, "Unbreakable") then
armourBase = armourBase * 2
end
if slot == "Body Armour" then
armour = armour + armourBase * calcLib.mod(modDB, slotCfg, "Armour", "ArmourAndEvasion", "Defences", "Body ArmourESAndArmour")
else
armour = armour + armourBase * calcLib.mod(modDB, slotCfg, "Armour", "ArmourAndEvasion", "Defences")
end
armour = armour + armourBase * calcLib.mod(modDB, slotCfg, "Armour", "ArmourAndEvasion", "Defences", slot.."ESAndArmour")
gearArmour = gearArmour + armourBase
if breakdown then
breakdown.slot(slot, nil, slotCfg, armourBase, nil, "Armour", "ArmourAndEvasion", "Defences")
Expand Down

0 comments on commit 7a65352

Please sign in to comment.