diff --git a/includes/types/item.class.php b/includes/types/item.class.php index 6448bc67..c029a822 100644 --- a/includes/types/item.class.php +++ b/includes/types/item.class.php @@ -529,7 +529,8 @@ class ItemList extends BaseType { $x .= '
'.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) diff --git a/setup/tools/sqlgen/currencies.func.php b/setup/tools/sqlgen/currencies.func.php index 7a2d43ec..d08d4c79 100644 --- a/setup/tools/sqlgen/currencies.func.php +++ b/setup/tools/sqlgen/currencies.func.php @@ -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])) diff --git a/setup/updates/1486948902_01.sql b/setup/updates/1486948902_01.sql new file mode 100644 index 00000000..b89e5ab3 --- /dev/null +++ b/setup/updates/1486948902_01.sql @@ -0,0 +1 @@ +UPDATE aowow_dbversion SET `sql` = CONCAT(`sql`, ' currencies');