Files
MetaHunt/api/pets-service-lifecycle.lua
2026-03-23 22:25:10 +01:00

23 lines
771 B
Lua

if not MTH_ST_LifecycleService then
MTH_ST_LifecycleService = {}
end
function MTH_ST_LifecycleService:HandleEvent(evt, eventArg1, eventArg2)
if type(MTH_ST_HandlePlayerEnteringWorld) == "function" and MTH_ST_HandlePlayerEnteringWorld(evt) then
return true, "lifecycle-enter-world"
end
if type(MTH_ST_HandleSpellcastEvent) == "function" and MTH_ST_HandleSpellcastEvent(evt, eventArg1, eventArg2) then
return true, "lifecycle-spellcast"
end
if type(MTH_ST_HandleUnitPetEvent) == "function" and MTH_ST_HandleUnitPetEvent(evt, eventArg1) then
if evt == "UNIT_PET" then
if eventArg1 == "player" then
return true, "lifecycle-unit-pet-player"
end
return true, "lifecycle-unit-pet-other"
end
return true, "lifecycle-unit-pet"
end
return false
end