public JahrWordsViewModel(RPGEntities15 bdd) { Bd = bdd; Champs = Bd.ChampLex.ToList(); Types = Bd.Type.ToList(); Cats = Bd.Categories_monde.ToList(); }
public GodViewModel(RPGEntities15 rPGEntities15) { Bd = rPGEntities15; Alignements = Bd.Alignement.ToList(); Pantheons = Bd.Pantheon.ToList(); Cultists = new ObservableCollection <Peuplade>(Bd.Peuplade); Villes = new ObservableCollection <Ville>(Bd.Ville); //SaveDivin. }
public PersoViewModel(RPGEntities15 entities15) { Bd = entities15; Conditions = Bd.Condition.ToList(); Categoriescombo = Bd.ComboCat.ToList(); NewPerso.Pers_stats = SaveStats; SaveStats.Persos = NewPerso; Magie = Bd.Magie_type.ToList(); Pieces = Bd.Piece.ToList(); Place = Bd.Bijoux_place.ToList(); ConsoTypes = Bd.Conso_type.ToList(); Conso_effects = Bd.Effets.ToList(); MunType = Bd.Munition_type.ToList(); Carbus = Bd.Carburant.ToList(); Voie = Bd.Voies.ToList(); Aligns = Bd.Alignement.ToList(); Deplacement = Bd.Mode_deplacement.ToList(); Maniabilities = Bd.Maniabilite.ToList(); Uses = Bd.Usage.ToList(); Sort = Bd.Sorts.ToList(); Combos = Bd.Combo.ToList(); foreach (Mag_element elem in Bd.Mag_element.Where(e => !e.element.Contains("Tous"))) { NewPerso.Perso_elemRes.Add(new Perso_elemRes { Mag_element = elem, Persos = NewPerso, maitrise = 0, }); NewPerso.Perso_elem.Add(new Perso_elem { Mag_element = elem, Persos = NewPerso, maitrise = 0 }); } foreach (Magie_type mag in Bd.Magie_type) { NewPerso.Pers_magoRes.Add(new Pers_magoRes { Magie_type = mag, Persos = NewPerso, maitrise = 0 }); NewPerso.Pers_mago.Add(new Pers_mago { Magie_type = mag, Persos = NewPerso, maitrise = 0 }); } foreach (Weapon_type weapon in Bd.Weapon_type) { NewPerso.Perso_weap_Master.Add(new Perso_weap_Master { Persos = NewPerso, Weapon_type = weapon, maitrise = 0 }); } Trais = Bd.Trais.ToList(); CriSize = Bd.Tailles.ToList(); LootList = Bd.Items.ToList(); StuffList = Bd.Items.ToList(); Races = Bd.Races.Where(r => !r.Race_Stat_Cap.evolved || r.nom == "Jahr").ToList(); Cats = Bd.PersoCategorie.ToList(); Origines = Bd.Monde_w.Where(m => m.nom != "Tous").ToList(); SaveCaracs.Persos = NewPerso; NewPerso.Pers_carac = SaveCaracs; }
public EnchantViewModel(RPGEntities15 Bd) { Bdd = Bd; SaveEnchant = new Enchantements(); Effects = Bdd.Enchant_Effets.ToList(); Types = Bdd.Enchant_Type.ToList(); Items = Bdd.Items.Where(i => i.origine == "Tous" || i.origine == "Magocosme" || i.origine == "Originel").ToList(); Armors = Bdd.Piece.ToList(); Bijoux = Bdd.Bijoux_place.ToList(); ArmorCats = Bdd.Armor_cat.ToList(); Origines = Bdd.Monde_w.Where(m => m.nom != "Technocosme" && m.nom != "Tous").ToList(); CacTypes = Bdd.Weapon_type.Where(c => c.categorie.Contains("CaC")).ToList(); MagTypes = Bdd.Weapon_type.Where(m => m.categorie.Contains("Magique")).ToList(); DstTypes = Bdd.Weapon_type.Where(d => d.categorie.Contains("Distance")).ToList(); }
public SpellViewModel(RPGEntities15 bd) { Bd = bd; StatPhys = new List <Stat>() { Bd.Stat.FirstOrDefault(s => s.valeur == "Dexterité"), Bd.Stat.FirstOrDefault(s => s.valeur == "Endurance"), Bd.Stat.FirstOrDefault(s => s.valeur == "Force") }; StatMag = new List <Stat>() { Bd.Stat.FirstOrDefault(s => s.valeur == "Charisme"), Bd.Stat.FirstOrDefault(s => s.valeur == "Intelligence"), Bd.Stat.FirstOrDefault(s => s.valeur == "Sagesse") }; Elements = Bd.Mag_element.ToList(); Weapons = Bd.Weapon_type.ToList(); CCs = Bd.Crowd_control.ToList(); Categories = bd.ComboCat.ToList(); States = Bd.Etat.ToList(); Schools = Bd.Magie_type.ToList(); Buffs = Bd.Buff.ToList(); Ciblages = Bd.Ciblage.ToList(); }
public BeastViewModel(RPGEntities15 bdd) { this.Bd = bdd; }