Ejemplo n.º 1
0
        public Warrior(string name, string surname, double mastery, double strength, double agility, Weapon weapon)
            : base(name,surname)
        {
            this.name = name;
            this.surname = surname;
            this.mastery = mastery;
            this.strength = strength;
            this.agility = agility;

            if (weapon == null)
            {
                WarriorBaseInfo wInfo = new WarriorBaseInfo(name, surname, mastery, strength, agility);
                WarriorException e = new WarriorException("Weapon is null",wInfo);
                throw e;
            }

            this.weapon = weapon;
            this.weapon.Holder = this;
        }
Ejemplo n.º 2
0
 public WarriorException(string message, WarriorBaseInfo wInfo)
     : base(message)
 {
     this.wInfo = wInfo;
 }