Thread Tools Display Modes
10/13/21, 07:57 AM   #1
Razor1980
AddOn Author - Click to view addons
Join Date: Nov 2016
Posts: 12
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.
  Reply With Quote
10/13/21, 09:24 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,959
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.
  Reply With Quote
10/13/21, 10:15 AM   #3
Razor1980
AddOn Author - Click to view addons
Join Date: Nov 2016
Posts: 12
Originally Posted by Baertram View Post
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.
  Reply With Quote
10/13/21, 11:17 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,959
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.
  Reply With Quote
10/13/21, 01:38 PM   #5
Razor1980
AddOn Author - Click to view addons
Join Date: Nov 2016
Posts: 12
Originally Posted by Baertram View Post
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...
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » How do I write a condition for blocking ?

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