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