diff --git a/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs b/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs index 97a281486..66c348579 100644 --- a/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs +++ b/Assets/Gothic-Core/Scripts/Models/Config/DeveloperConfig.cs @@ -177,6 +177,10 @@ public class DebugChannelTypesCollection : CollectionWrapper /// C_ITEM.damageType is a DAM_* bitmask whose bit positions match the PROT_* indices. /// Weapons carry one damage type; the first set bit wins. diff --git a/Assets/Gothic-Core/Scripts/Services/Npc/NpcService.cs b/Assets/Gothic-Core/Scripts/Services/Npc/NpcService.cs index d52ec2b88..e486b8407 100644 --- a/Assets/Gothic-Core/Scripts/Services/Npc/NpcService.cs +++ b/Assets/Gothic-Core/Scripts/Services/Npc/NpcService.cs @@ -247,6 +247,15 @@ public void ExtNpcChangeAttribute(NpcInstance npc, int attributeId, int value) vob.Attributes[attributeId] = value; } + public void SyncHeroInstanceToVob() + { + var hero = GetHeroContainer(); + hero.Vob.Level = hero.Instance.Level; + hero.Vob.Xp = hero.Instance.Exp; + hero.Vob.XpNextLevel = hero.Instance.ExpNext; + hero.Vob.Lp = hero.Instance.Lp; + } + public NpcContainer GetHeroContainer() { return ((NpcInstance)_gameStateService.GothicVm.GlobalHero).GetUserData();