TrinityCore
boss_anubarak_trial.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// Known bugs:
19// Anubarak - underground phase partially not worked
20// - tele after impale hit a permafrost doesn't work (the entire tele spell should be better)
21// Scarab - Kill credit isn't crediting?
22
23#include "ScriptMgr.h"
24#include "InstanceScript.h"
25#include "MotionMaster.h"
26#include "ObjectAccessor.h"
27#include "ScriptedCreature.h"
28#include "SpellAuraEffects.h"
29#include "SpellScript.h"
30#include "TemporarySummon.h"
32
34{
44
45 EMOTE_SPIKE = 0
46};
47
49{
51 NPC_BURROW = 34862,
52 NPC_BURROWER = 34607,
53 NPC_SCARAB = 34605,
54 NPC_SPIKE = 34660
55};
56
58{
64 SPELL_MARK = 67574,
71
72 // Burrow
74
75 // Scarab
77 SPELL_ACID_MANDIBLE = 65774, //Passive - Triggered
78
79 // Burrower
81 SPELL_EXPOSE_WEAKNESS = 67720, //Passive - Triggered
86
88
92
93 //Frost Sphere
98
99 //Spike
106 SPELL_SPIKE_TELE = 66170
108
109#define SPELL_PERMAFROST_HELPER RAID_MODE<uint32>(66193, 67855, 67856, 67857)
110
112{
116
118{
119 {779.8038f, 150.6580f, 158.1426f, 0},
120 {736.0243f, 113.4201f, 158.0226f, 0},
121 {712.5712f, 160.9948f, 158.4368f, 0},
122 {701.4271f, 126.4740f, 158.0205f, 0},
123 {747.9202f, 155.0920f, 158.0613f, 0},
124 {769.6285f, 121.1024f, 158.0504f, 0},
125};
126
128{
131
133{
139
141{
142 // Anub'arak
152 EVENT_BERSERK = 10
154
156{
157 // Anub'arak
161
163{
165 {
166 Initialize();
167 }
168
170 {
171 _intro = true;
172 _reachedPhase3 = false;
173 }
174
175 void Reset() override
176 {
177 _Reset();
184 if (IsHeroic())
186
187 if (!IsHeroic())
189
190 Initialize();
192 me->SetUninteractible(false);
193 me->SetCanMelee(true);
194 // clean up spawned Frost Spheres
195 std::list<Creature*> FrostSphereList;
196 me->GetCreatureListWithEntryInGrid(FrostSphereList, NPC_FROST_SPHERE, 150.0f);
197 if (!FrostSphereList.empty())
198 for (std::list<Creature*>::iterator itr = FrostSphereList.begin(); itr != FrostSphereList.end(); ++itr)
199 (*itr)->DespawnOrUnsummon();
200
201 _burrowGUID.clear();
202 }
203
204 void KilledUnit(Unit* who) override
205 {
206 if (who->GetTypeId() == TYPEID_PLAYER)
208 }
209
210 void MoveInLineOfSight(Unit* /*who*/) override
211 {
212 if (!_intro)
213 {
215 _intro = false;
216 }
217 }
218
219 void JustReachedHome() override
220 {
222 //Summon Scarab Swarms neutral at random places
223 for (int i = 0; i < 10; i++)
224 if (Creature* scarab = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ()))
225 {
226 scarab->SetFaction(FACTION_PREY);
227 scarab->GetMotionMaster()->MoveRandom(10);
228 }
229 }
230
231 void JustDied(Unit* /*killer*/) override
232 {
233 _JustDied();
235
236 // despawn frostspheres and Burrowers on death
237 std::list<Creature*> AddList;
240 if (!AddList.empty())
241 for (std::list<Creature*>::iterator itr = AddList.begin(); itr != AddList.end(); ++itr)
242 (*itr)->DespawnOrUnsummon();
243 }
244
245 void JustSummoned(Creature* summoned) override
246 {
247 switch (summoned->GetEntry())
248 {
249 case NPC_BURROW:
250 _burrowGUID.push_back(summoned->GetGUID());
251 summoned->SetReactState(REACT_PASSIVE);
252 summoned->CastSpell(summoned, SPELL_CHURNING_GROUND, false);
253 summoned->SetDisplayFromModel(1);
254 break;
255 case NPC_SPIKE:
256 summoned->SetDisplayFromModel(0);
257 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
258 {
259 summoned->EngageWithTarget(target);
260 Talk(EMOTE_SPIKE, target);
261 }
262 break;
263 default:
264 break;
265 }
266 summons.Summon(summoned);
267 }
268
269 void JustEngagedWith(Unit* who) override
270 {
274 me->SetUninteractible(false);
275
276 // Despawn Scarab Swarms neutral
279
280 // Spawn Burrow
281 for (int i = 0; i < 4; i++)
283
284 // Spawn 6 Frost Spheres at start
285 for (int i = 0; i < 6; i++)
286 if (Unit* summoned = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
287 _sphereGUID[i] = summoned->GetGUID();
288 }
289
290 void UpdateAI(uint32 diff) override
291 {
292 if (!UpdateVictim())
293 return;
294
295 events.Update(diff);
296
298 return;
299
300 while (uint32 eventId = events.ExecuteEvent())
301 {
302 switch (eventId)
303 {
307 return;
309 {
312 me->CastSpell(nullptr, SPELL_PENETRATING_COLD, args);
314 return;
315 }
317 if (IsHeroic() || !_reachedPhase3)
318 {
321 me->CastSpell(nullptr, SPELL_SUMMON_BURROWER, args);
322 }
324 return;
326 {
330 break;
331 }
332 case EVENT_SUBMERGE:
334 {
338 me->SetUninteractible(true);
339 me->SetCanMelee(false);
345 }
346 break;
349 break;
351 {
352 /* WORKAROUND
353 * - The correct implementation is more likely the comment below but it needs spell knowledge
354 */
355 GuidList::iterator i = _burrowGUID.begin();
356 uint32 at = urand(0, _burrowGUID.size()-1);
357 for (uint32 k = 0; k < at; k++)
358 ++i;
359 if (Creature* pBurrow = ObjectAccessor::GetCreature(*me, *i))
360 pBurrow->CastSpell(pBurrow, 66340, false);
361
363
364 /*It seems that this spell have something more that needs to be taken into account
365 //Need more sniff info
366 DoCast(SPELL_SUMMON_BEATLES);
367 // Just to make sure it won't happen again in this phase
368 m_uiSummonScarabTimer = 90*IN_MILLISECONDS;*/
369 break;
370 }
371 case EVENT_EMERGE:
376 me->SetUninteractible(false);
377 me->SetCanMelee(true);
385 if (IsHeroic())
387 return;
389 {
390 uint8 startAt = urand(0, 5);
391 uint8 i = startAt;
392 do
393 {
394 if (Unit* pSphere = ObjectAccessor::GetCreature(*me, _sphereGUID[i]))
395 {
396 if (!pSphere->HasAura(SPELL_FROST_SPHERE))
397 {
399 _sphereGUID[i] = summon->GetGUID();
400 break;
401 }
402 }
403 i = (i + 1) % 6;
404 }
405 while
406 (i != startAt);
408 break;
409 }
410 case EVENT_BERSERK:
412 break;
413 default:
414 break;
415 }
416
418 return;
419 }
420
422 {
423 _reachedPhase3 = true;
427 }
428 }
429
430 private:
433 bool _intro;
435};
436
438{
439 npc_swarm_scarab(Creature* creature) : ScriptedAI(creature)
440 {
441 Initialize();
442 _instance = creature->GetInstanceScript();
443 }
444
446 {
448 }
449
450 void Reset() override
451 {
452 me->SetCorpseDelay(0);
453 Initialize();
456 if (me->IsInCombat())
458 anubarak->AI()->JustSummoned(me);
459 }
460
461 void DoAction(int32 actionId) override
462 {
463 switch (actionId)
464 {
468 break;
469 default:
470 break;
471 }
472 }
473
474 void JustDied(Unit* killer) override
475 {
476 if (killer)
477 DoCast(killer, SPELL_TRAITOR_KING);
478 }
479
480 void UpdateAI(uint32 diff) override
481 {
484
485 if (!UpdateVictim())
486 return;
487
488 /* Bosskillers don't recognize */
489 if (_determinationTimer <= diff)
490 {
493 }
494 else
495 _determinationTimer -= diff;
496 }
497
498 private:
501};
502
504{
506 {
507 Initialize();
508 _instance = creature->GetInstanceScript();
509 }
510
512 {
514 }
515
516 void Reset() override
517 {
518 me->SetCorpseDelay(10);
519 Initialize();
524 if (me->IsInCombat())
526 anubarak->AI()->JustSummoned(me);
527 }
528
529 void DoAction(int32 actionId) override
530 {
531 switch (actionId)
532 {
537 break;
538 default:
539 break;
540 }
541 }
542
543 void UpdateAI(uint32 diff) override
544 {
547
549 return;
550
552 return;
553
554 if ((_submergeTimer <= diff) && HealthBelowPct(80))
555 {
557 {
561 me->SetUninteractible(false);
562 }
563 else
564 {
566 {
568 me->SetUninteractible(true);
570 }
571 }
573 }
574 else
575 _submergeTimer -= diff;
576 }
577
578 private:
582};
583
585{
586 npc_frost_sphere(Creature* creature) : ScriptedAI(creature) { }
587
588 void Reset() override
589 {
593 me->GetMotionMaster()->MoveRandom(20.0f);
594 }
595
596 void DamageTaken(Unit* /*who*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
597 {
598 if (me->GetHealth() <= damage)
599 {
600 damage = 0;
601 float floorZ = me->GetPositionZ();
603 if (fabs(me->GetPositionZ() - floorZ) < 0.1f)
604 {
605 // we are close to the ground
607 me->SetUninteractible(true);
611 me->SetObjectScale(2.0f);
612 }
613 else
614 {
615 // we are in air
617 me->SetUninteractible(true);
618 //At hit the ground
621 }
622 }
623 }
624
625 void MovementInform(uint32 type, uint32 pointId) override
626 {
627 if (type != EFFECT_MOTION_TYPE)
628 return;
629
630 switch (pointId)
631 {
637 me->SetObjectScale(2.0f);
638 break;
639 default:
640 break;
641 }
642 }
643};
644
646{
648 {
649 Initialize();
650 }
651
653 {
656 }
657
658 void Reset() override
659 {
660 Initialize();
661 // make sure the spike has everyone on threat list
663 }
664
665 bool CanAIAttack(Unit const* victim) const override
666 {
667 return victim->GetTypeId() == TYPEID_PLAYER;
668 }
669
670 void JustEngagedWith(Unit* who) override
671 {
672 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
673 {
674 StartChase(target);
675 Talk(EMOTE_SPIKE, who);
676 }
677 }
678
679 void DamageTaken(Unit* /*who*/, uint32& uiDamage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
680 {
681 uiDamage = 0;
682 }
683
684 void UpdateAI(uint32 diff) override
685 {
686 if (!UpdateVictim())
687 {
689 return;
690 }
691
693 {
694 if (_phaseSwitchTimer <= diff)
695 {
696 switch (_phase)
697 {
702 if (Unit* target2 = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
703 {
704 StartChase(target2);
705 Talk(EMOTE_SPIKE, target2);
706 }
708 return;
713 return;
718 return;
719 default:
720 return;
721 }
722 }
723 else
724 _phaseSwitchTimer -= diff;
725 }
726 }
727
728 void MoveInLineOfSight(Unit* pWho) override
729 {
730 if (!pWho)
731 return;
732
733 if (pWho->GetEntry() != NPC_FROST_SPHERE)
734 return;
735
737 return;
738
739 if (me->IsWithinDist(pWho, 7.0f))
740 {
741 switch (_phase)
742 {
745 break;
748 break;
751 break;
752 default:
753 break;
754 }
755
757
758 pWho->ToCreature()->DespawnOrUnsummon(3s);
759
760 // After the spikes hit the icy surface they can't move for about ~5 seconds
763 SetCombatMovement(false);
766 }
767 }
768
769 void StartChase(Unit* who)
770 {
771 DoCast(who, SPELL_MARK);
772 me->SetSpeedRate(MOVE_RUN, 0.5f);
773 // make sure the Spine will really follow the one he should
776 AddThreat(who, 1000000.0f);
777 AttackStart(who);
778 }
779
780 private:
783};
784
785// 65920 - Pursuing Spikes
786// 65922 - Pursuing Spikes
787// 65923 - Pursuing Spikes
789{
790 bool Validate(SpellInfo const* /*spellInfo*/) override
791 {
793 }
794
795 bool Load() override
796 {
798 }
799
800 void PeriodicTick(AuraEffect const* /*aurEff*/)
801 {
802 Unit* permafrostCaster = nullptr;
803 if (Aura* permafrostAura = GetTarget()->GetAura(SPELL_PERMAFROST))
804 permafrostCaster = permafrostAura->GetCaster();
805
806 if (permafrostCaster)
807 {
809
810 if (Creature* permafrostCasterCreature = permafrostCaster->ToCreature())
811 permafrostCasterCreature->DespawnOrUnsummon(3s);
812
815 if (Creature* targetCreature = GetTarget()->ToCreature())
816 targetCreature->DisappearAndDie();
817 }
818 }
819
820 void Register() override
821 {
823 }
824};
825
826// 65919 - Impale
828{
830 {
831 Unit* target = GetHitUnit();
832 uint32 permafrost = SPELL_PERMAFROST;
833
834 // make sure Impale doesnt do damage if we are standing on permafrost
835 if (target && target->HasAura(permafrost))
837 }
838
839 void Register() override
840 {
842 }
843};
844
845// 66118, 67630, 68646, 68647 - Leeching Swarm
847{
848 bool Validate(SpellInfo const* /*spell*/) override
849 {
851 }
852
854 {
855 Unit* caster = GetCaster();
856 if (Unit* target = GetTarget())
857 {
858 int32 lifeLeeched = target->CountPctFromCurHealth(aurEff->GetAmount());
859 if (lifeLeeched < 250)
860 lifeLeeched = 250;
862 args.AddSpellMod(SPELLVALUE_BASE_POINT0, lifeLeeched);
863 // Damage
864 caster->CastSpell(target, SPELL_LEECHING_SWARM_DMG, args);
865 // Heal
866 caster->CastSpell(caster, SPELL_LEECHING_SWARM_HEAL, args);
867 }
868 }
869
870 void Register() override
871 {
873 }
874};
875
877{
883
887}
@ IN_MILLISECONDS
Definition: Common.h:35
TC_GAME_API bool InstanceHasScript(WorldObject const *obj, char const *scriptName)
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
@ IN_PROGRESS
@ FAIL
@ EFFECT_MOTION_TYPE
std::list< ObjectGuid > GuidList
Definition: ObjectGuid.h:394
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_0
Definition: SharedDefines.h:30
@ EMOTE_ONESHOT_FLYDEATH
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ FACTION_PREY
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
Definition: SpellDefines.h:266
@ SPELLVALUE_MAX_TARGETS
Definition: SpellDefines.h:230
@ SPELLVALUE_BASE_POINT0
Definition: SpellDefines.h:196
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
@ MOVE_RUN
Definition: UnitDefines.h:118
@ REACT_PASSIVE
Definition: UnitDefines.h:506
DamageEffectType
Definition: UnitDefines.h:131
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:145
@ UNIT_STATE_CASTING
Definition: Unit.h:270
@ DATA_ANUBARAK
Definition: azjol_nerub.h:33
#define SPELL_PERMAFROST_HELPER
@ EMOTE_BURROWER
@ EMOTE_SUBMERGE
@ EMOTE_LEECHING_SWARM
@ EMOTE_EMERGE
@ SAY_KILL_PLAYER
@ EMOTE_SPIKE
@ SAY_LEECHING_SWARM
void AddSC_boss_anubarak_trial()
@ ACTION_SCARAB_SUBMERGE
@ ACTION_SHADOW_STRIKE
@ PHASE_SUBMERGED
@ SPELL_CLEAR_ALL_DEBUFFS
@ SPELL_FREEZE_SLASH
@ SPELL_SUBMERGE_ANUBARAK
@ SPELL_LEECHING_SWARM
@ SPELL_EMERGE_ANUBARAK
@ SPELL_FROST_SPHERE
@ SPELL_EXPOSE_WEAKNESS
@ SPELL_SUMMON_BURROWER
@ SPELL_SPIKE_CALL
@ SPELL_SUMMON_BEATLES
@ SPELL_DETERMINATION
@ SPELL_CHURNING_GROUND
@ SPELL_SPIKE_TRAIL
@ SPELL_EMERGE_EFFECT
@ SPELL_MARK
@ SPELL_SPIKE_SPEED2
@ SPELL_SHADOW_STRIKE
@ SPELL_SPIKE_TELE
@ SPELL_SUBMERGE_EFFECT
@ SPELL_PERSISTENT_DIRT
@ SPELL_AWAKENED
@ SPELL_SPIDER_FRENZY
@ SPELL_SPIKE_FAIL
@ SUMMON_FROSTSPHERE
@ SPELL_LEECHING_SWARM_HEAL
@ SPELL_LEECHING_SWARM_DMG
@ SPELL_PENETRATING_COLD
@ SPELL_PERMAFROST_VISUAL
@ SPELL_SUMMON_SPIKE
@ SPELL_PERMAFROST
@ SPELL_BERSERK
@ SPELL_SPIKE_SPEED3
@ SPELL_SPIKE_SPEED1
@ SPELL_PERMAFROST_MODEL
@ SUMMON_SCARAB
@ SPELL_ACID_MANDIBLE
@ POINT_FALL_GROUND
const Position SphereSpawn[6]
@ NPC_FROST_SPHERE
@ NPC_BURROW
@ NPC_SCARAB
@ NPC_BURROWER
PursuingSpikesPhases
@ PHASE_IMPALE_NORMAL
@ PHASE_NO_MOVEMENT
@ PHASE_IMPALE_MIDDLE
@ PHASE_IMPALE_FAST
@ EVENT_FREEZE_SLASH
@ EVENT_EMERGE
@ EVENT_PURSUING_SPIKE
@ EVENT_SUMMON_NERUBIAN
@ EVENT_SUMMON_SCARAB
@ EVENT_PENETRATING_COLD
@ EVENT_BERSERK
@ EVENT_SUMMON_FROST_SPHERE
@ EVENT_NERUBIAN_SHADOW_STRIKE
@ EVENT_SUBMERGE
Yells
int32 GetAmount() const
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
Unit * GetCaster() const
Aura * GetAura() const
Unit * GetTarget() const
Unit * GetUnitOwner() const
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
SummonList summons
EventMap events
void _JustDied()
void DoZoneInCombat()
Definition: CreatureAI.h:161
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 SetCanMelee(bool canMelee, bool fleeFromMelee=false)
Definition: Creature.cpp:2822
void SetObjectScale(float scale) override
Definition: Creature.cpp:3391
void SetDisplayFromModel(uint32 modelIdx)
Definition: Creature.cpp:3413
void SetReactState(ReactStates st)
Definition: Creature.h:160
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
void SetCorpseDelay(uint32 delay, bool ignoreCorpseDecayRatio=false)
Definition: Creature.h:104
void DisappearAndDie()
Definition: Creature.h:83
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
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:217
void SetPhase(uint8 phase)
Definition: EventMap.cpp:28
virtual bool SetBossState(uint32 id, EncounterState state)
Creature * GetCreature(uint32 type)
EncounterState GetBossState(uint32 id) const
void MoveRandom(float wanderDistance=0.0f, Optional< Milliseconds > duration={}, MovementSlot slot=MOTION_SLOT_DEFAULT)
void MoveFall(uint32 id=0)
static Creature * ToCreature(Object *o)
Definition: Object.h:219
TypeID GetTypeId() const
Definition: Object.h:173
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
void PreventHitDamage()
Definition: SpellScript.h:979
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
void DespawnEntry(uint32 entry)
void Summon(Creature const *summon)
void DoAction(int32 info, Predicate &&predicate, uint16 max=0)
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:79
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
ThreatManager & GetThreatManager()
Definition: Unit.h:1063
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
void SetUninteractible(bool apply)
Definition: Unit.cpp:8147
uint64 GetHealth() const
Definition: Unit.h:776
void EngageWithTarget(Unit *who)
Definition: Unit.cpp:8077
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition: Unit.cpp:8525
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 RemoveAllAuras()
Definition: Unit.cpp:4242
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 RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
bool IsInCombat() const
Definition: Unit.h:1043
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:834
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1042
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition: Object.cpp:3312
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
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
void UpdateGroundPositionZ(float x, float y, float &z) const
Definition: Object.cpp:1360
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition: Object.cpp:1142
void HandleEffectPeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
void HandleDamageCalc(SpellEffIndex)
void Register() override
void PeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
MovementPoints
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
Definition: SpellDefines.h:474
constexpr float GetPositionX() const
Definition: Position.h:76
constexpr float GetPositionY() const
Definition: Position.h:77
constexpr float GetPositionZ() const
Definition: Position.h:78
bool IsHeroic() const
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
void SetCombatMovement(bool allowMovement)
T const & RAID_MODE(T const &normal10, T const &normal25) const
bool HealthBelowPct(uint32 pct) const
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
void KilledUnit(Unit *who) override
void JustSummoned(Creature *summoned) override
void JustReachedHome() override
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
void MoveInLineOfSight(Unit *) override
void JustEngagedWith(Unit *who) override
boss_anubarak_trial(Creature *creature)
npc_anubarak_spike(Creature *creature)
void JustEngagedWith(Unit *who) override
PursuingSpikesPhases _phase
void StartChase(Unit *who)
void DamageTaken(Unit *, uint32 &uiDamage, DamageEffectType, SpellInfo const *) override
void UpdateAI(uint32 diff) override
void MoveInLineOfSight(Unit *pWho) override
bool CanAIAttack(Unit const *victim) const override
void MovementInform(uint32 type, uint32 pointId) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
npc_frost_sphere(Creature *creature)
void UpdateAI(uint32 diff) override
void DoAction(int32 actionId) override
npc_nerubian_burrower(Creature *creature)
void UpdateAI(uint32 diff) override
npc_swarm_scarab(Creature *creature)
void DoAction(int32 actionId) override
InstanceScript * _instance
void JustDied(Unit *killer) override
constexpr Position AnubarakLoc[]
@ SPELL_TRAITOR_KING
#define RegisterTrialOfTheCrusaderCreatureAI(ai_name)
#define ToCrScriptName