TrinityCore
boss_kirtonos_the_herald.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 "GameObject.h"
20#include "GameObjectAI.h"
21#include "InstanceScript.h"
22#include "MotionMaster.h"
23#include "ObjectAccessor.h"
24#include "Player.h"
25#include "scholomance.h"
26#include "ScriptedCreature.h"
27
28enum Says
29{
31};
32
34{
35 SPELL_SWOOP = 18144,
43};
44
46{
61};
62
63enum Misc
64{
67 KIRTONOS_PATH = 840488
68};
69
70Position const PosMove[2] =
71{
72 { 299.4884f, 92.76137f, 105.6335f, 0.0f },
73 { 314.8673f, 90.30210f, 101.6459f, 0.0f }
74};
75
77{
78 public: boss_kirtonos_the_herald() : CreatureScript("boss_kirtonos_the_herald") { }
79
81 {
83
84 void Reset() override
85 {
86 _Reset();
87 }
88
89 void JustEngagedWith(Unit* who) override
90 {
100 }
101
102 void JustDied(Unit* /*killer*/) override
103 {
105 gate->SetGoState(GO_STATE_ACTIVE);
107 {
108 brazier->ResetDoorOrButton();
109 brazier->SetGoState(GO_STATE_READY);
110 }
111 _JustDied();
112 }
113
114 void EnterEvadeMode(EvadeReason /*why*/) override
115 {
117 gate->SetGoState(GO_STATE_ACTIVE);
119 {
120 brazier->ResetDoorOrButton();
121 brazier->SetGoState(GO_STATE_READY);
122 }
124 }
125
126 void IsSummonedBy(WorldObject* /*summoner*/) override
127 {
129 me->SetDisableGravity(true);
132 me->SetUninteractible(true);
134 }
135
136 void JustSummoned(Creature* summon) override
137 {
138 BossAI::JustSummoned(summon);
139 }
140
141 void MovementInform(uint32 type, uint32 id) override
142 {
143 if (type == WAYPOINT_MOTION_TYPE && id == POINT_KIRTONOS_LAND)
145 }
146
147 void UpdateAI(uint32 diff) override
148 {
149 events.Update(diff);
150
151 if (!UpdateVictim())
152 {
153 while (uint32 eventId = events.ExecuteEvent())
154 {
155 switch (eventId)
156 {
157 case INTRO_1:
159 break;
160 case INTRO_2:
163 break;
164 case INTRO_3:
166 gate->SetGoState(GO_STATE_READY);
167 me->SetFacingTo(0.01745329f);
169 break;
170 case INTRO_4:
172 brazier->SetGoState(GO_STATE_READY);
173 me->SetWalk(true);
174 me->SetDisableGravity(false);
176 me->SetCanFly(false);
178 break;
179 case INTRO_5:
182 me->SetUninteractible(false);
186 break;
187 case INTRO_6:
189 break;
190 default:
191 break;
192 }
193 }
194
195 return;
196 }
197
199 return;
200
201 while (uint32 eventId = events.ExecuteEvent())
202 {
203 switch (eventId)
204 {
205 case EVENT_SWOOP:
208 break;
209 case EVENT_WING_FLAP:
212 break;
216 break;
217 case EVENT_DISARM:
220 break;
224 break;
228 break;
232 break;
235 {
237 me->SetVirtualItem(0, uint32(0));
238 me->SetCanFly(false);
239 }
240 else
241 {
244 me->SetCanFly(true);
245 }
247 break;
248 default:
249 break;
250 }
251
253 return;
254 }
255 }
256 };
257
258 CreatureAI* GetAI(Creature* creature) const override
259 {
260 return GetScholomanceAI<boss_kirtonos_the_heraldAI>(creature);
261 }
262};
263
264/*######
265## go_brazier_of_the_herald
266######*/
267
269{
271 SOUND_SCREECH = 557
273
275{
276 { 315.028f, 70.53845f, 102.1496f, 0.3859715f }
277};
278
280{
281 public:
282 go_brazier_of_the_herald() : GameObjectScript("go_brazier_of_the_herald") { }
283
285 {
287
288 bool OnGossipHello(Player* player) override
289 {
293 return true;
294 }
295 };
296
297 GameObjectAI* GetAI(GameObject* go) const override
298 {
299 return GetScholomanceAI<go_brazier_of_the_heraldAI>(go);
300 }
301};
302
304{
307}
uint32_t uint32
Definition: Define.h:142
@ WAYPOINT_MOTION_TYPE
@ TEMPSUMMON_DEAD_DESPAWN
Definition: ObjectDefines.h:69
Spells
Definition: PlayerAI.cpp:32
@ EMOTE_ONESHOT_ROAR
@ GO_STATE_READY
@ GO_STATE_ACTIVE
EvadeReason
Definition: UnitAICommon.h:30
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:145
@ UNIT_STATE_CASTING
Definition: Unit.h:270
Says
Position const PosSummon[1]
@ WEAPON_KIRTONOS_STAFF
@ SPELL_CURSE_OF_TONGUES
@ SPELL_KIRTONOS_TRANSFORM
Position const PosMove[2]
void AddSC_boss_kirtonos_the_herald()
@ EVENT_CURSE_OF_TONGUES
@ EVENT_KIRTONOS_TRANSFORM
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void JustSummoned(Creature *summon) 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
void SetReactState(ReactStates st)
Definition: Creature.h:160
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
GameObject *const me
Definition: GameObjectAI.h:50
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
virtual ObjectGuid GetGuidData(uint32 type) const override
void MovePath(uint32 pathId, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, bool generatePath=true)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void SetVirtualItem(uint32 slot, uint32 itemId, uint16 appearanceModId=0, uint16 itemVisual=0)
Definition: Unit.cpp:13604
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3685
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition: Unit.cpp:12725
void SetUninteractible(bool apply)
Definition: Unit.cpp:8147
bool SetCanFly(bool enable)
Definition: Unit.cpp:12820
bool SetWalk(bool enable)
Definition: Unit.cpp:12707
void SetFacingTo(float const ori, bool force=true)
Definition: Unit.cpp:12653
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition: Unit.cpp:1598
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:833
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:834
void PlayDirectSound(uint32 soundId, Player const *target=nullptr, uint32 broadcastTextId=0) const
Definition: Object.cpp:3592
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
CreatureAI * GetAI(Creature *creature) const override
GameObjectAI * GetAI(GameObject *go) const override
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
@ DATA_KIRTONOS
Definition: scholomance.h:35
@ GO_GATE_KIRTONOS
Definition: scholomance.h:55
@ GO_BRAZIER_OF_THE_HERALD
Definition: scholomance.h:63