Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell Cooldown #12

Open
cassrgs opened this issue Jan 6, 2016 · 7 comments
Open

Spell Cooldown #12

cassrgs opened this issue Jan 6, 2016 · 7 comments

Comments

@cassrgs
Copy link
Contributor

cassrgs commented Jan 6, 2016

Hello there

On spell.cs there is the GetCooldown() function that states the total cooldown of a spell. This function doesn't take into account alacrity modifiers. Since CanCast() suffer interference from global cooldown it would be an enormous and incredible improvement if we could have another function that states the current cooldown of a spell to use as a conditional on combat rotations as per the example bellow on a lethality operative rotation

Spell.Cast("Overload Shot", 
ret => 
Me.EnergyPercent > 85 &&
!Me.HasBuff("Tactical Advantage") && 
**CurrentCooldown**("Shiv") > 1500 &&
**CurrentCooldown**("Toxic Blast") > 1500 &&        
Me.CurrentTarget.HasDebuff("Corrosive Dart") && 
Me.CurrentTarget.HasDebuff("Corrosive Grenade") &&
!Me.IsStealthed)
,
@aevitas
Copy link
Contributor

aevitas commented Jan 6, 2016

There are two properties in TorAbility that are possibly interesting for this: CooldownTime and GlobalCooldownTime. Both return a time in milliseconds, so you could effectively do something like:

TimeSpan actualCooldown = TimeSpan.FromMilliseconds(ability.CooldownTime - ability.GlobalCooldownTime);

Which would remove the global cooldown duration from the equation. I'm not sure how this works with modifiers, but I'd assume those are taken into account in the CooldownTime. We could add this to the TorAbility API if it actually makes sense, but that'd be purely for convenience.

I'm going to guess you're looking to use this to anticipate better on what abilities you will be using?

@cassrgs
Copy link
Contributor Author

cassrgs commented Jan 6, 2016

from where in the game the TorAbility gets the info, isnt there a place on the memory with the current cooldown we could get? as it appear when we enable cooldown timer text on interface?

@LaoArchAngel
Copy link

According to my testing, TorAbility.CooldownTime returns the "default" cooldown time of a spell, not the current cooldown. eg, if Force Lift has a cooldown of 30 seconds, it will always return 30000, whether there's 5 seconds left on the current cooldown, or even if the ability is ready and has no active cooldown.

@cassrgs
Copy link
Contributor Author

cassrgs commented Jul 13, 2016

Indeed, we would need a way to get the current cooldown as it appear in
text when we enable it inside the game, or some kind of function inside
Spell.Cast that would get the default cd with TorAbility.CooldownTime, put
it in a variable and do some time -= time so that we could use the variable
in the rotations

2016-07-06 18:39 GMT-03:00 Malick McGregor notifications@github.com:

According to my testing, TorAbility.CooldownTime returns the "default"
cooldown time of a spell, not the current cooldown. eg, if Force Lift has a
cooldown of 30 seconds, it will always return 30000, whether there's 5
seconds left on the current cooldown, or even if the ability is ready and
has no active cooldown.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AI7YsSJphZ9f3-Yt9RzQ-Yfs69Qo3tm5ks5qTCCngaJpZM4G_vXW
.

@aevitas
Copy link
Contributor

aevitas commented Jul 16, 2016

I'll have another look at this. The game should keep track of this somewhere, but other than in the UI (which is in seconds), I wasn't able to locate it the last time.

@cassrgs
Copy link
Contributor Author

cassrgs commented Aug 16, 2016

any news on this? >.< that would change rotations so drasticly ;P

@BobbyT1
Copy link

BobbyT1 commented Feb 17, 2018

Anything we can do to help with this? Looking for a similiar solution for some of the internal buffs that aren't flagged by an icon now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants