Skip to content

Commit

Permalink
fix doner bonus increament
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Oct 29, 2024
1 parent 7a29366 commit 7159a46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions include/globalfunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7159a46

Please sign in to comment.