mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
fix doner bonus increament
This commit is contained in:
@@ -6315,7 +6315,7 @@ function build_bonus_table(array $user, array $bonusResult = [], array $options
|
||||
$isDonor = is_donor($user);
|
||||
$donortimes_bonus = get_setting('bonus.donortimes');
|
||||
$baseBonusFactor = 1;
|
||||
if ($isDonor) {
|
||||
if ($isDonor && $donortimes_bonus != 0) {
|
||||
$baseBonusFactor = $donortimes_bonus;
|
||||
}
|
||||
$baseBonus = $bonusResult['seed_bonus'] * $baseBonusFactor;
|
||||
|
||||
@@ -937,13 +937,13 @@ function getDataTraffic(array $torrent, array $queries, array $user, $peer, $sna
|
||||
}
|
||||
$uploaderRatio = get_setting('torrent.uploaderdouble');
|
||||
$log .= ", uploaderRatio: $uploaderRatio";
|
||||
if ($torrent['owner'] == $user['id']) {
|
||||
if ($torrent['owner'] == $user['id'] && $uploaderRatio != 1) {
|
||||
//uploader, use the bigger one
|
||||
$upRatio = max($uploaderRatio, \App\Models\Torrent::$promotionTypes[$spStateReal]['up_multiplier']);
|
||||
$log .= ", [IS_UPLOADER], upRatio: $upRatio";
|
||||
$log .= ", [IS_UPLOADER] && uploaderRatio != 1, upRatio: $upRatio";
|
||||
} else {
|
||||
$upRatio = \App\Models\Torrent::$promotionTypes[$spStateReal]['up_multiplier'];
|
||||
$log .= ", [IS_NOT_UPLOADER], upRatio: $upRatio";
|
||||
$log .= ", [IS_NOT_UPLOADER] || uploaderRatio == 1, upRatio: $upRatio";
|
||||
}
|
||||
/**
|
||||
* VIP do not calculate downloaded
|
||||
|
||||
Reference in New Issue
Block a user