From 457e5f1eb5b221b0d4036f94a5b1e7d1d4405f2e Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Fri, 2 Feb 2018 19:25:50 +0100 Subject: [PATCH] Items/Armor * fixed calculation of extra armor --- includes/types/item.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/types/item.class.php b/includes/types/item.class.php index 00f5d969..447bc096 100644 --- a/includes/types/item.class.php +++ b/includes/types/item.class.php @@ -640,10 +640,10 @@ class ItemList extends BaseType if ($interactive) $spanI = 'class="q2 tip" onmouseover="$WH.Tooltip.showAtCursor(event, $WH.sprintf(LANG.tooltip_armorbonus, '.$this->curTpl['armorDamageModifier'].'), 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"'; - $x .= ''.Lang::item('armor', [intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])]).'
'; + $x .= ''.Lang::item('armor', [intVal($this->curTpl['armor'] - $this->curTpl['armorDamageModifier'])]).'
'; } - else if (($this->curTpl['armor'] + $this->curTpl['armorDamageModifier']) > 0) - $x .= ''.Lang::item('armor', [intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])]).'
'; + else if (($this->curTpl['armor'] - $this->curTpl['armorDamageModifier']) > 0) + $x .= ''.Lang::item('armor', [intVal($this->curTpl['armor'] - $this->curTpl['armorDamageModifier'])]).'
'; // Block (note: block value from field block and from field stats or parsed from itemSpells are displayed independently) if ($this->curTpl['tplBlock']) @@ -1620,7 +1620,7 @@ class ItemList extends BaseType } if ($this->curTpl['armorDamageModifier'] > 0) - $json['armor'] += $this->curTpl['armorDamageModifier']; + $json['armor'] -= $this->curTpl['armorDamageModifier']; // clear zero-values afterwards foreach ($json as $k => $v)