• Visit Rebornbuddy
  • GCD help needed

    Discussion in 'Community Developer Forum' started by wolfrain62, Dec 10, 2015.

    1. wolfrain62

      wolfrain62 Member

      Joined:
      Aug 22, 2014
      Messages:
      137
      Likes Received:
      0
      Trophy Points:
      16
      Is there a way to force a GCD to wait for another GCD to activate first?

      I am trying to create an AoE portion for my Ninja routine. So i want Katon, Kassatsu, then Doton to cast. I tried using LastSpellID but since the spellid is another GCD the routine acts to fast and skips it (this probably does not make any sense to you guys). This is what I have currently.

      Code:
      if (Actionmanager.CanCastOrQueue(Kass, null) && VariableBook.HostileUnitsCount >= 3 && Core.Me.CurrentTarget.CurrentHealthPercent >= 60)
      {
       await CastKaton();
       await KatonKass();
       await CastDoton();
      }
      
      private static async Task<bool> KatonKass()
      {
       if (NinjaSettings.KassatsuAoE)
       {
         if (VariableBook.HostileUnitsCount >= 3 && !Me.HasAura("Doton") )
          {
            await Spell.NoneGcdCast("Kassatsu", Me, () => true);
          }
       }
       return false;
      }
      
      I need some kind of limit in KatonKass to only be uses after Katon is casted but I cant think of anything. Any help is appreciated.
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      Use ActionManager.CanCast. if that doesnt work for you then get the spelldata object and check its Cooldown
       
    3. wolfrain62

      wolfrain62 Member

      Joined:
      Aug 22, 2014
      Messages:
      137
      Likes Received:
      0
      Trophy Points:
      16
      meant Off GCD not GCD
       
    4. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      CanCast waits for the GCD to be done.
       

    Share This Page