mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
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:
@@ -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)
|
||||
|
||||
@@ -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]))
|
||||
|
||||
1
setup/updates/1486948902_01.sql
Normal file
1
setup/updates/1486948902_01.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE aowow_dbversion SET `sql` = CONCAT(`sql`, ' currencies');
|
||||
Reference in New Issue
Block a user