diff --git a/project/src/helpers/InRaidHelper.ts b/project/src/helpers/InRaidHelper.ts index ffcb5659..49029be1 100644 --- a/project/src/helpers/InRaidHelper.ts +++ b/project/src/helpers/InRaidHelper.ts @@ -141,6 +141,11 @@ export class InRaidHelper for (const backendCounterKey in saveProgressRequest.profile.BackendCounters) { + if (!saveProgressRequest.profile.BackendCounters[backendCounterKey].id) + { + continue; + } + const matchingPreRaidCounter = profileData.BackendCounters[backendCounterKey]; if (!matchingPreRaidCounter) { @@ -148,6 +153,7 @@ export class InRaidHelper 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`); diff --git a/project/src/services/InsuranceService.ts b/project/src/services/InsuranceService.ts index 43bf14d7..5d64c9b6 100644 --- a/project/src/services/InsuranceService.ts +++ b/project/src/services/InsuranceService.ts @@ -244,7 +244,7 @@ export class InsuranceService { equipmentToSendToPlayer.push({ pmcData: pmcData, - itemToReturnToPlayer: this.getInsuredItemDetails(pmcData, preRaidItem, offraidData.insurance.find(x => x.id === insuredItem.itemId)), + itemToReturnToPlayer: this.getInsuredItemDetails(pmcData, preRaidItem, offraidData.insurance?.find(x => x.id === insuredItem.itemId)), traderId: insuredItem.tid, sessionID: sessionID }); @@ -293,7 +293,7 @@ export class InsuranceService } // Client item has durability values, Ensure values persist into server data - if (insuredItemFromClient.durability) + if (insuredItemFromClient?.durability) { // Item didnt have Repairable object pre-raid, add it if (!itemToReturn.upd.Repairable)