Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_celebras_the_cursed.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6/* ScriptData
7SDName: Boss_Celebras_the_Cursed
8SD%Complete: 100
9SDComment:
10SDCategory: Maraudon
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15
22
24{
25public:
26 celebras_the_cursed() : CreatureScript("boss_celebras_the_cursed") { }
27
29 {
30 return new celebras_the_cursedAI(creature);
31 }
32
34 {
35 celebras_the_cursedAI(Creature* creature) : ScriptedAI(creature) { }
36
40
42 {
43 WrathTimer = 8000;
45 CorruptForcesTimer = 30000;
46 }
47
48 void EnterCombat(Unit* /*who*/) OVERRIDE { }
49
50 void JustDied(Unit* /*killer*/) OVERRIDE
51 {
52 me->SummonCreature(13716, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TempSummonType::TEMPSUMMON_TIMED_DESPAWN, 600000);
53 }
54
56 {
57 if (!UpdateVictim())
58 return;
59
60 //Wrath
61 if (WrathTimer <= diff)
62 {
63 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
64 DoCast(target, SPELL_WRATH);
65 WrathTimer = 8000;
66 }
67 else WrathTimer -= diff;
68
69 //EntanglingRoots
70 if (EntanglingRootsTimer <= diff)
71 {
74 }
75 else EntanglingRootsTimer -= diff;
76
77 //CorruptForces
78 if (CorruptForcesTimer <= diff)
79 {
80 me->InterruptNonMeleeSpells(false);
82 CorruptForcesTimer = 20000;
83 }
84 else CorruptForcesTimer -= diff;
85
87 }
88 };
89};
90
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:70
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
void AddSC_boss_celebras_the_cursed()
@ SPELL_WRATH
Definition chapter5.cpp:195
bool UpdateVictim()
CreatureScript(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition UnitAI.cpp:66
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================