Fix: workaround for old profiles with a wall at level 2 (!29)

Co-authored-by: Dev <dev@noreply.dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/29
This commit is contained in:
chomp 2023-03-06 12:02:21 +00:00
parent e75d030d74
commit e3fa31bbef

View File

@ -938,6 +938,24 @@ export class HideoutHelper
return;
}
// Workaround for old profiles that have the wall at level 2
if (wall.level === 2)
{
this.logger.debug("Old wall level 2 found, fixing");
if (this.hideoutImprovementIsComplete(pmcProfile.Hideout.Improvements["639199277a9178252d38c98f"]))
{
this.logger.debug("Wall level adjusted to 3");
wall.level++;
}
else
{
this.logger.debug("Wall level adjusted to 1");
wall.level--;
}
}
}
}