Esempio n. 1
0
 public void CastTo(ISpellCastTo spell, ICharacter target)
 {
     try
     {
         if (Check.IsCastableByWarrior(this, spell) == true)
         {
             base.CastTo(spell, target);
         }
         else
         {
             throw new InvalidOperationException();
         }
     }
     catch (InvalidOperationException) { }
 }
Esempio n. 2
0
 protected void CastTo(ISpellCastTo spell, ICharacter target)
 {
     try
     {
         if (Check.IsAlive(this) == true)
         {
             SpellLevelUp(spell, this.level);
             spell.CastTo(this, target);
         }
         else
         {
             throw new InvalidOperationException();
         }
     }
     catch (InvalidOperationException) { }
 }