/// <summary> /// Gets the time left in seconds before being able to reuse an ability /// </summary> /// <param name="index">Index of the ability</param> public int GetAbilityRecast(byte index) { if (index >= 0 && index <= MAX_ABILITY_INDEX) { return((int)Math.Ceiling((decimal)(FFACE.GetAbilityRecast(_InstanceID, index) / 60))); } else { throw new ArgumentOutOfRangeException("Must be within 0 to MAX_ABILITY_INDEX"); } } // @ public int GetAbilityRecast(byte index)
} // @ public TimeSpan GetSpellRecast(eSpellList spell) /// <summary> /// Gets the time left in seconds before being able to reuse an ability (use sparingly) /// </summary> /// <param name="abil">Ability List</param> /// <returns>-1 if Ability is not "equipped", Recast of the ability otherwise</returns> public int GetAbilityRecast(AbilityList abil) { for (byte i = 0; i < MAX_ABILITY_INDEX; i++) { if (GetAbilityID(i) == abil) { return((int)Math.Ceiling((decimal)(FFACE.GetAbilityRecast(_InstanceID, i) / 60))); } } // not found. return(-1); }