diff --git a/pages/compare.php b/pages/compare.php index de8f1ea9..0c047bb6 100644 --- a/pages/compare.php +++ b/pages/compare.php @@ -74,6 +74,9 @@ class ComparePage extends GenericPage if (empty($data[$itemId])) continue; + foreach ($data[$itemId]['subitems'] as &$si) + $si['enchantment'] = implode(', ', $si['enchantment']); + $this->cmpItems[] = [ $itemId, $iList->getField('name', true), diff --git a/pages/item.php b/pages/item.php index a4e4f242..fd71076f 100644 --- a/pages/item.php +++ b/pages/item.php @@ -377,10 +377,12 @@ class ItemPage extends genericPage uaSort($this->subject->subItems[$this->typeId], function($a, $b) { return strcmp($a['name'], $b['name']); }); $this->subItems = array( 'data' => array_values($this->subject->subItems[$this->typeId]), + 'randIds' => array_keys($this->subject->subItems[$this->typeId]), 'quality' => $this->subject->getField('quality') ); // merge identical stats and names for normal users (e.g. spellPower of a specific school became generel spellPower with 3.0) + if (!User::isInGroup(U_GROUP_EMPLOYEE)) { for ($i = 1; $i < count($this->subItems['data']); $i++) @@ -391,6 +393,7 @@ class ItemPage extends genericPage { $prev['chance'] += $cur['chance']; array_splice($this->subItems['data'], $i , 1); + array_splice($this->subItems['randIds'], $i , 1); $i = 1; } } diff --git a/static/css/aowow.css b/static/css/aowow.css index 464b2940..73801da6 100644 --- a/static/css/aowow.css +++ b/static/css/aowow.css @@ -171,6 +171,10 @@ h5 a.icontiny span { text-decoration:none !important; } width: 47%; } +.random-enchantments span{ + cursor: help; +} + h1.h1-icon { padding-top: 5px !important; } diff --git a/template/pages/item.tpl.php b/template/pages/item.tpl.php index 1df5b188..a92b8567 100644 --- a/template/pages/item.tpl.php +++ b/template/pages/item.tpl.php @@ -48,7 +48,7 @@ if (!empty($this->subItems)): $eText[] = ''.$txt.''; endforeach; - echo '