Go to Page... |
Compatibility: | Scribes of Fate (8.3.5) Firesong (8.2.5) Lost Depths (8.1.5) High Isle (8.0.0) Ascending Tide (7.3.5) Deadlands (7.2.5) |
Updated: | 03/13/23 03:57 AM |
Created: | 12/03/21 06:35 AM |
Monthly downloads: | 75 |
Total downloads: | 2,909 |
Favorites: | 2 |
MD5: |
File Name |
Version |
Size |
Uploader |
Date |
1.1.0 |
4kB |
12/03/21 06:35 AM |
![]() |
Comment Options |
tesoplayer |
View Public Profile |
Send a private message to tesoplayer |
Find More Posts by tesoplayer |
Add tesoplayer to Your Buddy List |
![]() |
|
Forum posts: 9
File comments: 230
Uploads: 0
|
Did this ever get updated? I like the idea.
|
![]() |
![]() |
Akopian Atrebates |
View Public Profile |
Send a private message to Akopian Atrebates |
Find More Posts by Akopian Atrebates |
Add Akopian Atrebates to Your Buddy List |
![]() |
|
|
To keep it more readable here are some other hints to your addon code:
Instead of overwriting the handlers (pelase don't) just use ZO_PostHookHandler or ZO_PreHookHandler. ZOs provides the hooks so that we do not need to overwrite code, especially in invetory there might else occur error messages like "called from insecure code" as your manually overwritten functions and handlers taint the original inventory code -> and make it "insecure" (in ZOs words). So instead of: Code:
local onShowPlayerInventory = ZO_PlayerInventory:GetHandler("OnShow") ZO_PlayerInventory:SetHandler("OnShow", function(...) HideInventoryClutter_ConsumablesButton:SetHidden(false) HideInventoryClutter_LockedButton:SetHidden(false) if onShowPlayerInventory then onShowPlayerInventory(...) end end) local onHidePlayerInventory = ZO_PlayerInventory:GetHandler("OnHide") ZO_PlayerInventory:SetHandler("OnHide", function(...) if not (self.bankOpen or self.storeOpen) then HideInventoryClutter_ConsumablesButton:SetHidden(true) HideInventoryClutter_LockedButton:SetHidden(true) end if onHidePlayerInventory then onHidePlayerInventory(...) end end) Lua Code:
You might even just "add" another handler without hooking anything, in some circumstances (e.g. 2 addons that add handlers somewhere). ZOs added way to e.g. add handlers and then call them after existing ones, if the exisitng ones got a unique name to reference to: https://wiki.esoui.com/SetHandler Unfortunately most ZOs handlers do not provide a standard name like "ZO_PlayerInventoryShow" or similar one coudl use to add to ![]()
Last edited by Baertram : 12/03/21 at 09:08 AM.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |