forked from ornfelt/azerothcore_lua_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlightedZombie2.lua
More file actions
26 lines (20 loc) · 797 Bytes
/
BlightedZombie2.lua
File metadata and controls
26 lines (20 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local BlightedZombie = {}
function BlightedZombie.OnCombat(event, creature, target)
creature:RegisterEvent(BlightedZombie.Ability1, 7000, 0)
creature:RegisterEvent(BlightedZombie.Ability2, 12000, 0)
end
function BlightedZombie.Ability1(event, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 52476, true)
end
function BlightedZombie.Ability2(event, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 37597, true)
end
function BlightedZombie.OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
function BlightedZombie.OnDeath(event, creature, killer)
creature:RemoveEvents()
end
RegisterCreatureEvent(4475, 1, BlightedZombie.OnCombat)
RegisterCreatureEvent(4475, 2, BlightedZombie.OnLeaveCombat)
RegisterCreatureEvent(4475, 4, BlightedZombie.OnDeath)