Thread Tools Display Modes
Prev Previous Post   Next Post Next
03/30/17, 10:04 PM   #11
Sounomi
Join Date: Oct 2014
Posts: 40
Here's an example of scene calling causing taint.

Basically I've wanted to modify the fence window and the most logical point for doing so was when it was first opened. But simply redoing the function that handles that causes the inventory fragment to get tainted. I tried everything I could to get around and I don't see what I'm doing wrong. Ultimately I created a simple test add-on which just straight out copies the original code and it still causes the taint.

Code:
local function OnOpened(fence, enableSell, enableLaunder)
    if not IsInGamepadPreferredMode() then
        fence:InitializeModeBar(enableSell, enableLaunder)
        fence.mode = enableSell and ZO_MODE_STORE_SELL_STOLEN or ZO_MODE_STORE_LAUNDER
        SCENE_MANAGER:Show("fence_keyboard")
    end
end

local function OnAddOnLoaded(code, name)
    ZO_PreHook(FENCE_KEYBOARD, "OnOpened", function(...) OnOpened(...); return true end)
end

EVENT_MANAGER:RegisterForEvent("FenceTest", EVENT_ADD_ON_LOADED, OnAddOnLoaded)
I did wind up finding another way to accomplish what I wanted to do but I still worry that whatever's triggering the taint will be a problem for others. For instance, the Awesome Guild Store add-on currently is causing inventory fragment taint as well and it could be due to a similar reason as the above code causes it.


Originally Posted by Rhyono View Post
I at least didn't see it mentioned: how did this change with Homestead for it to suddenly become so prevalent?
My guess is that they tightened up add-on security a bit more as a result to exploits that were mentioned to be used.
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » @ZOS: Improve "Access a private function" error message


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