1
This commit is contained in:
parent
a9314108e1
commit
d8245e333a
@ -99,62 +99,62 @@ class BattleDataService extends BaseService {
|
|||||||
|
|
||||||
public function updateBattleData()
|
public function updateBattleData()
|
||||||
{
|
{
|
||||||
error_log(json_encode($_REQUEST));
|
// error_log(json_encode($_REQUEST));
|
||||||
$matchMode = getReqVal('match_mode', 0);
|
// $matchMode = getReqVal('match_mode', 0);
|
||||||
{
|
// {
|
||||||
$heroDb = Hero::find(getReqVal('hero_uniid', 0));
|
// $heroDb = Hero::find(getReqVal('hero_uniid', 0));
|
||||||
if (!$heroDb) {
|
// if (!$heroDb) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
$this->heroDto = Hero::toDto($heroDb);
|
// $this->heroDto = Hero::toDto($heroDb);
|
||||||
if (Hero::heroIsLocking($heroDb)) {
|
// if (Hero::heroIsLocking($heroDb)) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
$this->heroMeta = mt\Hero::get($this->heroDto['hero_id']);
|
// $this->heroMeta = mt\Hero::get($this->heroDto['hero_id']);
|
||||||
if (!$this->heroMeta) {
|
// if (!$this->heroMeta) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
$this->reward['hero']['hero_uniid'] = $this->heroDto['hero_uniid'];
|
// $this->reward['hero']['hero_uniid'] = $this->heroDto['hero_uniid'];
|
||||||
$this->reward['hero']['ceg_uplimit'] = $this->heroDto['gold_uplimit'];
|
// $this->reward['hero']['ceg_uplimit'] = $this->heroDto['gold_uplimit'];
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
//录入战斗记录
|
//录入战斗记录
|
||||||
// $this->saveBattleHistory();
|
// $this->saveBattleHistory();
|
||||||
error_log('updateBattleData0----------'.$matchMode);
|
error_log('updateBattleData0----------'.$matchMode);
|
||||||
switch ($matchMode) {
|
// switch ($matchMode) {
|
||||||
case self::MATCH_MODE_PVP:
|
// case self::MATCH_MODE_PVP:
|
||||||
{
|
// {
|
||||||
error_log('updateBattleData1');
|
// error_log('updateBattleData1');
|
||||||
//匹配赛模式
|
// //匹配赛模式
|
||||||
$this->updatePvpData();
|
// $this->updatePvpData();
|
||||||
// $this->rewardCegPvp();
|
//// $this->rewardCegPvp();
|
||||||
myself()->_incDailyV(TN_DAILY_PVP_BATTLE_TIMES, 0, 1);
|
// myself()->_incDailyV(TN_DAILY_PVP_BATTLE_TIMES, 0, 1);
|
||||||
}
|
// }
|
||||||
break;
|
// break;
|
||||||
case self::MATCH_MODE_MATCH:
|
// case self::MATCH_MODE_MATCH:
|
||||||
{
|
// {
|
||||||
//排位赛(和匹配合二为一)
|
// //排位赛(和匹配合二为一)
|
||||||
// $this->updateSeasonData();
|
//// $this->updateSeasonData();
|
||||||
// myself()->_incDailyV(TN_DAILY_RANK_BATTLE_TIMES, 0, 1);
|
//// myself()->_incDailyV(TN_DAILY_RANK_BATTLE_TIMES, 0, 1);
|
||||||
}
|
// }
|
||||||
break;
|
// break;
|
||||||
case self::MATCH_MODE_PVE:
|
// case self::MATCH_MODE_PVE:
|
||||||
{
|
// {
|
||||||
//pve
|
// //pve
|
||||||
$this->updatePveData();
|
// $this->updatePveData();
|
||||||
if ($this->pveGeminiMeta &&
|
// if ($this->pveGeminiMeta &&
|
||||||
$this->pveGeminiModeMeta) {
|
// $this->pveGeminiModeMeta) {
|
||||||
$this->rewardFragmentPve();
|
// $this->rewardFragmentPve();
|
||||||
}
|
// }
|
||||||
myself()->_incDailyV(TN_DAILY_PVE_BATTLE_TIMES, 0, 1);
|
// myself()->_incDailyV(TN_DAILY_PVE_BATTLE_TIMES, 0, 1);
|
||||||
}
|
// }
|
||||||
break;
|
// break;
|
||||||
default:
|
// default:
|
||||||
{
|
// {
|
||||||
}
|
// }
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user