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

Move gift checks into GiftService.sendPraporStartingGift

This commit is contained in:
Dev 2023-07-25 11:17:54 +01:00
parent 41b4bdc432
commit 38b921a7e4
2 changed files with 14 additions and 14 deletions

View File

@ -475,24 +475,18 @@ export class GameController
const oneDaySeconds = this.timeUtil.getHoursAsSeconds(24);
const currentTimeStamp = this.timeUtil.getTimestamp();
if (!this.profileHelper.playerHasRecievedGift(pmcProfile.aid, "PraporGiftDay1"))
{
// One day post-profile creation
if (currentTimeStamp > (timeStampProfileCreated + oneDaySeconds))
{
this.giftService.sendPraporStartingGift(pmcProfile.aid, 1);
}
}
if (!this.profileHelper.playerHasRecievedGift(pmcProfile.aid, "PraporGiftDay2"))
{
// Two day post-profile creation
if (currentTimeStamp > (timeStampProfileCreated + (oneDaySeconds * 2)))
{
this.giftService.sendPraporStartingGift(pmcProfile.aid, 2);
}
}
}
/**
* Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long

View File

@ -180,10 +180,16 @@ export class GiftService
switch (day)
{
case 1:
if (this.profileHelper.playerHasRecievedGift(sessionId, "PraporGiftDay1"))
{
this.sendGiftToPlayer(sessionId, "PraporGiftDay1");
}
break;
case 2:
if (this.profileHelper.playerHasRecievedGift(sessionId, "PraporGiftDay2"))
{
this.sendGiftToPlayer(sessionId, "PraporGiftDay2");
}
break;
}