Quantcast Any event difference between cancel and confirm for ground abilities - ESOUI
Thread Tools Display Modes
11/29/16, 12:14 PM   #1
cloudor
 
cloudor's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 5
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.
  Reply With Quote
11/29/16, 07:20 PM   #2
Diesosoon
 
Diesosoon's Avatar
Join Date: Oct 2016
Posts: 15
Question 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
__________________
~ @Diesosoon ~
NA/?EU?
  Reply With Quote
11/30/16, 02:22 AM   #3
cloudor
 
cloudor's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 5
Originally Posted by Diesosoon View Post
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
Thanks for your reply, but I didn't figur out any solutions after read this.
  Reply With Quote
11/30/16, 07:14 PM   #4
Diesosoon
 
Diesosoon's Avatar
Join Date: Oct 2016
Posts: 15
Lightbulb Ifnot

Originally Posted by cloudor View Post
Thanks for your reply, but I didn't figur out any solutions after read this.
I was talking about this:
Code:
    if (not isDamage and not isHeal) or abilityId == 41467 or abilityId == 57466 or abilityId == 57468 or hitValue < 2 then return end
    local isCrit = result==ACTION_RESULT_CRITICAL_DAMAGE or result==ACTION_RESULT_CRITICAL_HEAL or result==ACTION_RESULT_DOT_TICK_CRITICAL or result==ACTION_RESULT_HOT_TICK_CRITICAL   
    local hit = {
        ["sourceId"]    = sourceUnitId,
        ["targetId"]    = targetUnitId,
        ["hitValue"]    = hitValue,
        ["abilityId"]   = abilityId,
        ["crit"]        = isCrit,
        ["heal"]        = isHeal,
        ["timeMs"]      = GetGameTimeMilliseconds()
Potential ifnotthan statement that could possible be included to correct the problem
__________________
~ @Diesosoon ~
NA/?EU?
  Reply With Quote
12/02/16, 02:37 AM   #5
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,056
@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.
  Reply With Quote
12/06/16, 07:32 PM   #6
cloudor
 
cloudor's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 5
@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.
  Reply With Quote
01/05/17, 10:09 PM   #7
Arterion
Join Date: Apr 2015
Posts: 10
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.
  Reply With Quote
01/06/17, 04:12 AM   #8
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,056
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.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Any event difference between cancel and confirm for ground abilities

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off