public static Composite CheckThatShieldIsEquippedIfNeeded()
 {
     if (_checkShield == null)
     {
         _checkShield = new ThrottlePasses(60,
                                           new Sequence(
                                               new DecoratorContinue(
                                                   ret => !Me.Disarmed && !HasShieldInOffHand && SpellManager.HasSpell("Shield Slam"),
                                                   new Action(ret => Logger.Write(Color.HotPink, "User Error: a{0} requires a Shield in offhand to cast Shield Slam", SingularRoutine.SpecAndClassName()))
                                                   ),
                                               new ActionAlwaysFail()
                                               )
                                           );
     }
     return(_checkShield);
 }
Beispiel #2
0
 public static Composite CheckThatWeaponIsEquipped()
 {
     if (_checkWeapons == null)
     {
         _checkWeapons = new ThrottlePasses(60,
                                            new Sequence(
                                                new DecoratorContinue(
                                                    ret => !Me.Disarmed && !IsWeapon2H(Me.Inventory.Equipped.MainHand),
                                                    new Action(ret => Logger.Write(Color.HotPink, "User Error: a {0} requires a Two Handed Weapon equipped to be effective", SingularRoutine.SpecAndClassName()))
                                                    ),
                                                new ActionAlwaysFail()
                                                )
                                            );
     }
     return(_checkWeapons);
 }