Всё крашилось из-за отсутствия подарочных предметов в магазине.
This commit is contained in:
parent
b055071e2e
commit
c2eae44401
@ -186,7 +186,6 @@ class Register
|
||||
|
||||
private function setStatsItemsEffects($uid)
|
||||
{
|
||||
$u = User::start();
|
||||
if ($_SESSION['ref'] === 1) {
|
||||
$this->classBonuses[$this->class]['items'][] = 4811;
|
||||
}
|
||||
@ -199,11 +198,12 @@ class Register
|
||||
]
|
||||
);
|
||||
|
||||
//fixme проверять предмет на существование!
|
||||
foreach ($this->classBonuses[$this->class]['items'] as $item) {
|
||||
$itemId = \User\ItemsModel::addItem($item, $uid);
|
||||
$itemId = ItemsModel::addItem($item, $uid);
|
||||
Db::sql(
|
||||
'update items_users
|
||||
set `1price` = (select price_1 from items_shop where items_shop.item_id = ? and sid = 1)
|
||||
set `1price` = (select price_1 from items_main where items_main.item_id = ? and sid = 1)
|
||||
where id = ?',
|
||||
[$item, $itemId]
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user