1
This commit is contained in:
parent
e478d73cbd
commit
2978e5093f
@ -183,13 +183,15 @@ class RoomBattleDataService extends BaseService {
|
|||||||
|
|
||||||
//算力加成
|
//算力加成
|
||||||
$currentPeriod= \mt\AchievementsCycle::getCurrentPeriod();
|
$currentPeriod= \mt\AchievementsCycle::getCurrentPeriod();
|
||||||
$lastCompute = HashRate::getTotalByAccount($userDb['account_id'], $currentPeriod['id'] - 1);
|
if ($currentPeriod){
|
||||||
$currentCompute = HashRate::getTotalByAccount($userDb['account_id'], $currentPeriod['id']);
|
$lastCompute = HashRate::getTotalByAccount($userDb['account_id'], $currentPeriod['id'] - 1);
|
||||||
$s = mt\Parameter::getVal('economy_account_compute_s',0);
|
$currentCompute = HashRate::getTotalByAccount($userDb['account_id'], $currentPeriod['id']);
|
||||||
$totalCompute = $currentCompute + $s * $lastCompute;
|
$s = mt\Parameter::getVal('economy_account_compute_s',0);
|
||||||
$computeParam = mt\Parameter::getVal('economy_account_compute_K',0);
|
$totalCompute = $currentCompute + $s * $lastCompute;
|
||||||
$computeMaxEffect = mt\Parameter::getVal('economy_account_compute_E',0);
|
$computeParam = mt\Parameter::getVal('economy_account_compute_K',0);
|
||||||
$gold = intval( $gold * ($totalCompute / ($totalCompute + $computeParam) * $computeMaxEffect + 1));
|
$computeMaxEffect = mt\Parameter::getVal('economy_account_compute_E',0);
|
||||||
|
$gold = intval( $gold * ($totalCompute / ($totalCompute + $computeParam) * $computeMaxEffect + 1));
|
||||||
|
}
|
||||||
if ($gold > 0){
|
if ($gold > 0){
|
||||||
array_push($reward,array(
|
array_push($reward,array(
|
||||||
"item_id" => V_ITEM_GOLD,
|
"item_id" => V_ITEM_GOLD,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user