TrinityCore
Loading...
Searching...
No Matches
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
33
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
128 };
129
130 AuraScript* GetAuraScript() const override
131 {
133 }
134};
135
uint32_t uint32
Definition Define.h:154
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
Spells
Definition PlayerAI.cpp:32
@ EFFECT_0
#define AuraDispelFn(F)
@ UNIT_STATE_CASTING
Definition Unit.h:276
@ 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
TypeID GetTypeId() const
Definition BaseEntity.h:166
void JustEngagedWith(Unit *who) override
EventMap events
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
WorldObject * GetDispeller() const
Definition Unit.h:396
void Update(uint32 time)
Definition EventMap.h:61
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition Unit.h:635
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
CreatureAI * GetAI(Creature *creature) const override
AuraScript * GetAuraScript() const override
@ DATA_HEXLORD
Definition zulaman.h:34