0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Fixed profileChangeEvent Skill failing when invalid skill passed in

This commit is contained in:
Dev 2024-05-25 14:40:49 +01:00
parent e505f86137
commit aa03a002ed

View File

@ -979,6 +979,11 @@ export class InventoryController
case "SkillPoints":
{
const profileSkill = pmcData.Skills.Common.find((x) => x.Id === mailEvent.entity);
if (!profileSkill)
{
this.logger.warning(`Unable to find skill with name: ${mailEvent.entity}`);
continue;
}
profileSkill.Progress = mailEvent.value;
this.logger.success(`Set profile skill: ${mailEvent.entity} to: ${mailEvent.value}`);
break;