[implemented] Event when leaving ground target mode.
When using a ground target ability the events EVENT_ENTER_GROUND_TARGET_MODE and EVENT_ACTION_SLOT_ABILITY_USED fire. When the ground targeting is finished, no further event happens, so it is hard to find out if the ability has been fired or cancelled and thus if it has consumed magicka.
I can right now track the cost (e.g. magicka) and try to catch when those cost are removed from the resource pool. But I don't like this roundabout way since it can also fail. I tried looking for other events and also prehooked CancelCast() but none gave me a reliable way to figure this out. Would it be possible to add an event EVENT_LEAVE_GROUND_TARGET_MODE(isCancelled) with a return that indicates if the skill was fired?. Alternatively EVENT_COMBAT_EVENT could also report when Resources get used by skills. Right now it only reacts to effects on the player (like sprinting, blocking, potions or those lightning drains in the Halls of Fabrication trial) |
I highly support the first request. The second request has only my support if it won't be too much of performance (fps/ping) drain.
|
I can easily add an event for cancel. But you don't get any combat event when the ability casts?
|
Sounds very good already, thanks.
I tested this with Blazing Spear rank IV (Id of the slotted skill: 27167): When I select the skill I get the events as written before. When I then throw it (or it gets thrown automatically if the gameplay setting is chosen accordingly) I get EVENT_ACTION_SLOT_STATE_UPDATED for each other slotted ability, however the same happens when I cancel it. This is also the point in time that I like to get, since this is when the magicka gets subtracted. Finally, when it lands I get two combat events with
Since the abilityIds don't match I can't really use this to detect that it was sucessfully thrown. I guess with a reliable event when it gets cancelled I could at least assume that it goes through unless such an event is called, but it would be better if some event gets called when the actuall throwing/activation happens. |
It's easy to know when the ground target was chosen, but the ability may still fail after that for many reasons. It is the responsibility of the combat events to indicate the state of the actual cast. So I'll add the canceled event and I think your best bet will be to map the ability id from the combat event to the ability id of the ability on the bar for your addon.
|
Quote:
Combat events don't give a 'cast succeeded' event, one would have to watch out for a damage tick or an effect that has been gained. This is what Chip wrote back in the days when I wrote about that problem (he is referring to the elemental blockade ability): Quote:
|
Quote:
However - there is still a slight delay between action bar events and effects firing off. Also its worth nothing that if the player has their weapon sheathed the action bar events all fire off but the effect is delayed by the duration of the weapon draw animation. |
Oh right, combatUnitType has been added after I have designed my code! Good find! If all ground effects use this, I could use event_effect_changed to track them. Not all of them returning a proper name is a problem though, as my CheckAllAbilityIds-functionality uses localized spell names :/
/edit: Damn, and I need the unitTag to determine the exact source. I'd have to hack my own code to change the functionality...... *sigh* ok I admit the needed tools are there but they are not normalized and imo they feel very chaotic. I'd still like to have a proper combat event for successful instant casts that pass the abilityId of the ability used. |
Quote:
But I think I probably can make it work with the canceled event. |
Where is your point of interest exactly located? When the button is pressed or when the effect really starts? Because the 2nd case should be impossible right now, as even EVENT_EFFECT_CHANGED fires 'OnButtonPressed' and not 'OnEventStarted'.
|
All times are GMT -6. The time now is 09:51 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI