Esempio n. 1
0
        // Creates a unit, assigning it a level
        public static Unit create(string nickname, GameExt game, Profession prof, byte level, params string[] passives)
        {
            // Variables
            Unit	unit=	new Unit(
                getRandomFirstName(10),
                nickname,
                getRandomLastName(8),
                game,
                prof
            );

            unit.pLevel=	level;
            unit.pExp=	getExpFromLevel(level);
            if(passives!= null && passives.Length> 0)
            {
                unit.removeAllPassives();
                for(int i= 0; i< passives.Length; i++)
                    unit.assignPassive(passives[i]);
            }

            return unit;
        }