1
This commit is contained in:
parent
b3fe7f6242
commit
b3bc1f65da
@ -50,6 +50,7 @@ class BattleDataService extends BaseService {
|
|||||||
private $rankActivityService = null;
|
private $rankActivityService = null;
|
||||||
private $pveGeminiMeta = null;
|
private $pveGeminiMeta = null;
|
||||||
private $pveGeminiModeMeta = null;
|
private $pveGeminiModeMeta = null;
|
||||||
|
private $instanceRank = 0;
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
@ -456,8 +457,12 @@ class BattleDataService extends BaseService {
|
|||||||
{
|
{
|
||||||
$instanceId = getReqVal('pve_instance_id', 0);
|
$instanceId = getReqVal('pve_instance_id', 0);
|
||||||
$instanceMode = getReqVal('pve_instance_mode', 0);
|
$instanceMode = getReqVal('pve_instance_mode', 0);
|
||||||
|
$pveRankScore = getReqVal('pve_rank_score', 0);
|
||||||
$this->pveGeminiMeta = mt\PveGemini::get($instanceId);
|
$this->pveGeminiMeta = mt\PveGemini::get($instanceId);
|
||||||
$this->pveGeminiMetaMode = mt\PveGeminiMode::get($instanceMode);
|
$this->pveGeminiMetaMode = mt\PveGeminiMode::get($instanceMode);
|
||||||
|
if ($this->pveGeminiModeMeta) {
|
||||||
|
$this->instanceRank = mt\PveGeminiMode::calcStar($this->pveGeminiModeMeta, $pveRankScore);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function rewardFragmentPvp()
|
private function rewardFragmentPvp()
|
||||||
@ -662,41 +667,30 @@ class BattleDataService extends BaseService {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function GetInstanceRank()
|
|
||||||
{
|
|
||||||
$pveRankScore = getReqVal('pve_rank_score', 0);
|
|
||||||
$instanceRank = mt\PveGeminiMode::calcStar($this->pveGeminiModeMeta, $pveRankScore);
|
|
||||||
return $instanceRank;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getInstanceRankRate()
|
private function getInstanceRankRate()
|
||||||
{
|
{
|
||||||
if ($this->pveGeminiModeMeta) {
|
switch ($this->instanceRank) {
|
||||||
$instanceRank = $this->getInstanceRank();
|
case 1:
|
||||||
switch ($instanceRank) {
|
{
|
||||||
case 1:
|
return 0.8;
|
||||||
{
|
}
|
||||||
return 0.8;
|
break;
|
||||||
}
|
case 2:
|
||||||
break;
|
{
|
||||||
case 2:
|
return 0.55;
|
||||||
{
|
}
|
||||||
return 0.55;
|
break;
|
||||||
}
|
case 3:
|
||||||
break;
|
{
|
||||||
case 3:
|
return 0.3;
|
||||||
{
|
}
|
||||||
return 0.3;
|
break;
|
||||||
}
|
default:
|
||||||
break;
|
{
|
||||||
default:
|
return 0;
|
||||||
{
|
}
|
||||||
return 0;
|
break;
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user