From 1212438c6e065a6bbb5b1d91d34b2b02148b6bfe Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 19 Sep 2022 13:36:09 +0800 Subject: [PATCH] 1 --- webapp/services/BattleDataService.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/webapp/services/BattleDataService.php b/webapp/services/BattleDataService.php index 763a8e09..a13a16a1 100644 --- a/webapp/services/BattleDataService.php +++ b/webapp/services/BattleDataService.php @@ -61,6 +61,7 @@ class BattleDataService extends BaseService { public function updateBattleData() { error_log(json_encode($_REQUEST)); + $matchMode = getReqVal('match_mode'); { $heroDb = Hero::find(getReqVal('hero_uniid', 0)); if (!$heroDb) { @@ -74,7 +75,8 @@ class BattleDataService extends BaseService { if (!$this->heroMeta) { return false; } - $this->reward['hero']['uuid'] = $this->heroDto['hero_uniid']; + $this->reward['hero']['hero_uniid'] = $this->heroDto['hero_uniid']; + $this->reward['hero']['ceg_uplimit'] = $matchMode == 2 ? $this->heroDto['pve_ceg_uplimit'] : $this->heroDto['pvp_ceg_uplimit']; } { $weaponUuid1 = getReqVal('weapon_uuid1', ''); @@ -84,7 +86,8 @@ class BattleDataService extends BaseService { return false; } $this->weapon1Dto = Gun::toDto($weaponDb); - $this->reward['weapon1']['uuid'] = $this->weapon1Dto['gun_uniid']; + $this->reward['weapon1']['gun_uniid'] = $this->weapon1Dto['gun_uniid']; + $this->reward['weapon1']['gun_uniid'] = $matchMode == 2 ? $this->weapon1Dto['pve_ceg_uplimit'] : $this->weapon1Dto['pvp_ceg_uplimit']; } } { @@ -95,10 +98,10 @@ class BattleDataService extends BaseService { return false; } $this->weapon2Dto = Gun::toDto($weaponDb); - $this->reward['weapon2']['uuid'] = $this->weapon2Dto['gun_uniid']; + $this->reward['weapon2']['gun_uniid'] = $this->weapon2Dto['gun_uniid']; + $this->reward['weapon2']['ceg_uplimit'] = $matchMode == 2 ? $this->weapon2Dto['pve_ceg_uplimit'] : $this->weapon2Dto['pvp_ceg_uplimit']; } } - $matchMode = getReqVal('match_mode'); switch ($matchMode) { case 0: {