1
This commit is contained in:
parent
daf9fdb349
commit
a564c68236
@ -36,14 +36,17 @@ use services\FormulaService;
|
|||||||
class BattleDataService extends BaseService {
|
class BattleDataService extends BaseService {
|
||||||
|
|
||||||
private $seasonDb = array();
|
private $seasonDb = array();
|
||||||
|
private $heroDto = null;
|
||||||
|
private $heroMeta = null;
|
||||||
|
private $weapon1Dto = null;
|
||||||
|
private $weapon2Dto = null;
|
||||||
|
|
||||||
private $reward = array(
|
private $reward = array(
|
||||||
'hero' => array(),
|
'hero' => array(),
|
||||||
'weapon1' => array(),
|
'weapon1' => array(),
|
||||||
'weapon2' => array(),
|
'weapon2' => array(),
|
||||||
'items' => array()
|
'items' => array()
|
||||||
);
|
);
|
||||||
private $heroDto = null;
|
|
||||||
private $heroMeta = null;
|
|
||||||
private $rankActivityService = null;
|
private $rankActivityService = null;
|
||||||
private $pveGeminiMeta = null;
|
private $pveGeminiMeta = null;
|
||||||
private $pveGeminiModeMeta = null;
|
private $pveGeminiModeMeta = null;
|
||||||
@ -56,19 +59,41 @@ class BattleDataService extends BaseService {
|
|||||||
|
|
||||||
public function updateBattleData()
|
public function updateBattleData()
|
||||||
{
|
{
|
||||||
$row = Hero::find(getReqVal('hero_uniid', 0));
|
error_log(json_encode($_REQUEST));
|
||||||
if (!$row) {
|
{
|
||||||
|
$heroDb = Hero::find(getReqVal('hero_uniid', 0));
|
||||||
|
if (!$heroDb) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->heroDto = Hero::toDto($row);
|
$this->heroDto = Hero::toDto($heroDb);
|
||||||
if (Hero::heroIsLocking($heroDb)) {
|
if (Hero::heroIsLocking($heroDb)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
error_log(json_encode($_REQUEST));
|
|
||||||
$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;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
$weaponUuid1 = getReqVal('weapon_uuid1', '');
|
||||||
|
if ($weaponUuid1) {
|
||||||
|
$weaponDb = Gun::find($weaponUuid1);
|
||||||
|
if (!$weaponDb) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$this->weapon1Dto = Gun::toDto($weaponDb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
$weaponUuid2 = getReqVal('weapon_uuid2', '');
|
||||||
|
if ($weaponUuid2) {
|
||||||
|
$weaponDb = Gun::find($weaponUuid2);
|
||||||
|
if (!$weaponDb) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$this->weapon2Dto = Gun::toDto($weaponDb);
|
||||||
|
}
|
||||||
|
}
|
||||||
$matchMode = getReqVal('match_mode');
|
$matchMode = getReqVal('match_mode');
|
||||||
switch ($matchMode) {
|
switch ($matchMode) {
|
||||||
case 0:
|
case 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user