ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   How do I write a condition for blocking ? (https://www.esoui.com/forums/showthread.php?t=9951)

Razor1980 10/13/21 07:57 AM

How do I write a condition for blocking ?
 
I figured out how to write a condition to trigger on bash, but not one to trigger on a blocked hit. Don't want it on beginning to block but to trigger only on receiving a blocked hit.

Baertram 10/13/21 09:24 AM

Afaik there are not API functions or events to support this so far.
We requested them already as you can see here:
https://www.esoui.com/forums/showthr...ighlight=block

But there is nothing implemented to be used so far, I think.

You could check the combat events if there is anything about incoming damage types = "block" or similar.
https://wiki.esoui.com/EVENT_COMBAT_EVENT
There is a abilityActionSlotType == ACTION_SLOT_TYPE_BLOCK

And in addition try something like the usage of EVENT_POWER_UPDATE (number eventCode, string unitTag, number powerIndex, CombatMechanicType powerType, number powerValue, number powerMax, number powerEffectiveMax) to check for stamina loss (CombatMechanicType == POWERTYPE_STAMINA) as the block happens.

Razor1980 10/13/21 10:15 AM

Quote:

Originally Posted by Baertram (Post 44826)
Afaik there are not API functions or events to support this so far.
We requested them already as you can see here:
https://www.esoui.com/forums/showthr...ighlight=block

But there is nothing implemented to be used so far, I think.

You could check the combat events if there is anything about incoming damage types = "block" or similar.
https://wiki.esoui.com/EVENT_COMBAT_EVENT
There is a abilityActionSlotType == ACTION_SLOT_TYPE_BLOCK

And in addition try something like the usage of EVENT_POWER_UPDATE (number eventCode, string unitTag, number powerIndex, CombatMechanicType powerType, number powerValue, number powerMax, number powerEffectiveMax) to check for stamina loss (CombatMechanicType == POWERTYPE_STAMINA) as the block happens.

Thanks. What I managed to find in the meanwhile in the EVENT_COMBAT_EVENT
sourceType=COMBAT_UNIT_TYPE_NONE
abilityActionSlotType= ACTION_TYPE_NOTHING
targetType=COMBAT_UNIT_TYPE_PLAYER

Doesn't make any sense, but it seems kinda working.

Baertram 10/13/21 11:17 AM

Quote:

sourceType=COMBAT_UNIT_TYPE_NONE
abilityActionSlotType= ACTION_TYPE_NOTHING
I would not use this! It's saying nothing and this will be applying to about every 2nd incoming combat event on the player...
So your code will most likely fail to detect the block properly and raise many false positives!

btw: the source data is often unknown/empty like your's here, especially if you are in a PvP/AvA environment.

Razor1980 10/13/21 01:38 PM

Quote:

Originally Posted by Baertram (Post 44828)
I would not use this! It's saying nothing and this will be applying to about every 2nd incoming combat event on the player...
So your code will most likely fail to detect the block properly and raise many false positives!

btw: the source data is often unknown/empty like your's here, especially if you are in a PvP/AvA environment.

Oh, I didn't test my addon in PVP. I have no idea what it does there...


All times are GMT -6. The time now is 04:59 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI