Update JSONs and include end of wipe gift
Add additional method to send localised messages from SYSTEM to player
This commit is contained in:
parent
7a1301d436
commit
99715f90cd
@ -715,6 +715,26 @@
|
|||||||
"messageText": "Easy Kappa",
|
"messageText": "Easy Kappa",
|
||||||
"collectionTimeHours": 48,
|
"collectionTimeHours": 48,
|
||||||
"associatedEvent": "Promo"
|
"associatedEvent": "Promo"
|
||||||
|
},
|
||||||
|
"ENDOFWIPE": {
|
||||||
|
"items": [{
|
||||||
|
"_id": "a89275c1b18274ef7432a6d7",
|
||||||
|
"_tpl": "5449016a4bdc2d6f028b456f",
|
||||||
|
"upd": {
|
||||||
|
"StackObjectsCount": 500000
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"_id": "a89275c1b18274e27432a6d7",
|
||||||
|
"_tpl": "5449016a4bdc2d6f028b456f",
|
||||||
|
"upd": {
|
||||||
|
"StackObjectsCount": 500000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sender": "System",
|
||||||
|
"localeTextId": "626e5d63bc92c87fd22a943f 0",
|
||||||
|
"collectionTimeHours": 48,
|
||||||
|
"associatedEvent": "Promo"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15295,6 +15295,7 @@
|
|||||||
"64c0e0ac03044d5322024995": "Obtain the second part of the encoded intel on Woods",
|
"64c0e0ac03044d5322024995": "Obtain the second part of the encoded intel on Woods",
|
||||||
"64c7de532c6492d0560d544e": "Obtain the V4 Flash Drive on Customs",
|
"64c7de532c6492d0560d544e": "Obtain the V4 Flash Drive on Customs",
|
||||||
"64c7de8bc4777b028806f20c": "Hand over the V4 Flash Drive",
|
"64c7de8bc4777b028806f20c": "Hand over the V4 Flash Drive",
|
||||||
|
"64d2c807d13cc217c605a77c 0": "Congratulations! You've won the prize!",
|
||||||
"7099Kills": "Level 71-99 players killed",
|
"7099Kills": "Level 71-99 players killed",
|
||||||
"8 Description": "",
|
"8 Description": "",
|
||||||
"8 FirstName": "",
|
"8 FirstName": "",
|
||||||
|
@ -68,6 +68,17 @@ export class GiftService
|
|||||||
|
|
||||||
// Handle system messsages
|
// Handle system messsages
|
||||||
if (giftData.sender === GiftSenderType.SYSTEM)
|
if (giftData.sender === GiftSenderType.SYSTEM)
|
||||||
|
{
|
||||||
|
// Has a localisable text id to send to player
|
||||||
|
if (giftData.localeTextId)
|
||||||
|
{
|
||||||
|
this.mailSendService.sendLocalisedSystemMessageToPlayer(
|
||||||
|
playerId,
|
||||||
|
giftData.localeTextId,
|
||||||
|
giftData.items,
|
||||||
|
this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
this.mailSendService.sendSystemMessageToPlayer(
|
this.mailSendService.sendSystemMessageToPlayer(
|
||||||
playerId,
|
playerId,
|
||||||
@ -75,6 +86,9 @@ export class GiftService
|
|||||||
giftData.items,
|
giftData.items,
|
||||||
this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours));
|
this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
// Handle user messages
|
// Handle user messages
|
||||||
else if (giftData.sender === GiftSenderType.USER)
|
else if (giftData.sender === GiftSenderType.USER)
|
||||||
{
|
{
|
||||||
@ -107,8 +121,6 @@ export class GiftService
|
|||||||
giftData.items,
|
giftData.items,
|
||||||
this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours));
|
this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -136,6 +136,31 @@ export class MailSendService
|
|||||||
this.sendMessageToPlayer(details);
|
this.sendMessageToPlayer(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a message from SYSTEM to the player with or without items with loalised text
|
||||||
|
* @param playerId Players id to send message to
|
||||||
|
* @param messageLocaleId Id of key from locale file to send to player
|
||||||
|
* @param items Optional items to send to player
|
||||||
|
* @param maxStorageTimeSeconds Optional time to collect items before they expire
|
||||||
|
*/
|
||||||
|
public sendLocalisedSystemMessageToPlayer(playerId: string, messageLocaleId: string, items: Item[] = [], maxStorageTimeSeconds = null): void
|
||||||
|
{
|
||||||
|
const details: ISendMessageDetails = {
|
||||||
|
recipientId: playerId,
|
||||||
|
sender: MessageType.SYSTEM_MESSAGE,
|
||||||
|
templateId: messageLocaleId
|
||||||
|
};
|
||||||
|
|
||||||
|
// Add items to message
|
||||||
|
if (items.length > 0)
|
||||||
|
{
|
||||||
|
details.items = items;
|
||||||
|
details.itemsMaxStorageLifetimeSeconds = maxStorageTimeSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sendMessageToPlayer(details);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a USER message to a player with or without items
|
* Send a USER message to a player with or without items
|
||||||
* @param playerId Players id to send message to
|
* @param playerId Players id to send message to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user