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 "SpellAuras.h"
34#include "SpellInfo.h"
35#include "SpellScript.h"
36#include "sunwell_plateau.h"
37
39{
40 // M'uru - Initial
45
46 // M'uru - Combat
48
49 // M'uru - Transition
52
53 // Entropius - Initial
56
57 // Entropius - Combat
60
61 // M'uru Portal Target
67
68 // Void Sentinel Summoner
70
71 // Void Sentinel
75
76 // Void Spawn
78
79 // Dark Fiend
84
85 // Darkness
89
90 // Singularity
95
96 // Shadowsword Berserker
98 SPELL_FLURRY = 46160,
99
100 // Shadowsword Fury Mage
103
104 // Scripts
106
111
120
123
126
141
151
163
165{
166 std::vector<Creature*> portals;
167 GetCreatureListWithEntryInGrid(portals, creature, NPC_MURU_PORTAL_TARGET, 100.0f);
168 for (Creature* portal : portals)
169 portal->RemoveAllAuras();
170}
171
173{
174 std::vector<Creature*> spawns;
175 GetCreatureListWithEntryInGrid(spawns, creature, NPC_ENTROPIUS, 250.0f);
177 GetCreatureListWithEntryInGrid(spawns, creature, NPC_VOID_SENTINEL, 250.0f);
178 GetCreatureListWithEntryInGrid(spawns, creature, NPC_VOID_SPAWN, 250.0f);
179 GetCreatureListWithEntryInGrid(spawns, creature, NPC_DARK_FIEND, 250.0f);
180 GetCreatureListWithEntryInGrid(spawns, creature, NPC_DARKNESS, 250.0f);
181 GetCreatureListWithEntryInGrid(spawns, creature, NPC_SINGULARITY, 250.0f);
182 GetCreatureListWithEntryInGrid(spawns, creature, NPC_BERSERKER, 250.0f);
183 GetCreatureListWithEntryInGrid(spawns, creature, NPC_FURY_MAGE, 250.0f);
184 for (Creature* spawn : spawns)
185 spawn->DespawnOrUnsummon();
186
187 std::vector<Creature*> portals;
188 GetCreatureListWithEntryInGrid(portals, creature, NPC_MURU_PORTAL_TARGET, 100.0f);
189 for (Creature* portal : portals)
190 portal->AI()->DoAction(ACTION_CANCEL_SUMMON);
191}
192
193// 25741 - M'uru
194struct boss_muru : public BossAI
195{
196 boss_muru(Creature* creature) : BossAI(creature, DATA_MURU), _isBerserkTriggered(false), _isInTransition(false) { }
197
198 void Reset() override
199 {
200 _Reset();
201
202 _isBerserkTriggered = false;
203 _isInTransition = false;
204 }
205
219
240
241 void OnSpellCast(SpellInfo const* spell) override
242 {
243 if (spell->Id == SPELL_SUMMON_ENTROPIUS)
247 }
248
249 void EnterEvadeMode(EvadeReason /*why*/) override
250 {
254 }
255
256 // Do not store anything, despawn is handled in DoDespawnSummons
257 void JustSummoned(Creature* summon) override
258 {
259 if (summon->GetEntry() == NPC_ENTROPIUS)
261 summon->AI()->DoAction(ACTION_BERSERK);
262 }
263
264 void UpdateAI(uint32 diff) override
265 {
266 if (!UpdateVictim())
267 return;
268
269 events.Update(diff);
270
272 return;
273
274 while (uint32 eventId = events.ExecuteEvent())
275 {
276 switch (eventId)
277 {
280 break;
283 break;
285 me->SetVisible(false);
286 break;
287 case EVENT_BERSERK:
288 {
289 _isBerserkTriggered = true;
291
292 if (Creature* entropius = instance->GetCreature(DATA_ENTROPIUS))
293 entropius->AI()->DoAction(ACTION_BERSERK);
294 break;
295 }
296 default:
297 break;
298 }
299 }
300 }
301
302private:
305};
306
307// 25840 - Entropius
308struct boss_entropius : public BossAI
309{
310 boss_entropius(Creature* creature) : BossAI(creature, DATA_MURU) { }
311
312 void InitializeAI() override
313 {
315 }
316
317 void JustAppeared() override
318 {
320
322 }
323
324 void JustEngagedWith(Unit* who) override
325 {
327
330 }
331
332 // Do not store anything, despawn is handled in DoDespawnSummons
333 void JustSummoned(Creature* /*summon*/) override { }
334
335 void DoAction(int32 action) override
336 {
337 if (action == ACTION_BERSERK)
339 }
340
341 void EnterEvadeMode(EvadeReason /*why*/) override
342 {
344 muru->AI()->EnterEvadeMode();
345
349 }
350
351 void JustDied(Unit* /*killer*/) override
352 {
353 _JustDied();
354
356
358 muru->DisappearAndDie();
359 }
360
361 void UpdateAI(uint32 diff) override
362 {
363 events.Update(diff);
364
366 return;
367
368 while (uint32 eventId = events.ExecuteEvent())
369 {
370 switch (eventId)
371 {
372 case EVENT_SPAWN_1:
375 break;
376 case EVENT_SPAWN_2:
380 break;
381 case EVENT_DARKNESS:
382 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
383 DoCast(target, SPELL_DARKNESS);
384 events.Repeat(10s, 15s);
385 break;
386 case EVENT_BLACK_HOLE:
387 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
388 DoCast(target, SPELL_BLACK_HOLE);
389 events.Repeat(20s, 25s);
390 break;
391 default:
392 break;
393 }
394
396 return;
397 }
398
399 if (UpdateVictim())
401 }
402};
403
404// 25770 - M'uru Portal Target
406{
407 npc_muru_portal(Creature* creature) : ScriptedAI(creature) { }
408
409 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
410 {
411 switch (spellInfo->Id)
412 {
415 _scheduler.Schedule(5s, [this](TaskContext /*task*/)
416 {
418 });
419 break;
422 _scheduler.Schedule(2s, [this](TaskContext /*task*/)
423 {
425 });
426 break;
427 default:
428 break;
429 }
430 }
431
432 void JustSummoned(Creature* summon) override
433 {
435 }
436
437 void DoAction(int32 action) override
438 {
439 if (action == ACTION_CANCEL_SUMMON)
441 }
442
443 void UpdateAI(uint32 diff) override
444 {
445 _scheduler.Update(diff);
446 }
447
448private:
450};
451
452// 25782 - Void Sentinel Summoner
454{
456
457 void JustAppeared() override
458 {
459 _scheduler.Schedule(1500ms, [this](TaskContext /*task*/)
460 {
462 me->DespawnOrUnsummon(3500ms);
463 });
464 }
465
466 void UpdateAI(uint32 diff) override
467 {
468 _scheduler.Update(diff);
469 }
470
471private:
473};
474
475// 25772 - Void Sentinel
477{
478 npc_void_sentinel(Creature* creature) : ScriptedAI(creature) { }
479
480 void InitializeAI() override
481 {
482 me->SetCorpseDelay(5, true);
484 }
485
486 void JustAppeared() override
487 {
489
490 _scheduler.Schedule(2500ms, [this](TaskContext /*task*/)
491 {
494 });
495 }
496
497 void JustEngagedWith(Unit* /*who*/) override
498 {
499 _scheduler.Schedule(10s, 15s, [this](TaskContext task)
500 {
502 task.Repeat(20s, 30s);
503 });
504 }
505
506 void JustDied(Unit* /*killer*/) override
507 {
508 for (uint8 i = 0; i < MAX_VOID_SPAWNS; ++i)
510 }
511
512 void UpdateAI(uint32 diff) override
513 {
514 _scheduler.Update(diff);
515
516 if (UpdateVictim())
518 }
519
520private:
522};
523
524// 25824 - Void Spawn
526{
527 npc_void_spawn(Creature* creature) : ScriptedAI(creature) { }
528
529 void InitializeAI() override
530 {
531 me->SetCorpseDelay(5, true);
533 }
534
535 void JustAppeared() override
536 {
537 _scheduler.Schedule(2s, [this](TaskContext /*task*/)
538 {
541 });
542 }
543
544 void JustEngagedWith(Unit* /*who*/) override
545 {
546 _scheduler.Schedule(10s, 20s, [this](TaskContext task)
547 {
549 task.Repeat(20s, 30s);
550 });
551 }
552
553 void UpdateAI(uint32 diff) override
554 {
555 _scheduler.Update(diff);
556
557 if (UpdateVictim())
559 }
560
561private:
563};
564
565// 25744 - Dark Fiend
567{
568 npc_dark_fiend(Creature* creature) : ScriptedAI(creature), _isKilled(false) { }
569
575
576 void JustAppeared() override
577 {
579
580 _scheduler.Schedule(2s, [this](TaskContext /*task*/)
581 {
584 });
585
586 _scheduler.Schedule(2s, [this](TaskContext task)
587 {
588 if (me->IsWithinDist(me->GetVictim(), 2.0f))
590 else
591 task.Repeat(100ms);
592 });
593 }
594
595 void SpellHitTarget(WorldObject* /*target*/, SpellInfo const* spellInfo) override
596 {
597 if (spellInfo->Id == SPELL_DARK_FIEND_TRAP)
598 {
599 _scheduler.Schedule(0s, [this](TaskContext task)
600 {
601 switch (task.GetRepeatCounter())
602 {
603 case 0:
604 me->RemoveAurasDueToSpell(SPELL_DARK_FIEND_MAGIC);
605 DoCastSelf(SPELL_DARK_FIEND_DAMAGE);
606 me->SetReactState(REACT_PASSIVE);
607 me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
608 task.Repeat(2500ms);
609 break;
610 case 1:
611 DoCastSelf(SPELL_DARK_FIEND_VISUAL);
612 me->DespawnOrUnsummon(3500ms);
613 break;
614 default:
615 break;
616 }
617 });
618 }
619 }
620
621 void DoAction(int32 action) override
622 {
624 if (action == ACTION_DISPELLED_MAGIC)
625 {
629 }
630 }
631
632 void DamageTaken(Unit* /*who*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
633 {
634 if (damage >= me->GetHealth())
635 {
636 damage = me->GetHealth() -1;
637
638 if (!_isKilled)
639 {
640 _isKilled = true;
645 me->DespawnOrUnsummon(4500ms);
646 }
647 }
648 }
649
650 void UpdateAI(uint32 diff) override
651 {
652 UpdateVictim();
653
654 _scheduler.Update(diff);
655 }
656
657private:
660};
661
662// 25879 - Darkness
664{
665 npc_darkness(Creature* creature) : ScriptedAI(creature) { }
666
667 void InitializeAI() override
668 {
670 }
671
672 void JustAppeared() override
673 {
674 _scheduler.Schedule(1s, [this](TaskContext task)
675 {
676 switch (task.GetRepeatCounter())
677 {
678 case 0:
679 DoCastSelf(SPELL_VOID_ZONE_PRE_EFFECT_VISUAL);
680 task.Repeat(3s);
681 break;
682 case 1:
683 me->RemoveAurasDueToSpell(SPELL_VOID_ZONE_PRE_EFFECT_VISUAL);
684 DoCastSelf(SPELL_VOID_ZONE_PERIODIC);
685 task.Repeat(2500ms);
686 break;
687 case 2:
688 DoCastSelf(SPELL_SUMMON_DARK_FIEND);
689 break;
690 default:
691 break;
692 }
693 });
694 }
695
696 void UpdateAI(uint32 diff) override
697 {
698 _scheduler.Update(diff);
699 }
700
701private:
703};
704
705// 25855 - Singularity
707{
708 npc_singularity(Creature* creature) : ScriptedAI(creature) { }
709
710 void InitializeAI() override
711 {
713 }
714
715 void JustAppeared() override
716 {
717 _scheduler.Schedule(1s, [this](TaskContext task)
718 {
719 switch (task.GetRepeatCounter())
720 {
721 case 0:
722 DoCastSelf(SPELL_BLACK_HOLE_SUMMON_VISUAL);
723 task.Repeat(1s);
724 break;
725 case 1:
726 DoCastSelf(SPELL_BLACK_HOLE_SUMMON_VISUAL_2);
727 task.Repeat(1s);
728 break;
729 case 2:
730 DoCastSelf(SPELL_BLACK_HOLE_SUMMON_VISUAL);
731 task.Repeat(2s);
732 break;
733 case 3:
734 me->RemoveAurasDueToSpell(SPELL_BLACK_HOLE_SUMMON_VISUAL_2);
735 DoCastSelf(SPELL_BLACK_HOLE_PASSIVE);
736 DoCastSelf(SPELL_BLACK_HOLE_VISUAL_2);
737 task.Repeat(1s);
738 break;
739 case 4:
740 me->SetReactState(REACT_AGGRESSIVE);
741 DoZoneInCombat();
742 me->DespawnOrUnsummon(15s);
743 break;
744 default:
745 break;
746 }
747 });
748 }
749
750 void UpdateAI(uint32 diff) override
751 {
752 UpdateVictim();
753
754 _scheduler.Update(diff);
755 }
756
757private:
759};
760
762{
763 ShadowswordBaseAI(Creature* creature) : ScriptedAI(creature) { }
764
765 void InitializeAI() override
766 {
768 me->SetCorpseDelay(3, true);
769 }
770
771 void JustAppeared() override
772 {
774 {
776 });
777
779 {
780 float x, y, z;
781 trigger->GetClosePoint(x, y, z, 0.0f, 3.0f, float(M_PI));
783 }
784 }
785
786 void MovementInform(uint32 type, uint32 pointId) override
787 {
788 if (type != POINT_MOTION_TYPE)
789 return;
790
791 if (pointId == POINT_ROOM)
792 {
795 }
796 }
797
798 void JustEngagedWith(Unit* /*who*/) override
799 {
801 }
802
803 virtual void ScheduleEvents() = 0;
804
805 void UpdateAI(uint32 diff) override
806 {
807 if (!UpdateVictim())
808 return;
809
810 scheduler.Update(diff);
811
813 }
814
815protected:
817};
818
819// 25798 - Shadowsword Berserker
821{
823
829
830 void ScheduleEvents() override
831 {
832 scheduler.Schedule(10s, 20s, [this](TaskContext task)
833 {
835 task.Repeat(15s, 25s);
836 });
837 }
838};
839
840// 25799 - Shadowsword Fury Mage
842{
844
845 void ScheduleEvents() override
846 {
847 scheduler.Schedule(5s, 10s, [this](TaskContext task)
848 {
850 task.Repeat(5s, 10s);
851 });
852
853 scheduler.Schedule(20s, 40s, [this](TaskContext task)
854 {
856 task.Repeat(40s, 60s);
857 });
858 }
859};
860
861// 46041 - Summon Blood Elves Periodic
887
888// 46050 - Summon Blood Elves Script
920
921// 45996 - Darkness
923{
925
926 bool Validate(SpellInfo const* /*spellInfo*/) override
927 {
929 }
930
932 {
933 if (aurEff->GetTickNumber() == 2)
934 {
935 Unit* target = GetTarget();
936 for (uint32 SummonSpell : SummonDarkFiendSpells)
937 target->CastSpell(target, SummonSpell);
938 }
939 }
940
945};
946
947// 45934 - Dark Fiend
949{
951
952 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
953 {
954 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL)
955 return;
956
957 if (Creature* target = GetTarget()->ToCreature())
958 target->AI()->DoAction(ACTION_DISPELLED_MAGIC);
959 }
960
965};
966
967// 46205 - Transform Visual Missile Periodic
987
988// 45978 - Summon Void Sentinel Summoner
1004
1005// 46284 - Negative Energy Periodic
1007{
1009
1010 bool Validate(SpellInfo const* spellInfo) override
1011 {
1012 return ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
1013 }
1014
1015 void PeriodicTick(AuraEffect const* aurEff)
1016 {
1018
1019 CastSpellExtraArgs args(aurEff);
1020 args.AddSpellMod(SPELLVALUE_MAX_TARGETS, aurEff->GetTickNumber() / 10 + 1);
1021 GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, args);
1022 }
1023
1028};
1029
1030// 46289 - Negative Energy
1050
#define M_PI
Definition Common.h:72
First const & RAND(First const &first, Second const &second, Rest const &... rest)
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
@ POINT_MOTION_TYPE
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
SpellEffIndex
@ EFFECT_0
@ EFFECT_2
@ SPELL_EFFECT_SCRIPT_EFFECT
@ TARGET_DEST_CASTER_FRONT
@ AURA_REMOVE_BY_ENEMY_SPELL
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ 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)
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_STATE_CASTING
Definition Unit.h:235
DamageEffectType
Definition Unit.h:352
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:39
@ SPELL_SHADOW_BOLT_VOLLEY
Definition boss_muru.cpp:77
@ SPELL_OPEN_PORTAL_PERIODIC
Definition boss_muru.cpp:41
@ SPELL_ENTROPIUS_COSMETIC_SPAWN
Definition boss_muru.cpp:54
@ SPELL_DARKNESS
Definition boss_muru.cpp:58
@ SPELL_BLACK_HOLE_SUMMON_VISUAL
Definition boss_muru.cpp:91
@ SPELL_TRANSFORM_VISUAL_MISSILE_2
@ SPELL_SUMMON_DARK_FIEND_1
@ SPELL_VOID_BLAST
Definition boss_muru.cpp:73
@ SPELL_DARK_FIEND_DAMAGE
Definition boss_muru.cpp:83
@ SPELL_SUMMON_ENTROPIUS
Definition boss_muru.cpp:51
@ SPELL_SUMMON_DARK_FIEND_8
@ SPELL_SUMMON_VOID_SENTINEL_SUMMONER
Definition boss_muru.cpp:64
@ SPELL_SUMMON_BLOOD_ELVES_SCRIPT
@ SPELL_NEGATIVE_ENERGY_PERIODIC
Definition boss_muru.cpp:43
@ SPELL_OPEN_PORTAL_VISUAL
Definition boss_muru.cpp:63
@ SPELL_SPELL_FURY
@ SPELL_SUMMON_DARK_FIEND_3
@ SPELL_BLACK_HOLE_SUMMON_VISUAL_2
Definition boss_muru.cpp:92
@ SPELL_TRANSFORM_VISUAL_MISSILE_1
@ SPELL_SUMMON_DARK_FIEND_6
@ SPELL_DARKNESS_PERIODIC
Definition boss_muru.cpp:42
@ SPELL_SUMMON_FURY_MAGE_2
@ SPELL_BLACK_HOLE_VISUAL_2
Definition boss_muru.cpp:94
@ SPELL_SUMMON_BLOOD_ELVES_PERIODIC
Definition boss_muru.cpp:44
@ SPELL_OPEN_ALL_PORTALS
Definition boss_muru.cpp:50
@ SPELL_SUMMON_VOID_SENTINEL
Definition boss_muru.cpp:69
@ SPELL_DARK_FIEND_MAGIC
Definition boss_muru.cpp:80
@ SPELL_BLACK_HOLE
Definition boss_muru.cpp:59
@ SPELL_OPEN_PORTAL
Definition boss_muru.cpp:62
@ SPELL_SUMMON_DARK_FIEND_7
@ SPELL_FLURRY
Definition boss_muru.cpp:98
@ SPELL_FEL_FIREBALL
@ SPELL_SUMMON_FURY_MAGE_1
@ SPELL_VOID_ZONE_PERIODIC
Definition boss_muru.cpp:87
@ SPELL_SUMMON_BERSERKER_2
@ SPELL_SUMMON_VOID_SENTINEL_SUMMONER_VISUAL
Definition boss_muru.cpp:65
@ SPELL_NEGATIVE_ENERGY_PERIODIC_E
Definition boss_muru.cpp:55
@ SPELL_NEGATIVE_ENERGY_DAMAGE
@ SPELL_SUMMON_VOID_SPAWN
Definition boss_muru.cpp:74
@ SPELL_SUMMON_DARK_FIEND_5
@ SPELL_DUAL_WIELD_PASSIVE
Definition boss_muru.cpp:97
@ SPELL_DARK_FIEND_VISUAL
Definition boss_muru.cpp:81
@ SPELL_VOID_ZONE_PRE_EFFECT_VISUAL
Definition boss_muru.cpp:86
@ SPELL_TRANSFORM_VISUAL_MISSILE
Definition boss_muru.cpp:66
@ SPELL_SUMMON_DARK_FIEND_4
@ SPELL_BERSERK
Definition boss_muru.cpp:47
@ SPELL_SHADOW_PULSE_PERIODIC
Definition boss_muru.cpp:72
@ SPELL_DARK_FIEND_TRAP
Definition boss_muru.cpp:82
@ SPELL_SUMMON_DARK_FIEND
Definition boss_muru.cpp:88
@ SPELL_BLACK_HOLE_PASSIVE
Definition boss_muru.cpp:93
@ 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(Creature *creature=nullptr)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
void SetDisplayId(uint32 modelId) override
void SetReactState(ReactStates st)
Definition Creature.h:119
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
CreatureTemplate const * GetCreatureTemplate() const
Definition Creature.h:186
void SetCorpseDelay(uint32 delay, bool ignoreCorpseDecayRatio=false)
Definition Creature.h:89
CreatureAI * AI() const
Definition Creature.h:154
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:63
EventId ExecuteEvent()
Definition EventMap.cpp:73
void CancelEvent(EventId eventId)
Definition EventMap.cpp:151
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
Creature * GetCreature(uint32 type)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
uint32 GetEntry() const
Definition Object.h:81
uint32 TriggerSpell
Definition SpellInfo.h:228
uint32 Id
Definition SpellInfo.h:289
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:483
Unit * GetCaster() const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskScheduler::repeated_t GetRepeatCounter() const
Returns the repeat counter which increases every time the task is repeated.
TaskScheduler & CancelAll()
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.
virtual void DoAction(int32)
Definition UnitAI.h:154
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
void SetVisible(bool x)
Definition Unit.cpp:8513
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
uint32 GetHealth() const
Definition Unit.h:913
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
Unit * GetVictim() const
Definition Unit.h:859
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:954
float GetMapHeight(float x, float y, float z, bool vmap=true, float distanceToSearch=50.0f) const
Definition Object.cpp:3606
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2099
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition Object.cpp:1187
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_muru_dark_fiend_magic)
void HandleEffectPeriodic(AuraEffect const *aurEff)
void Register() override
PrepareAuraScript(spell_muru_darkness)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_muru_negative_energy_periodic)
void PeriodicTick(AuraEffect const *aurEff)
bool Validate(SpellInfo const *spellInfo) override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_muru_negative_energy)
PrepareAuraScript(spell_muru_summon_blood_elves_periodic)
bool Validate(SpellInfo const *) override
void OnPeriodic(AuraEffect const *)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
PrepareSpellScript(spell_muru_summon_blood_elves_script)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_muru_summon_void_sentinel_summoner)
void SetDest(SpellDestination &dest)
PrepareAuraScript(spell_muru_transform_visual_missile_periodic)
bool Validate(SpellInfo const *) override
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
float m_positionZ
Definition Position.h:58
float GetPositionZ() const
Definition Position.h:81
float GetPositionX() const
Definition Position.h:79
float GetPositionY() const
Definition Position.h:80
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