• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Issue with DefaultCombat and watchman sentinel

    Discussion in 'Buddy Wing Forum' started by Truestorybro, Oct 21, 2012.

    1. Truestorybro

      Truestorybro New Member

      Joined:
      Jun 7, 2012
      Messages:
      111
      Likes Received:
      0
      Trophy Points:
      0
      Don't know if this is a know issue or not but DefaultCombat [1] never uses Zen even though my char sits with a nice stack of 30 centering.

      [1]
      Code:
                      Spell.Cast("Valorous Call", castWhen => !BuddyTor.Me.HasBuff("Centering")),
      
                      //#Only 1 of these 3 buffs can be active at a time#
                      Spell.Cast("Zen", castWhen => BuddyTor.Me.HasBuff("Centering")),
                      Spell.Cast("Inspiration", castWhen => BuddyTor.Me.HasBuff("Centering")),//5m CD
                      Spell.Cast("Transcendence", castWhen => BuddyTor.Me.HasBuff("Centering") && BuddyTor.Me.HealthPercent <= 50 || (BuddyTor.Me.CurrentTarget.Distance >= 2f && !AbilityManager.CanCast("Force Leap", BuddyTor.Me.CurrentTarget))),
      
       
    2. Truestorybro

      Truestorybro New Member

      Joined:
      Jun 7, 2012
      Messages:
      111
      Likes Received:
      0
      Trophy Points:
      0

      Don't know if this is a good solution or not but changed Spell.Cast("Zen", castWhen => BuddyTor.Me.HasBuff("Centering")), to Spell.BuffSelf("Zen", castWhen => BuddyTor.Me.HasBuff("Centering")), and now my sentinel is casting Zen like there is no tomorrow.
       
    3. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      Nice catch! And, that's an easy mistake for a CC-writer to make.
      The two-argument version of Spell.Cast() defaults to "CurrentTarget" as the destination, whereas, Spell.BuffSelf() defaults to "Me".

      Another way to solve the problem would've been:
      Spell.Cast("Zen", on => BuddyTor.Me, castWhen => BuddyTor.Me.HasBuff("Centering"))

      cheers,
      chinajade
       

    Share This Page