TrinityCore
boss_horAI.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 "boss_horAI.h"
19#include "halls_of_reflection.h"
20#include "InstanceScript.h"
21
22boss_horAI::boss_horAI(Creature* creature, uint32 bossId) : BossAI(creature, bossId)
23{
24}
25
27{
28 _Reset();
29 me->SetVisible(false);
30 me->SetImmuneToAll(true);
33 instance->ProcessEvent(nullptr, EVENT_DO_WIPE, nullptr);
34}
35
37{
38 switch (actionId)
39 {
40 case ACTION_ENTER_COMBAT: // called by InstanceScript when boss shall enter in combat.
41 me->SetImmuneToAll(false);
44 break;
45 default:
46 break;
47 }
48}
49
51{
52 summons.Summon(summon);
53}
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
@ NOT_STARTED
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
InstanceScript *const instance
SummonList summons
void DoZoneInCombat()
Definition: CreatureAI.h:161
Creature *const me
Definition: CreatureAI.h:61
void SetReactState(ReactStates st)
Definition: Creature.h:160
void SetImmuneToAll(bool apply) override
Definition: Creature.h:167
void Summon(Creature const *summon)
void SetVisible(bool x)
Definition: Unit.cpp:8351
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:91
virtual void ProcessEvent(WorldObject *, uint32, WorldObject *)
Definition: ZoneScript.h:95
@ DATA_WAVE_COUNT
@ EVENT_DO_WIPE
@ ACTION_ENTER_COMBAT
void Reset() override
Definition: boss_horAI.cpp:26
void DoAction(int32 actionId) override
Definition: boss_horAI.cpp:36
void JustSummoned(Creature *summon) override
Definition: boss_horAI.cpp:50
boss_horAI(Creature *creature, uint32 bossId)
Definition: boss_horAI.cpp:22