Add code to check BackendCounter values pre vs post-raid

This commit is contained in:
Dev 2023-08-07 11:13:17 +01:00
parent b2530a6083
commit 92c30dbe5d

View File

@ -139,6 +139,21 @@ export class InRaidHelper
profileData.Encyclopedia = saveProgressRequest.profile.Encyclopedia;
profileData.ConditionCounters = saveProgressRequest.profile.ConditionCounters;
for (const backendCounterKey in saveProgressRequest.profile.BackendCounters)
{
const matchingPreRaidCounter = profileData.BackendCounters[backendCounterKey];
if (!matchingPreRaidCounter)
{
this.logger.error(`Backendcounter: ${backendCounterKey} cannot be found in pre-raid data`);
continue;
}
if (matchingPreRaidCounter.value !== saveProgressRequest.profile.BackendCounters[backendCounterKey].value)
{
this.logger.error(`Backendcounter: ${backendCounterKey} value is different post raid, old: ${matchingPreRaidCounter.value} new: saveProgressRequest.profile.BackendCounters[backendCounterKey].value`);
}
}
this.processFailedQuests(sessionID, profileData, profileData.Quests, saveProgressRequest.profile.Quests);
profileData.Quests = saveProgressRequest.profile.Quests;