1
This commit is contained in:
parent
55846eabd3
commit
0ded0384af
@ -41,6 +41,10 @@ class BattleDataService extends BaseService {
|
|||||||
|
|
||||||
const MAX_DROP_NUM = 2;
|
const MAX_DROP_NUM = 2;
|
||||||
|
|
||||||
|
const MATCH_MODE_PVP = 0;
|
||||||
|
const MATCH_MODE_MATCH = 1;
|
||||||
|
const MATCH_MODE_PVE = 2;
|
||||||
|
|
||||||
private $seasonDb = array();
|
private $seasonDb = array();
|
||||||
private $heroDto = null;
|
private $heroDto = null;
|
||||||
private $heroMeta = null;
|
private $heroMeta = null;
|
||||||
@ -82,7 +86,8 @@ class BattleDataService extends BaseService {
|
|||||||
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'] = $matchMode == 2 ? $this->heroDto['pve_ceg_uplimit'] : $this->heroDto['pvp_ceg_uplimit'];
|
$this->reward['hero']['ceg_uplimit'] = $matchMode == self::MATCH_MODE_PVE ?
|
||||||
|
$this->heroDto['pve_ceg_uplimit'] : $this->heroDto['pvp_ceg_uplimit'];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
$weaponUuid1 = getReqVal('weapon_uuid1', '');
|
$weaponUuid1 = getReqVal('weapon_uuid1', '');
|
||||||
@ -93,7 +98,8 @@ class BattleDataService extends BaseService {
|
|||||||
}
|
}
|
||||||
$this->weapon1Dto = Gun::toDto($weaponDb);
|
$this->weapon1Dto = Gun::toDto($weaponDb);
|
||||||
$this->reward['weapon1']['gun_uniid'] = $this->weapon1Dto['gun_uniid'];
|
$this->reward['weapon1']['gun_uniid'] = $this->weapon1Dto['gun_uniid'];
|
||||||
$this->reward['weapon1']['ceg_uplimit'] = $matchMode == 2 ? $this->weapon1Dto['pve_ceg_uplimit'] : $this->weapon1Dto['pvp_ceg_uplimit'];
|
$this->reward['weapon1']['ceg_uplimit'] = $matchMode == self::MATCH_MODE_PVE ?
|
||||||
|
$this->weapon1Dto['pve_ceg_uplimit'] : $this->weapon1Dto['pvp_ceg_uplimit'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -105,7 +111,8 @@ class BattleDataService extends BaseService {
|
|||||||
}
|
}
|
||||||
$this->weapon2Dto = Gun::toDto($weaponDb);
|
$this->weapon2Dto = Gun::toDto($weaponDb);
|
||||||
$this->reward['weapon2']['gun_uniid'] = $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'];
|
$this->reward['weapon2']['ceg_uplimit'] = $matchMode == self::MATCH_MODE_PVE ?
|
||||||
|
$this->weapon2Dto['pve_ceg_uplimit'] : $this->weapon2Dto['pvp_ceg_uplimit'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch ($matchMode) {
|
switch ($matchMode) {
|
||||||
@ -697,6 +704,7 @@ class BattleDataService extends BaseService {
|
|||||||
|
|
||||||
private function procDrop($dropIdx)
|
private function procDrop($dropIdx)
|
||||||
{
|
{
|
||||||
|
$matchMode = getReqVal('match_mode');
|
||||||
if ($dropIdx == 0) {
|
if ($dropIdx == 0) {
|
||||||
$itemId = FragmentPool::dropHero();
|
$itemId = FragmentPool::dropHero();
|
||||||
if ($itemId) {
|
if ($itemId) {
|
||||||
@ -705,7 +713,11 @@ class BattleDataService extends BaseService {
|
|||||||
'item_id' => $itemId,
|
'item_id' => $itemId,
|
||||||
'item_num' => 1
|
'item_num' => 1
|
||||||
));
|
));
|
||||||
$this->_incDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 1);
|
if ($matchMode == self::MATCH_MODE_PVE) {
|
||||||
|
$this->_incDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 1);
|
||||||
|
} else {
|
||||||
|
$this->_incDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if ($dropIdx == 1) {
|
} else if ($dropIdx == 1) {
|
||||||
$itemId = FragmentPool::dropGun();
|
$itemId = FragmentPool::dropGun();
|
||||||
@ -715,7 +727,11 @@ class BattleDataService extends BaseService {
|
|||||||
'item_id' => $itemId,
|
'item_id' => $itemId,
|
||||||
'item_num' => 1
|
'item_num' => 1
|
||||||
));
|
));
|
||||||
$this->_incDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 1);
|
if ($matchMode == self::MATCH_MODE_PVE) {
|
||||||
|
$this->_incDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 1);
|
||||||
|
} else {
|
||||||
|
$this->_incDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user