1
This commit is contained in:
parent
ebcef6e4da
commit
d5977c23fc
@ -43,6 +43,13 @@ class UserController extends BaseAuthedController {
|
|||||||
|
|
||||||
private function loginCheck($userInfo)
|
private function loginCheck($userInfo)
|
||||||
{
|
{
|
||||||
|
$rankMeta = mt\Rank::get(1);
|
||||||
|
if ($rankMeta && $userInfo['rank'] < $rankMeta['rank']) {
|
||||||
|
$this->updateUserInfo(array(
|
||||||
|
'rank' => $rankMeta['rank'],
|
||||||
|
'score' => $rankMeta['min_score'],
|
||||||
|
));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +74,7 @@ class UserController extends BaseAuthedController {
|
|||||||
'head_frame' => 19003,
|
'head_frame' => 19003,
|
||||||
'level' => 100,
|
'level' => 100,
|
||||||
'exp' => 0,
|
'exp' => 0,
|
||||||
'rank' => $rankMeta ? $rankMeta['id'] : 0,
|
'rank' => $rankMeta ? $rankMeta['rank'] : 0,
|
||||||
'score' => $rankMeta ? $rankMeta['min_score'] : 0,
|
'score' => $rankMeta ? $rankMeta['min_score'] : 0,
|
||||||
'head_id' => 18001,
|
'head_id' => 18001,
|
||||||
'hero_id' => 30100,
|
'hero_id' => 30100,
|
||||||
|
@ -14,6 +14,8 @@ class User extends BaseModel {
|
|||||||
'head_frame' => $row['head_frame'],
|
'head_frame' => $row['head_frame'],
|
||||||
'level' => $row['level'],
|
'level' => $row['level'],
|
||||||
'exp' => $row['exp'],
|
'exp' => $row['exp'],
|
||||||
|
'rank' => $row['rank'],
|
||||||
|
'score' => $row['score'],
|
||||||
'gold' => $row['gold'],
|
'gold' => $row['gold'],
|
||||||
'diamond' => $row['diamond'],
|
'diamond' => $row['diamond'],
|
||||||
'hero_id' => $row['hero_id'],
|
'hero_id' => $row['hero_id'],
|
||||||
@ -31,6 +33,8 @@ class User extends BaseModel {
|
|||||||
'head_frame' => $row['head_frame'],
|
'head_frame' => $row['head_frame'],
|
||||||
'level' => $row['level'],
|
'level' => $row['level'],
|
||||||
'exp' => $row['exp'],
|
'exp' => $row['exp'],
|
||||||
|
'rank' => $row['rank'],
|
||||||
|
'score' => $row['score'],
|
||||||
'gold' => $row['gold'],
|
'gold' => $row['gold'],
|
||||||
'diamond' => $row['diamond'],
|
'diamond' => $row['diamond'],
|
||||||
'hero_id' => $row['hero_id'],
|
'hero_id' => $row['hero_id'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user