/// <summary> /// Initialize global variables /// </summary> public static void Initialize() { Globals.Logger.Debug("Global variables initialization..."); foreach (var skill in SkillDef.AllLaborSkills()) { viewModel.Skills.Add(new SkillEntry(skill, 0, false)); } Globals.Logger.Debug("Global variables initialized"); }
public Gnome(Character gnome, int level, int row, int column, int mapCellPosition, int realIndex) { this.name = gnome.Name(); this.id = realIndex; this.level = level; this.row = row; this.column = column; this.position = mapCellPosition; this.profession = gnome.Mind.Profession; this.mining = gnome.SkillLevel(CharacterSkillType.Mining); foreach (var skill in SkillDef.AllLaborSkills()) { this.laborSkills.Add(new SkillEntry(skill, gnome.SkillLevel(skill), gnome.Mind.IsSkillAllowed(skill))); } foreach (var skill in SkillDef.AllCombatSkills()) { this.combatSkills.Add(new SkillEntry(skill, gnome.SkillLevel(skill), gnome.Mind.IsSkillAllowed(skill))); } foreach (var attribute in Enum.GetValues(typeof(CharacterAttributeType))) { this.attributes.Add(new AttributeEntry((CharacterAttributeType)attribute, gnome.AttributeLevel((CharacterAttributeType)attribute))); } }