Added feature to keep daily quest type when replacing. Refering issue #745 (!400)

## Added:
* Config to keep daily quest type

## Changed:
* changeRepeatableQuest to check if the daily quest type should be kept the same

Co-authored-by: W1ngZ <W1ngZ@NoRealMail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/400
Co-authored-by: W1ngZ <w1ngz@noreply.dev.sp-tarkov.com>
Co-committed-by: W1ngZ <w1ngz@noreply.dev.sp-tarkov.com>
This commit is contained in:
W1ngZ 2024-08-25 07:56:48 +00:00 committed by chomp
parent c8e66de039
commit eff5f14e5c
3 changed files with 7 additions and 1 deletions

View File

@ -980,7 +980,8 @@
"rewardBlacklist": ["627bce33f21bc425b06ab967", "59f32c3b86f77472a31742f0", "59f32bb586f774757e1e8442"],
"rewardAmmoStackMinSize": 5,
"freeChangesAvailable": 2,
"freeChanges": 2
"freeChanges": 2,
"keepDailyQuestTypeOnReplacement": false
},
{
"id": "618035d38012292db3081bf0",

View File

@ -513,6 +513,10 @@ export class RepeatableQuestController {
(config) => config.name === repeatablesInProfile.name,
);
// If the configuration dictates to replace with the same quest type, adjust the available quest types
if (repeatableConfig?.keepDailyQuestTypeOnReplacement) {
repeatableConfig.types = [questToReplace.type];
}
// Generate meta-data for what type/levelrange of quests can be generated for player
const allowedQuestTypes = this.generateQuestPool(repeatableConfig, pmcData.Info.Level);
const newRepeatableQuest = this.attemptToGenerateRepeatableQuest(pmcData, allowedQuestTypes, repeatableConfig);

View File

@ -55,6 +55,7 @@ export interface IRepeatableQuestConfig {
rewardAmmoStackMinSize: number;
freeChangesAvailable: number;
freeChanges: number;
keepDailyQuestTypeOnReplacement: boolean;
}
export interface IRewardScaling {