fix: hook ZoneDB.Initialize to apply custom zones before original Initialize
This commit is contained in:
@@ -410,4 +410,14 @@ function _ZoneDB:RunTests()
|
|||||||
Questie:Debug(Questie.DEBUG_CRITICAL, "[" .. Questie:Colorize("ZoneDBTests", "yellow") .. "] Testing ZoneDB done")
|
Questie:Debug(Questie.DEBUG_CRITICAL, "[" .. Questie:Colorize("ZoneDBTests", "yellow") .. "] Testing ZoneDB done")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
do
|
||||||
|
local originalZoneInitialize = ZoneDB.Initialize
|
||||||
|
if type(originalZoneInitialize) == "function" then
|
||||||
|
function ZoneDB:Initialize(...)
|
||||||
|
ZoneDB:ApplyCustomZones()
|
||||||
|
return originalZoneInitialize(self, ...)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return ZoneDB
|
return ZoneDB
|
||||||
|
|||||||
Reference in New Issue
Block a user