TrinityCore
boss_hexlord.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 "ScriptedCreature.h"
20#include "SpellAuraEffects.h"
21#include "SpellScript.h"
22#include "zulaman.h"
23
24enum Says
25{
31 SAY_DEATH = 5
32};
33
35{
38};
39
41{
42};
43
45{
46 public:
47
48 boss_hexlord_malacrass() : CreatureScript("boss_hexlord_malacrass") { }
49
51 {
53
54 void Reset() override
55 {
56 _Reset();
57 }
58
59 void JustEngagedWith(Unit* who) override
60 {
63 }
64
65 void JustDied(Unit* /*killer*/) override
66 {
68 _JustDied();
69 }
70
71 void KilledUnit(Unit* victim) override
72 {
73 if (victim->GetTypeId() == TYPEID_PLAYER)
75 }
76
77 void UpdateAI(uint32 diff) override
78 {
79 if (!UpdateVictim())
80 return;
81
82 events.Update(diff);
83
85 return;
86 /*
87 while (uint32 eventId = events.ExecuteEvent())
88 {
89 switch (eventId)
90 {
91 default:
92 break;
93 }
94 }
95 */
96 }
97 };
98
99 CreatureAI* GetAI(Creature* creature) const override
100 {
101 return GetZulAmanAI<boss_hex_lord_malacrassAI>(creature);
102 }
103};
104
105// 43522 - Unstable Affliction
107{
108 public:
109 spell_hexlord_unstable_affliction() : SpellScriptLoader("spell_hexlord_unstable_affliction") { }
110
112 {
113 bool Validate(SpellInfo const* /*spell*/) override
114 {
116 }
117
118 void HandleDispel(DispelInfo* dispelInfo)
119 {
120 if (Unit* caster = GetCaster())
121 caster->CastSpell(dispelInfo->GetDispeller(), SPELL_WL_UNSTABLE_AFFL_DISPEL, GetEffect(EFFECT_0));
122 }
123
124 void Register() override
125 {
127 }
128 };
129
130 AuraScript* GetAuraScript() const override
131 {
133 }
134};
135
137{
140}
uint32_t uint32
Definition: Define.h:142
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
Spells
Definition: PlayerAI.cpp:32
@ EFFECT_0
Definition: SharedDefines.h:30
#define AuraDispelFn(F)
Definition: SpellScript.h:2018
@ UNIT_STATE_CASTING
Definition: Unit.h:270
Says
@ SAY_DEATH
@ SAY_PLAYER_KILL
@ SAY_AGGRO
@ SAY_PET_DEATH
@ SAY_SIPHON_SOUL
@ SAY_SPIRIT_BOLTS
@ SPELL_WL_UNSTABLE_AFFL_DISPEL
@ SPELL_WL_UNSTABLE_AFFL
void AddSC_boss_hex_lord_malacrass()
Unit * GetCaster() const
AuraEffect * GetEffect(uint8 effIndex) const
HookList< AuraDispelHandler > AfterDispel
Definition: SpellScript.h:2017
void JustEngagedWith(Unit *who) override
EventMap events
void _JustDied()
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
WorldObject * GetDispeller() const
Definition: Unit.h:390
void Update(uint32 time)
Definition: EventMap.h:56
TypeID GetTypeId() const
Definition: Object.h:173
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
Definition: Unit.h:627
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
CreatureAI * GetAI(Creature *creature) const override
AuraScript * GetAuraScript() const override
@ DATA_HEXLORD
Definition: zulaman.h:34