Use globals ratingSumForIncrease value (!243)
Corrects previous pull request hardcoding the value for `ratingSumForIncrease`. Anytime it changes in globals it will now be reflected without needing to change it in `RagFairOfferHelper` Co-authored-by: Corey <dirtbikercj@gmail.com> Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/243 Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com> Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
This commit is contained in:
parent
45687b982a
commit
c7a577d903
@ -352,6 +352,8 @@ export class RagfairOfferHelper
|
|||||||
*/
|
*/
|
||||||
public increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void
|
public increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void
|
||||||
{
|
{
|
||||||
|
const ragfairConfig = this.databaseServer.getTables().globals.config.RagFair;
|
||||||
|
|
||||||
profile.characters.pmc.RagfairInfo.isRatingGrowing = true;
|
profile.characters.pmc.RagfairInfo.isRatingGrowing = true;
|
||||||
if (Number.isNaN(amountToIncrementBy))
|
if (Number.isNaN(amountToIncrementBy))
|
||||||
{
|
{
|
||||||
@ -360,7 +362,7 @@ export class RagfairOfferHelper
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
profile.characters.pmc.RagfairInfo.rating +=
|
profile.characters.pmc.RagfairInfo.rating +=
|
||||||
(this.databaseServer.getTables().globals.config.RagFair.ratingIncreaseCount / 100000) * amountToIncrementBy;
|
(ragfairConfig.ratingIncreaseCount / ragfairConfig.ratingSumForIncrease) * amountToIncrementBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user