mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Items
* display randomEnchantment-Id as title on suffix-text on detail page Compare * fixed stats display in subitem-picker
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ if (!empty($this->subItems)):
|
||||
$eText[] = '<a style="text-decoration:none; color:#CCCCCC;" href="?enchantment='.$eId.'">'.$txt.'</a>';
|
||||
endforeach;
|
||||
|
||||
echo ' <li><div><span class="q'.$this->subItems['quality'].'">...'.$i['name'].'</span>';
|
||||
echo ' <li><div><span title="ID'.Lang::main('colon').$this->subItems['randIds'][$k].'" class="q'.$this->subItems['quality'].'">...'.$i['name'].'</span>';
|
||||
echo ' <small class="q0">'.sprintf(Lang::item('_chance'), $i['chance']).'</small><br />'.implode(', ', $eText).'</div></li>';
|
||||
endif;
|
||||
endforeach;
|
||||
@@ -68,7 +68,7 @@ if (!empty($this->subItems)):
|
||||
$eText[] = '<a style="text-decoration:none; color:#CCCCCC;" href="?enchantment='.$eId.'">'.$txt.'</a>';
|
||||
endforeach;
|
||||
|
||||
echo ' <li><div><span class="q'.$this->subItems['quality'].'">...'.$i['name'].'</span>';
|
||||
echo ' <li><div><span title="ID'.Lang::main('colon').$this->subItems['randIds'][$k].'" class="q'.$this->subItems['quality'].'">...'.$i['name'].'</span>';
|
||||
echo ' <small class="q0">'.sprintf(Lang::item('_chance'), $i['chance']).'</small><br />'.implode(', ', $eText).'</div></li>';
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
Reference in New Issue
Block a user