TrinityCore
Loading...
Searching...
No Matches
boss_skadi.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 "GridNotifiers.h"
20#include "InstanceScript.h"
21#include "MotionMaster.h"
22#include "MoveSplineInit.h"
23#include "Player.h"
24#include "ScriptedCreature.h"
25#include "SpellAuras.h"
26#include "SpellScript.h"
27#include "TemporarySummon.h"
28#include "utgarde_pinnacle.h"
29#include "Vehicle.h"
30
64
75
85
94
102
108
117
118float const BreachPoint = 2.670354f;
119float const BreathPointRight = 3.124139f;
120float const BreathPointLeft = 3.228859f;
121Position const SecondaryWavesInitialPoint = { 478.7434f, -505.5758f, 104.7237f };
122Position const SecondaryWavesFinalPoint = { 318.177f, -503.8898f, 104.5326f };
123Position const SpawnLoc = { 477.5808f, -484.5591f, 104.8221f, 4.677482f };
124Position const GraufLoc = { 341.7411f, -516.9545f, 104.6695f, 3.124139f };
126{
127 { 458.5323f, -516.2537f, 104.617f },
128 { 429.4242f, -517.5624f, 104.8936f },
129 { 394.4955f, -514.6144f, 104.7235f },
130 { 362.2862f, -515.8771f, 104.7539f },
131 { 333.5374f, -514.7942f, 104.4779f },
132 { 457.6105f, -508.8362f, 104.4013f },
133 { 427.4026f, -510.7716f, 104.8802f },
134 { 392.5114f, -507.9429f, 104.7433f },
135 { 362.9511f, -508.4115f, 104.7218f },
136 { 333.536f, -506.0805f, 104.4258f },
137 { 478.31f, -511.049f, 104.7242f, 3.263766f },
138 { 482.25f, -514.1273f, 104.7234f, 3.263766f },
139 { 481.3883f, -507.1089f, 104.7241f, 3.263766f },
140};
141
142struct boss_skadi : public BossAI
143{
145 {
146 Initialize();
147 }
148
150 {
151 firstWaveSummoned = false;
152 _harpoonHit = 0;
153 _loveSkadi = 0;
156 {
158 });
159 }
160
171
172 void EnterEvadeMode(EvadeReason /*why*/) override
173 {
176 }
177
178 void JustSummoned(Creature* summon) override
179 {
180 switch (summon->GetEntry())
181 {
187 break;
188 default:
189 break;
190 }
191 summons.Summon(summon);
192 }
193
195 {
196 for (uint8 i = 0; i < FIRST_WAVE_MAX_WARRIORS; i++)
198 summon->GetMotionMaster()->MovePoint(POINT_0, FirstWaveLocations[i]);
199
201 crea->GetMotionMaster()->MovePoint(POINT_0, FirstWaveLocations[10]);
203 crea->GetMotionMaster()->MovePoint(POINT_0, FirstWaveLocations[11]);
205 crea->GetMotionMaster()->MovePoint(POINT_0, FirstWaveLocations[12]);
206
207 firstWaveSummoned = true;
208 }
209
210 void JustDied(Unit* /*killer*/) override
211 {
212 _JustDied();
214 }
215
216 void KilledUnit(Unit* who) override
217 {
218 if (who->GetTypeId() == TYPEID_PLAYER)
219 Talk(SAY_KILL);
220 }
221
222 void DoAction(int32 action) override
223 {
224 switch (action)
225 {
229 me->setActive(true);
234
236 .Schedule(Seconds(6), [this](TaskContext resetCheck)
237 {
238 if (Creature* resetTrigger = me->FindNearestCreature(NPC_TRIGGER_RESET, 200.0f))
239 resetTrigger->CastSpell(resetTrigger, SPELL_UTGARDE_PINNACLE_GUANTLET_RESET_CHECK, true);
240 resetCheck.Repeat();
241 })
242 .Schedule(Seconds(2), [this](TaskContext /*context*/)
243 {
245 DoCast(grauf, SPELL_RIDE_GRAUF);
246 });
247
248 if (Creature* summonTrigger = me->SummonCreature(NPC_WORLD_TRIGGER, SpawnLoc))
249 summonTrigger->CastSpell(summonTrigger, SPELL_SUMMON_GAUNLET_MOBS_PERIODIC, true);
250
251 if (Creature* combatTrigger = me->SummonCreature(NPC_COMBAT_TRIGGER, SpawnLoc))
252 combatTrigger->AI()->DoZoneInCombat();
253 break;
255 if (_loveSkadi == 1)
256 _loveSkadi++;
258 break;
264 me->SetImmuneToPC(false);
267
269 .Schedule(Seconds(8), [this](TaskContext crush)
270 {
272 crush.Repeat();
273 })
274 .Schedule(Seconds(11), [this](TaskContext poisonedSpear)
275 {
278 poisonedSpear.Repeat();
279 })
280 .Schedule(Seconds(23), [this](TaskContext whirlwind)
281 {
283 whirlwind.Repeat();
284 });
285 break;
287 _harpoonHit++;
288 if (_harpoonHit == 1)
289 _loveSkadi = 1;
290 break;
291 }
292 }
293
294 uint32 GetData(uint32 id) const override
295 {
296 if (id == DATA_LOVE_TO_SKADI)
297 return _loveSkadi;
298
299 return 0;
300 }
301
302 void UpdateAI(uint32 diff) override
303 {
304 scheduler.Update(diff);
305
306 if (_phase == PHASE_GROUND)
307 {
308 if (!UpdateVictim())
309 return;
310
312 }
313 }
314
315private:
320};
321
322struct npc_grauf : public ScriptedAI
323{
324 npc_grauf(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
325
326 void Reset() override
327 {
329 me->SetRegenerateHealth(false);
330 me->SetSpeedRate(MOVE_RUN, 2.5f);
331 }
332
333 void JustDied(Unit* /*killer*/) override
334 {
336 skadi->ExitVehicle();
337
339 }
340
341 void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
342 {
343 if (!apply)
344 {
346 skadi->AI()->DoAction(ACTION_GAUNTLET_END);
347 return;
348 }
349
350 std::function<void(Movement::MoveSplineInit&)> initializer = [](Movement::MoveSplineInit& init)
351 {
352 init.DisableTransportPathTransformations();
353 init.MoveTo(0.3320355f, 0.05355075f, 5.196949f, false);
354 };
356
357 me->setActive(true);
358 me->SetFarVisible(true);
359 me->SetCanFly(true);
360 me->SetDisableGravity(true);
361
362 _scheduler.Schedule(Seconds(2), [this](TaskContext /*context*/)
363 {
365 });
366 }
367
368 void MovementInform(uint32 type, uint32 pointId) override
369 {
370 if (type != SPLINE_CHAIN_MOTION_TYPE)
371 return;
372
373 switch (pointId)
374 {
375 case POINT_BREACH:
377 .Schedule(Milliseconds(1), [this](TaskContext /*context*/)
378 {
381 })
382 .Schedule(Seconds(10), [this](TaskContext /*context*/)
383 {
386 else
388 });
389 break;
390 case POINT_LEFT:
392 .Schedule(Milliseconds(1), [this](TaskContext /*context*/)
393 {
396 })
397 .Schedule(Seconds(2), [this](TaskContext /*context*/)
398 {
402 skadi->AI()->DoAction(ACTION_DRAKE_BREATH);
403 })
404 .Schedule(Seconds(10), [this](TaskContext /*context*/)
405 {
407 });
408 break;
409 case POINT_RIGHT:
411 .Schedule(Milliseconds(1), [this](TaskContext /*context*/)
412 {
415 })
416 .Schedule(Seconds(2), [this](TaskContext /*context*/)
417 {
421 skadi->AI()->DoAction(ACTION_DRAKE_BREATH);
422 })
423 .Schedule(Seconds(10), [this](TaskContext /*context*/)
424 {
426 });
427 break;
428 default:
429 break;
430 }
431 }
432
433 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
434 {
435 if (spellInfo->Id == SPELL_LAUNCH_HARPOON)
437 skadi->AI()->DoAction(ACTION_HARPOON_HIT);
438 }
439
440 void UpdateAI(uint32 diff) override
441 {
442 _scheduler.Update(diff);
443 }
444
445private:
448};
449
451{
452 npc_skadi_trashAI(Creature* creature) : ScriptedAI(creature)
453 {
455
457 {
459 });
460 }
461
462 void JustEngagedWith(Unit* who) override
463 {
466 }
467
468 void IsSummonedBy(WorldObject* /*summoner*/) override
469 {
471 skadi->AI()->JustSummoned(me);
472 }
473
474 void MovementInform(uint32 type, uint32 pointId) override
475 {
476 if (type != POINT_MOTION_TYPE)
477 return;
478
479 switch (pointId)
480 {
481 case POINT_0:
483 break;
484 case POINT_1:
485 _scheduler.Schedule(Seconds(1), [this](TaskContext /*context*/)
486 {
488 });
489 break;
490 case POINT_2:
492 break;
493 default:
494 break;
495 }
496 }
497
498 void UpdateAI(uint32 diff) override
499 {
500 UpdateVictim();
501
502 _scheduler.Update(diff, [this]
503 {
505 });
506 }
507
508 virtual void ScheduleTasks() = 0;
509
510protected:
513};
514
516{
518
519 void ScheduleTasks() override
520 {
522 .Schedule(Seconds(2), [this](TaskContext context)
523 {
525 context.Repeat(Seconds(11), Seconds(18));
526 })
527 .Schedule(Seconds(9), [this](TaskContext context)
528 {
530 context.Repeat(Seconds(10), Seconds(13));
531 });
532 }
533};
534
536{
538
539 void ScheduleTasks() override
540 {
542 .Schedule(Seconds(2), [this](TaskContext shadowBolt)
543 {
545 shadowBolt.Repeat();
546 })
547 .Schedule(Seconds(20), Seconds(34), [this](TaskContext shrink)
548 {
550 shrink.Repeat();
551 });
552 }
553};
554
556{
558
559 void ScheduleTasks() override
560 {
562 .Schedule(Seconds(13), [this](TaskContext net)
563 {
564 if (Unit* target = SelectTarget(SelectTargetMethod::MaxDistance, 0, 30, true))
565 DoCast(target, SPELL_NET);
566 net.Repeat();
567 })
568 .Schedule(Seconds(2), [this](TaskContext castThrow)
569 {
571 castThrow.Repeat();
572 });
573 }
574
575 void JustDied(Unit* /*killer*/) override
576 {
578 }
579};
580
581// 47594 - Freezing Cloud
607
608// 47574 - Freezing Cloud
634
635// 47579, 60020 - Freezing Cloud
637{
639
640 bool CanBeAppliedOn(Unit* target)
641 {
642 if (Aura* aur = target->GetAura(GetId()))
643 if (aur->GetOwner() != GetOwner())
644 return false;
645
646 return true;
647 }
648
653};
654
655// 49308 - Utgarde Pinnacle Guantlet Reset Check
657{
659
660 void CountTargets(std::list<WorldObject*>& targets)
661 {
663 _targetCount = targets.size();
664 }
665
666 void HandleDummy(SpellEffIndex /*effIndex*/)
667 {
668 if (_targetCount)
669 return;
670
671 Creature* target = GetHitCreature();
672 if (!target)
673 return;
674
675 if (InstanceScript* instance = target->GetInstanceScript())
676 if (instance->GetBossState(DATA_SKADI_THE_RUTHLESS) == IN_PROGRESS)
678 }
679
685
686private:
688};
689
690// 48642 - Launch Harpoon
692{
694
695 void FilterTargets(std::list<WorldObject*>& targets)
696 {
697 if (targets.size() >= 2)
698 targets.remove_if([](WorldObject* obj) { return obj->GetEntry() != NPC_GRAUF; });
699 }
700
702 {
703 if (Unit* target = GetHitUnit())
704 SetHitDamage(target->CountPctFromMaxHealth(35));
705 }
706
712};
713
714// 50255, 59331 - Poisoned Spear
734
735// 61791 - Ride Vehicle
756
757// 59275 - Summon Gauntlet Mobs Periodic
759{
761
763 {
764 for (uint8 i = 0; i < 2; ++i)
765 {
766 uint32 spellId = SummonSpellsList.front();
767 GetTarget()->CastSpell(nullptr, spellId, true);
768 SummonSpellsList.push_back(spellId);
769 SummonSpellsList.pop_front();
770 }
771 }
773 {
774 for (uint8 j = 0; j < 2; ++j)
775 {
776 SummonSpellsList.push_back(SummonSpellsList.front());
777 SummonSpellsList.pop_front();
778 }
779 }
780
781 void OnPeriodic(AuraEffect const* /*aurEff*/)
782 {
783 if (RAND(0, 1))
784 {
787 }
788 else
789 {
792 }
793 }
794private:
806
811};
812
814{
815 public:
816 achievement_girl_love_to_skadi() : AchievementCriteriaScript("achievement_girl_love_to_skadi") { }
817
818 bool OnCheck(Player* /*player*/, Unit* target) override
819 {
820 if (!target)
821 return false;
822
823 if (Creature* skadi = target->ToCreature())
824 if (skadi->AI()->GetData(DATA_LOVE_TO_SKADI) == 1)
825 return true;
826
827 return false;
828 }
829};
830
832{
833 public:
834 at_skadi_gaunlet() : AreaTriggerScript("at_skadi_gaunlet") { }
835
836 bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
837 {
838 InstanceScript* instance = player->GetInstanceScript();
839 if (!instance || player->IsGameMaster())
840 return true;
841
843 if (Creature* skadi = instance->GetCreature(DATA_SKADI_THE_RUTHLESS))
844 {
845 skadi->AI()->DoAction(ACTION_START_ENCOUNTER);
846 return true;
847 }
848
849 return true;
850 }
851};
852
Actions
@ NPC_WORLD_TRIGGER
First const & RAND(First const &first, Second const &second, Rest const &... rest)
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition DBCEnums.h:122
uint8_t uint8
Definition Define.h:135
int8_t int8
Definition Define.h:131
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:27
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:24
@ IN_PROGRESS
@ NOT_STARTED
@ MOTION_PRIORITY_HIGHEST
@ SPLINE_CHAIN_MOTION_TYPE
@ POINT_MOTION_TYPE
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
Spells
Definition PlayerAI.cpp:32
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ SPELL_EFFECT_APPLY_AURA
@ TARGET_UNIT_CONE_ENTRY
@ TARGET_UNIT_SRC_AREA_ENTRY
@ EMOTE_STATE_READY1H
@ EMOTE_STATE_READY2HL
@ EVENT_VEHICLE_BOARD
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_CONTROL_VEHICLE
@ SPELL_AURA_PERIODIC_DUMMY
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellHitFn(F)
#define AuraCheckAreaTargetFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ MOVE_RUN
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_STATE_ROOT
Definition Unit.h:230
@ UNIT_STATE_CASTING
Definition Unit.h:235
CombatPhase
@ FIRST_WAVE_MAX_WARRIORS
@ ACHIEV_LODI_DODI_WE_LOVES_THE_SKADI
@ FIRST_WAVE_SIZE
@ DATA_LOVE_TO_SKADI
Position const SecondaryWavesInitialPoint
@ ACTION_HARPOON_HIT
@ ACTION_GAUNTLET_END
@ ACTION_START_ENCOUNTER
@ ACTION_DRAKE_BREATH
Position const SecondaryWavesFinalPoint
float const BreathPointRight
@ POINT_0
@ POINT_1
@ POINT_RIGHT
@ POINT_2
@ POINT_BREACH
@ POINT_LEFT
@ SPELL_SUMMON_HARPOON
@ SPELL_SHRINK
@ SPELL_HAMSTRING
@ SPELL_STRIKE
@ SPELL_FREEZING_CLOUD_LEFT_PERIODIC
@ SPELL_SUMMON_YMIRJAR_WARRIOR_E
@ SPELL_SUMMON_YMIRJAR_WARRIOR_W
@ SPELL_SKADI_TELEPORT
@ SPELL_SUMMON_YMIRJAR_HARPOONER_W
@ SPELL_SUMMON_YMIRJAR_HARPOONER_E
@ SPELL_SUMMON_YMIRJAR_WITCH_DOCTOR_E
@ SPELL_FREEZING_CLOUD_RIGHT_AREA
@ SPELL_POISONED_SPEAR_PERIODIC
@ SPELL_POISONED_SPEAR
@ SPELL_SHADOW_BOLT
@ SPELL_LAUNCH_HARPOON
@ SPELL_FREEZING_CLOUD_RIGHT_PERIODIC
@ SPELL_THROW
@ SPELL_SUMMON_GAUNLET_MOBS_PERIODIC
@ SPELL_FREEZING_CLOUD_LEFT_AREA
@ SPELL_NET
@ SPELL_SUMMON_YMIRJAR_WITCH_DOCTOR_W
@ SPELL_RIDE_GRAUF
@ SPELL_UTGARDE_PINNACLE_GUANTLET_RESET_CHECK
@ SPELL_UTGARDE_PINNACLE_GAUNTLET_EFFECT
@ SPELL_WHIRLWIND
@ SPELL_FREEZING_CLOUD
@ SPELL_CRUSH
Position const FirstWaveLocations[FIRST_WAVE_SIZE]
float const BreachPoint
void AddSC_boss_skadi()
@ SAY_DEATH
@ SAY_DRAKE_DEATH
@ SAY_AGGRO
@ EMOTE_BREATH
@ SAY_KILL
@ SAY_DRAKE_BREATH
@ EMOTE_ON_RANGE
SplineChainIds
@ SPLINE_CHAIN_BREACH_RIGHT
@ SPLINE_CHAIN_BREACH_LEFT
@ SPLINE_CHAIN_RIGHT
@ SPLINE_CHAIN_INITIAL
@ SPLINE_CHAIN_LEFT
Position const SpawnLoc
CombatPhase
@ PHASE_FLYING
@ PHASE_GROUND
Position const GraufLoc
float const BreathPointLeft
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
WorldObject * GetOwner() const
Unit * GetCaster() const
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectRemove
uint32 GetId() const
InstanceScript *const instance
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
TaskScheduler scheduler
SummonList summons
virtual void JustEngagedWith(Unit *)
Definition CreatureAI.h:127
@ EVADE_REASON_NO_HOSTILES
Definition CreatureAI.h:94
void DoZoneInCombat(Creature *creature=nullptr)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void SetImmuneToPC(bool apply) override
Definition Creature.h:129
void SetReactState(ReactStates st)
Definition Creature.h:119
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetRegenerateHealth(bool value)
Definition Creature.h:285
CreatureAI * AI() const
Definition Creature.h:154
virtual bool SetBossState(uint32 id, EncounterState state)
Creature * GetCreature(uint32 type)
EncounterState GetBossState(uint32 id) const
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void LaunchMoveSpline(std::function< void(Movement::MoveSplineInit &init)> &&initializer, uint32 id=0, MovementGeneratorPriority priority=MOTION_PRIORITY_NORMAL, MovementGeneratorType type=EFFECT_MOTION_TYPE)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
static Creature * ToCreature(Object *o)
Definition Object.h:186
TypeID GetTypeId() const
Definition Object.h:93
uint32 GetEntry() const
Definition Object.h:81
bool IsGameMaster() const
Definition Player.h:998
uint32 Id
Definition SpellInfo.h:289
Creature * GetHitCreature() const
HookList< HitHandler > OnHit
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
void SetHitDamage(int32 damage)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void DespawnEntry(uint32 entry)
void Summon(Creature const *summon)
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:96
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4439
void SetControlled(bool apply, UnitState state)
Definition Unit.cpp:11256
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13286
void SetEmoteState(Emote emote)
Definition Unit.h:967
bool SetCanFly(bool enable, bool packetOnly=false)
Definition Unit.cpp:13374
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition Unit.cpp:8678
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void SetFacingTo(float ori, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13250
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
Vehicle * GetVehicleKit() const
Definition Unit.h:1735
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:955
Vehicle * RemovePassenger(Unit *passenger)
Removes the passenger from the vehicle.
Definition Vehicle.cpp:497
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1087
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
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:1992
void setActive(bool isActiveObject)
Definition Object.cpp:991
void SetFarVisible(bool on)
Definition Object.cpp:1014
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2099
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool OnCheck(Player *, Unit *target) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_freezing_cloud_area_left)
PrepareSpellScript(spell_freezing_cloud_area_right)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_freezing_cloud_damage)
bool CanBeAppliedOn(Unit *target)
PrepareSpellScript(spell_skadi_launch_harpoon)
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_skadi_poisoned_spear)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_skadi_reset_check)
void CountTargets(std::list< WorldObject * > &targets)
void HandleDummy(SpellEffIndex)
void Register() override
void Register() override
void OnRemoveVehicle(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_skadi_ride_vehicle)
std::deque< uint32 > SummonSpellsList
PrepareAuraScript(spell_summon_gauntlet_mobs_periodic)
void OnPeriodic(AuraEffect const *)
float GetPositionY() const
Definition Position.h:80
bool firstWaveSummoned
void UpdateAI(uint32 diff) override
void EnterEvadeMode(EvadeReason) override
uint32 GetData(uint32 id) const override
void Initialize()
void JustDied(Unit *) override
void KilledUnit(Unit *who) override
uint8 _harpoonHit
uint8 _loveSkadi
boss_skadi(Creature *creature)
void JustSummoned(Creature *summon) override
void SpawnFirstWave()
CombatPhase _phase
void Reset() override
void DoAction(int32 action) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void PassengerBoarded(Unit *who, int8, bool apply) override
== Fields =======================================
void JustDied(Unit *) override
void Reset() override
void MovementInform(uint32 type, uint32 pointId) override
InstanceScript * _instance
npc_grauf(Creature *creature)
TaskScheduler _scheduler
void UpdateAI(uint32 diff) override
npc_skadi_trashAI(Creature *creature)
void IsSummonedBy(WorldObject *) override
TaskScheduler _scheduler
void MovementInform(uint32 type, uint32 pointId) override
void JustEngagedWith(Unit *who) override
virtual void ScheduleTasks()=0
void UpdateAI(uint32 diff) override
InstanceScript * _instance
void ScheduleTasks() override
void JustDied(Unit *) override
npc_ymirjar_harpooner(Creature *creature)
npc_ymirjar_warrior(Creature *creature)
void ScheduleTasks() override
npc_ymirjar_witch_doctor(Creature *creature)
void ScheduleTasks() override
#define RegisterUtgardePinnacleCreatureAI(ai_name)
@ DATA_SKADI_THE_RUTHLESS
@ DATA_GRAUF
@ NPC_TRIGGER_RESET
@ NPC_COMBAT_TRIGGER
@ NPC_YMIRJAR_WITCH_DOCTOR
@ NPC_YMIRJAR_WARRIOR
@ NPC_GRAUF
@ NPC_YMIRJAR_HARPOONER