Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ function internal:buildBroadcastFunc(hooksField, argsFunc)
end

for i, extObj in ipairs(modApiExt_internal.extObjects) do
if extObj[hooksField] then
-- Only process hooks that are directly on this extObj, not inherited via metatable
-- This prevents proxies from accidentally firing hooks they don't actually support
if rawget(extObj, hooksField) then
for j, hook in ipairs(extObj[hooksField]) do
-- invoke the hook in a xpcall, since errors in SkillEffect
-- scripts fail silently, making debugging a nightmare.
Expand Down