Go to Page... |
Compatibility: | Necrom (9.0.0) Scribes of Fate (8.3.5) Firesong (8.2.5) Lost Depths (8.1.5) High Isle (8.0.0) |
Updated: | 05/07/23 05:44 PM |
Created: | 12/11/20 03:03 AM |
Monthly downloads: | 1,873 |
Total downloads: | 89,690 |
Favorites: | 23 |
MD5: |
LibSkillBlocker.RegisterSkillBlock(addonName, abilityId, customBlockHandler, noErrorMessage) LibSkillBlocker.RegisterSkillBlock(addonName, abilityId)
LibSkillBlocker.UnregisterSkillBlock(addonName, abilityId)
LibSkillBlocker.GetRegisteredAbilityIds() -> {}[abilityId][addonName] = callback
LibSkillBlocker.GetRegisteredAbilityId(abilityId) -> {}[addonName] = callback
LibSkillBlocker.GetRegisteredAbilityIdsByAddon(addonName) -> {}[abilityIds] = callback
if (IsPlayerInAvAWorld() or IsActiveWorldBattleground()) then LibSkillBlocker.UnregisterSkillBlock("NoInnerLight", 40478) else LibSkillBlocker.RegisterSkillBlock("NoInnerLight", 40478) end
File Name |
Version |
Size |
Uploader |
Date |
1.0.7 |
2kB |
Baertram |
04/30/23 11:41 AM |
|
1.0.6 |
1kB |
Baertram |
04/14/23 03:40 AM |
|
1.0.5 |
2kB |
Baertram |
04/13/23 11:00 AM |
|
1.0.4 |
1kB |
Jarva |
12/20/21 08:04 PM |
|
1.0.3 |
1kB |
Jarva |
12/15/20 08:03 PM |
|
1.0.2 |
1kB |
Jarva |
12/14/20 01:01 AM |
|
1.0.1 |
1kB |
Jarva |
12/13/20 12:14 AM |
|
1.0.0 |
1kB |
12/11/20 03:03 AM |
Comment Options |
silentseashore |
View Public Profile |
Send a private message to silentseashore |
Send email to silentseashore |
Find More Posts by silentseashore |
Add silentseashore to Your Buddy List |
04/13/23, 06:00 AM | |
|
Hi Jarva,
as you said you are not playing ESO any longer and offered other devs to be added to the teams of addons , or to take over: Could youz please add me to the team of this library so I can update it, thanks. |
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
03/26/23, 08:33 AM | |
|
I think you could improve this line to only one "match" check against the pattern:
Code:
local slotNum = tonumber(debug.traceback():match('keybind = "ACTION_BUTTON_(%d)')) or tonumber(debug.traceback():match('keybind = "GAMEPAD_ACTION_BUTTON_(%d)')) Lua Code:
This will find the occurrence of " (escaped: \") followed by any text and then ACTION_BUTTON. So it should find "GAMEPAD_ACTION_BUTTON or ACTION_BUTTON or any other *ACTION_BUTTON that ZOs will implement As the function LibSkillBlocker.IsSlotBlocked is called very often you shluld also add a local isSlotBlocked = LibSkillBlocker.IsSlotBlocked after the function and use tha local "speed up reference" isSlotBlocked instead of LibSkillBlocker.IsSlotBlocked each time in your functions then! Also: If no skill block is registered, you should strip the call to your function LibSkillBlocker.CanUseActionSlots() in total! E.g. check with a local variable if ANY skill block is registered at the start of LibSkillBlocker.CanUseActionSlots() and if nothing is registered skip the performance expensive stack.traceback calls! You only need to update the local for "is ANY skill block registered" as a new skill block register was done, and that's all. Saves a lot of performance that way! Thanks for considering this. I've created such a performance optimized version, also checking with assert if the API function are used properly, else shows an error message. It also removes the gamepad mode check so that gamepad mode officially will work properly. If you are interested, here is the link: LibSkillBlocker 1.0.5 changed by Baertram
Last edited by Baertram : 03/26/23 at 09:19 AM.
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
09/26/22, 11:51 PM | |
Not sure why you have that second line on the section bellow, but removing that fixes the blocks not working on gamepad mode.
Removed it for a skill blocker I made, could need some more testing but haven't gotten any problems yet. Lua Code:
|
|
|
notnear |
View Public Profile |
Send a private message to notnear |
Send email to notnear |
Find More Posts by notnear |
Add notnear to Your Buddy List |
02/16/22, 09:13 AM | ||
|
Thank you very much!
|
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
02/14/22, 02:34 PM | ||
|
|
|
|
Jarva |
View Public Profile |
Send a private message to Jarva |
Send email to Jarva |
Find More Posts by Jarva |
Add Jarva to Your Buddy List |
02/10/22, 01:40 PM | |
|
Hey Jarva, is this library able to block skills without the abilityId, e.g. usage of quickslots too?
or would this be an addition you want to add? Quickslots also are action buttons like the skill ones, just handled a bit differently. But maybe it would be possible to define a callback function that is called as a quickslot is used, where we can check the quickslot's slot data for our needs and if we return "true" the call to teh quickslot will be blocked? it also uses ZO_ActionBar_CanUseActionSlots and fires the quickslot usage with ZO_ActionBar_OnActionButtonUp, so one shouldbe able to provide such a block feature for quickslots, right? You are able to detect the quickslot slot via the slotNum. It should be 9 (ACTION_BAR_FIRST_UTILITY_BAR_SLOT + 1) Lua Code:
Last edited by Baertram : 02/10/22 at 01:51 PM.
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
12/12/20, 08:23 AM | |||
|
Whoops, my bad eyes
Thanks for the clarification.
|
||
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
12/11/20, 02:57 PM | ||
|
If several addons register the same abilityId the lib will iterate over them until one returns true or they all return false. |
|
|
Jarva |
View Public Profile |
Send a private message to Jarva |
Send email to Jarva |
Find More Posts by Jarva |
Add Jarva to Your Buddy List |
12/11/20, 07:05 AM | |
|
Sounds nice thanks for the lib.
One idea: Don't you think an additional parameter "AddonName" would be nice to specify which addon has added the skillblock + an API function to read the table of blocked abilityIds per addon / get all blocked ones. And what if several addons register the same abilityId, but with different customBlockHandler functions for the block? Is the lib just overwriting it then and always using "the last added"'s customBlockHandler? Maybe I'm thinking to complicated here, but at best all customBlockHandlers registered to the same ailityId should be taken into account then, like if customBlockHandler1 or customBlockHandler2 or customBlockHandler3 then block else unblock end
Last edited by Baertram : 12/11/20 at 07:07 AM.
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |