From 5624f0966ab4df15da792d2f802c3ae78198dbd6 Mon Sep 17 00:00:00 2001 From: Lyrgard Date: Mon, 27 Aug 2018 17:34:55 +0200 Subject: [PATCH] correct shield counting as weapon for DEF based damage --- static/builder/common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/builder/common.js b/static/builder/common.js index ea8925848..46026e29b 100644 --- a/static/builder/common.js +++ b/static/builder/common.js @@ -493,10 +493,10 @@ function calculateStatValue(itemAndPassives, stat, unitBuild) { return result; } else { var result = {"right":0,"left":0,"total":Math.floor(calculatedValue),"bonusPercent":currentPercentIncrease.value}; - if (itemAndPassives[0]) { + if (itemAndPassives[0] && weaponList.includes(itemAndPassives[0].type)) { result.right = result.total; } - if (itemAndPassives[1]) { + if (itemAndPassives[1] && weaponList.includes(itemAndPassives[1].type)) { result.left = result.total; } return result;