Пример #1
0
 static string ArmorSpell(MageArmor s)
 {
     return s.ToString() + " Armor";
 }
Пример #2
0
 /// <summary>
 /// behavior to cast appropriate Armor 
 /// </summary>
 /// <returns></returns>
 public static Composite CreateMageArmorBehavior()
 {
     return new Throttle(TimeSpan.FromMilliseconds(500),
         new Sequence(
             new Action(ret => _Armor = GetBestArmor()),
             new Decorator(
                 ret => _Armor != MageArmor.None
                     && !Me.HasMyAura(ArmorSpell(_Armor))
                     && Spell.CanCastHack(ArmorSpell(_Armor), Me),
                 Spell.BuffSelf(s => ArmorSpell(_Armor), ret => !Me.HasAura(ArmorSpell(_Armor)))
                 )
             )
         );
 }