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