diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 339d55d5..f876b9d2 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -45,6 +45,7 @@ class UserController extends BaseAuthedController { $userInfo = $this->_safeGetOrmUserInfo(); if (!$userInfo) { $this->createNewUserV2($userName); + $this->_addFreeItem(); //送 50 Test_CEG $userInfo = $this->_getOrmUserInfo(); $this->_setV(TN_RANK_STATUS, 0, 1); } @@ -124,27 +125,33 @@ 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, + 'item_num' => 50 + ) + ); $awardService = new services\AwardService(); $propertyChgService = new services\PropertyChgService(); - $this->_addItems($addItems, $awardService, $propertyChgService); + $this->_addItems($items, $awardService, $propertyChgService); } private function loginCheck($userInfo)