0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Fixed multiple ragfair bans being added on profile creation

This commit is contained in:
Dev 2024-05-25 15:46:01 +01:00
parent ef8307540b
commit 923a92169d

View File

@ -145,11 +145,20 @@ export class TraderHelper
if (rawProfileTemplate.fleaBlockedDays > 0) if (rawProfileTemplate.fleaBlockedDays > 0)
{ {
pmcData.Info.Bans.push( const newBanDateTime = this.timeUtil.getTimeStampFromNowDays(rawProfileTemplate.fleaBlockedDays);
{ const existingBan = pmcData.Info.Bans.find((ban) => ban.banType === BanType.RAGFAIR);
banType: BanType.RAGFAIR, if (existingBan)
dateTime: this.timeUtil.getTimeStampFromNowDays(rawProfileTemplate.fleaBlockedDays), {
}); existingBan.dateTime = newBanDateTime;
}
else
{
pmcData.Info.Bans.push(
{
banType: BanType.RAGFAIR,
dateTime: newBanDateTime,
});
}
} }
if (traderID === Traders.JAEGER) if (traderID === Traders.JAEGER)