This commit is contained in:
hujiabin 2024-06-05 16:45:31 +08:00
parent 0573cdf911
commit 9443d07aa8

View File

@ -193,18 +193,20 @@ class RoomBattleDataService extends BaseService {
$coefficientArr = explode(";",$rewardMeta['goldParam']);
$coefficient = isset($coefficientArr[$teamRank-1]) ? $coefficientArr[$teamRank-1] : 0;
if ($this->mapMode == mt\MapMode::GOLD_MODE){
$gold = $gold * $coefficient * ($battleScore / $teamScoreAvg);
$gold = floor($gold * $coefficient * ($battleScore / $teamScoreAvg));
}
if ($this->mapMode == mt\MapMode::BET_MODE){
$gold = $gold * $this->realUserCount * $coefficient * ($battleScore / $teamScore);
$gold = floor($gold * $this->realUserCount * $coefficient * ($battleScore / $teamScore));
}
}
//基础金币获得
$baseValue = $gold;
//财富值加成
$wealthK = mt\Parameter::getVal('economy_hero_wealth_K',0);
$wealthE = mt\Parameter::getVal('economy_hero_wealth_E',0);
$gold = $gold * (1 + $wealthE * (Hero::getHeroWealth($heroDb) / (Hero::getHeroWealth($heroDb) + $wealthK)));
$gold = floor( $gold * (1 + $wealthE * (Hero::getHeroWealth($heroDb) / (Hero::getHeroWealth($heroDb) + $wealthK))));
$wealthValue = $gold - $baseValue;
//算力加成
$currentPeriod= \mt\AchievementsCycle::getCurrentPeriod();
@ -215,8 +217,10 @@ class RoomBattleDataService extends BaseService {
$totalCompute = $currentCompute + $s * $lastCompute;
$computeParam = mt\Parameter::getVal('economy_account_compute_K',0);
$computeMaxEffect = mt\Parameter::getVal('economy_account_compute_E',0);
$gold = $gold * ($totalCompute / ($totalCompute + $computeParam) * $computeMaxEffect + 1);
$gold = floor($gold * ($totalCompute / ($totalCompute + $computeParam) * $computeMaxEffect + 1));
$compute = ($totalCompute / ($totalCompute + $computeParam) * $computeMaxEffect + 1);
$hashRateValue = $gold - $baseValue - $wealthValue;
}
if ($userDb['account_id'] == "6517_2006_s1_0_104162729566475397176"){
error_log("BattleGoldRecord:".json_encode(array(
@ -244,6 +248,11 @@ class RoomBattleDataService extends BaseService {
array_push($reward,array(
"item_id" => V_ITEM_GOLD,
"item_num" => floor($gold),
"details" => array(
'baseValue' => $baseValue,
'wealthValue' => $wealthValue,
'hashRateValue' => isset($hashRateValue) ? $hashRateValue : 0,
)
));
myself()->_incDailyV(TN_DAILY_GATHER_GOLD,0,floor($gold));
}