public PersonaViewModel(Persona persona, IPersonaList personaList, ISkillList skillList) { _persona = persona; _personaList = personaList; _skillList = skillList; _vm = PersonaList.FirstOrDefault(x => x.Value == PersonaId); }
public CompendiumViewModel( ISavePersona5 save, IPersonaList personaList, ISkillList skillList, ITraitList traitList) : this(save.Compendium.Select((x, i) => new PersonaViewModel(i, x, personaList, skillList, traitList))) { _save = save; UnlockAllCompendiumCommand = new RelayCommand(_ => { var result = MessageBox.Show(UnlockCompendiumMessage, "Reset Persona to default", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning); System.Func <PersonaViewModel, bool> predicate; switch (result) { case MessageBoxResult.Yes: predicate = x => true; break; case MessageBoxResult.No: predicate = x => !x.IsEnabled; break; default: return; } foreach (var persona in Items.Where(predicate)) { persona.ResetPersonaToDefault(); } }); }
public CompendiumViewModel( ISavePersona5 save, IPersonaList personaList, ISkillList skillList) : this(save.Compendium.Select(x => new PersonaViewModel(x, personaList, skillList))) { _save = save; }
public CharactersViewModel( ISavePersona5 save, IPersonaList personaList, ISkillList skillList, IEquipmentList equipmentList) : this(save.Characters.Select((_, i) => new CharacterEntryViewModel(save, save.Characters[i], i, personaList, skillList, equipmentList))) { _save = save; }
public DoSkill(IWriteToClient writer, ISpellTargetCharacter spellTargetCharacter, ICache cache, IDamage damage, IUpdateClientUI updateClientUi, IMobScripts mobScripts, IDice dice, ISkillList skillList) { _writer = writer; _spellTargetCharacter = spellTargetCharacter; _cache = cache; _damage = damage; _updateClientUi = updateClientUi; _mobScripts = mobScripts; _dice = dice; _skillList = skillList; }
public CharacterEntryViewModel( ISavePersona5 save, Character character, int index, IPersonaList personaList, ISkillList skillList, IEquipmentList equipmentList, ITraitList traitList) : base(character.Persona.Select((x, i) => new PersonaViewModel(-1, x, personaList, skillList, traitList))) { _save = save; _id = (Characters)index; _character = character; _equipmentList = equipmentList; }
public PersonaViewModel(int compendiumIndex, Persona persona, IPersonaList personaList, ISkillList skillList) { _compendiumIndex = compendiumIndex; _persona = persona; _personaList = personaList; _skillList = skillList; _vm = PersonaList.FirstOrDefault(x => x.Value == PersonaId); ResetPersonaCommand = new RelayCommand(_ => { if (MessageBox.Show("This will reset stats and skills of your persona. Do you want to continue?", "Reset Persona to default", MessageBoxButton.YesNo, MessageBoxImage.Warning) != MessageBoxResult.Yes) { return; } ResetPersonaToDefault(); }, _ => _compendiumIndex >= 0); }
public CharacterEntryViewModel(Character character, int index, IPersonaList personaList, ISkillList skillList) : base(character.Persona.Select(x => new PersonaViewModel(x, personaList, skillList))) { _id = (Characters)index; _character = character; }
public PersonaViewModel(Persona persona, IPersonaList personaList, ISkillList skillList) { _persona = persona; _personaList = personaList; _skillList = skillList; }