TrinityCore
Loading...
Searching...
No Matches
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#include "ScriptMgr.h"
19#include "maraudon.h"
20#include "ScriptedCreature.h"
21
28
33
34// 12225 - Celebras the Cursed
36{
38
39 void JustEngagedWith(Unit* who) override
40 {
42
44 .Schedule(0s, 6s, [this](TaskContext& task)
45 {
47 task.Repeat(4s, 8s);
48 })
49 .Schedule(0s, 5s, [this](TaskContext& task)
50 {
52 task.Repeat(20s);
53 })
54 .Schedule(30s, [this](TaskContext& task)
55 {
57 task.Repeat(20s);
58 });
59 }
60
67
68 void UpdateAI(uint32 diff) override
69 {
70 if (!UpdateVictim())
71 return;
72
73 scheduler.Update(diff);
74 }
75};
76
uint32_t uint32
Definition Define.h:154
@ TEMPSUMMON_MANUAL_DESPAWN
@ NPC_CELEBRAS_THE_REDEEMED
void AddSC_boss_celebras_the_cursed()
void JustEngagedWith(Unit *who) override
void JustDied(Unit *) override
TaskScheduler scheduler
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & Update()
Update the scheduler to the current time.
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:172
Definition Unit.h:647
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:1403
@ BOSS_CELEBRAS_THE_CURSED
Definition maraudon.h:31
#define RegisterMaraudonCreatureAI(ai_name)
Definition maraudon.h:53
constexpr float GetPositionX() const
Definition Position.h:87
constexpr float GetPositionY() const
Definition Position.h:88
constexpr float GetPositionZ() const
Definition Position.h:89
boss_celebras_the_cursed(Creature *creature)
void JustDied(Unit *killer) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *who) override