1
This commit is contained in:
parent
f92deeb2d7
commit
eaed9c83ef
@ -4,21 +4,20 @@ require_once('models/Chip.php');
|
||||
require_once('models/Hero.php');
|
||||
require_once('models/Gun.php');
|
||||
require_once('models/User.php');
|
||||
require_once('models/Nft.php');
|
||||
|
||||
require_once('mt/ChipAttr.php');
|
||||
|
||||
require_once('services/FormulaService.php');
|
||||
require_once('services/PropertyChgService.php');
|
||||
require_once('services/LogService.php');
|
||||
require_once('services/SeasonService.php');
|
||||
|
||||
require_once('models/Season.php');
|
||||
|
||||
|
||||
|
||||
use models\Chip;
|
||||
use models\Hero;
|
||||
use models\Gun;
|
||||
use models\User;
|
||||
use models\Nft;
|
||||
use models\Season;
|
||||
use services\FormulaService;
|
||||
use services\LogService;
|
||||
use phpcommon\SqlHelper;
|
||||
@ -553,34 +552,6 @@ class ChipController extends BaseAuthedController
|
||||
]);
|
||||
}
|
||||
|
||||
public function test(){
|
||||
|
||||
// $nft_active = SqlHelper::ormSelect(
|
||||
// myself()->_getSelfMysql(),
|
||||
// 't_nft_active',
|
||||
// array(
|
||||
// 'account_id' => myself()->_getAccountId(),
|
||||
// 'token_type' =>3,
|
||||
// )
|
||||
// );
|
||||
// print_r($nft_active);die;
|
||||
// foreach ($nft_active as $item){
|
||||
// $chip = Chip::getChipByTokenId($item['token_id']);
|
||||
// if ($chip['chip_type'] == 1){
|
||||
// $Chip_PSA_Value= \services\FormulaService::Hero_Chip_PSA_Value($chip['chip_grade']);
|
||||
// }else{
|
||||
// $Chip_PSA_Value= \services\FormulaService::Weapon_Chip_DA_Value($chip['chip_grade']);
|
||||
// }
|
||||
// $tili = $chip['strength']-$chip['strength_max']*$Chip_PSA_Value; //错误公式
|
||||
// Chip::update($chip['token_id'],['strength'=>$tili]);
|
||||
// }
|
||||
// $this->_rspOk();
|
||||
|
||||
// $this->chipDetails();
|
||||
// $arr = [30900=>2,31000=>6,31100=>4];
|
||||
}
|
||||
|
||||
|
||||
private function _doInlayHero($hero_id,$token_id){
|
||||
$chip = Chip::getChipByTokenId($token_id);
|
||||
$hero = Hero::find($hero_id);
|
||||
|
@ -39,7 +39,7 @@ class Season extends BaseModel {
|
||||
$temp = explode(',',$reward);
|
||||
array_push($rewardList,array(
|
||||
'item_id' => $temp[0],
|
||||
'item_num' => $temp[1],
|
||||
'item_num' => $temp[1]?$temp[1]:1,
|
||||
));
|
||||
}
|
||||
return $rewardList;
|
||||
|
10
webapp/models/SeasonHistory.php
Normal file
10
webapp/models/SeasonHistory.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace models;
|
||||
|
||||
|
||||
class SeasonHistory
|
||||
{
|
||||
|
||||
}
|
10
webapp/models/UserSeasonRing.php
Normal file
10
webapp/models/UserSeasonRing.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace models;
|
||||
|
||||
|
||||
class UserSeasonRing
|
||||
{
|
||||
|
||||
}
|
@ -39,13 +39,13 @@ class Rank {
|
||||
{
|
||||
$meta = self::getMetaListNew();
|
||||
for ($i=1;$i<=count($meta);$i++){
|
||||
if ($i==1){
|
||||
if ($meta[$i]['id'] == 1){
|
||||
$newScore = max($newScore,$meta[$i]['rank_score']);
|
||||
}
|
||||
if ($i == count($meta)){
|
||||
if ($meta[$i]['id'] == count($meta)){
|
||||
$newScore = min($newScore,$meta[$i]['rank_score']);
|
||||
}
|
||||
if ($meta[$i+1]){
|
||||
if ($i+1<=count($meta)){
|
||||
if($newScore>=$meta[$i]['rank_score'] && $newScore<$meta[$i+1]['rank_score']){
|
||||
$newRank = $meta[$i]['id'];
|
||||
}
|
||||
@ -55,23 +55,6 @@ class Rank {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// $currRankMeta = self::get($oldRank);
|
||||
// if ($currRankMeta && $currRankMeta['max_score'] > 0) {
|
||||
// $newScore = min($oldScore, $currRankMeta['max_score']) + $addScore;
|
||||
// do {
|
||||
// if ($newScore > $currRankMeta['max_score']) {
|
||||
// ++$newRank;
|
||||
// $currRankMeta = self::get($newRank);
|
||||
// if ($currRankMeta['max_score'] < 0) {
|
||||
// $newScore = $currRankMeta['min_score'];
|
||||
// break;
|
||||
// }
|
||||
// } else {
|
||||
// break;
|
||||
// }
|
||||
// } while ($currRankMeta);
|
||||
// }
|
||||
}
|
||||
|
||||
protected static function getMetaList()
|
||||
|
@ -426,7 +426,7 @@ class BattleDataService extends BaseService {
|
||||
//排名前十 总次数
|
||||
$this->incValue($heroInfo[$hero['hero_id']], 'top_ten_times', 1);//使用该英雄进前十次数
|
||||
}
|
||||
if (!$heroInfo[$hero['hero_id']]['weapon']){
|
||||
if (!isset($heroInfo[$hero['hero_id']]['weapon'])){
|
||||
$heroInfo[$hero['hero_id']]['weapon'] = array();
|
||||
}
|
||||
$weapon_uuid1 = getReqVal('weapon_uuid1', '');
|
||||
|
Loading…
x
Reference in New Issue
Block a user