1
This commit is contained in:
parent
0a1ac2342d
commit
27f73b2c30
@ -143,6 +143,7 @@ class BattleController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
for ($i = 1; $i <= 2; ++$i) {
|
for ($i = 1; $i <= 2; ++$i) {
|
||||||
|
if (isset($member['weapon_uniid' . $i])) {
|
||||||
$gunDb = Gun::findByAccountId($member['account_id'],
|
$gunDb = Gun::findByAccountId($member['account_id'],
|
||||||
$member['weapon_uniid' . $i]);
|
$member['weapon_uniid' . $i]);
|
||||||
if ($gunDb) {
|
if ($gunDb) {
|
||||||
@ -151,6 +152,7 @@ class BattleController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
array_push($data['members'], $info);
|
array_push($data['members'], $info);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -391,7 +391,7 @@ class Hero extends BaseModel {
|
|||||||
return $finalyAddGold;
|
return $finalyAddGold;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function gainGoldPve($heroDto, $count)
|
public static function gainGoldPve($heroDto, $addGold)
|
||||||
{
|
{
|
||||||
$newGold = min($heroDto['pve_ceg_uplimit'],
|
$newGold = min($heroDto['pve_ceg_uplimit'],
|
||||||
$heroDto['current_pve_get_ceg'] + $addGold);
|
$heroDto['current_pve_get_ceg'] + $addGold);
|
||||||
|
@ -492,15 +492,20 @@ class BattleDataService extends BaseService {
|
|||||||
$userInfo = myself()->_getOrmUserInfo();
|
$userInfo = myself()->_getOrmUserInfo();
|
||||||
$this->pveGeminiMeta = mt\PveGemini::get($instanceId);
|
$this->pveGeminiMeta = mt\PveGemini::get($instanceId);
|
||||||
if ($this->pveGeminiMeta) {
|
if ($this->pveGeminiMeta) {
|
||||||
if (!($userInfo['pve_instance_id'] == $instanceId ||
|
if (!(
|
||||||
$userInfo['pve_instance_id'] == $instanceId + 1)) {
|
$instanceId == mt\PveGemini::FIRST_INSTANCE_ID ||
|
||||||
|
$userInfo['pve_instance_id'] == $instanceId ||
|
||||||
|
$userInfo['pve_instance_id'] == $instanceId + 1)
|
||||||
|
) {
|
||||||
$this->pveGeminiMeta = null;
|
$this->pveGeminiMeta = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
error_log(json_encode($this->pveGeminiMeta));
|
||||||
$this->pveGeminiMetaMode = mt\PveGeminiMode::get($instanceMode);
|
$this->pveGeminiMetaMode = mt\PveGeminiMode::get($instanceMode);
|
||||||
if ($this->pveGeminiModeMeta) {
|
if ($this->pveGeminiModeMeta) {
|
||||||
$this->instanceRank = mt\PveGeminiMode::calcStar($this->pveGeminiModeMeta, $pveRankScore);
|
$this->instanceRank = mt\PveGeminiMode::calcStar($this->pveGeminiModeMeta, $pveRankScore);
|
||||||
}
|
}
|
||||||
|
error_log(json_encode($this->pveGeminiMetaMode));
|
||||||
if (getReqVal('pve_kill_boss', 0) == 1) {
|
if (getReqVal('pve_kill_boss', 0) == 1) {
|
||||||
if ($this->pveGeminiMeta) {
|
if ($this->pveGeminiMeta) {
|
||||||
myself()->_updateUserInfo(array(
|
myself()->_updateUserInfo(array(
|
||||||
@ -640,16 +645,28 @@ class BattleDataService extends BaseService {
|
|||||||
private function rewardCegPve()
|
private function rewardCegPve()
|
||||||
{
|
{
|
||||||
$instanceLevel = $this->pveGeminiMeta['gemini_lv'];
|
$instanceLevel = $this->pveGeminiMeta['gemini_lv'];
|
||||||
$bossReward = getReqVal(pve_kill_boss) ? 1 : 0;
|
$bossReward = getReqVal('pve_kill_boss', 0) ? 1 : 0;
|
||||||
|
|
||||||
$heroPveCeg = FormulaService::calcHeroPveCeg($this->heroDto, $instanceLevel, $instanceRank, $bossReward);
|
$heroPveCeg = FormulaService::calcHeroPveCeg(
|
||||||
|
$this->heroDto,
|
||||||
|
$instanceLevel,
|
||||||
|
$this->instanceRank,
|
||||||
|
$bossReward);
|
||||||
$weaponPveCeg1 = 0;
|
$weaponPveCeg1 = 0;
|
||||||
$weaponPveCeg2 = 0;
|
$weaponPveCeg2 = 0;
|
||||||
if ($this->weapon1Dto) {
|
if ($this->weapon1Dto) {
|
||||||
$weaponPveCeg1 = FormulaService::calcWeaponPveCeg($this->weapon1Dto, $instanceLevel, $instanceRank, $bossReward);
|
$weaponPveCeg1 = FormulaService::calcWeaponPveCeg(
|
||||||
|
$this->weapon1Dto,
|
||||||
|
$instanceLevel,
|
||||||
|
$this->instanceRank,
|
||||||
|
$bossReward);
|
||||||
}
|
}
|
||||||
if ($this->weapon2Dto) {
|
if ($this->weapon2Dto) {
|
||||||
$weaponPveCeg2 = FormulaService::calcWeaponPveCeg($this->weapon2Dto, $instanceLevel, $instanceRank, $bossReward);
|
$weaponPveCeg2 = FormulaService::calcWeaponPveCeg(
|
||||||
|
$this->weapon2Dto,
|
||||||
|
$instanceLevel,
|
||||||
|
$this->instanceRank,
|
||||||
|
$bossReward);
|
||||||
}
|
}
|
||||||
error_log(json_encode(array(
|
error_log(json_encode(array(
|
||||||
'heroPveCeg' => $heroPveCeg,
|
'heroPveCeg' => $heroPveCeg,
|
||||||
|
@ -53,7 +53,7 @@ class FormulaService extends BaseService {
|
|||||||
(0.8 - ($instanceRank - 1) * 0.25 + $bossReward * 0.2) *
|
(0.8 - ($instanceRank - 1) * 0.25 + $bossReward * 0.2) *
|
||||||
1/10;
|
1/10;
|
||||||
|
|
||||||
return round(ceg);
|
return round($ceg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function calcWeaponPvpCeg($weaponDto, $params)
|
public static function calcWeaponPvpCeg($weaponDto, $params)
|
||||||
@ -153,7 +153,7 @@ class FormulaService extends BaseService {
|
|||||||
public static function calcHeroFragmentProbabilityPve($heroQuality,
|
public static function calcHeroFragmentProbabilityPve($heroQuality,
|
||||||
$onlineNum,
|
$onlineNum,
|
||||||
$heroFragmentNum,
|
$heroFragmentNum,
|
||||||
$todayPvpBattleTimes,
|
$todayPveBattleTimes,
|
||||||
$instanceLevel,
|
$instanceLevel,
|
||||||
$instanceRank,
|
$instanceRank,
|
||||||
$instanceRankRate,
|
$instanceRankRate,
|
||||||
@ -172,7 +172,7 @@ class FormulaService extends BaseService {
|
|||||||
public static function calcWeaponFragmentProbabilityPve($heroQuality,
|
public static function calcWeaponFragmentProbabilityPve($heroQuality,
|
||||||
$onlineNum,
|
$onlineNum,
|
||||||
$gunFragmentNum,
|
$gunFragmentNum,
|
||||||
$todayPvpBattleTimes,
|
$todayPveBattleTimes,
|
||||||
$instanceLevel,
|
$instanceLevel,
|
||||||
$instanceRank,
|
$instanceRank,
|
||||||
$instanceRankRate,
|
$instanceRankRate,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user