|
|
@@ -608,10 +608,12 @@ LoggerTool::debug(json_encode(['FWBonusPerfData-P2', $userId, $bonusUserId]));
|
|
|
if ($isDec == 0) {
|
|
|
continue;
|
|
|
}
|
|
|
+LoggerTool::debug(json_encode(['FWBonusPerfData-P3', $userId, $bonusUserId, $isDec]));
|
|
|
$decRoleId = $bonusUserInfo['DEC_ROLE_ID'];
|
|
|
if (!$decRoleId ) {
|
|
|
continue;
|
|
|
}
|
|
|
+LoggerTool::debug(json_encode(['FWBonusPerfData-P4', $userId, $bonusUserId, $decRoleId]));
|
|
|
if (!isset($this->_decRoleConfig[$decRoleId])) {
|
|
|
continue;
|
|
|
}
|
|
|
@@ -621,22 +623,22 @@ LoggerTool::debug(json_encode(['FWBonusPerfData-P2', $userId, $bonusUserId]));
|
|
|
$parentFwBonusPercent = $parentDecRoleLevel['FW_BONUS_PERCENT'] ?? 0;
|
|
|
$cacheMaxPercent = CalcCache::fwMaxBonusPercent($bonusUserId, $this->_periodNum);
|
|
|
$diffPercent = $parentFwBonusPercent - $cacheMaxPercent;
|
|
|
+LoggerTool::debug(json_encode(['FWBonusPerfData-P5', $userId, $bonusUserId, $diffPercent]));
|
|
|
if ($diffPercent <= 0) {
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
// 计算奖金
|
|
|
$fwBonus = $validPvPcs * $diffPercent / 100;
|
|
|
if ($fwBonus <= 0) {
|
|
|
continue;
|
|
|
}
|
|
|
-LoggerTool::debug(json_encode(['FWBonusPerfData-P3', $userId, $bonusUserId, $parentFwBonusPercent, $fwBonus]));
|
|
|
+LoggerTool::debug(json_encode(['FWBonusPerfData-P6', $userId, $bonusUserId, $parentFwBonusPercent, $fwBonus]));
|
|
|
//给本人添加服务奖比例
|
|
|
CalcCache::fwMaxBonusPercent($bonusUserId, $this->_periodNum, $parentFwBonusPercent);
|
|
|
//记录奖金和奖金来源到缓存 并实现在缓存中奖金累加
|
|
|
CalcCache::saveFwBonusList($bonusUserId, $this->_periodNum, $fwBonus, ['fromUid'=>$userId, 'fromPvPcs'=>$validPvPcs]);
|
|
|
CalcCache::addHasFwBonusUsers($bonusUserId, $this->_periodNum);
|
|
|
-LoggerTool::debug(json_encode(['FWBonusPerfData-P4', $userId, $bonusUserId]));
|
|
|
+LoggerTool::debug(json_encode(['FWBonusPerfData-P7', $userId, $bonusUserId]));
|
|
|
// unset($userId, $validPvPcs);
|
|
|
}
|
|
|
|