Remove unnecessary removeMapAccessKey() method, now handled in client

This commit is contained in:
Dev 2023-11-14 17:34:44 +00:00
parent bb8677bc65
commit 909d79f415

View File

@ -186,9 +186,6 @@ export class InRaidHelper
profileData.Info.Experience += profileData.Stats.Eft.TotalSessionExperience;
profileData.Stats.Eft.TotalSessionExperience = 0;
// Remove the Lab card
this.removeMapAccessKey(saveProgressRequest, sessionID);
this.setPlayerInRaidLocationStatusToNone(sessionID);
if (!saveProgressRequest.isPlayerScav)
@ -312,32 +309,6 @@ export class InRaidHelper
}
}
/**
* Some maps have one-time-use keys (e.g. Labs
* Remove the relevant key from an inventory based on the post-raid request data passed in
* @param offraidData post-raid data
* @param sessionID Session id
*/
protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void
{
const locationName = this.saveServer.getProfile(sessionID).inraid.location.toLowerCase();
const mapKey = this.databaseServer.getTables().locations[locationName].base.AccessKeys[0];
if (!mapKey)
{
return;
}
for (const item of offraidData.profile.Inventory.items)
{
if (item._tpl === mapKey && item.slotId.toLowerCase() !== "hideout")
{
this.inventoryHelper.removeItem(offraidData.profile, item._id, sessionID);
break;
}
}
}
/**
* Set the SPT inraid location Profile property to 'none'
* @param sessionID Session id