diff --git a/src/app/tabs/npcs/npcs-editor/npcs-editor.component.ts b/src/app/tabs/npcs/npcs-editor/npcs-editor.component.ts index c6225ac..b6e14df 100644 --- a/src/app/tabs/npcs/npcs-editor/npcs-editor.component.ts +++ b/src/app/tabs/npcs/npcs-editor/npcs-editor.component.ts @@ -8,10 +8,11 @@ import { ItemSlot, ItemSlotType, Rollable, + Skill, SkillType, StatType, } from '../../../../interfaces'; -import { levelFromSkillXP } from '../../../helpers/export'; +import { levelFromSkillXP, skillXPFromLevel } from '../../../helpers/export'; import { EditorBaseComponent } from '../../../shared/components/editor-base/editor-base.component'; @Component({ @@ -508,6 +509,12 @@ export class NpcsEditorComponent delete (npc as any).triggers; } + Object.values(Skill).forEach((skill) => { + npc.skills[skill.toLowerCase() as SkillType] = skillXPFromLevel( + npc.skillLevels + ); + }); + this.editing.set(npc); super.doSave(); diff --git a/src/app/tabs/npcs/npcs.component.ts b/src/app/tabs/npcs/npcs.component.ts index 51032a9..a10b6f7 100644 --- a/src/app/tabs/npcs/npcs.component.ts +++ b/src/app/tabs/npcs/npcs.component.ts @@ -50,6 +50,13 @@ export class NpcsComponent extends EditorBaseTableComponent { cellDataType: 'number', filter: 'agNumberColumnFilter', }, + { + field: 'skillLevels', + headerName: 'Skill', + flex: 1, + cellDataType: 'number', + filter: 'agNumberColumnFilter', + }, { field: 'cr', headerName: 'Challenge Rating',