diff --git a/project/assets/configs/seasonalevents.json b/project/assets/configs/seasonalevents.json index 9a7082f7..c4e21d12 100644 --- a/project/assets/configs/seasonalevents.json +++ b/project/assets/configs/seasonalevents.json @@ -13,7 +13,6 @@ "62a5c333ec21e50cad3b5dc6": 1, "62a5c41e8ec41a51b34739c3": 1, "635267ab3c89e2112001f826": 1, - "5bd06f5d86f77427101ad47c": 1, "5e54f79686f7744022011103": 1 }, "Headwear": { @@ -36,7 +35,6 @@ "62a5c333ec21e50cad3b5dc6": 5, "62a5c41e8ec41a51b34739c3": 5, "635267ab3c89e2112001f826": 5, - "5bd06f5d86f77427101ad47c": 5, "5e54f79686f7744022011103": 5 }, "Headwear": { @@ -54,7 +52,6 @@ "62a5c333ec21e50cad3b5dc6": 5, "62a5c41e8ec41a51b34739c3": 5, "635267ab3c89e2112001f826": 5, - "5bd06f5d86f77427101ad47c": 5, "5e54f79686f7744022011103": 5 }, "Headwear": { diff --git a/project/src/helpers/ProfileHelper.ts b/project/src/helpers/ProfileHelper.ts index e7747e0b..1f3226c0 100644 --- a/project/src/helpers/ProfileHelper.ts +++ b/project/src/helpers/ProfileHelper.ts @@ -1,7 +1,7 @@ import { inject, injectable } from "tsyringe"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { QuestStatus } from "../models/enums/QuestStatus"; @@ -329,4 +329,18 @@ export class ProfileHelper return !!profile.aki.receivedGifts.find(x => x.giftId === giftId); } + + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + public incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void + { + const stat = counters.find(x => x.Key.includes(keyToIncrement)); + if (stat) + { + stat.Value++; + } + } } \ No newline at end of file