TrinityCore
Loading...
Searching...
No Matches
boss_muru.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/*
19 * Combat timers requires to be revisited
20 * Singularity may be much trickier:
21 1. Check if singularity should change targets
22 2. Check if despawn timer depends on how much targets singularity hits by passive spells
23 * Check if Dark Fiend should change target
24 * Berserk for Entropius should be triggered from Entropius' AI since M'uru originally despawns after summoning Entropius,
25 NYI, currently triggered from M'uru's AI
26 */
27
28#include "ScriptMgr.h"
29#include "InstanceScript.h"
30#include "MotionMaster.h"
31#include "ScriptedCreature.h"
32#include "SpellAuraEffects.h"
33#include "SpellInfo.h"
34#include "SpellScript.h"
35#include "sunwell_plateau.h"
36
38{
39 // M'uru - Initial
44
45 // M'uru - Combat
47
48 // M'uru - Transition
51
52 // Entropius - Initial
55
56 // Entropius - Combat
59
60 // M'uru Portal Target
66
67 // Void Sentinel Summoner
69
70 // Void Sentinel
74
75 // Void Spawn
77
78 // Dark Fiend
83
84 // Darkness
88
89 // Singularity
94
95 // Shadowsword Berserker
97 SPELL_FLURRY = 46160,
98
99 // Shadowsword Fury Mage
102
103 // Scripts
105
110
119
122
125
140
150
162
164{
165 std::vector<Creature*> portals;
166 GetCreatureListWithEntryInGrid(portals, creature, NPC_MURU_PORTAL_TARGET, 100.0f);
167 for (Creature* portal : portals)
168 portal->RemoveAllAuras();
169}
170
172{
173 std::vector<Creature*> spawns;
174 GetCreatureListWithEntryInGrid(spawns, creature, NPC_ENTROPIUS, 250.0f);
176 GetCreatureListWithEntryInGrid(spawns, creature, NPC_VOID_SENTINEL, 250.0f);
177 GetCreatureListWithEntryInGrid(spawns, creature, NPC_VOID_SPAWN, 250.0f);
178 GetCreatureListWithEntryInGrid(spawns, creature, NPC_DARK_FIEND, 250.0f);
179 GetCreatureListWithEntryInGrid(spawns, creature, NPC_DARKNESS, 250.0f);
180 GetCreatureListWithEntryInGrid(spawns, creature, NPC_SINGULARITY, 250.0f);
181 GetCreatureListWithEntryInGrid(spawns, creature, NPC_BERSERKER, 250.0f);
182 GetCreatureListWithEntryInGrid(spawns, creature, NPC_FURY_MAGE, 250.0f);
183 for (Creature* spawn : spawns)
184 spawn->DespawnOrUnsummon();
185
186 std::vector<Creature*> portals;
187 GetCreatureListWithEntryInGrid(portals, creature, NPC_MURU_PORTAL_TARGET, 100.0f);
188 for (Creature* portal : portals)
189 portal->AI()->DoAction(ACTION_CANCEL_SUMMON);
190}
191
192// 25741 - M'uru
193struct boss_muru : public BossAI
194{
195 boss_muru(Creature* creature) : BossAI(creature, DATA_MURU), _isBerserkTriggered(false), _isInTransition(false) { }
196
197 void Reset() override
198 {
199 _Reset();
200
201 _isBerserkTriggered = false;
202 _isInTransition = false;
203 }
204
218
239
240 void OnSpellCast(SpellInfo const* spell) override
241 {
242 if (spell->Id == SPELL_SUMMON_ENTROPIUS)
246 }
247
248 void EnterEvadeMode(EvadeReason /*why*/) override
249 {
253 }
254
255 // Do not store anything, despawn is handled in DoDespawnSummons
256 void JustSummoned(Creature* summon) override
257 {
258 if (summon->GetEntry() == NPC_ENTROPIUS)
260 summon->AI()->DoAction(ACTION_BERSERK);
261 }
262
263 void UpdateAI(uint32 diff) override
264 {
265 if (!UpdateVictim())
266 return;
267
268 events.Update(diff);
269
271 return;
272
273 while (uint32 eventId = events.ExecuteEvent())
274 {
275 switch (eventId)
276 {
279 break;
282 break;
284 me->SetVisible(false);
285 break;
286 case EVENT_BERSERK:
287 {
288 _isBerserkTriggered = true;
290
291 if (Creature* entropius = instance->GetCreature(DATA_ENTROPIUS))
292 entropius->AI()->DoAction(ACTION_BERSERK);
293 break;
294 }
295 default:
296 break;
297 }
298 }
299 }
300
301private:
304};
305
306// 25840 - Entropius
307struct boss_entropius : public BossAI
308{
309 boss_entropius(Creature* creature) : BossAI(creature, DATA_MURU) { }
310
311 void InitializeAI() override
312 {
314 }
315
316 void JustAppeared() override
317 {
319
321 }
322
323 void JustEngagedWith(Unit* who) override
324 {
326
329 }
330
331 // Do not store anything, despawn is handled in DoDespawnSummons
332 void JustSummoned(Creature* /*summon*/) override { }
333
334 void DoAction(int32 action) override
335 {
336 if (action == ACTION_BERSERK)
338 }
339
340 void EnterEvadeMode(EvadeReason /*why*/) override
341 {
343 muru->AI()->EnterEvadeMode();
344
348 }
349
350 void JustDied(Unit* /*killer*/) override
351 {
352 _JustDied();
353
355
357 muru->DisappearAndDie();
358 }
359
360 void UpdateAI(uint32 diff) override
361 {
362 events.Update(diff);
363
365 return;
366
367 while (uint32 eventId = events.ExecuteEvent())
368 {
369 switch (eventId)
370 {
371 case EVENT_SPAWN_1:
374 break;
375 case EVENT_SPAWN_2:
379 break;
380 case EVENT_DARKNESS:
381 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
382 DoCast(target, SPELL_DARKNESS);
383 events.Repeat(10s, 15s);
384 break;
385 case EVENT_BLACK_HOLE:
386 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
387 DoCast(target, SPELL_BLACK_HOLE);
388 events.Repeat(20s, 25s);
389 break;
390 default:
391 break;
392 }
393
395 return;
396 }
397
398 UpdateVictim();
399 }
400};
401
402// 25770 - M'uru Portal Target
404{
405 npc_muru_portal(Creature* creature) : ScriptedAI(creature) { }
406
407 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
408 {
409 switch (spellInfo->Id)
410 {
413 _scheduler.Schedule(5s, [this](TaskContext const& /*task*/)
414 {
416 });
417 break;
420 _scheduler.Schedule(2s, [this](TaskContext const& /*task*/)
421 {
423 });
424 break;
425 default:
426 break;
427 }
428 }
429
430 void JustSummoned(Creature* summon) override
431 {
433 }
434
435 void DoAction(int32 action) override
436 {
437 if (action == ACTION_CANCEL_SUMMON)
439 }
440
441 void UpdateAI(uint32 diff) override
442 {
443 _scheduler.Update(diff);
444 }
445
446private:
448};
449
450// 25782 - Void Sentinel Summoner
452{
454
455 void JustAppeared() override
456 {
457 _scheduler.Schedule(1500ms, [this](TaskContext const& /*task*/)
458 {
460 me->DespawnOrUnsummon(3500ms);
461 });
462 }
463
464 void UpdateAI(uint32 diff) override
465 {
466 _scheduler.Update(diff);
467 }
468
469private:
471};
472
473// 25772 - Void Sentinel
475{
476 npc_void_sentinel(Creature* creature) : ScriptedAI(creature) { }
477
478 void InitializeAI() override
479 {
480 me->SetCorpseDelay(5, true);
482 }
483
484 void JustAppeared() override
485 {
487
488 _scheduler.Schedule(2500ms, [this](TaskContext const& /*task*/)
489 {
492 });
493 }
494
495 void JustEngagedWith(Unit* /*who*/) override
496 {
497 _scheduler.Schedule(10s, 15s, [this](TaskContext& task)
498 {
500 task.Repeat(20s, 30s);
501 });
502 }
503
504 void JustDied(Unit* /*killer*/) override
505 {
506 for (uint8 i = 0; i < MAX_VOID_SPAWNS; ++i)
508 }
509
510 void UpdateAI(uint32 diff) override
511 {
512 _scheduler.Update(diff);
513
514 UpdateVictim();
515 }
516
517private:
519};
520
521// 25824 - Void Spawn
523{
524 npc_void_spawn(Creature* creature) : ScriptedAI(creature) { }
525
526 void InitializeAI() override
527 {
528 me->SetCorpseDelay(5, true);
530 }
531
532 void JustAppeared() override
533 {
534 _scheduler.Schedule(2s, [this](TaskContext const& /*task*/)
535 {
538 });
539 }
540
541 void JustEngagedWith(Unit* /*who*/) override
542 {
543 _scheduler.Schedule(10s, 20s, [this](TaskContext& task)
544 {
546 task.Repeat(20s, 30s);
547 });
548 }
549
550 void UpdateAI(uint32 diff) override
551 {
552 _scheduler.Update(diff);
553
554 UpdateVictim();
555 }
556
557private:
559};
560
561// 25744 - Dark Fiend
563{
564 npc_dark_fiend(Creature* creature) : ScriptedAI(creature), _isKilled(false) { }
565
566 void InitializeAI() override
567 {
570 }
571
572 void JustAppeared() override
573 {
575
576 _scheduler.Schedule(2s, [this](TaskContext const& /*task*/)
577 {
580 });
581
582 _scheduler.Schedule(2s, [this](TaskContext& task)
583 {
584 if (me->IsWithinDist(me->GetVictim(), 2.0f))
586 else
587 task.Repeat(100ms);
588 });
589 }
590
591 void SpellHitTarget(WorldObject* /*target*/, SpellInfo const* spellInfo) override
592 {
593 if (spellInfo->Id == SPELL_DARK_FIEND_TRAP)
594 {
595 _scheduler.Schedule(0s, [this](TaskContext& task)
596 {
597 switch (task.GetRepeatCounter())
598 {
599 case 0:
600 me->RemoveAurasDueToSpell(SPELL_DARK_FIEND_MAGIC);
601 DoCastSelf(SPELL_DARK_FIEND_DAMAGE);
602 me->SetReactState(REACT_PASSIVE);
603 me->SetUninteractible(true);
604 task.Repeat(2500ms);
605 break;
606 case 1:
607 DoCastSelf(SPELL_DARK_FIEND_VISUAL);
608 me->DespawnOrUnsummon(3500ms);
609 break;
610 default:
611 break;
612 }
613 });
614 }
615 }
616
617 void DoAction(int32 action) override
618 {
620 if (action == ACTION_DISPELLED_MAGIC)
621 {
625 }
626 }
627
628 void DamageTaken(Unit* /*who*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
629 {
630 if (damage >= me->GetHealth())
631 {
632 damage = me->GetHealth() -1;
633
634 if (!_isKilled)
635 {
636 _isKilled = true;
640 me->SetUninteractible(true);
641 me->DespawnOrUnsummon(4500ms);
642 }
643 }
644 }
645
646 void UpdateAI(uint32 diff) override
647 {
648 UpdateVictim();
649
650 _scheduler.Update(diff);
651 }
652
653private:
656};
657
658// 25879 - Darkness
660{
661 npc_darkness(Creature* creature) : ScriptedAI(creature) { }
662
663 void InitializeAI() override
664 {
666 }
667
668 void JustAppeared() override
669 {
670 _scheduler.Schedule(1s, [this](TaskContext& task)
671 {
672 switch (task.GetRepeatCounter())
673 {
674 case 0:
675 DoCastSelf(SPELL_VOID_ZONE_PRE_EFFECT_VISUAL);
676 task.Repeat(3s);
677 break;
678 case 1:
679 me->RemoveAurasDueToSpell(SPELL_VOID_ZONE_PRE_EFFECT_VISUAL);
680 DoCastSelf(SPELL_VOID_ZONE_PERIODIC);
681 task.Repeat(2500ms);
682 break;
683 case 2:
684 DoCastSelf(SPELL_SUMMON_DARK_FIEND);
685 break;
686 default:
687 break;
688 }
689 });
690 }
691
692 void UpdateAI(uint32 diff) override
693 {
694 _scheduler.Update(diff);
695 }
696
697private:
699};
700
701// 25855 - Singularity
703{
704 npc_singularity(Creature* creature) : ScriptedAI(creature) { }
705
706 void InitializeAI() override
707 {
709 }
710
711 void JustAppeared() override
712 {
713 _scheduler.Schedule(1s, [this](TaskContext& task)
714 {
715 switch (task.GetRepeatCounter())
716 {
717 case 0:
718 DoCastSelf(SPELL_BLACK_HOLE_SUMMON_VISUAL);
719 task.Repeat(1s);
720 break;
721 case 1:
722 DoCastSelf(SPELL_BLACK_HOLE_SUMMON_VISUAL_2);
723 task.Repeat(1s);
724 break;
725 case 2:
726 DoCastSelf(SPELL_BLACK_HOLE_SUMMON_VISUAL);
727 task.Repeat(2s);
728 break;
729 case 3:
730 me->RemoveAurasDueToSpell(SPELL_BLACK_HOLE_SUMMON_VISUAL_2);
731 DoCastSelf(SPELL_BLACK_HOLE_PASSIVE);
732 DoCastSelf(SPELL_BLACK_HOLE_VISUAL_2);
733 task.Repeat(1s);
734 break;
735 case 4:
736 me->SetReactState(REACT_AGGRESSIVE);
737 DoZoneInCombat();
738 me->DespawnOrUnsummon(15s);
739 break;
740 default:
741 break;
742 }
743 });
744 }
745
746 void UpdateAI(uint32 diff) override
747 {
748 UpdateVictim();
749
750 _scheduler.Update(diff);
751 }
752
753private:
755};
756
758{
759 ShadowswordBaseAI(Creature* creature) : ScriptedAI(creature) { }
760
761 void InitializeAI() override
762 {
764 me->SetCorpseDelay(3, true);
765 }
766
767 void JustAppeared() override
768 {
770 {
772 });
773
775 {
776 float x, y, z;
777 trigger->GetClosePoint(x, y, z, 0.0f, 3.0f, float(M_PI));
779 }
780 }
781
782 void MovementInform(uint32 type, uint32 pointId) override
783 {
784 if (type != POINT_MOTION_TYPE)
785 return;
786
787 if (pointId == POINT_ROOM)
788 {
791 }
792 }
793
794 void JustEngagedWith(Unit* /*who*/) override
795 {
797 }
798
799 virtual void ScheduleEvents() = 0;
800
801 void UpdateAI(uint32 diff) override
802 {
803 if (!UpdateVictim())
804 return;
805
806 scheduler.Update(diff);
807 }
808
809protected:
811};
812
813// 25798 - Shadowsword Berserker
815{
817
823
824 void ScheduleEvents() override
825 {
826 scheduler.Schedule(10s, 20s, [this](TaskContext& task)
827 {
829 task.Repeat(15s, 25s);
830 });
831 }
832};
833
834// 25799 - Shadowsword Fury Mage
836{
838
839 void ScheduleEvents() override
840 {
841 scheduler.Schedule(5s, 10s, [this](TaskContext& task)
842 {
844 task.Repeat(5s, 10s);
845 });
846
847 scheduler.Schedule(20s, 40s, [this](TaskContext& task)
848 {
850 task.Repeat(40s, 60s);
851 });
852 }
853};
854
855// 46041 - Summon Blood Elves Periodic
879
880// 46050 - Summon Blood Elves Script
882{
883 bool Validate(SpellInfo const* /*spellInfo*/) override
884 {
885 return ValidateSpellInfo(
886 {
891 });
892 }
893
894 void HandleScript(SpellEffIndex /*effIndex*/)
895 {
896 Unit* caster = GetCaster();
897 caster->CastSpell(caster, SPELL_SUMMON_BERSERKER_1);
898 caster->CastSpell(caster, SPELL_SUMMON_BERSERKER_1);
899 caster->CastSpell(caster, SPELL_SUMMON_FURY_MAGE_1);
900 caster->CastSpell(caster, SPELL_SUMMON_FURY_MAGE_2);
901 caster->CastSpell(caster, SPELL_SUMMON_BERSERKER_2);
902 caster->CastSpell(caster, SPELL_SUMMON_BERSERKER_2);
903 }
904
909};
910
911// 45996 - Darkness
913{
914 bool Validate(SpellInfo const* /*spellInfo*/) override
915 {
917 }
918
920 {
921 if (aurEff->GetTickNumber() == 2)
922 {
923 Unit* target = GetTarget();
924 for (uint32 SummonSpell : SummonDarkFiendSpells)
925 target->CastSpell(target, SummonSpell);
926 }
927 }
928
933};
934
935// 45934 - Dark Fiend
937{
938 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
939 {
940 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL)
941 return;
942
943 if (Creature* target = GetTarget()->ToCreature())
944 target->AI()->DoAction(ACTION_DISPELLED_MAGIC);
945 }
946
951};
952
953// 46205 - Transform Visual Missile Periodic
971
972// 45978 - Summon Void Sentinel Summoner
986
987// 46284 - Negative Energy Periodic
989{
990 bool Validate(SpellInfo const* spellInfo) override
991 {
992 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
993 }
994
995 void PeriodicTick(AuraEffect const* aurEff)
996 {
998
999 CastSpellExtraArgs args(aurEff);
1000 args.AddSpellMod(SPELLVALUE_MAX_TARGETS, aurEff->GetTickNumber() / 10 + 1);
1001 GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, args);
1002 }
1003
1008};
1009
1010// 46289 - Negative Energy
1012{
1013 bool Validate(SpellInfo const* /*spellInfo*/) override
1014 {
1016 }
1017
1018 void HandleScript(SpellEffIndex /*effIndex*/)
1019 {
1021 }
1022
1027};
1028
#define M_PI
Definition Common.h:118
First const & RAND(First const &first, Second const &second, Rest const &... rest)
uint8_t uint8
Definition Define.h:156
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
@ POINT_MOTION_TYPE
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
SpellEffIndex
@ EFFECT_0
@ EFFECT_2
@ SPELL_EFFECT_SCRIPT_EFFECT
@ TARGET_DEST_CASTER_FRONT
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_ENEMY_SPELL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELLVALUE_MAX_TARGETS
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
EvadeReason
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
DamageEffectType
@ UNIT_STATE_CASTING
Definition Unit.h:290
void DoResetPortals(Creature *creature)
static constexpr std::array< uint32, 8 > SummonDarkFiendSpells
MuruMisc
@ ACTION_BERSERK
@ ACTION_CANCEL_SUMMON
@ MAX_VOID_SPAWNS
@ NPC_WORLD_TRIGGER_MOVE_TO
@ POINT_ROOM
@ ACTION_DISPELLED_MAGIC
void DoDespawnSummons(Creature *creature)
void AddSC_boss_muru()
MuruEvents
@ EVENT_SPAWN_1
@ EVENT_SPAWN_2
@ EVENT_DARKNESS
@ EVENT_SUMMON_ENTROPIUS
@ EVENT_BERSERK
@ EVENT_BLACK_HOLE
@ EVENT_SET_INVISIBLE
@ EVENT_SUMMON_BLOOD_ELVES
MuruSpells
Definition boss_muru.cpp:38
@ SPELL_SHADOW_BOLT_VOLLEY
Definition boss_muru.cpp:76
@ SPELL_OPEN_PORTAL_PERIODIC
Definition boss_muru.cpp:40
@ SPELL_ENTROPIUS_COSMETIC_SPAWN
Definition boss_muru.cpp:53
@ SPELL_DARKNESS
Definition boss_muru.cpp:57
@ SPELL_BLACK_HOLE_SUMMON_VISUAL
Definition boss_muru.cpp:90
@ SPELL_TRANSFORM_VISUAL_MISSILE_2
@ SPELL_SUMMON_DARK_FIEND_1
@ SPELL_VOID_BLAST
Definition boss_muru.cpp:72
@ SPELL_DARK_FIEND_DAMAGE
Definition boss_muru.cpp:82
@ SPELL_SUMMON_ENTROPIUS
Definition boss_muru.cpp:50
@ SPELL_SUMMON_DARK_FIEND_8
@ SPELL_SUMMON_VOID_SENTINEL_SUMMONER
Definition boss_muru.cpp:63
@ SPELL_SUMMON_BLOOD_ELVES_SCRIPT
@ SPELL_NEGATIVE_ENERGY_PERIODIC
Definition boss_muru.cpp:42
@ SPELL_OPEN_PORTAL_VISUAL
Definition boss_muru.cpp:62
@ SPELL_SPELL_FURY
@ SPELL_SUMMON_DARK_FIEND_3
@ SPELL_BLACK_HOLE_SUMMON_VISUAL_2
Definition boss_muru.cpp:91
@ SPELL_TRANSFORM_VISUAL_MISSILE_1
@ SPELL_SUMMON_DARK_FIEND_6
@ SPELL_DARKNESS_PERIODIC
Definition boss_muru.cpp:41
@ SPELL_SUMMON_FURY_MAGE_2
@ SPELL_BLACK_HOLE_VISUAL_2
Definition boss_muru.cpp:93
@ SPELL_SUMMON_BLOOD_ELVES_PERIODIC
Definition boss_muru.cpp:43
@ SPELL_OPEN_ALL_PORTALS
Definition boss_muru.cpp:49
@ SPELL_SUMMON_VOID_SENTINEL
Definition boss_muru.cpp:68
@ SPELL_DARK_FIEND_MAGIC
Definition boss_muru.cpp:79
@ SPELL_BLACK_HOLE
Definition boss_muru.cpp:58
@ SPELL_OPEN_PORTAL
Definition boss_muru.cpp:61
@ SPELL_SUMMON_DARK_FIEND_7
@ SPELL_FLURRY
Definition boss_muru.cpp:97
@ SPELL_FEL_FIREBALL
@ SPELL_SUMMON_FURY_MAGE_1
@ SPELL_VOID_ZONE_PERIODIC
Definition boss_muru.cpp:86
@ SPELL_SUMMON_BERSERKER_2
@ SPELL_SUMMON_VOID_SENTINEL_SUMMONER_VISUAL
Definition boss_muru.cpp:64
@ SPELL_NEGATIVE_ENERGY_PERIODIC_E
Definition boss_muru.cpp:54
@ SPELL_NEGATIVE_ENERGY_DAMAGE
@ SPELL_SUMMON_VOID_SPAWN
Definition boss_muru.cpp:73
@ SPELL_SUMMON_DARK_FIEND_5
@ SPELL_DUAL_WIELD_PASSIVE
Definition boss_muru.cpp:96
@ SPELL_DARK_FIEND_VISUAL
Definition boss_muru.cpp:80
@ SPELL_VOID_ZONE_PRE_EFFECT_VISUAL
Definition boss_muru.cpp:85
@ SPELL_TRANSFORM_VISUAL_MISSILE
Definition boss_muru.cpp:65
@ SPELL_SUMMON_DARK_FIEND_4
@ SPELL_BERSERK
Definition boss_muru.cpp:46
@ SPELL_SHADOW_PULSE_PERIODIC
Definition boss_muru.cpp:71
@ SPELL_DARK_FIEND_TRAP
Definition boss_muru.cpp:81
@ SPELL_SUMMON_DARK_FIEND
Definition boss_muru.cpp:87
@ SPELL_BLACK_HOLE_PASSIVE
Definition boss_muru.cpp:92
@ SPELL_SUMMON_DARK_FIEND_2
@ SPELL_SUMMON_BERSERKER_1
uint32 GetTickNumber() const
SpellEffectInfo const & GetSpellEffectInfo() const
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
Unit * GetTarget() const
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
EventMap events
void DoZoneInCombat()
Definition CreatureAI.h:169
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void SetDisplayFromModel(uint32 modelIdx)
void SetReactState(ReactStates st)
Definition Creature.h:180
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetCorpseDelay(uint32 delay, bool ignoreCorpseDecayRatio=false)
Definition Creature.h:118
CreatureAI * AI() const
Definition Creature.h:235
void Update(uint32 time)
Definition EventMap.h:77
void Repeat(Milliseconds time)
Definition EventMap.cpp:67
EventId ExecuteEvent()
Definition EventMap.cpp:77
void CancelEvent(EventId eventId)
Definition EventMap.cpp:156
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:40
Creature * GetCreature(uint32 type)
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={})
uint32 GetEntry() const
Definition Object.h:89
uint32 TriggerSpell
Definition SpellInfo.h:234
uint32 const Id
Definition SpellInfo.h:328
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:590
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Unit * GetCaster() const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
TaskScheduler::repeated_t GetRepeatCounter() const
Returns the repeat counter which increases every time the task is repeated.
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
TaskScheduler & Update()
Update the scheduler to the current time.
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
virtual void DoAction(int32 param)
Definition UnitAI.h:73
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:172
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:71
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:81
Definition Unit.h:647
void SetVisible(bool x)
Definition Unit.cpp:8787
MotionMaster * GetMotionMaster()
Definition Unit.h:1750
void SetUninteractible(bool apply)
Definition Unit.cpp:8583
uint64 GetHealth() const
Definition Unit.h:800
Unit * GetVictim() const
Definition Unit.h:738
bool HasUnitState(const uint32 f) const
Definition Unit.h:755
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3992
float GetMapHeight(float x, float y, float z, bool vmap=true, float distanceToSearch=50.0f) const
Definition Object.cpp:3131
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2222
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1522
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:494
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectPeriodic(AuraEffect const *aurEff)
void Register() override
bool Validate(SpellInfo const *) override
void PeriodicTick(AuraEffect const *aurEff)
bool Validate(SpellInfo const *spellInfo) override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void OnPeriodic(AuraEffect const *)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void SetDest(SpellDestination &dest)
bool Validate(SpellInfo const *) override
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
constexpr float GetPositionX() const
Definition Position.h:87
float m_positionZ
Definition Position.h:66
constexpr float GetPositionY() const
Definition Position.h:88
constexpr float GetPositionZ() const
Definition Position.h:89
TaskScheduler scheduler
virtual void ScheduleEvents()=0
void JustAppeared() override
void InitializeAI() override
void MovementInform(uint32 type, uint32 pointId) override
ShadowswordBaseAI(Creature *creature)
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
WorldLocation _position
void DoAction(int32 action) override
void JustAppeared() override
void JustEngagedWith(Unit *who) override
boss_entropius(Creature *creature)
void JustSummoned(Creature *) override
void UpdateAI(uint32 diff) override
void EnterEvadeMode(EvadeReason) override
void InitializeAI() override
void JustDied(Unit *) override
void Reset() override
void JustEngagedWith(Unit *who) override
bool _isBerserkTriggered
boss_muru(Creature *creature)
void JustSummoned(Creature *summon) override
bool _isInTransition
void UpdateAI(uint32 diff) override
void OnSpellCast(SpellInfo const *spell) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void EnterEvadeMode(EvadeReason) override
void DoAction(int32 action) override
TaskScheduler _scheduler
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
npc_dark_fiend(Creature *creature)
void UpdateAI(uint32 diff) override
void InitializeAI() override
void SpellHitTarget(WorldObject *, SpellInfo const *spellInfo) override
void JustAppeared() override
npc_darkness(Creature *creature)
TaskScheduler _scheduler
void InitializeAI() override
void JustAppeared() override
void UpdateAI(uint32 diff) override
void JustSummoned(Creature *summon) override
TaskScheduler _scheduler
npc_muru_portal(Creature *creature)
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void ScheduleEvents() override
npc_shadowsword_berserker(Creature *creature)
void JustAppeared() override
void ScheduleEvents() override
npc_shadowsword_fury_mage(Creature *creature)
void InitializeAI() override
npc_singularity(Creature *creature)
TaskScheduler _scheduler
void JustAppeared() override
void UpdateAI(uint32 diff) override
npc_void_sentinel_summoner(Creature *creature)
void JustAppeared() override
void UpdateAI(uint32 diff) override
void UpdateAI(uint32 diff) override
void InitializeAI() override
npc_void_sentinel(Creature *creature)
TaskScheduler _scheduler
void JustDied(Unit *) override
void JustAppeared() override
void JustEngagedWith(Unit *) override
void UpdateAI(uint32 diff) override
TaskScheduler _scheduler
npc_void_spawn(Creature *creature)
void InitializeAI() override
void JustEngagedWith(Unit *) override
void JustAppeared() override
#define RegisterSunwellPlateauCreatureAI(ai_name)
@ DATA_MURU
@ DATA_ENTROPIUS
@ NPC_DARKNESS
@ NPC_VOID_SENTINEL_SUMMONER
@ NPC_BERSERKER
@ NPC_FURY_MAGE
@ NPC_MURU_PORTAL_TARGET
@ NPC_ENTROPIUS
@ NPC_VOID_SENTINEL
@ NPC_DARK_FIEND
@ NPC_VOID_SPAWN
@ NPC_SINGULARITY