1
This commit is contained in:
parent
61d4bd36ad
commit
ebcef6e4da
14
doc/Bag.py
14
doc/Bag.py
@ -19,4 +19,18 @@ class Bag(object):
|
||||
['!item_list', [_common.Item()], '物品列表']
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'useItem',
|
||||
'desc': '使用道具',
|
||||
'group': 'Bag',
|
||||
'url': 'webapp/index.php?c=Bag&a=useItem',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['award', _common.Award(), '奖励信息'],
|
||||
['property_chg', _common.PropertyChg(), '属性变更'],
|
||||
]
|
||||
},
|
||||
]
|
||||
|
@ -11,7 +11,7 @@ require_once('mt/SeasonPoint.php');
|
||||
require_once('mt/RankReward.php');
|
||||
require_once('mt/Equip.php');
|
||||
require_once('mt/Hero.php');
|
||||
require_once('mt/Robot.php');
|
||||
require_once('mt/Rank.php');
|
||||
|
||||
require_once('services/PropertyChgService.php');
|
||||
|
||||
@ -48,6 +48,7 @@ class UserController extends BaseAuthedController {
|
||||
|
||||
private function createNewUser($userName, $avatarUrl)
|
||||
{
|
||||
$rankMeta = mt\Rank::get(1);
|
||||
SqlHelper::upsert
|
||||
($this->_getSelfMysql(),
|
||||
't_user',
|
||||
@ -66,8 +67,8 @@ class UserController extends BaseAuthedController {
|
||||
'head_frame' => 19003,
|
||||
'level' => 100,
|
||||
'exp' => 0,
|
||||
'rank' => 0,
|
||||
'score' => 0,
|
||||
'rank' => $rankMeta ? $rankMeta['id'] : 0,
|
||||
'score' => $rankMeta ? $rankMeta['min_score'] : 0,
|
||||
'head_id' => 18001,
|
||||
'hero_id' => 30100,
|
||||
'createtime' => $this->_getNowTime(),
|
||||
|
24
webapp/mt/Rank.php
Normal file
24
webapp/mt/Rank.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace mt;
|
||||
|
||||
use phpcommon;
|
||||
|
||||
class Rank {
|
||||
|
||||
public static function get($id)
|
||||
{
|
||||
return getXVal(self::getMetaList(), $id);
|
||||
}
|
||||
|
||||
protected static function getMetaList()
|
||||
{
|
||||
if (!self::$metaList) {
|
||||
self::$metaList = getMetaTable('rank@rank.php');
|
||||
}
|
||||
return self::$metaList;
|
||||
}
|
||||
|
||||
protected static $metaList;
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user