Skip to content
Snippets Groups Projects
Commit cf720eb5 authored by DarkGod's avatar DarkGod
Browse files

New hook "Zone:create" for when a zone.lua file is loaded

parent c2da4d0f
No related branches found
No related tags found
No related merge requests found
......@@ -749,11 +749,13 @@ function _M:load(dynamic)
for k, e in pairs(data) do self[k] = e end
self:onLoadZoneFile(self:getBaseName())
self:triggerHook{"Zone:create", dynamic=dynamic}
if self.on_loaded then self:on_loaded() end
elseif not data and dynamic then
data = dynamic
ret = false
for k, e in pairs(data) do self[k] = e end
self:triggerHook{"Zone:create", dynamic=dynamic}
if self.on_loaded then self:on_loaded() end
else
for k, e in pairs(data) do self[k] = e end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment