Any event difference between cancel and confirm for ground abilities
I use EVENT_ACTION_SLOT_ABILITY_USED and EVENT_ACTION_UPDATE_COOLDOWNS to track ground abilities. When using another ability to cancel the ground ability, it fires same events as confirm.
|
Unsure
I know little to nothing but looked up something that may be of assistance. Just looking at some of the example code I thought it may be similar.
http://www.esoui.com/forums/showthread.php?t=5576 |
Quote:
|
Ifnot
Quote:
Code:
if (not isDamage and not isHeal) or abilityId == 41467 or abilityId == 57466 or abilityId == 57468 or hitValue < 2 then return end |
@cloudor
Maybe built an internal table with unique "groundtarget eventid = ability's id" when the event gets first fired. Insert a boolean value into the table like local myAddon.activeGroundTargetAbilities = { [abilityid of ground target here] = boolean value, } Set it to true if the ability is not in the table yet and the events fires the 1st time. Check if it's in the table by "if myAddon.activeGroundTargetAbilities[ability id] then" and remove it if the event fires the 2nd time. You're able to react on the ground target ability ids this way at the 2nd time if the event callback function parameters are always the same :( Be sure to clear the table at realoadui (maybe inside callback function of player activated event) and where needed in between. |
@Diesosoon @Baertram Thank you, I found a easy way to judge whether a ground ability is confirmed or canceled. If the ground ability is canceled by performing another ability, then the EVENT_ACTION_SLOT_ABILITY_USED will be immediately fired after EVENT_ACTION_UPDATE_COOLDOWNS within 1 millisecond. So I can solve this problem by doing a 2-staged lazy check.
|
Random thought: If the ground target is canceled, no resources will be consumed. Could you watch the resource (magicka, stamina, ultimate) and check to see if they decrease by the amount the ability costs? That would let you know when to start the timer.
|
The ground ability gets canceldd by "using" another ability and thus the ressources for the ground ability got used AND the new ressources for the canceling ability.
|
All times are GMT -6. The time now is 06:47 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI