mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 19:42:19 +00:00
Fix hook signatures to follow runtime hook registrations in ScriptHookController.
This fixes broken unresolved DBC addon hook event types
This commit is contained in:
1 parent
36f7233297
commit
32fd6af04f
5 files changed
+115
-10
No files matched your search
@@ -25,6 +25,7 @@ import noppes.npcs.client.gui.util.IGuiData;
|
||||
import noppes.npcs.client.gui.util.IJTextAreaListener;
|
||||
import noppes.npcs.client.gui.util.ITextChangeListener;
|
||||
import noppes.npcs.client.gui.util.ITextfieldListener;
|
||||
import noppes.npcs.client.gui.util.script.interpreter.js_parser.JSTypeRegistry;
|
||||
import noppes.npcs.constants.ScriptContext;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
@@ -115,6 +116,12 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
// Initialize hooks from handler
|
||||
gui.hookList = new ArrayList<>(handler.getHooks());
|
||||
|
||||
JSTypeRegistry registry = JSTypeRegistry.getInstance();
|
||||
if (!registry.isInitialized()) {
|
||||
registry.initializeFromResources();
|
||||
}
|
||||
registry.syncHooksFromScriptHookControllerIfNeeded();
|
||||
|
||||
// Request data from server
|
||||
if (handler instanceof IScriptHandlerPacket)
|
||||
((IScriptHandlerPacket) handler).requestData();
|
||||
|
||||
Reference in new issue
Block a user