ShopProc.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. namespace loyalsoft;
  8. /**
  9. * Description of ShopProc
  10. *
  11. * @author c'y'zhao
  12. */
  13. class ShopProc {
  14. /**
  15. * 逻辑分发
  16. * 所有的Proc中必须有这样一个方法
  17. * @param Req $req
  18. */
  19. public static function procMain($req) {
  20. switch ($req->cmd) {
  21. case CmdCode::cmd_shop_BuyGift: # 6501 商城购买东西
  22. return ShopProc::ShopBuyGift();
  23. case CmdCode::cmd_shop_BuyTili: # 6502 买体力
  24. return ShopProc::BuyTili();
  25. default:
  26. Err(ErrCode::cmd_err);
  27. }
  28. }
  29. public static function BuyTili() {
  30. list($type) = req()->paras;
  31. $addTili = 0;
  32. if ($type == 1) {//广告
  33. $maxNum = glc()->GuanggaoGetTili_DailyMaxNum;
  34. my_Assert(ctx()->privateState->guanggaoGetTiliNum < $maxNum, ErrCode::user_shop_GuanggaoGetTiliNumLimit);
  35. my_Assert(now() - ctx()->privateState->guanggaoGetTili_ts > 300, ErrCode::user_shop_DownTsLimit);
  36. $addTili = glc()->GuanggaoGetTili;
  37. ctx()->baseInfo->Add_tili(glc()->GuanggaoGetTili);
  38. ctx()->privateState->guanggaoGetTiliNum += 1;
  39. ctx()->privateState->guanggaoGetTili_ts = now();
  40. } else {
  41. $maxNum = glc()->BuyTili_DailyMaxNum;
  42. my_Assert(ctx()->privateState->buyTiliNum < $maxNum, ErrCode::user_shop_buyTiliNumLimit);
  43. $arr = explode(',', glc()->BuyTiliCost);
  44. my_Assert(ctx()->baseInfo->cash >= $arr[0], ErrCode::user_shop_NotRepeatBuy);
  45. ctx()->baseInfo->Consume_Cash($arr[0]);
  46. $addTili = $arr[1];
  47. ctx()->baseInfo->Add_tili($arr[1]);
  48. ctx()->privateState->buyTiliNum += 1;
  49. }
  50. TaskProc::OnBuyTiliOrLookGuanggao();
  51. UserProc::updateUserInfo();
  52. return Resp::ok(array(
  53. "privateState" => ctx()->privateState,
  54. "baseInfo" => ctx()->baseInfo,
  55. "tili" => $addTili,
  56. "task" => ctx()->task,
  57. ));
  58. }
  59. /**
  60. * 商城购买东西
  61. * @return type
  62. */
  63. public static function ShopBuyGift() {
  64. list($type, $typeId, $buyNum) = req()->paras;
  65. $user = ctx();
  66. $resultArr = array();
  67. $dailyArr = array();
  68. $equip = array();
  69. $gateGift = array();
  70. switch ($type) {
  71. case EnumShopGift::GateGift_Shop://章节礼包
  72. self::BuyShop_GateGift($type, $typeId, $buyNum);
  73. break;
  74. case EnumShopGift::Daily_Shop://每日商店
  75. $mo = GameConfig::shop_daily_getItem($typeId);
  76. my_Assert($mo != null, ErrCode::err_const_no);
  77. my_Assert(in_array($typeId, $user->privateState->dailyShopRandItems), ErrCode::err_const_no);
  78. if ($mo->type == 1) {
  79. $getNum = 0;
  80. foreach ($user->privateState->dailyShopReceived as $id) {
  81. if ($id == $typeId) {
  82. $getNum += 1;
  83. }
  84. }
  85. if ($getNum >= $mo->freeNum) {
  86. my_Assert($user->privateState->dailyShop_GuangGaoNum < $mo->num, ErrCode::user_shop_GuanggaoFreeNumLimit);
  87. if ($user->privateState->dailyShop_GuangGaoNum >= 1) {
  88. my_Assert(now() - $user->privateState->dailyShop_GuangGaoTs >= $mo->downTs, ErrCode::user_shop_DownTsLimit);
  89. }
  90. $user->privateState->dailyShop_GuangGaoNum += 1;
  91. $user->privateState->dailyShop_GuangGaoTs = now();
  92. }
  93. } else {
  94. my_Assert(!in_array($typeId, $user->privateState->dailyShopReceived), ErrCode::user_shop_NotRepeatBuy);
  95. switch ($mo->costType) {
  96. case EnumShopCost::Gold:
  97. my_Assert($user->baseInfo->gold >= $mo->costNum, ErrCode::notenough_gold_msg);
  98. ctx()->baseInfo->Consume_Gold($mo->costNum);
  99. break;
  100. case EnumShopCost::Cash:
  101. my_Assert($user->baseInfo->cash >= $mo->costNum, ErrCode::notenough_cash_msg);
  102. ctx()->baseInfo->Consume_Cash($mo->costNum);
  103. break;
  104. default:
  105. break;
  106. }
  107. TaskProc::OnBuyNumDailyShop();
  108. }
  109. // $str = explode(',', $mo->reward);
  110. // if ($str[0] == 501) {//暂时还没有
  111. // }
  112. //$dailyArr
  113. StoreProc::AddMultiItemInStore($mo->reward);
  114. ctx()->privateState->dailyShopReceived[] = $typeId;
  115. TaskProc::OnBuyNumDailyShop_state();
  116. break;
  117. case EnumShopGift::GemBox_Shop ://宝石宝箱---->2024.8.14 改为可能抽出宝石或是道具
  118. $mo = GameConfig::shop_box_getItem($typeId);
  119. my_Assert($mo != null, ErrCode::err_const_no);
  120. if ($buyNum == 1) {
  121. $yaoshiArr = explode(',', $mo->cost_one_yaoshi);
  122. $itemId = $yaoshiArr[0];
  123. if (StlUtil::dictHasProperty(ctx()->store->items, $itemId) && ctx()->store->items->$itemId >= $yaoshiArr[1]) {
  124. ctx()->store->removeItem($itemId, $yaoshiArr[1]);
  125. } else {
  126. $cost = $mo->cost_one;
  127. my_Assert($user->baseInfo->cash >= $cost, ErrCode::notenough_cash_msg);
  128. $user->baseInfo->Consume_Cash($cost);
  129. }
  130. } elseif ($buyNum == 10) {
  131. $yaoshiArr = explode(',', $mo->cost_ten_yaoshi);
  132. $itemId = $yaoshiArr[0];
  133. if (StlUtil::dictHasProperty(ctx()->store->items, $itemId) && ctx()->store->items->$itemId >= $yaoshiArr[1]) {
  134. ctx()->store->removeItem($itemId, $yaoshiArr[1]);
  135. } else {
  136. $cost = $mo->cost_ten;
  137. my_Assert($user->baseInfo->cash >= $cost, ErrCode::notenough_cash_msg);
  138. $user->baseInfo->Consume_Cash($cost);
  139. }
  140. }
  141. if ($mo->type == 1) {
  142. if ($buyNum == 0) {
  143. $buyNum = 1;
  144. my_Assert(now() - $user->privateState->lastFreeGetTs_ShopBoxCommon >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
  145. $user->privateState->lastFreeGetTs_ShopBoxCommon = now();
  146. }
  147. } else if ($mo->type == 2) {
  148. if ($buyNum == 0) {
  149. $buyNum = 1;
  150. my_Assert(now() - $user->privateState->lastFreeGetTs_ShopBoxBright >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
  151. $user->privateState->lastFreeGetTs_ShopBoxBright = now();
  152. }
  153. }
  154. $arr = array();
  155. $arr[] = 1;
  156. $arr[] = 10;
  157. if (!in_array($buyNum, $arr)) {
  158. $buyNum = 1;
  159. }
  160. TaskProc::OnOpenNumBrightBox($typeId, $buyNum);
  161. TaskProc::OnOpenNumAnyBox($buyNum);
  162. $perList = explode(';', $mo->percent);
  163. $allNum = 0;
  164. foreach ($perList as $key => $value) {
  165. $str = explode(',', $value);
  166. $allNum += $str[1];
  167. }
  168. $allNum *= 10;
  169. for ($i = 0; $i < $buyNum; $i++) {
  170. mt_srand((double) microtime() * 1000000);
  171. $buyCount = 0;
  172. if ($mo->type == 1) {
  173. $user->privateState->buyNum_ShopBoxCommon += 1;
  174. $buyCount = $user->privateState->buyNum_ShopBoxCommon;
  175. } else {
  176. $user->privateState->buyNum_ShopBoxBright += 1;
  177. $buyCount = $user->privateState->buyNum_ShopBoxBright;
  178. }
  179. $bichu1 = explode(',', $mo->bichu1);
  180. $qual = 0; //改成道具盒子了 但是这个变量不动了
  181. if ($buyCount % $bichu1[0] == 0) {
  182. $qual = $bichu1[1];
  183. }
  184. if ($mo->bichu2 != null) {
  185. $bichu2 = explode(',', $mo->bichu2);
  186. if ($buyCount % $bichu2[0] == 0) {
  187. $qual = $bichu2[1];
  188. }
  189. }
  190. if ($qual == 0) {
  191. $start = 0;
  192. $end = 0;
  193. $randNum = mt_rand(1, $allNum);
  194. foreach ($perList as $k => $val) {
  195. $str = explode(',', $val);
  196. $end += $str[1] * 10;
  197. if ($randNum > $start && $randNum <= $end) {
  198. $qual = $str[0];
  199. break;
  200. }
  201. $start = $end;
  202. }
  203. }
  204. if ($qual > 0) {
  205. StoreProc::AddMultiItemInStore($qual . ",1", Enum_StoreSourceType::ShopBox);
  206. }
  207. }
  208. TaskProc::OnOpenNumBrightBox_state($typeId, $buyNum);
  209. break;
  210. case EnumShopGift::BujiBox_Shop://补给箱
  211. $mo = GameConfig::shop_supply_getItem($typeId);
  212. my_Assert($mo != null, ErrCode::err_const_no);
  213. $list = explode(',', $mo->cost);
  214. my_Assert(StlUtil::dictHasProperty($user->store->items, $list[0]), ErrCode::notenough_item);
  215. $user->store->removeItem($list[0], $list[1]);
  216. $user->baseInfo->Add_Gold($mo->gold);
  217. if (!StlUtil::dictHasProperty($user->privateState->junbeiShopNumRecord, $typeId)) {
  218. $user->privateState->junbeiShopNumRecord->$typeId = 0;
  219. }
  220. $num = $user->privateState->junbeiShopNumRecord->$typeId += 1;
  221. if (!StlUtil::dictHasProperty($user->privateState->supplyBichuDic, $typeId)) {
  222. $user->privateState->supplyBichuDic->$typeId = 0;
  223. }
  224. $user->privateState->supplyBichuDic->$typeId += 1;
  225. my_Assert($num <= $mo->limitNum, ErrCode::user_shop_LimitNum);
  226. $list = explode(';', $mo->percent);
  227. $randNum = rand(0, 10000);
  228. $start = 0;
  229. $end = 0;
  230. $qual = null;
  231. foreach ($list as $item) {
  232. $arr = explode(',', $item);
  233. $per = $arr[2] * 100;
  234. $end += $per;
  235. if ($randNum >= $start && $randNum < $end) {
  236. $qual = $arr[0] . ',' . $arr[1]; //品阶,稀有度
  237. break;
  238. }
  239. $start = $end;
  240. }
  241. //必出
  242. $bichu = explode(',', $mo->bichu);
  243. $qArr = explode(',', $qual);
  244. if ($qArr[0] == $bichu[1] && $qArr[1] == $bichu[2]) {//得到必出,重置数量记录
  245. $user->privateState->supplyBichuDic->$typeId = 0;
  246. $qual = $bichu[1] . ',' . $bichu[2];
  247. } else {
  248. if ($user->privateState->supplyBichuDic->$typeId == $bichu[0]) {
  249. $qual = $bichu[1] . ',' . $bichu[2];
  250. $user->privateState->supplyBichuDic->$typeId = 0;
  251. }
  252. }
  253. if ($qual != null) {
  254. $str = explode(',', $qual);
  255. $equipList = array();
  256. $dic = GameConfig::equip();
  257. foreach ($dic as $tid => $item) {
  258. if ($item->qual == $str[0] && $item->rarity == $str[1]) {
  259. $equipList[] = $item->typeId;
  260. }
  261. }
  262. $rNum = rand(0, count($equipList) - 1);
  263. $equipId = $equipList[$rNum];
  264. StoreProc::PutEquipInStore($equipId, 1);
  265. $equip[] = $equipId;
  266. }
  267. break;
  268. case EnumShopGift::Cash_Shop://商城-钻石
  269. $mo = GameConfig::shop_cash_getItem($typeId);
  270. my_Assert($mo != null, ErrCode::err_const_no);
  271. $tag = false;
  272. if (in_array($typeId, $user->privateState->cashShopReceived)) {
  273. $tag = true;
  274. }
  275. $reward = $mo->reward;
  276. if (!$tag) {
  277. $reward = $mo->reward . ';' . $mo->reward;
  278. }
  279. StoreProc::AddMultiItemInStore($reward);
  280. $user->baseInfo->charge_amt += $mo->price;
  281. $user->privateState->cashShopReceived[] = $typeId;
  282. TaskProc::OnRecharge();
  283. break;
  284. case EnumShopGift::Gold_Shop://商城-金币--可以多次购买
  285. $mo = GameConfig::shop_gold_getItem($typeId);
  286. my_Assert($mo != null, ErrCode::err_const_no);
  287. $tempNum = 0;
  288. foreach ($user->privateState->goldShopReceived as $key) {
  289. if ($key == $typeId) {
  290. $tempNum += 1;
  291. }
  292. }
  293. if ($tempNum >= $mo->freeNum) {
  294. $ts = 0;
  295. switch ($typeId) {
  296. case 1:
  297. $ts = $user->privateState->goldShop_CoolDownTs_1;
  298. break;
  299. case 2:
  300. $ts = $user->privateState->goldShop_CoolDownTs_2;
  301. break;
  302. case 3:
  303. $ts = $user->privateState->goldShop_CoolDownTs_3;
  304. break;
  305. }
  306. //收费买
  307. if ($typeId == 1 && $user->privateState->goldShop_GuangGaoNum < $mo->guanggaoNum) {
  308. $user->privateState->goldShop_GuangGaoNum += 1;
  309. } else {
  310. my_Assert($user->baseInfo->cash >= $mo->price, ErrCode::notenough_cash_msg);
  311. ctx()->baseInfo->Consume_Cash($mo->price);
  312. }
  313. if ($ts == 0) {
  314. switch ($typeId) {
  315. case 1:
  316. $user->privateState->goldShop_CoolDownTs_1 = now();
  317. break;
  318. case 2:
  319. $user->privateState->goldShop_CoolDownTs_2 = now();
  320. break;
  321. case 3:
  322. $user->privateState->goldShop_CoolDownTs_3 = now();
  323. break;
  324. }
  325. //$user->privateState->goldShopReceived[] = $typeId;
  326. } else {
  327. my_Assert(now() - $ts >= $mo->downTs, ErrCode::user_shop_DownTsLimit);
  328. switch ($typeId) {
  329. case 1:
  330. $user->privateState->goldShop_CoolDownTs_1 = now();
  331. break;
  332. case 2:
  333. $user->privateState->goldShop_CoolDownTs_2 = now();
  334. break;
  335. case 3:
  336. $user->privateState->goldShop_CoolDownTs_3 = now();
  337. break;
  338. }
  339. }
  340. if ($typeId == 1 && $user->privateState->goldShop_GuangGaoNum == $mo->guanggaoNum) {
  341. $user->privateState->goldShop_GuangGaoNum += 1;
  342. $user->privateState->goldShop_CoolDownTs_1 = 0;
  343. }
  344. }
  345. TaskProc::OnBuyGold();
  346. $user->privateState->goldShopReceived[] = $typeId;
  347. StoreProc::AddMultiItemInStore($mo->reward);
  348. break;
  349. case EnumShopGift::MonthCard_Shop:
  350. $mo = GameConfig::shop_monthcard_getItem($typeId);
  351. my_Assert($mo != null, ErrCode::err_const_no);
  352. //$user->privateState->monthCardShop_Received[] = $typeId;
  353. if ($typeId == 1) {
  354. my_Assert($user->privateState->monthCardShop_ts == 0, ErrCode::err_const_no);
  355. $user->privateState->monthCardShop_ts = now();
  356. StoreProc::AddMultiItemInStore($mo->buy_reward);
  357. EmailProc::SendMonthCardRewardMail(req()->zoneid, req()->uid, $mo->daily_reward);
  358. } else {
  359. my_Assert($user->privateState->honourCardShop_ts == 0, ErrCode::err_const_no);
  360. $user->privateState->honourCardShop_ts = now();
  361. }
  362. break;
  363. default:
  364. break;
  365. }
  366. // if (ctx()->baseInfo->charge_amt > 0 && ctx()->baseInfo->fRechargePriceReceived == 0) {
  367. // StoreProc::AddMultiItemInStore(GameConfig::globalsettings()->FirstRechargePrice);
  368. // ctx()->baseInfo->fRechargePriceReceived = 1;
  369. // }
  370. ctx($user);
  371. UserProc::updateUserInfo();
  372. return Resp::ok(array(
  373. 'gemBox' => $resultArr,
  374. 'gateGift' => $gateGift,
  375. 'cash' => $user->baseInfo->cash,
  376. 'gold' => $user->baseInfo->gold,
  377. 'privateState' => $user->privateState,
  378. 'store' => $user->store,
  379. 'task' => ctx()->task,
  380. 'heros' => ctx()->heros,
  381. 'reward' => StoreProc::$reward,
  382. 'reward_Gem' => StoreProc::$reward_Gem,
  383. ));
  384. }
  385. //商城章节礼包购买
  386. public static function BuyShop_GateGift($type, $typeId, $buyNum) {
  387. my_Assert(!in_array($typeId, ctx()->privateState->gateGiftReceived), ErrCode::user_shop_NotRepeatBuy);
  388. $mo = GameConfig::shop_gategift_getItem($typeId);
  389. my_Assert($mo != null, ErrCode::err_const_no);
  390. $price = explode(';', $mo->reward);
  391. foreach ($price as $value) {
  392. $item = explode(',', $value);
  393. if (GameConfig::item_getItem($item[0])->itemType == EnumItemType::tuzhiBox) {
  394. $dic = GameConfig::item();
  395. $list = array();
  396. foreach ($dic as $id => $val) {
  397. if ($val->itemType == EnumItemType::tuzhi) {
  398. $list[] = $val->typeId;
  399. }
  400. }
  401. $randNum = rand(0, count($list) - 1);
  402. $tuzhiId = $list[$randNum];
  403. $gateGift[] = $tuzhiId . ',1';
  404. } else {
  405. $gateGift[] = $value;
  406. }
  407. }
  408. foreach ($gateGift as $str) {
  409. StoreProc::AddMultiItemInStore($str);
  410. }
  411. ctx()->privateState->gateGiftReceived[] = $typeId;
  412. ctx()->baseInfo->charge_amt += $mo->curPrice;
  413. }
  414. public static function functionName($param) {
  415. }
  416. /**
  417. * 商城每日重置
  418. */
  419. public static function ShopDailyClear() {
  420. ctx()->privateState->dailyShopReceived = array();
  421. ctx()->privateState->goldShopReceived = array();
  422. $num = count(ctx()->privateState->goldShopReceived);
  423. $arr = ctx()->privateState->goldShopReceived;
  424. for ($i = 0; $i < $num; $i++) {
  425. if ($arr[$i] == 1) {
  426. StlUtil::arrayRemoveAt($arr, $i);
  427. }
  428. }
  429. ctx()->privateState->goldShop_CoolDownTs_1 = 0;
  430. ctx()->privateState->goldShop_GuangGaoNum = 0;
  431. ctx()->privateState->junbeiShopNumRecord = new \stdClass();
  432. ctx()->privateState->dailyShop_GuangGaoNum = 0;
  433. ctx()->privateState->dailyShop_GuangGaoTs = 0;
  434. ctx()->privateState->guanggaoGetTiliNum = 0;
  435. ctx()->privateState->buyTiliNum = 0;
  436. ctx()->privateState->lastFreeGetTs_ShopBoxBright = 0;
  437. ctx()->privateState->lastFreeGetTs_ShopBoxCommon = 0;
  438. self::ShopMonthClear();
  439. }
  440. /**
  441. * 月卡按照时间记录的一个月后清理
  442. */
  443. public static function ShopMonthClear() {
  444. $monthTs = 30 * 24 * 60 * 60;
  445. if (ctx()->privateState->monthCardShop_ts > 0) {
  446. if (now() - ctx()->privateState->monthCardShop_ts >= $monthTs) {
  447. ctx()->privateState->monthCardShop_ts = 0;
  448. } else {
  449. $mo = GameConfig::shop_monthcard_getItem(1);
  450. EmailProc::SendMonthCardRewardMail(req()->zoneid, req()->uid, $mo->daily_reward);
  451. }
  452. }
  453. if (ctx()->privateState->honourCardShop_ts > 0 && now() - ctx()->privateState->honourCardShop_ts >= $monthTs) {
  454. ctx()->privateState->honourCardShop_ts = 0;
  455. }
  456. }
  457. /**
  458. * 每日商城随机6个道具
  459. * @return type
  460. */
  461. public static function DailyShopItemRand() {
  462. $dataDic = new \stdClass();
  463. $dic = GameConfig::shop_daily();
  464. if ($dic == null) {
  465. return;
  466. }
  467. foreach ($dic as $typeId => $mo) {
  468. $type = $mo->type;
  469. if (StlUtil::dictHasProperty($dataDic, $type)) {
  470. $list = $dataDic->$type;
  471. $list[] = $typeId;
  472. $dataDic->$type = $list;
  473. } else {
  474. $list = array();
  475. $list[] = $typeId;
  476. $dataDic->$type = $list;
  477. }
  478. }
  479. $result = array();
  480. $arrType = array(1, 2, 3, 2, 4, 3);
  481. foreach ($arrType as $k) {
  482. if (StlUtil::dictHasProperty($dataDic, $k) && count($dataDic->$k) > 0) {
  483. $arr2 = $dataDic->$k;
  484. if ($k == 1) {
  485. $result[] = $arr2[0];
  486. continue;
  487. }
  488. $allNum = 0;
  489. foreach ($arr2 as $giftTypeId) {
  490. $allNum += GameConfig::shop_daily_getItem($giftTypeId)->per;
  491. }
  492. $randNum = rand(1, $allNum);
  493. $start = 0;
  494. $end = 0;
  495. $index = 0;
  496. foreach ($arr2 as $itemId) {
  497. $per = GameConfig::shop_daily_getItem($itemId)->per;
  498. $end += $per;
  499. if ($randNum >= $start && $randNum < $end) {
  500. $result[] = $itemId;
  501. break;
  502. }
  503. $start = $end;
  504. $index += 1;
  505. }
  506. unset($arr2[$index]);
  507. $dataDic->$k = array_values($arr2);
  508. }
  509. }
  510. ctx()->privateState->dailyShopRandItems = $result;
  511. UserProc::updateUserInfo();
  512. }
  513. }