Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_hexlord.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#include "ScriptMgr.h"
7#include "ScriptedCreature.h"
8#include "SpellScript.h"
9#include "SpellAuraEffects.h"
10#include "zulaman.h"
11
21
27
29{
30};
31
33{
34 public:
35
36 boss_hexlord_malacrass() : CreatureScript("boss_hexlord_malacrass") { }
37
39 {
41
43 {
44 _Reset();
45 }
46
47 void EnterCombat(Unit* /*who*/) OVERRIDE
48 {
51 }
52
53 void JustDied(Unit* /*killer*/) OVERRIDE
54 {
56 _JustDied();
57 }
58
59 void KilledUnit(Unit* victim) OVERRIDE
60 {
61 if (victim->GetTypeId() == TYPEID_PLAYER)
63 }
64
66 {
67 if (!UpdateVictim())
68 return;
69
70 events.Update(diff);
71
72 if (me->HasUnitState(UNIT_STATE_CASTING))
73 return;
74 /*
75 while (uint32 eventId = events.ExecuteEvent())
76 {
77 switch (eventId)
78 {
79 default:
80 break;
81 }
82 }
83 */
84
86 }
87 };
88
90 {
92 }
93};
94
96{
97 public:
98 spell_hexlord_unstable_affliction() : SpellScriptLoader("spell_hexlord_unstable_affliction") { }
99
101 {
103
104 bool Validate(SpellInfo const* /*spell*/) OVERRIDE
105 {
106 if (!sSpellMgr->GetSpellInfo(SPELL_WL_UNSTABLE_AFFL_DISPEL))
107 return false;
108 return true;
109 }
110
111 void HandleDispel(DispelInfo* dispelInfo)
112 {
113 if (Unit* caster = GetCaster())
114 caster->CastSpell(dispelInfo->GetDispeller(), SPELL_WL_UNSTABLE_AFFL_DISPEL, true, NULL, GetEffect(EFFECT_0));
115 }
116
121 };
122
127};
128
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
static constexpr TypeID TYPEID_PLAYER
@ EFFECT_0
#define sSpellMgr
Definition SpellMgr.h:744
#define AuraDispelFn(F)
@ UNIT_STATE_CASTING
Definition Unit.h:527
@ SAY_PLAYER_KILL
#define SAY_DEATH
#define SAY_AGGRO
@ 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
EventMap events
BossAI(Creature *creature, uint32 bossId)
void _EnterCombat()
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
CreatureScript(const char *name)
Unit * GetDispeller() const
Definition Unit.h:840
SpellScriptLoader(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
AuraScript * GetAuraScript() const OVERRIDE
Creature * me
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
CreatureAI * GetZulAmanAI(Creature *creature)
Definition zulaman.h:69
@ DATA_HEXLORD
Definition zulaman.h:19