Added implementation for Achievement
quest rewards
This commit is contained in:
parent
aebe1ab606
commit
e5398f5e4d
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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(<string>reward.value)); // add specified stash rows from quest reward - requires client restart
|
||||
|
Loading…
x
Reference in New Issue
Block a user