This commit is contained in:
hujiabin 2023-01-11 13:30:48 +08:00
parent c8a01d8cd3
commit 8593a75139

View File

@ -125,24 +125,24 @@ class UserController extends BaseAuthedController {
}
private function _addFreeItem(){
// foreach (mt\Parameter::getListValue('creator_hero_id') as $heroId) {
// $heroMeta = mt\Item::get($heroId);
// if ($heroMeta) {
// Hero::addHero($heroMeta);
// User::upsertHeadList($heroMeta);
// }
// }
// $addItems =array();
// foreach (mt\Parameter::getListValue('creator_present_items') as $itemsStr) {
// list($itemId, $itemNum) = explode(':', $itemsStr);
// if ($itemNum > 0) {
// array_push($addItems,
// array(
// 'item_id' => $itemId,
// 'item_num' => $itemNum
// ));
// }
// }
foreach (mt\Parameter::getListValue('creator_hero_id') as $heroId) {
$heroMeta = mt\Item::get($heroId);
if ($heroMeta) {
Hero::addHero($heroMeta);
User::upsertHeadList($heroMeta);
}
}
$addItems =array();
foreach (mt\Parameter::getListValue('creator_present_items') as $itemsStr) {
list($itemId, $itemNum) = explode(':', $itemsStr);
if ($itemNum > 0) {
array_push($addItems,
array(
'item_id' => $itemId,
'item_num' => $itemNum
));
}
}
$items = array(
array(
'item_id' => V_ITEM_GOLD,