1
This commit is contained in:
commit
05faaed838
@ -367,16 +367,18 @@ class Hero extends BaseModel {
|
|||||||
$lucky += $heroResult['lucky'];
|
$lucky += $heroResult['lucky'];
|
||||||
$lucky_rate += $heroResult['lucky_rate'];
|
$lucky_rate += $heroResult['lucky_rate'];
|
||||||
$chipPageDb = ChipPage::find($row['idx']);
|
$chipPageDb = ChipPage::find($row['idx']);
|
||||||
$data = emptyReplace(json_decode($chipPageDb['data'], true), array());
|
if ($chipPageDb){
|
||||||
foreach ($data as $value){
|
$data = emptyReplace(json_decode($chipPageDb['data'], true), array());
|
||||||
$chipDb = Chip::find($value['chip_id']);
|
foreach ($data as $value){
|
||||||
if ( $chipDb ) {
|
$chipDb = Chip::find($value['chip_id']);
|
||||||
$chipAttrs = emptyReplace(json_decode($chipDb['wealth_attr'], true), array());
|
if ( $chipDb ) {
|
||||||
$chipResult = \mt\EconomyAttribute::getAttrValue($chipAttrs);
|
$chipAttrs = emptyReplace(json_decode($chipDb['wealth_attr'], true), array());
|
||||||
$wealth += $chipResult['wealth'];
|
$chipResult = \mt\EconomyAttribute::getAttrValue($chipAttrs);
|
||||||
$wealth_rate += $chipResult['wealth_rate'];
|
$wealth += $chipResult['wealth'];
|
||||||
$lucky += $chipResult['lucky'];
|
$wealth_rate += $chipResult['wealth_rate'];
|
||||||
$lucky_rate += $chipResult['lucky_rate'];
|
$lucky += $chipResult['lucky'];
|
||||||
|
$lucky_rate += $chipResult['lucky_rate'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return array(
|
return array(
|
||||||
|
@ -71,34 +71,8 @@ class User extends BaseModel {
|
|||||||
|
|
||||||
public static function show($row)
|
public static function show($row)
|
||||||
{
|
{
|
||||||
// mt\LevelUp::getExpByLv($row['level'],$row['exp']);
|
|
||||||
{
|
|
||||||
$current_star_num = $row['star_num'];
|
|
||||||
$currSeasonMeta = \mt\StarLevel::getCurrentSeason();
|
|
||||||
$next_star_num = mt\StarLevel::getNextNeedStarNum($current_star_num,$currSeasonMeta['id']);
|
|
||||||
}
|
|
||||||
$heroDb = Hero::find($row['hero_id']);
|
$heroDb = Hero::find($row['hero_id']);
|
||||||
$heroId = $heroDb['hero_id'];
|
$heroId = $heroDb['hero_id'];
|
||||||
// if ($heroDb){
|
|
||||||
// $heroId = $heroDb['hero_id'];
|
|
||||||
// }else{
|
|
||||||
// $heroUniId = 0;
|
|
||||||
// $heroId = 0;
|
|
||||||
// Hero::randHero($heroUniId,$heroId);
|
|
||||||
// $heroMeta = mt\Item::get($heroId);
|
|
||||||
// $headList = emptyReplace(json_decode($row['head_list'], true), array());
|
|
||||||
// if ($heroMeta['hero_head'] && !in_array($heroMeta['hero_head'],$headList)){
|
|
||||||
// array_push($headList,$heroMeta['hero_head']);
|
|
||||||
// }
|
|
||||||
// self::update(array(
|
|
||||||
// 'hero_id' => $heroUniId,
|
|
||||||
// 'head_id' => $heroMeta['hero_head'],
|
|
||||||
// 'head_frame' => 60000,
|
|
||||||
// 'head_list' => json_encode($headList),
|
|
||||||
// 'head_frame_list' => json_encode(array(60000)),
|
|
||||||
// ));
|
|
||||||
// $row = myself()->_getOrmUserInfo();
|
|
||||||
// }
|
|
||||||
$honorInfo = array();
|
$honorInfo = array();
|
||||||
if ($row['address']){
|
if ($row['address']){
|
||||||
$honorInfo = UserHonor::info($row['address']);
|
$honorInfo = UserHonor::info($row['address']);
|
||||||
@ -139,43 +113,15 @@ class User extends BaseModel {
|
|||||||
'parachute_list' => Parachute::getMyParachute(),
|
'parachute_list' => Parachute::getMyParachute(),
|
||||||
'ring_id' => $row['ring_id'],
|
'ring_id' => $row['ring_id'],
|
||||||
'ring_list' => UserSeasonRing::ringList($row['account_id']),
|
'ring_list' => UserSeasonRing::ringList($row['account_id']),
|
||||||
'current_star_num' => $current_star_num,
|
|
||||||
'next_star_num' => $next_star_num,
|
|
||||||
// 'status_bar' => self::_getState(),
|
|
||||||
'honor_info' => $honorInfo
|
'honor_info' => $honorInfo
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function info($row)
|
public static function info($row)
|
||||||
{
|
{
|
||||||
// mt\LevelUp::getExpByLv($row['level'],$row['exp']);
|
|
||||||
{
|
|
||||||
$current_star_num = $row['star_num'];
|
|
||||||
$currSeasonMeta = \mt\StarLevel::getCurrentSeason();
|
|
||||||
$next_star_num = mt\StarLevel::getNextNeedStarNum($current_star_num,$currSeasonMeta['id']);
|
|
||||||
}
|
|
||||||
$heroDb = Hero::findByAccountId($row['account_id'],$row['hero_id']);
|
$heroDb = Hero::findByAccountId($row['account_id'],$row['hero_id']);
|
||||||
$heroId = $heroDb['hero_id'];
|
$heroId = $heroDb['hero_id'];
|
||||||
// if ($heroDb){
|
|
||||||
// $heroId = $heroDb['hero_id'];
|
|
||||||
// }else{
|
|
||||||
// $heroUniId = 0;
|
|
||||||
// $heroId = 0;
|
|
||||||
// Hero::randHero($heroUniId,$heroId);
|
|
||||||
// $heroMeta = mt\Item::get($heroId);
|
|
||||||
// $headList = emptyReplace(json_decode($row['head_list'], true), array());
|
|
||||||
// if ($heroMeta['hero_head'] && !in_array($heroMeta['hero_head'],$headList)){
|
|
||||||
// array_push($headList,$heroMeta['hero_head']);
|
|
||||||
// }
|
|
||||||
// self::update(array(
|
|
||||||
// 'hero_id' => $heroUniId,
|
|
||||||
// 'head_id' => $heroMeta['hero_head'],
|
|
||||||
// 'head_frame' => 60000,
|
|
||||||
// 'head_list' => json_encode($headList),
|
|
||||||
// 'head_frame_list' => json_encode(array(60000)),
|
|
||||||
// ));
|
|
||||||
// $row = myself()->_getOrmUserInfo();
|
|
||||||
// }
|
|
||||||
$honorInfo = array();
|
$honorInfo = array();
|
||||||
if ($row['address']){
|
if ($row['address']){
|
||||||
$honorInfo = UserHonor::info($row['address']);
|
$honorInfo = UserHonor::info($row['address']);
|
||||||
@ -217,33 +163,13 @@ class User extends BaseModel {
|
|||||||
'ring_list' => UserSeasonRing::ringList($row['account_id']),
|
'ring_list' => UserSeasonRing::ringList($row['account_id']),
|
||||||
'parachute' => $row['parachute'] ? $row['parachute'] : Parachute::$parachute,
|
'parachute' => $row['parachute'] ? $row['parachute'] : Parachute::$parachute,
|
||||||
'parachute_list' => Parachute::getMyParachute(),
|
'parachute_list' => Parachute::getMyParachute(),
|
||||||
'current_star_num' => $current_star_num,
|
|
||||||
'next_star_num' => $next_star_num,
|
|
||||||
// 'status_bar' => self::_getState(),
|
|
||||||
'honor_info' => $honorInfo,
|
'honor_info' => $honorInfo,
|
||||||
'last_login_time' => $row['last_login_time'],
|
'last_login_time' => $row['last_login_time'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// private static function _getState(){
|
|
||||||
// $sign_state = 0;
|
|
||||||
// $signDb = SignLog::find();
|
|
||||||
//// $paramMeta = \mt\Parameter::getByName('sign_daily_duration');
|
|
||||||
//// $end_time = myself()->_getDaySeconds($signDb['createtime'])+$paramMeta['param_value']*24*60*60;
|
|
||||||
// if($signDb['days'] == 7 && $signDb['is_receive'] == 1){
|
|
||||||
//// if ( myself()->_getNowTime() - $end_time > 0){
|
|
||||||
// $sign_state = 1;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return array(
|
|
||||||
// "first_top_up" => myself()->_getV(TN_FIRST_TUPOP_STATUS,0),
|
|
||||||
// "sign_day" => $sign_state
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
public static function toSimple($row)
|
public static function toSimple($row)
|
||||||
{
|
{
|
||||||
// mt\LevelUp::getExpByLv($row['level'],$row['exp']);
|
|
||||||
$heroDb = Hero::find($row['hero_id']);
|
$heroDb = Hero::find($row['hero_id']);
|
||||||
if ($heroDb){
|
if ($heroDb){
|
||||||
$heroId = $heroDb['hero_id'];
|
$heroId = $heroDb['hero_id'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user