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:
Cj 2024-03-04 18:06:10 +00:00 committed by chomp
parent 45687b982a
commit c7a577d903

View File

@ -352,6 +352,8 @@ export class RagfairOfferHelper
*/
public increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void
{
const ragfairConfig = this.databaseServer.getTables().globals.config.RagFair;
profile.characters.pmc.RagfairInfo.isRatingGrowing = true;
if (Number.isNaN(amountToIncrementBy))
{
@ -360,7 +362,7 @@ export class RagfairOfferHelper
return;
}
profile.characters.pmc.RagfairInfo.rating +=
(this.databaseServer.getTables().globals.config.RagFair.ratingIncreaseCount / 100000) * amountToIncrementBy;
(ragfairConfig.ratingIncreaseCount / ragfairConfig.ratingSumForIncrease) * amountToIncrementBy;
}
/**