From 8fcd8ea429886eaefd457395cd24868abae4c94b Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 26 Feb 2017 16:07:29 +0100 Subject: [PATCH] Spells/Tooltips * fixed range display when friend- and foe-distances differ * fixed interpretation of $l-switch Item/DetailPage * do note prepare unnessecary data for the currency-for tab (eases load) --- includes/types/spell.class.php | 5 +++-- pages/item.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/types/spell.class.php b/includes/types/spell.class.php index 9c19a12c..371bf850 100644 --- a/includes/types/spell.class.php +++ b/includes/types/spell.class.php @@ -538,7 +538,7 @@ class SpellList extends BaseType return sprintf(Lang::spell('range'), $this->curTpl['rangeMinHostile'].' - '.$this->curTpl['rangeMaxHostile']); // friend and hostile differ; do color else if ($this->curTpl['rangeMaxHostile'] != $this->curTpl['rangeMaxFriend']) - return sprintf(Lang::spell('range'), ''.$this->curTpl['rangeMaxHostile'].' - '.$this->curTpl['rangeMaxHostile']. ''); + return sprintf(Lang::spell('range'), ''.$this->curTpl['rangeMaxHostile'].' - '.$this->curTpl['rangeMaxFriend']. ''); // hardcode: "melee range" else if ($this->curTpl['rangeMaxHostile'] == 5) return Lang::spell('meleeRange'); @@ -956,7 +956,8 @@ class SpellList extends BaseType break; case 'l': // boolean choice with last value as condition $lX:Y; case 'L': - $result[2] = '$l'.$switch[0].':'.$switch[1];// resolve later by backtracking + // resolve later by backtracking + $result[2] = '$l'.$switch[0].':'.$switch[1].';'; break; case 'm': // BasePoints (minValue) case 'M': // BasePoints (maxValue) diff --git a/pages/item.php b/pages/item.php index e67f85d9..67107190 100644 --- a/pages/item.php +++ b/pages/item.php @@ -875,7 +875,7 @@ class ItemPage extends genericPage $this->lvTabs[] = ['item', $tabData]; - $this->extendGlobalData($boughtBy->getJSGlobals(GLOBALINFO_ANY)); + $this->extendGlobalData($boughtBy->getJSGlobals(GLOBALINFO_SELF)); } }