TrinityCore
boss_houndmaster_loksey.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 "scarlet_monastery.h"
19#include "ScriptedCreature.h"
20#include "ScriptMgr.h"
21
23{
25};
26
28{
30 SPELL_BLOODLUST = 6742
31};
32
34{
36};
37
39{
41
42 void JustEngagedWith(Unit* who) override
43 {
48 }
49
50 void ExecuteEvent(uint32 eventId) override
51 {
52 switch (eventId)
53 {
54 case EVENT_BLOODLUST:
55 if (me->HealthBelowPct(60))
56 {
58 events.Repeat(60s);
59 }
60 else
61 events.Repeat(1s);
62 break;
63 default:
64 break;
65 }
66 }
67};
68
70{
72}
uint32_t uint32
Definition: Define.h:142
void AddSC_boss_houndmaster_loksey()
@ SPELL_SUMMON_SCARLET_HOUND
void JustEngagedWith(Unit *who) override
EventMap events
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
Creature *const me
Definition: CreatureAI.h:61
void Repeat(Milliseconds time)
Definition: EventMap.cpp:63
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:159
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:780
@ DATA_HOUNDMASTER_LOKSEY
#define RegisterScarletMonasteryCreatureAI(ai)
void JustEngagedWith(Unit *who) override
boss_houndmaster_loksey(Creature *creature)
void ExecuteEvent(uint32 eventId) override