Ejemplo n.º 1
0
        private void CréationPerso()
        {
            int    idRace;
            int    idSousRace;
            int    idClasse;
            String nom;
            String prenom;
            String description;

            Int32.TryParse(race["id"].ToString(), out idRace);
            Int32.TryParse(sousRace["id"].ToString(), out idSousRace);
            Int32.TryParse(classe["id"].ToString(), out idClasse);
            nom         = tbNom.Text;
            prenom      = tbPrenom.Text;
            description = tbDesc.Text;
            if (nom != null && nom != "" && prenom != null && prenom != "" && description != null && description != "")
            {
                CreationPerso creatNewPerso = new CreationPerso();
                int           idPerso       = creatNewPerso.CreatNewPerso(idRace, idClasse, idSousRace, 0, nom, prenom, description);
            }
            else
            {
                // message d'érreur;
            }
        }
Ejemplo n.º 2
0
        private void Generate(int idRace, int idSousRace, int idClasse, int lvl, int num)
        {
            CreationPerso      builderPerso = new CreationPerso();
            int                idPerso      = builderPerso.CreatNewPerso(idRace, idClasse, idSousRace, lvl, "mob", num.ToString(), "non");
            Perso              perso        = new Perso(idPerso);
            CreationEquipement creation     = new CreationEquipement(valEquip, 20, Genre.typeEquipementBase.cac, 1, CreationEquipement.typeCible.Guerrier);
            int                idequip      = creation.Generate();
            int                type;
            Items              item = Items.GetItems(idequip, out type);

            perso.Equipe((Equipement)item);
        }