TrinityCore
Loading...
Searching...
No Matches
boss_vancleef.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 "deadmines.h"
20#include "ScriptedCreature.h"
21
28
30{
31 SAY_AGGRO = 0, // None may challenge the Brotherhood!
32 SAY_ONE = 1, // Lapdogs, all of you!
33 SAY_SUMMON = 2, // calls more of his allies out of the shadows.
34 SAY_TWO = 3, // Fools! Our cause is righteous!
35 SAY_KILL = 4, // And stay down!
36 SAY_THREE = 5 // The Brotherhood shall prevail!
37};
38
39// TDB coords
41{
42 { -78.2791f, -824.784f, 40.0007f, 2.93215f },
43 { -77.8071f, -815.097f, 40.0188f, 3.26377f }
44};
45
46struct boss_vancleef : public BossAI
47{
48 public:
49 boss_vancleef(Creature* creature) : BossAI(creature, BOSS_VANCLEEF), _guardsCalled(false), _health25(false), _health33(false), _health66(false) { }
50
51 void Reset() override
52 {
54
55 _guardsCalled = false;
56 _health25 = false;
57 _health33 = false;
58 _health66 = false;
59
62
64 }
65
66 void JustEngagedWith(Unit* victim) override
67 {
70
72 }
73
74 void KilledUnit(Unit* victim) override
75 {
76 if (victim->GetTypeId() == TYPEID_PLAYER)
78 }
79
80 void EnterEvadeMode(EvadeReason /*why*/) override
81 {
84 }
85
87 {
88 for (Position BlackguardPosition : BlackguardPositions)
90 }
91
92 void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
93 {
94 if (!_guardsCalled && HealthBelowPct(50))
95 {
98 _guardsCalled = true;
99 }
100
101 if (!_health25 && HealthBelowPct(25))
102 {
104 _health25 = true;
105 }
106 else if (!_health33 && HealthBelowPct(33))
107 {
108 Talk(SAY_TWO);
109 _health33 = true;
110 }
111 else if (!_health66 && HealthBelowPct(66))
112 {
113 Talk(SAY_ONE);
114 _health66 = true;
115 }
116 }
117
118 private:
123};
124
uint32_t uint32
Definition Define.h:133
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
DamageEffectType
Definition Unit.h:352
@ SAY_ONE
@ SAY_TWO
@ SAY_AGGRO
@ SAY_KILL
@ SAY_SUMMON
@ SAY_THREE
void AddSC_boss_vancleef()
VanCleefData
@ SPELL_DUAL_WIELD
@ SPELL_THRASH
@ SPELL_VANCLEEFS_ALLIES
Position const BlackguardPositions[]
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
SummonList summons
void Reset() override
Creature * DoSummon(uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
TypeID GetTypeId() const
Definition Object.h:93
void DoZoneInCombat(uint32 entry=0)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
Definition Unit.h:769
@ NPC_BLACKGUARD
Definition deadmines.h:78
@ BOSS_VANCLEEF
Definition deadmines.h:46
#define RegisterDeadminesCreatureAI(ai_name)
Definition deadmines.h:93
bool HealthBelowPct(uint32 pct) const
void EnterEvadeMode(EvadeReason) override
void KilledUnit(Unit *victim) override
boss_vancleef(Creature *creature)
void SummonBlackguards()
void DamageTaken(Unit *, uint32 &, DamageEffectType, SpellInfo const *) override
void Reset() override
void JustEngagedWith(Unit *victim) override