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
@ -216,7 +216,7 @@
|
||||
"messageText": "Merry christmas!",
|
||||
"timestampToSend": 42069,
|
||||
"associatedEvent": "Christmas",
|
||||
"collectionTimeHours": 48
|
||||
"collectionTimeHours": 48
|
||||
},
|
||||
"1CLICKDRESSUP": {
|
||||
"items": [{
|
||||
@ -715,6 +715,26 @@
|
||||
"messageText": "Easy Kappa",
|
||||
"collectionTimeHours": 48,
|
||||
"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",
|
||||
"64c7de532c6492d0560d544e": "Obtain the V4 Flash Drive on Customs",
|
||||
"64c7de8bc4777b028806f20c": "Hand over the V4 Flash Drive",
|
||||
"64d2c807d13cc217c605a77c 0": "Congratulations! You've won the prize!",
|
||||
"7099Kills": "Level 71-99 players killed",
|
||||
"8 Description": "",
|
||||
"8 FirstName": "",
|
||||
|
@ -69,11 +69,25 @@ export class GiftService
|
||||
// Handle system messsages
|
||||
if (giftData.sender === GiftSenderType.SYSTEM)
|
||||
{
|
||||
this.mailSendService.sendSystemMessageToPlayer(
|
||||
playerId,
|
||||
giftData.messageText,
|
||||
giftData.items,
|
||||
this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours));
|
||||
// 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(
|
||||
playerId,
|
||||
giftData.messageText,
|
||||
giftData.items,
|
||||
this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// Handle user messages
|
||||
else if (giftData.sender === GiftSenderType.USER)
|
||||
@ -106,9 +120,7 @@ export class GiftService
|
||||
giftData.messageText,
|
||||
giftData.items,
|
||||
this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -136,6 +136,31 @@ export class MailSendService
|
||||
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
|
||||
* @param playerId Players id to send message to
|
||||
|
Loading…
Reference in New Issue
Block a user