2023-03-03 16:34:18 -07:00
|
|
|
local BoneSentinel = {};
|
|
|
|
|
|
|
|
|
|
local function CastShadowCleave(eventId, delay, calls, creature)
|
2023-03-06 05:52:04 -07:00
|
|
|
creature:CastSpell(creature:GetVictim(), 38226, true)
|
2023-03-03 16:34:18 -07:00
|
|
|
end
|
|
|
|
|
|
2023-03-06 05:52:04 -07:00
|
|
|
local function CastEarthquake(eventId, delay, calls, creature)
|
|
|
|
|
creature:CastSpell(creature:GetVictim(), 33919, true)
|
2023-03-03 16:34:18 -07:00
|
|
|
end
|
|
|
|
|
|
2023-03-09 03:36:13 -07:00
|
|
|
local function CastSpecialSpell(eventId, delay, calls, creature)
|
|
|
|
|
local victim = creature:GetVictim()
|
|
|
|
|
if not victim then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then
|
|
|
|
|
creature:CastSpell(victim, 5, true)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2023-03-06 05:52:04 -07:00
|
|
|
local function OnEnterCombat(event, creature, target)
|
|
|
|
|
creature:RegisterEvent(CastShadowCleave, 5000, 0)
|
|
|
|
|
creature:RegisterEvent(CastEarthquake, 12000, 0)
|
2023-03-09 03:36:13 -07:00
|
|
|
creature:RegisterEvent(CastSpecialSpell, 1000, 0)
|
2023-03-03 16:34:18 -07:00
|
|
|
end
|
|
|
|
|
|
2023-03-06 05:52:04 -07:00
|
|
|
local function OnLeaveCombat(event, creature)
|
|
|
|
|
creature:RemoveEvents()
|
2023-03-03 16:34:18 -07:00
|
|
|
end
|
|
|
|
|
|
2023-03-06 05:52:04 -07:00
|
|
|
local function OnDied(event, creature, killer)
|
|
|
|
|
creature:RemoveEvents()
|
2023-03-03 16:34:18 -07:00
|
|
|
end
|
|
|
|
|
|
2023-03-06 05:52:04 -07:00
|
|
|
RegisterCreatureEvent(400036, 1, OnEnterCombat)
|
|
|
|
|
RegisterCreatureEvent(400036, 2, OnLeaveCombat)
|
|
|
|
|
RegisterCreatureEvent(400036, 4, OnDied)
|