Originally Posted by semlar
Lua Code:
SetSuperTrackedQuestID(0) hooksecurefunc('SetSuperTrackedQuestID', function(questID) if questID ~= 0 then SetSuperTrackedQuestID(0) end end)
|
Hooking a function then unwittingly calling it from itself is dangerously close to sending Lua into an infinite loop by recursive calling. You can avoid this by storing the old function and calling that directly instead of calling it normally and running your hook again.
Lua Code:
local oldfunc=SetSuperTrackedQuestID;
hooksecurefunc('SetSuperTrackedQuestID', function() oldfunc(0); end);
Note
hooksecurefunc() creates a new function just like any manual hooking method would. The only difference is it bypasses the taint mechanic.