TrinityCore
boss_celebras_the_cursed.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/* ScriptData
19SDName: Boss_Celebras_the_Cursed
20SD%Complete: 100
21SDComment:
22SDCategory: Maraudon
23EndScriptData */
24
25#include "ScriptMgr.h"
26#include "maraudon.h"
27#include "ScriptedCreature.h"
28
30{
31 SPELL_WRATH = 21807,
34};
35
37{
38public:
39 celebras_the_cursed() : CreatureScript("celebras_the_cursed") { }
40
41 CreatureAI* GetAI(Creature* creature) const override
42 {
43 return GetMaraudonAI<celebras_the_cursedAI>(creature);
44 }
45
47 {
49 {
50 Initialize();
51 }
52
54 {
55 WrathTimer = 8000;
57 CorruptForcesTimer = 30000;
58 }
59
63
64 void Reset() override
65 {
67
68 Initialize();
69 }
70
71 void JustDied(Unit* killer) override
72 {
73 BossAI::JustDied(killer);
74
76 }
77
78 void UpdateAI(uint32 diff) override
79 {
80 if (!UpdateVictim())
81 return;
82
83 //Wrath
84 if (WrathTimer <= diff)
85 {
87 DoCast(target, SPELL_WRATH);
88 WrathTimer = 8000;
89 }
90 else WrathTimer -= diff;
91
92 //EntanglingRoots
93 if (EntanglingRootsTimer <= diff)
94 {
97 }
98 else EntanglingRootsTimer -= diff;
99
100 //CorruptForces
101 if (CorruptForcesTimer <= diff)
102 {
105 CorruptForcesTimer = 20000;
106 }
107 else CorruptForcesTimer -= diff;
108 }
109 };
110};
111
113{
115}
uint32_t uint32
Definition: Define.h:142
@ TEMPSUMMON_TIMED_DESPAWN
Definition: ObjectDefines.h:65
Spells
Definition: PlayerAI.cpp:32
@ SPELL_CORRUPT_FORCES
@ SPELL_ENTANGLINGROOTS
void AddSC_boss_celebras_the_cursed()
void JustDied(Unit *) override
void Reset() override
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:79
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:3089
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
CreatureAI * GetAI(Creature *creature) const override
@ BOSS_CELEBRAS_THE_CURSED
Definition: maraudon.h:31
constexpr float GetPositionX() const
Definition: Position.h:76
constexpr float GetPositionY() const
Definition: Position.h:77
constexpr float GetPositionZ() const
Definition: Position.h:78