• Visit Rebornbuddy
  • Checking the cooldown remaining on a certain ability?

    Discussion in 'Community Developer Forum' started by Ichiba, Jun 19, 2014.

    1. Ichiba

      Ichiba New Member

      Joined:
      Jun 14, 2014
      Messages:
      258
      Likes Received:
      8
      Trophy Points:
      0
      I'm wondering if there's a way to check how much time is remaining on the cooldown before an ability is ready. I'd like to make a combat routine not use off-GCD skills if their animation lock will prevent GCD spells from going off, but I can't seem to really find anything but ff14bot.Objects.SpellData.Cooldown which I'm not really sure how to implement for this purpose. Any help appreciated, thanks.
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      ff14bot.Objects.SpellData.Cooldown is a timespan, so youll probably want to check ff14bot.Objects.SpellData.Cooldown.TotalMilliseconds which will return a float with how many MS left before you can cast again.
       
    3. Ichiba

      Ichiba New Member

      Joined:
      Jun 14, 2014
      Messages:
      258
      Likes Received:
      8
      Trophy Points:
      0
      Okay, that helps a little. So what would the syntax look like if I wanted to return the remaining cooldown on, for example, Heavy Shot? I do a fair amount of programming, but not in c#, and it's kind of difficult to wrap my head around this stuff with no real documentation, comments, or examples of how they work. Thanks again.
       
    4. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      something like

      Code:
      
                  SpellData spell;
                  Actionmanager.CurrentActions.TryGetValue("Heavy Shot", out spell);
      
      if (spell != null)
      {
      spell.Cooldown.totalmilliseconds something else here with that data
      }
      
       

    Share This Page