Items/Currency

* do not display unique-limited amount on item if currency token
 * display as cap on currency page instead
This commit is contained in:
Sarjuuk
2017-02-13 02:13:43 +01:00
parent 294ba109df
commit b3369d0b3f
3 changed files with 5 additions and 3 deletions

View File

@@ -529,7 +529,8 @@ class ItemList extends BaseType
{
$x .= '<br />'.Lang::item('unique');
if ($this->curTpl['maxCount'] > 1)
// not for currency tokens
if ($this->curTpl['maxCount'] > 1 && $this->curTpl['bagFamily'] != 8192)
$x .= ' ('.$this->curTpl['maxCount'].')';
}
else if ($_flags & ITEM_FLAG_UNIQUEEQUIPPED)

View File

@@ -31,8 +31,8 @@ function currencies(array $ids = [])
$moneyItems = DB::Aowow()->selectCol('SELECT id AS ARRAY_KEY, itemId FROM dbc_currencytypes{ WHERE id IN (?a)}', $ids ?: DBSIMPLE_SKIP);
// apply names
$moneyNames = DB::World()->select('SELECT it.entry AS ARRAY_KEY, name AS name_loc0, name_loc2, name_loc3, name_loc6, name_loc8 FROM item_template it LEFT JOIN locales_item li ON li.entry = it.entry WHERE it.entry IN (?a)', $moneyItems);
// apply names & cap
$moneyNames = DB::World()->select('SELECT it.entry AS ARRAY_KEY, name AS name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, it.maxCount AS cap FROM item_template it LEFT JOIN locales_item li ON li.entry = it.entry WHERE it.entry IN (?a)', $moneyItems);
foreach ($moneyItems as $cId => $itemId)
{
if (!empty($moneyNames[$itemId]))

View File

@@ -0,0 +1 @@
UPDATE aowow_dbversion SET `sql` = CONCAT(`sql`, ' currencies');