TrinityCore
Loading...
Searching...
No Matches
boss_nexus_commanders.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 "nexus.h"
20#include "ScriptedCreature.h"
21
30
32{
35 SAY_DEATH = 2
36};
37
44
46{
48
60
61 void ExecuteEvent(uint32 eventId) override
62 {
63 switch (eventId)
64 {
66 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
67 DoCast(target, SPELL_CHARGE);
69 break;
70 case EVENT_WHIRLWIND:
73 break;
77 break;
78 default:
79 break;
80 }
81 }
82
83 void JustDied(Unit* /*killer*/) override
84 {
85 _JustDied();
87 }
88
89 void KilledUnit(Unit* who) override
90 {
91 if (who->GetTypeId() == TYPEID_PLAYER)
93 }
94};
95
uint32_t uint32
Definition Define.h:154
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
Spells
Definition PlayerAI.cpp:32
@ SPELL_BATTLE_SHOUT
@ SPELL_FROZEN_PRISON
@ SPELL_FRIGHTENING_SHOUT
void AddSC_boss_nexus_commanders()
@ EVENT_CHARGE_COMMANDER
@ EVENT_FRIGHTENING_SHOUT
Yells
TypeID GetTypeId() const
Definition BaseEntity.h:166
void JustEngagedWith(Unit *who) override
EventMap events
Creature *const me
Definition CreatureAI.h:63
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
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 DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:162
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3974
@ DATA_COMMANDER
Definition nexus.h:30
#define RegisterNexusCreatureAI(ai_name)
Definition nexus.h:74
void JustDied(Unit *) override
void ExecuteEvent(uint32 eventId) override
void KilledUnit(Unit *who) override
void JustEngagedWith(Unit *who) override
boss_nexus_commanders(Creature *creature)