TrinityCore
Loading...
Searching...
No Matches
boss_rajaxx.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 "ruins_of_ahnqiraj.h"
19#include "ScriptedCreature.h"
20#include "ScriptMgr.h"
21#include "SpellScript.h"
22
24{
25 // The time of our retribution is at hand! Let darkness reign in the hearts of our enemies! Sound: 8645 Emote: 35
26 SAY_ANDOROV_INTRO = 0, // Before for the first wave
27 SAY_ANDOROV_ATTACK = 1, // Beginning the event
28
41 SAY_COMPLETE_QUEST = 12 // Yell when realm complete quest 8743 for world event
42 // Warriors, Captains, continue the fight! Sound: 8640
43};
44
46{
49 SPELL_THUNDERCRASH = 25599
50};
51
53{
54 EVENT_DISARM = 1, // 03:58:27, 03:58:49
55 EVENT_THUNDERCRASH = 2, // 03:58:29, 03:58:50
57};
58
60{
61 public:
62 boss_rajaxx() : CreatureScript("boss_rajaxx") { }
63
64 struct boss_rajaxxAI : public BossAI
65 {
66 boss_rajaxxAI(Creature* creature) : BossAI(creature, DATA_RAJAXX)
67 {
68 Initialize();
69 }
70
72 {
73 enraged = false;
74 }
75
76 void Reset() override
77 {
78 _Reset();
79 Initialize();
82 }
83
84 void UpdateAI(uint32 diff) override
85 {
86 if (!UpdateVictim())
87 return;
88
89 events.Update(diff);
90
92 return;
93
94 while (uint32 eventId = events.ExecuteEvent())
95 {
96 switch (eventId)
97 {
98 case EVENT_DISARM:
101 break;
105 break;
106 default:
107 break;
108 }
109
111 return;
112 }
113 }
114 private:
116 };
117
118 CreatureAI* GetAI(Creature* creature) const override
119 {
120 return GetAQ20AI<boss_rajaxxAI>(creature);
121 }
122};
123
124// 25599 - Thundercrash
126{
127 static void HandleDamageCalc(SpellScript const&, SpellEffectInfo const& /*spellEffectInfo*/, Unit const* victim, int32& damage, int32& /*flatMod*/, float& /*pctMod*/)
128 {
129 damage = victim->CountPctFromCurHealth(50);
130 }
131
136};
137
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
Spells
Definition PlayerAI.cpp:32
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
#define SpellCalcDamageFn(F)
@ UNIT_STATE_CASTING
Definition Unit.h:276
@ SAY_DEATH
@ SAY_UNK3
@ SAY_UNK1
@ SAY_WAVE3
@ SAY_WAVE6
@ SAY_WAVE5
@ SAY_ANDOROV_ATTACK
@ SAY_KILLS_ANDOROV
@ SAY_ANDOROV_INTRO
@ SAY_UNK2
@ SAY_CHANGEAGGRO
@ SAY_COMPLETE_QUEST
@ SAY_WAVE4
@ SAY_INTRO
@ SAY_WAVE7
@ SPELL_FRENZY
@ SPELL_THUNDERCRASH
@ SPELL_DISARM
void AddSC_boss_rajaxx()
@ EVENT_DISARM
@ EVENT_THUNDERCRASH
@ EVENT_CHANGE_AGGRO
Yells
EventMap events
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
uint32 ExecuteEvent()
Definition EventMap.cpp:77
void Update(uint32 time)
Definition EventMap.h:61
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
HookList< DamageAndHealingCalcHandler > CalcDamage
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
uint64 CountPctFromCurHealth(float pct) const
Definition Unit.h:798
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
CreatureAI * GetAI(Creature *creature) const override
static void HandleDamageCalc(SpellScript const &, SpellEffectInfo const &, Unit const *victim, int32 &damage, int32 &, float &)
@ DATA_RAJAXX
boss_rajaxxAI(Creature *creature)
void UpdateAI(uint32 diff) override