View Single Post
03/29/18, 05:06 PM   #1
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
[outdated] GetAbilityDuration() returning wrong values

/Edit: With the help of ArtOfShred I finally found the actual problem. GetAbilityDuration() does in fact NOT return wrong values, it is another problem related to ground effects (for best reproduction of the issue use the bow ability 'Endless Hail').

The problem:
Code:
GetAbilityDuration(40932) -- endless hail rank IV
-- returns 10000
As you can clearly see, it takes 12 seconds from pressing the button to the end of the effect - let's have a look at the following timeline:

timeline
0s: Animation start for endless hail
...
2s: 'real' endless hail effect spawning in the world (hail of arrows animation start)
...
12s: the 'real' effect of endless hail ends

So the 'real' effect has indeed a duration of 10seconds, yet it still takes 2s after pressing the button before it starts. The problem with this is, that there is currently no way to determine exactly WHEN the 'real' effect starts, as EVENT_COMBAT_EVENT will fire for 'endless hail' as soon as the button is pressed', just as EVENT_ACTION_SLOT_ABILITY_USED does.

My suggestion:
- Change the behaviour of all ground effects so that the event will only fire as soon as the 'real' effect starts.
- Additionally, giving ground effects a whole new event type (EVENT_GROUND_EFFECT_CHANGED(eventId, changeType, abilityId, startTime, endTime)) and removing it from EVENT_EFFECT_CHANGED would get rid of the overhead fields that are currently passed when a ground effect is communicated via EVENT_EFFECT_CHANGED and make it much easier to adress and to filter.

Original Post:
Warning: Spoiler

Last edited by Letho : 04/01/18 at 04:24 PM.