mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 08:10:44 -05:00
Move gift checks into GiftService.sendPraporStartingGift
This commit is contained in:
parent
41b4bdc432
commit
38b921a7e4
@ -475,22 +475,16 @@ 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))
|
||||
{
|
||||
// One day post-profile creation
|
||||
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
|
||||
if (currentTimeStamp > (timeStampProfileCreated + (oneDaySeconds * 2)))
|
||||
{
|
||||
// Two day post-profile creation
|
||||
if (currentTimeStamp > (timeStampProfileCreated + (oneDaySeconds * 2)))
|
||||
{
|
||||
this.giftService.sendPraporStartingGift(pmcProfile.aid, 2);
|
||||
}
|
||||
this.giftService.sendPraporStartingGift(pmcProfile.aid, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,10 +180,16 @@ export class GiftService
|
||||
switch (day)
|
||||
{
|
||||
case 1:
|
||||
this.sendGiftToPlayer(sessionId, "PraporGiftDay1");
|
||||
if (this.profileHelper.playerHasRecievedGift(sessionId, "PraporGiftDay1"))
|
||||
{
|
||||
this.sendGiftToPlayer(sessionId, "PraporGiftDay1");
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
this.sendGiftToPlayer(sessionId, "PraporGiftDay2");
|
||||
if (this.profileHelper.playerHasRecievedGift(sessionId, "PraporGiftDay2"))
|
||||
{
|
||||
this.sendGiftToPlayer(sessionId, "PraporGiftDay2");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user