Remove dupe items from seasonal gear

This commit is contained in:
Dev 2023-07-24 18:47:26 +01:00
parent 070b9c7ad6
commit 7e60ea9d79
2 changed files with 15 additions and 4 deletions

View File

@ -13,7 +13,6 @@
"62a5c333ec21e50cad3b5dc6": 1, "62a5c333ec21e50cad3b5dc6": 1,
"62a5c41e8ec41a51b34739c3": 1, "62a5c41e8ec41a51b34739c3": 1,
"635267ab3c89e2112001f826": 1, "635267ab3c89e2112001f826": 1,
"5bd06f5d86f77427101ad47c": 1,
"5e54f79686f7744022011103": 1 "5e54f79686f7744022011103": 1
}, },
"Headwear": { "Headwear": {
@ -36,7 +35,6 @@
"62a5c333ec21e50cad3b5dc6": 5, "62a5c333ec21e50cad3b5dc6": 5,
"62a5c41e8ec41a51b34739c3": 5, "62a5c41e8ec41a51b34739c3": 5,
"635267ab3c89e2112001f826": 5, "635267ab3c89e2112001f826": 5,
"5bd06f5d86f77427101ad47c": 5,
"5e54f79686f7744022011103": 5 "5e54f79686f7744022011103": 5
}, },
"Headwear": { "Headwear": {
@ -54,7 +52,6 @@
"62a5c333ec21e50cad3b5dc6": 5, "62a5c333ec21e50cad3b5dc6": 5,
"62a5c41e8ec41a51b34739c3": 5, "62a5c41e8ec41a51b34739c3": 5,
"635267ab3c89e2112001f826": 5, "635267ab3c89e2112001f826": 5,
"5bd06f5d86f77427101ad47c": 5,
"5e54f79686f7744022011103": 5 "5e54f79686f7744022011103": 5
}, },
"Headwear": { "Headwear": {

View File

@ -1,7 +1,7 @@
import { inject, injectable } from "tsyringe"; import { inject, injectable } from "tsyringe";
import { IPmcData } from "../models/eft/common/IPmcData"; 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 { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
import { QuestStatus } from "../models/enums/QuestStatus"; import { QuestStatus } from "../models/enums/QuestStatus";
@ -329,4 +329,18 @@ export class ProfileHelper
return !!profile.aki.receivedGifts.find(x => x.giftId === giftId); 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++;
}
}
} }