Correct mistake in sending repeatable data to client on quest accept
This commit is contained in:
parent
d97beda4b7
commit
79dc3cca1b
@ -18,8 +18,7 @@
|
||||
},
|
||||
"conditions": {
|
||||
"AvailableForStart": [],
|
||||
"AvailableForFinish": [
|
||||
{
|
||||
"AvailableForFinish": [{
|
||||
"_props": {
|
||||
"id": "618c1de4d4cd91439f3de4ae",
|
||||
"parentId": "",
|
||||
@ -32,8 +31,7 @@
|
||||
"doNotResetIfCounterCompleted": false,
|
||||
"counter": {
|
||||
"id": "618c1de4d4cd91439f3de4ac",
|
||||
"conditions": [
|
||||
{
|
||||
"conditions": [{
|
||||
"_props": {
|
||||
"target": "Savage",
|
||||
"value": 1,
|
||||
@ -62,8 +60,7 @@
|
||||
"startedMessageText": "{templateId} startedMessageText {traderId} 0",
|
||||
"changeQuestMessageText": "{templateId} changeQuestMessageText {traderId} 0",
|
||||
"templateId": "{templateId}",
|
||||
"changeCost": [
|
||||
{
|
||||
"changeCost": [{
|
||||
"templateId": "5449016a4bdc2d6f028b456f",
|
||||
"count": 5000
|
||||
}
|
||||
@ -99,8 +96,7 @@
|
||||
"startedMessageText": "{templateId} startedMessageText {traderId} 0",
|
||||
"changeQuestMessageText": "{templateId} changeQuestMessageText {traderId} 0",
|
||||
"templateId": "{templateId}",
|
||||
"changeCost": [
|
||||
{
|
||||
"changeCost": [{
|
||||
"templateId": "5449016a4bdc2d6f028b456f",
|
||||
"count": 5000
|
||||
}
|
||||
@ -125,8 +121,7 @@
|
||||
},
|
||||
"conditions": {
|
||||
"AvailableForStart": [],
|
||||
"AvailableForFinish": [
|
||||
{
|
||||
"AvailableForFinish": [{
|
||||
"_props": {
|
||||
"id": "618c1de4d4cd91439f3de4a5",
|
||||
"parentId": "",
|
||||
@ -139,8 +134,7 @@
|
||||
"doNotResetIfCounterCompleted": false,
|
||||
"counter": {
|
||||
"id": "618c1de4d4cd91439f3de4a4",
|
||||
"conditions": [
|
||||
{
|
||||
"conditions": [{
|
||||
"_props": {
|
||||
"status": [
|
||||
"Survived"
|
||||
@ -149,8 +143,7 @@
|
||||
"dynamicLocale": true
|
||||
},
|
||||
"_parent": "ExitStatus"
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"_props": {
|
||||
"target": [],
|
||||
"id": "618c1de4d4cd91439f3de4a2",
|
||||
@ -174,9 +167,11 @@
|
||||
"failMessageText": "{templateId} failMessageText {traderId} 0",
|
||||
"startedMessageText": "{templateId} startedMessageText {traderId} 0",
|
||||
"changeQuestMessageText": "{templateId} changeQuestMessageText {traderId} 0",
|
||||
"acceptPlayerMessage": "{templateId} acceptPlayerMessage {traderId}",
|
||||
"declinePlayerMessage": "{templateId} declinePlayerMessage {traderId}",
|
||||
"completePlayerMessage": "{templateId} completePlayerMessage {traderId}",
|
||||
"templateId": "{templateId}",
|
||||
"changeCost": [
|
||||
{
|
||||
"changeCost": [{
|
||||
"templateId": "5449016a4bdc2d6f028b456f",
|
||||
"count": 5000
|
||||
}
|
||||
@ -185,7 +180,7 @@
|
||||
},
|
||||
"Pickup": {
|
||||
"_id": "64cfb3818db9f48b3f0b0a759",
|
||||
"traderId": "579dc571d53a0658a154fbec",
|
||||
"traderId": "{traderId}",
|
||||
"location": "any",
|
||||
"image": "/files/quest/icon/62bd61b1b818ff064405b827.jpg",
|
||||
"type": "PickUp",
|
||||
@ -295,14 +290,15 @@
|
||||
},
|
||||
"data": {
|
||||
"Completion": {
|
||||
"itemsBlacklist": [
|
||||
{"minPlayerLevel": 1, "itemIds": [
|
||||
"itemsBlacklist": [{
|
||||
"minPlayerLevel": 1,
|
||||
"itemIds": [
|
||||
"5485a8684bdc2da71d8b4567",
|
||||
"543be5e94bdc2df1348b4568"
|
||||
]}
|
||||
]
|
||||
}
|
||||
],
|
||||
"itemsWhitelist": [
|
||||
{
|
||||
"itemsWhitelist": [{
|
||||
"minPlayerLevel": 1,
|
||||
"itemIds": [
|
||||
"544fb37f4bdc2dee738b4567",
|
||||
@ -394,8 +390,7 @@
|
||||
"5c06782b86f77426df5407d2",
|
||||
"590a3efd86f77437d351a25b"
|
||||
]
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"minPlayerLevel": 15,
|
||||
"itemIds": [
|
||||
"5d40412b86f7743cb332ac3a",
|
||||
@ -442,8 +437,7 @@
|
||||
"619cbf476b8a1b37a54eebf8",
|
||||
"590c651286f7741e566b6461"
|
||||
]
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"minPlayerLevel": 25,
|
||||
"itemIds": [
|
||||
"590c621186f774138d11ea29",
|
||||
@ -480,8 +474,7 @@
|
||||
"590c645c86f77412b01304d9",
|
||||
"5e2aedd986f7746d404f3aa4"
|
||||
]
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"minPlayerLevel": 40,
|
||||
"itemIds": [
|
||||
"59e3647686f774176a362507",
|
||||
|
@ -10,7 +10,7 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||
import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||
import { AvailableForConditions, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||
import { IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData";
|
||||
import { ICompleteQuestRequestData } from "@spt-aki/models/eft/quests/ICompleteQuestRequestData";
|
||||
@ -373,7 +373,6 @@ export class QuestController
|
||||
}
|
||||
|
||||
const questRewards = this.questHelper.getQuestRewardItems(<IQuest><unknown>repeatableQuestProfile, desiredQuestState);
|
||||
|
||||
this.mailSendService.sendLocalisedNpcMessageToPlayer(
|
||||
sessionID,
|
||||
this.traderHelper.getTraderById(repeatableQuestProfile.traderId),
|
||||
@ -382,7 +381,15 @@ export class QuestController
|
||||
questRewards,
|
||||
this.timeUtil.getHoursAsSeconds(this.questConfig.redeemTime));
|
||||
|
||||
acceptQuestResponse.profileChanges[sessionID].quests = this.questHelper.getNewlyAccessibleQuestsWhenStartingQuest(acceptedQuest.qid, sessionID);
|
||||
const repeatableSettings = pmcData.RepeatableQuests.find(x => x.name === repeatableQuestProfile.sptRepatableGroupName);
|
||||
const responseData: IPmcDataRepeatableQuest = {
|
||||
activeQuests: [repeatableQuestProfile],
|
||||
name: repeatableSettings.name,
|
||||
inactiveQuests: [],
|
||||
endTime: repeatableSettings.endTime,
|
||||
changeRequirement: repeatableSettings.changeRequirement
|
||||
};
|
||||
acceptQuestResponse.profileChanges[sessionID].repeatableQuests = [responseData];
|
||||
|
||||
return acceptQuestResponse;
|
||||
}
|
||||
@ -401,6 +408,7 @@ export class QuestController
|
||||
if (matchingQuest)
|
||||
{
|
||||
this.logger.debug(`Accepted repeatable quest ${acceptedQuest.qid} from ${repeatableQuest.name}`);
|
||||
matchingQuest.sptRepatableGroupName = repeatableQuest.name;
|
||||
|
||||
return matchingQuest;
|
||||
}
|
||||
|
@ -73,6 +73,7 @@ export interface IRepeatableQuest
|
||||
templateId: string
|
||||
changeCost: IChangeCost[]
|
||||
changeStandingCost: number
|
||||
sptRepatableGroupName?: string;
|
||||
}
|
||||
|
||||
export interface IRewards
|
||||
|
Loading…
Reference in New Issue
Block a user