View Single Post
10/02/14, 07:21 PM   #5
katkat42
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 155
Originally Posted by Sasky View Post
As such, you'd need to hook into the callback creation of the dataControl and make sure that for each object created, your structure is there. researchAssistant does this with:
Lua Code:
  1. local hookedFunctions = DECONSTRUCTION.dataTypes[1].setupCallback
  2. DECONSTRUCTION.dataTypes[1].setupCallback = function(rowControl, slot)
  3.     hookedFunctions(rowControl, slot)
  4.     AddResearchIndicatorToSlot(rowControl)
  5. end
(which is essentially doing ZO_PreHook on the setupCallback).
Except that this is actually a post-hook, since the new function gets run after the original, not before. (I suspect that if you pre-hooked the setupCallback, your data would immediately get clobbered, like it is now.)
  Reply With Quote