diff --git a/project/src/helpers/ProfileHelper.ts b/project/src/helpers/ProfileHelper.ts index a05080c6..acacd0a9 100644 --- a/project/src/helpers/ProfileHelper.ts +++ b/project/src/helpers/ProfileHelper.ts @@ -557,4 +557,14 @@ export class ProfileHelper return pmcProfile.Info.Bans .some((ban) => ban.banType === BanType.RAGFAIR && currentTimestamp < ban.dateTime); } + + /** + * Add an achievement to player profile + * @param pmcProfile Profile to add achievement to + * @param achievementId Id of achievement to add + */ + public addAchievementToProfile(pmcProfile: IPmcData, achievementId: string): void + { + pmcProfile.Achievements[achievementId] = this.timeUtil.getTimestamp(); + } } diff --git a/project/src/helpers/QuestHelper.ts b/project/src/helpers/QuestHelper.ts index 0ec46487..72911f40 100644 --- a/project/src/helpers/QuestHelper.ts +++ b/project/src/helpers/QuestHelper.ts @@ -956,8 +956,7 @@ export class QuestHelper // Handled elsewhere, TODO: find and say here break; case QuestRewardType.ACHIEVEMENT: - this.logger.warning(`TODO - achievement: ${reward.target} reward for quest completion not implemented yet`); - // TODO - Implement (rewards for completion of Gunsmith P25) + this.profileHelper.addAchievementToProfile(pmcProfile, reward.target); break; case QuestRewardType.STASH_ROWS: this.profileHelper.addStashRowsBonusToProfile(sessionId, Number.parseInt(reward.value)); // add specified stash rows from quest reward - requires client restart