This commit is contained in:
aozhiwei 2022-09-19 13:36:09 +08:00
parent d08ec370a3
commit 1212438c6e

View File

@ -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:
{