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