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:
parent
41b4bdc432
commit
38b921a7e4
@ -475,24 +475,18 @@ export class GameController
|
|||||||
const oneDaySeconds = this.timeUtil.getHoursAsSeconds(24);
|
const oneDaySeconds = this.timeUtil.getHoursAsSeconds(24);
|
||||||
const currentTimeStamp = this.timeUtil.getTimestamp();
|
const currentTimeStamp = this.timeUtil.getTimestamp();
|
||||||
|
|
||||||
if (!this.profileHelper.playerHasRecievedGift(pmcProfile.aid, "PraporGiftDay1"))
|
|
||||||
{
|
|
||||||
// One day post-profile creation
|
// One day post-profile creation
|
||||||
if (currentTimeStamp > (timeStampProfileCreated + oneDaySeconds))
|
if (currentTimeStamp > (timeStampProfileCreated + oneDaySeconds))
|
||||||
{
|
{
|
||||||
this.giftService.sendPraporStartingGift(pmcProfile.aid, 1);
|
this.giftService.sendPraporStartingGift(pmcProfile.aid, 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.profileHelper.playerHasRecievedGift(pmcProfile.aid, "PraporGiftDay2"))
|
|
||||||
{
|
|
||||||
// Two day post-profile creation
|
// Two day post-profile creation
|
||||||
if (currentTimeStamp > (timeStampProfileCreated + (oneDaySeconds * 2)))
|
if (currentTimeStamp > (timeStampProfileCreated + (oneDaySeconds * 2)))
|
||||||
{
|
{
|
||||||
this.giftService.sendPraporStartingGift(pmcProfile.aid, 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
|
* 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
|
||||||
|
@ -180,10 +180,16 @@ export class GiftService
|
|||||||
switch (day)
|
switch (day)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
if (this.profileHelper.playerHasRecievedGift(sessionId, "PraporGiftDay1"))
|
||||||
|
{
|
||||||
this.sendGiftToPlayer(sessionId, "PraporGiftDay1");
|
this.sendGiftToPlayer(sessionId, "PraporGiftDay1");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
if (this.profileHelper.playerHasRecievedGift(sessionId, "PraporGiftDay2"))
|
||||||
|
{
|
||||||
this.sendGiftToPlayer(sessionId, "PraporGiftDay2");
|
this.sendGiftToPlayer(sessionId, "PraporGiftDay2");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user