TrinityCore
Loading...
Searching...
No Matches
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
44
62
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
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
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
uint32_t uint32
Definition Define.h:154
@ WAYPOINT_MOTION_TYPE
@ TEMPSUMMON_DEAD_DESPAWN
Spells
Definition PlayerAI.cpp:32
@ EMOTE_ONESHOT_ROAR
@ GO_STATE_READY
@ GO_STATE_ACTIVE
EvadeReason
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_STATE_CASTING
Definition Unit.h:276
Position const PosSummon[1]
@ SPELL_KIRTONOS_TRANSFORM
Position const PosMove[2]
void AddSC_boss_kirtonos_the_herald()
@ EVENT_KIRTONOS_TRANSFORM
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void JustSummoned(Creature *summon) override
EventMap events
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void SetReactState(ReactStates st)
Definition Creature.h:174
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
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
GameObject *const me
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
virtual ObjectGuid GetGuidData(uint32 type) const override
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
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={}, Optional< bool > exactSplinePath={}, bool generatePath=true, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
void SetVirtualItem(uint32 slot, uint32 itemId, uint16 appearanceModId=0, uint16 itemVisual=0)
Definition Unit.cpp:14374
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3828
MotionMaster * GetMotionMaster()
Definition Unit.h:1723
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13361
void SetUninteractible(bool apply)
Definition Unit.cpp:8564
bool SetCanFly(bool enable)
Definition Unit.cpp:13459
bool SetWalk(bool enable)
Definition Unit.cpp:13343
void SetFacingTo(float const ori, bool force=true)
Definition Unit.cpp:13289
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4804
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition Unit.cpp:1657
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:846
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:847
void PlayDirectSound(uint32 soundId, Player const *target=nullptr, uint32 broadcastTextId=0) const
Definition Object.cpp:2938
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:1398
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