From d1c614b88f3accf6cfc739af9ddf95dce1eacc2c Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 17 Oct 2022 20:09:50 +0800 Subject: [PATCH] q --- webapp/controller/UserController.class.php | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index e63b6fd2..6770e5e6 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -42,6 +42,7 @@ class UserController extends BaseAuthedController { $this->createNewUser($userName, $avatarUrl); $this->addChip(); + $this->addFragmentBox(); $userInfo = $this->_getOrmUserInfo(); } @@ -53,6 +54,28 @@ class UserController extends BaseAuthedController { )); $this->_incDailyV(TN_DAILY_LOGINS, 0, 1); } + + private function addFragmentBox(){ + $items = array( + array( + 'item_id' => V_ITEM_GOLD, + 'item_num' => 10000 + ),array( + 'item_id' => V_ITEM_DIAMOND, + 'item_num' => 10000 + ), + ); + $boxMeta=\mt\Item::getMetaListByType(15); + foreach ($boxMeta as $box){ + array_push($items,array( + 'item_id' => $box['id'], + 'item_num' => 10 + )); + } + $awardService = new services\AwardService(); + $propertyChgService = new services\PropertyChgService(); + $this->_addItems($items,$awardService,$propertyChgService); + } private function addChip(){ $list1 = [130001,130002,130003,130004,130005,130006,130007,130008,130009,130010];