View Single Post
04/04/22, 12:52 PM   #6
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
That behaviour is to be expected.
The reference to DestroyAllJunk is stored at the time the dialog is defined, so anything you do to that function afterwards (like adding a hook, which essentially replaces DestroyAllJunk) doesn't apply to the callback of the dialog. ZOS would have to change the line
Lua Code:
  1. callback =  DestroyAllJunk,
to
Lua Code:
  1. callback = function() DestroyAllJunk() end,
so it gets the hooked DestroyAllJunk function at the time the callback is run.
Otherwise you have to manually replace the callback after you added the hook like Baertram said.
  Reply With Quote