From d8245e333afe108f027c5ab0ce66da39b8ebfa58 Mon Sep 17 00:00:00 2001 From: hujiabin Date: Fri, 17 Mar 2023 19:38:58 +0800 Subject: [PATCH] 1 --- webapp/services/BattleDataService.php | 102 +++++++++++++------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/webapp/services/BattleDataService.php b/webapp/services/BattleDataService.php index 6e1e0db2..41d41b8d 100644 --- a/webapp/services/BattleDataService.php +++ b/webapp/services/BattleDataService.php @@ -99,62 +99,62 @@ class BattleDataService extends BaseService { public function updateBattleData() { - error_log(json_encode($_REQUEST)); - $matchMode = getReqVal('match_mode', 0); - { - $heroDb = Hero::find(getReqVal('hero_uniid', 0)); - if (!$heroDb) { - return false; - } - $this->heroDto = Hero::toDto($heroDb); - if (Hero::heroIsLocking($heroDb)) { - return false; - } - $this->heroMeta = mt\Hero::get($this->heroDto['hero_id']); - if (!$this->heroMeta) { - return false; - } - $this->reward['hero']['hero_uniid'] = $this->heroDto['hero_uniid']; - $this->reward['hero']['ceg_uplimit'] = $this->heroDto['gold_uplimit']; - } +// error_log(json_encode($_REQUEST)); +// $matchMode = getReqVal('match_mode', 0); +// { +// $heroDb = Hero::find(getReqVal('hero_uniid', 0)); +// if (!$heroDb) { +// return false; +// } +// $this->heroDto = Hero::toDto($heroDb); +// if (Hero::heroIsLocking($heroDb)) { +// return false; +// } +// $this->heroMeta = mt\Hero::get($this->heroDto['hero_id']); +// if (!$this->heroMeta) { +// return false; +// } +// $this->reward['hero']['hero_uniid'] = $this->heroDto['hero_uniid']; +// $this->reward['hero']['ceg_uplimit'] = $this->heroDto['gold_uplimit']; +// } //录入战斗记录 // $this->saveBattleHistory(); error_log('updateBattleData0----------'.$matchMode); - switch ($matchMode) { - case self::MATCH_MODE_PVP: - { - error_log('updateBattleData1'); - //匹配赛模式 - $this->updatePvpData(); -// $this->rewardCegPvp(); - myself()->_incDailyV(TN_DAILY_PVP_BATTLE_TIMES, 0, 1); - } - break; - case self::MATCH_MODE_MATCH: - { - //排位赛(和匹配合二为一) -// $this->updateSeasonData(); -// myself()->_incDailyV(TN_DAILY_RANK_BATTLE_TIMES, 0, 1); - } - break; - case self::MATCH_MODE_PVE: - { - //pve - $this->updatePveData(); - if ($this->pveGeminiMeta && - $this->pveGeminiModeMeta) { - $this->rewardFragmentPve(); - } - myself()->_incDailyV(TN_DAILY_PVE_BATTLE_TIMES, 0, 1); - } - break; - default: - { - } - break; - } +// switch ($matchMode) { +// case self::MATCH_MODE_PVP: +// { +// error_log('updateBattleData1'); +// //匹配赛模式 +// $this->updatePvpData(); +//// $this->rewardCegPvp(); +// myself()->_incDailyV(TN_DAILY_PVP_BATTLE_TIMES, 0, 1); +// } +// break; +// case self::MATCH_MODE_MATCH: +// { +// //排位赛(和匹配合二为一) +//// $this->updateSeasonData(); +//// myself()->_incDailyV(TN_DAILY_RANK_BATTLE_TIMES, 0, 1); +// } +// break; +// case self::MATCH_MODE_PVE: +// { +// //pve +// $this->updatePveData(); +// if ($this->pveGeminiMeta && +// $this->pveGeminiModeMeta) { +// $this->rewardFragmentPve(); +// } +// myself()->_incDailyV(TN_DAILY_PVE_BATTLE_TIMES, 0, 1); +// } +// break; +// default: +// { +// } +// break; +// } }