forked from ornfelt/azerothcore_lua_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlliancePriest2.lua
More file actions
31 lines (24 loc) · 850 Bytes
/
AlliancePriest2.lua
File metadata and controls
31 lines (24 loc) · 850 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
27
28
29
30
31
local APriest = {};
local function CastSmite(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 48122, true)
end
local function CastHolyFire(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 48134, true)
end
local function CastSWP(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 27605, true)
end
local function OnEnterCombat(event, creature, target)
creature:RegisterEvent(CastSmite, 2600, 0)
creature:RegisterEvent(CastHolyFire, 5000, 0)
creature:RegisterEvent(CastSWP, 15000, 0)
end
local function OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
local function OnDied(event, creature, killer)
creature:RemoveEvents()
end
RegisterCreatureEvent(400026, 1, OnEnterCombat)
RegisterCreatureEvent(400026, 2, OnLeaveCombat)
RegisterCreatureEvent(400026, 4, OnDied)