public AddEditNPCDataViewModel() : base(-1) { ValidItems = TemplateCache.GetAll <IInanimateTemplate>(); ValidRaces = TemplateCache.GetAll <IRace>(); ValidGenders = TemplateCache.GetAll <IGender>(); DataObject = new NonPlayerCharacterTemplate(); }
public AddEditNPCDataViewModel(long templateId) : base(templateId) { ValidItems = TemplateCache.GetAll <IInanimateTemplate>(); ValidRaces = TemplateCache.GetAll <IRace>(); ValidGenders = TemplateCache.GetAll <IGender>(); DataObject = new NonPlayerCharacterTemplate(); //apply template if (DataTemplate != null) { DataObject.Gender = DataTemplate.Gender; DataObject.InventoryRestock = DataTemplate.InventoryRestock; DataObject.Personality = DataTemplate.Personality; DataObject.Qualities = DataTemplate.Qualities; DataObject.Race = DataTemplate.Race; DataObject.TeachableProficencies = DataTemplate.TeachableProficencies; DataObject.TotalHealth = DataTemplate.TotalHealth; DataObject.TotalStamina = DataTemplate.TotalStamina; DataObject.WillPurchase = DataTemplate.WillPurchase; DataObject.WillSell = DataTemplate.WillSell; } }