TrinityCore
Loading...
Searching...
No Matches
boss_ahune.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 * Some details may be missing
20 * SPELL_IS_DEAD_CHECK is NYI, what it does is unknown
21 * Trash from instance start to first boss should not spawn if players entered instance by LFG (gameobjects like veins and herbs are spawned)
22 * Verify if Synch Health has correct script effect
23 * SPELL_AHUNE_RESURFACES doesn't work, caster is friendly to players?
24 */
25
26#include "ScriptMgr.h"
27#include "Containers.h"
28#include "GameObject.h"
29#include "GameObjectAI.h"
30#include "Group.h"
31#include "InstanceScript.h"
32#include "LFGMgr.h"
33#include "Map.h"
34#include "MotionMaster.h"
35#include "ObjectMgr.h"
36#include "Player.h"
37#include "ScriptedCreature.h"
38#include "ScriptedGossip.h"
39#include "SpellAuraEffects.h"
40#include "SpellScript.h"
41#include "the_slave_pens.h"
42
44{
45 // Ahune Summon Loc Bunny
47
48 // Ahune (sender is guessed)
50
51 // Earthen Ring Flamecaller
54
55 // Player
56 TEXT_INTRO_1 = 24895,
57 TEXT_INTRO_2 = 24893,
58 TEXT_INTRO_3 = 24894
59};
60
62{
63 // Ahune - Combat - Initial
65 SPELL_STAND = 37752,
68
69 // Ahune - Combat
72
73 // Ahune - Combat - Submerge
77
78 // Ahune - Combat - Death
80
81 // Frozen Core
86
87 // Earthen Ring Flamecaller
90
91 // Shaman Bonfire Bunny
94
95 // Ahune Summon Loc Bunny
103
104 // Ahune Ice Spear Bunny
108
109 // Ice Stone
111
112 // Scripts
128
148
162
169
177
178static const Position AhuneSpawnPosition = { -99.10210f, -233.75261f, -1.2229697f, 1.567972064018249511f };
179static const Position CoreSpawnPosition = { -98.01508f, -230.45549f, -1.2108916f, 1.797689080238342285f };
180
181// 25740 - Ahune
182struct boss_ahune : public BossAI
183{
184 boss_ahune(Creature* creature) : BossAI(creature, DATA_AHUNE), _summonCount(0) { }
185
186 void InitializeAI() override
187 {
188 me->SetCorpseDelay(20, true);
190 }
191
200
208
209 void JustSummoned(Creature* summon) override
210 {
211 if (summon->GetEntry() == NPC_FROZEN_CORE)
212 return;
213
214 DoZoneInCombat(summon);
215 summons.Summon(summon);
216 }
217
245
246 void SetData(uint32 type, uint32 value) override
247 {
248 if (type == DATA_SUMMON_COUNT)
249 _summonCount = value;
250 }
251
252 uint32 GetData(uint32 type) const override
253 {
254 if (type == DATA_SUMMON_COUNT)
255 return _summonCount;
256
257 return 0;
258 }
259
260 void EnterEvadeMode(EvadeReason /*why*/) override
261 {
263
265 bunny->AI()->DoAction(ACTION_STOP_EVENT_WIPE);
266
267 if (Creature* frozenCore = instance->GetCreature(DATA_FROZEN_CORE))
268 frozenCore->DespawnOrUnsummon();
269
271
273 }
274
275 void JustDied(Unit* /*killer*/) override
276 {
278
280 bunny->AI()->DoAction(ACTION_STOP_EVENT_WIN);
281
282 Map::PlayerList const& players = me->GetMap()->GetPlayers();
283 if (!players.isEmpty())
284 {
285 if (Group* group = players.begin()->GetSource()->GetGroup())
286 if (group->isLFGGroup())
287 sLFGMgr->FinishDungeon(group->GetGUID(), LFG_DUNGEON_ID_AHUNE, me->GetMap());
288 }
289
290 _JustDied();
291 }
292
293 void ExecuteEvent(uint32 eventId) override
294 {
295 switch (eventId)
296 {
299 break;
301 if (Creature* frozenCore = instance->GetCreature(DATA_FROZEN_CORE))
302 DoCast(frozenCore, SPELL_SYNCH_HEALTH, true);
303 events.Repeat(2s);
304 break;
305 case EVENT_SUICIDE:
306 if (Creature* frozenCore = instance->GetCreature(DATA_FROZEN_CORE))
307 if (!frozenCore->IsAlive())
309 events.Repeat(2s);
310 break;
311 default:
312 break;
313 }
314 }
315
316private:
318};
319
320// 25865 - Frozen Core
322{
323 npc_frozen_core(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
324
325 void InitializeAI() override
326 {
327 me->SetCorpseDelay(5, true);
329 me->SetRegenerateHealth(false);
331 }
332
341
342 void Reset() override
343 {
344 _events.Reset();
345 }
346
347 void DoAction(int32 action) override
348 {
349 if (action == ACTION_ACTIVATE_CORE)
350 {
351 // Not correct, aura is not removed. It stops working for a while but starts working again before phase end,
352 // making it impossible to simply check in aura script if core is uninteractible
355 me->SetImmuneToPC(false);
356 }
357 else if (action == ACTION_DEACTIVATE_CORE)
358 {
361 me->SetImmuneToPC(true);
362 }
363 }
364
365 void JustDied(Unit* /*killer*/) override
366 {
369 }
370
371 void UpdateAI(uint32 diff) override
372 {
373 UpdateVictim();
374
375 _events.Update(diff);
376
377 while (uint32 eventId = _events.ExecuteEvent())
378 {
379 switch (eventId)
380 {
383 DoCast(ahune, SPELL_SYNCH_HEALTH, true);
384 _events.Repeat(2s);
385 break;
386 case EVENT_SUICIDE:
388 if (!ahune->IsAlive())
390 _events.Repeat(2s);
391 break;
392 default:
393 break;
394 }
395 }
396 }
397
398private:
401};
402
403// 25745 - [PH] Ahune Summon Loc Bunny
405{
406 npc_ahune_bunny(Creature* creature) : ScriptedAI(creature), _summons(me), _instance(creature->GetInstanceScript()) { }
407
408 void JustSummoned(Creature* summon) override
409 {
410 if (summon->GetEntry() == NPC_AHUNE)
411 return;
412
413 DoZoneInCombat(summon);
414 _summons.Summon(summon);
415 }
416
418 {
419 std::vector<Creature*> creatures;
424 for (Creature* creature : creatures)
425 creature->AI()->DoAction(ACTION_RESET_CREATURES);
426
427 std::vector<Creature*> beams;
431 for (Creature* beam : beams)
432 beam->RemoveAurasDueToSpell(SPELL_FIND_OPENING_BEAM_END);
433 }
434
435 void DoAction(int32 action) override
436 {
437 switch (action)
438 {
442 break;
446 _events.Reset();
447
448 me->SummonGameObject(GO_ICE_STONE, -69.90455f, -162.2449f, -2.366563f, 2.426008f, QuaternionData(0.0f, 0.0f, 0.9366722f, 0.3502074f), 0s);
449 break;
453 _events.Reset();
454 break;
455 default:
456 break;
457 }
458 }
459
460 void UpdateAI(uint32 diff) override
461 {
462 _events.Update(diff);
463
464 while (uint32 eventId = _events.ExecuteEvent())
465 {
466 switch (eventId)
467 {
468 case EVENT_INTRO_1:
471 break;
472 case EVENT_INTRO_2:
476 break;
477 case EVENT_INTRO_3:
479 break;
480
485 break;
486
487 case EVENT_SUBMERGE:
488 if (Creature* flamecaller = me->FindNearestCreatureWithOptions(200.0f, { .StringId = "EarthenRingFlamecaller3" }))
489 flamecaller->AI()->DoAction(ACTION_RETREAT_EMOTE);
490
492 DoCast(ahune, SPELL_FOUND_OPENING, true);
493
495 break;
497 {
498 std::vector<Creature*> bonfires;
502 for (Creature* bonfire : bonfires)
503 bonfire->AI()->DoAction(ACTION_STOP_VISUALS);
504
505 std::vector<Creature*> beams;
509 for (Creature* beam : beams)
510 beam->DespawnOrUnsummon();
512 break;
513 }
517
518 if (Creature* flamecaller = me->FindNearestCreatureWithOptions(200.0f, { .StringId = "EarthenRingFlamecaller3" }))
519 flamecaller->AI()->DoAction(ACTION_RESURFACE_EMOTE);
520
522 break;
524 {
527
528 std::vector<Creature*> creatures;
530 for (Creature* creature : creatures)
531 creature->AI()->DoAction(ACTION_START_VISUALS);
532
534 core->AI()->DoAction(ACTION_DEACTIVATE_CORE);
535
538 break;
539 }
540 default:
541 break;
542 }
543 }
544 }
545
546private:
550};
551
552// 25754 - Earthen Ring Flamecaller
554{
555 npc_earthen_ring_flamecaller(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
556
557 void JustAppeared() override
558 {
560 }
561
562 void DoAction(int32 action) override
563 {
564 switch (action)
565 {
568
569 if (me->HasStringId("EarthenRingFlamecaller1"))
571 else if (me->HasStringId("EarthenRingFlamecaller2"))
573 else if (me->HasStringId("EarthenRingFlamecaller3"))
575 break;
578 break;
581 break;
585
586 if (me->HasStringId("EarthenRingFlamecaller1"))
587 {
588 _scheduler.Schedule(45s, 55s, [this](TaskContext /*task*/)
589 {
591
593 DoCast(bonfireBunny, SPELL_FIND_OPENING_VISUAL_TRIGGER, true);
594 });
595 }
596 else if (me->HasStringId("EarthenRingFlamecaller2"))
597 {
598 _scheduler.Schedule(75s, 80s, [this](TaskContext /*task*/)
599 {
601
603 DoCast(bonfireBunny, SPELL_FIND_OPENING_VISUAL_TRIGGER, true);
604 });
605 }
606 else if (me->HasStringId("EarthenRingFlamecaller3"))
607 {
608 _scheduler.Schedule(20s, 25s, [this](TaskContext /*task*/)
609 {
611
613 DoCast(bonfireBunny, SPELL_FIND_OPENING_VISUAL_TRIGGER, true);
614 });
615 }
616 break;
621 break;
622 default:
623 break;
624 }
625 }
626
627 void MovementInform(uint32 type, uint32 pointId) override
628 {
629 if (type != POINT_MOTION_TYPE)
630 return;
631
632 if (pointId == POINT_HOME)
634 }
635
636 void WaypointPathEnded(uint32/* waypointId*/, uint32 pathId) override
637 {
638 switch (pathId)
639 {
642 me->SetFacingToObject(bonfireBunny);
643
645
646 _scheduler.Schedule(45s, 55s, [this](TaskContext /*task*/)
647 {
649
651 DoCast(bonfireBunny, SPELL_FIND_OPENING_VISUAL_TRIGGER, true);
652 });
653 break;
656 me->SetFacingToObject(bonfireBunny);
657
659
660 _scheduler.Schedule(75s, 80s, [this](TaskContext /*task*/)
661 {
663
665 DoCast(bonfireBunny, SPELL_FIND_OPENING_VISUAL_TRIGGER, true);
666 });
667 break;
670 me->SetFacingToObject(bonfireBunny);
671
673
674 _scheduler.Schedule(20s, 25s, [this](TaskContext /*task*/)
675 {
677
679 DoCast(bonfireBunny, SPELL_FIND_OPENING_VISUAL_TRIGGER, true);
680 });
681 break;
682 default:
683 break;
684 }
685 }
686
687 void UpdateAI(uint32 diff) override
688 {
689 _scheduler.Update(diff);
690 }
691
692private:
696};
697
698// 25971 - Shaman Bonfire Bunny 000
699// 25972 - Shaman Bonfire Bunny 001
700// 25973 - Shaman Bonfire Bunny 002
702{
703 npc_shaman_bonfire_bunny(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
704
705 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
706 {
707 switch (spellInfo->Id)
708 {
711 break;
713 switch (me->GetEntry())
714 {
718 break;
722 break;
726 break;
727 default:
728 break;
729 }
730 break;
731 default:
732 break;
733 }
734 }
735
736 void DoAction(int32 action) override
737 {
738 if (action == ACTION_RESET_CREATURES)
739 {
742 }
743 else if (action == ACTION_STOP_VISUALS)
744 {
746 }
747 }
748
749private:
751};
752
753// 25985 - Ahune Ice Spear Bunny
755{
757
758 void JustAppeared() override
759 {
762
763 _scheduler.Schedule(2500ms, [this](TaskContext /*task*/)
764 {
766 me->DespawnOrUnsummon(3500ms);
767 });
768 }
769
770 void UpdateAI(uint32 diff) override
771 {
772 _scheduler.Update(diff);
773 }
774
775private:
777};
778
779// 188077 - Ice Spear
781{
783
784 void Reset() override
785 {
786 _scheduler.Schedule(2500ms, [this](TaskContext /*task*/)
787 {
789 me->DespawnOrUnsummon(3500ms);
790 });
791 }
792
793 void UpdateAI(uint32 diff) override
794 {
795 _scheduler.Update(diff);
796 }
797
798private:
800};
801
802// 187882 - Ice Stone
804{
806
807 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
808 {
809 ClearGossipMenuFor(player);
810 CloseGossipMenuFor(player);
813 return true;
814 }
815};
816
817// 45926 - Summoning Rhyme Aura
819{
821
822 bool Validate(SpellInfo const* /*spellInfo*/) override
823 {
825 sObjectMgr->GetBroadcastText(TEXT_INTRO_1) && sObjectMgr->GetBroadcastText(TEXT_INTRO_2) && sObjectMgr->GetBroadcastText(TEXT_INTRO_3);
826 }
827
828 void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
829 {
830 Unit* target = GetTarget();
831
832 if (InstanceScript* instance = target->GetInstanceScript())
833 {
834 if (Creature* bunny = instance->GetCreature(DATA_AHUNE_BUNNY))
835 bunny->AI()->DoAction(ACTION_START_EVENT);
836
837 std::vector<Creature*> flamecallers;
839 for (Creature* flamecaller : flamecallers)
840 flamecaller->AI()->DoAction(ACTION_START_EVENT);
841
842 // Luma should cast 45926 on player before despawn, NYI
843 if (Creature* luma = instance->GetCreature(DATA_LUMA_SKYMOTHER))
844 luma->DespawnOrUnsummon();
845 }
846
848 target->Unit::Say(TEXT_INTRO_1);
850 }
851
852 void OnPeriodic(AuraEffect const* aurEff)
853 {
854 Unit* target = GetTarget();
855
856 switch (aurEff->GetTickNumber())
857 {
858 case 1:
859 target->CastSpell(nullptr, SPELL_SUMMONING_RHYME_BONFIRE, true);
860 target->Unit::Say(TEXT_INTRO_2);
861 break;
862 case 2:
863 target->Unit::Say(TEXT_INTRO_3);
864 Remove();
865 break;
866 default:
867 break;
868 }
869 }
870
876};
877
878// 45954 - Ahune's Shield
880{
882
883 bool Validate(SpellInfo const* /*spellInfo*/) override
884 {
886 }
887
888 void OnPeriodic(AuraEffect const* /*aurEff*/)
889 {
890 GetTarget()->CastSpell(nullptr, SPELL_SUMMON_COLDWEAVE, true);
891 GetTarget()->CastSpell(nullptr, SPELL_SUMMON_COLDWEAVE, true);
892
893 if (Creature* creature = GetTarget()->ToCreature())
894 {
895 // This value was verified by two sniffs
896 if (creature->AI()->GetData(DATA_SUMMON_COUNT) < 14)
897 creature->AI()->SetData(DATA_SUMMON_COUNT, creature->AI()->GetData(DATA_SUMMON_COUNT) + 1);
898 else
899 creature->CastSpell(nullptr, SPELL_SUMMON_FROSTWIND, true);
900 }
901 }
902
907};
908
909// 46430 - Synch Health
924
925// 46878 - Summon Ice Spear Delayer
946
947// 46371 - Ice Spear Control Aura
967
968// 46372 - Ice Spear Target Picker
995
996// 46320 - Slippery Floor Ambient Periodic
998{
1000
1001 bool Validate(SpellInfo const* /*spellInfo*/) override
1002 {
1004 }
1005
1006 void HandleScript(SpellEffIndex /*effIndex*/)
1007 {
1008 Unit* target = GetHitUnit();
1009 if (target->isMoving())
1010 {
1011 target->CastSpell(target, SPELL_SLIPPERY_FLOOR_SLIP, true);
1012 target->CastSpell(target, SPELL_SLIPPERY_FLOOR_YOU_SLIPPED, true);
1013 }
1014 }
1015
1020};
1021
1022// 46146 - Ahune Spanky Hands
1024{
1026
1027 bool Validate(SpellInfo const* /*spellInfo*/) override
1028 {
1030 }
1031
1032 void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
1033 {
1034 eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_COLD_SLAP, true);
1035 }
1036
1041};
1042
1043// 46843 - Minion Despawner
1045{
1047
1048 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1049 {
1050 if (Creature* creature = GetTarget()->ToCreature())
1051 creature->DespawnOrUnsummon();
1052 }
1053
1058};
1059
1060// 46398 - Ice Bombardment Dest Picker
1080
1081// 45964 - Find Opening Visual
1101
1102// 46333 - Find Opening Beam End
1122
1123// 46735 - Spank - Force Bunny To Knock You To
1143
1144// 46809 - Make Ahune's Ghost Burst
1146{
1148
1149 bool Validate(SpellInfo const* /*spellInfo*/) override
1150 {
1151 return sObjectMgr->GetCreatureTemplate(NPC_GHOST_OF_AHUNE);
1152 }
1153
1157 {
1158 if (Creature* creature = GetCaster()->FindNearestCreature(NPC_GHOST_OF_AHUNE, 200.0f))
1159 creature->AI()->SetData(DATA_GHOST_OF_AHUNE, DATA_GHOST_OF_AHUNE);
1160 }
1161
1166};
1167
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
#define sLFGMgr
Definition LFGMgr.h:492
@ POINT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
#define sObjectMgr
Definition ObjectMgr.h:1721
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
void ClearGossipMenuFor(Player *player)
void CloseGossipMenuFor(Player *player)
SpellEffIndex
@ EFFECT_0
@ EFFECT_2
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ TARGET_UNIT_SRC_AREA_ENTRY
@ EMOTE_ONESHOT_SHOUT
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_PERIODIC_DUMMY
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellCastFn(F)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ REACT_PASSIVE
@ UNIT_STAND_STATE_SUBMERGED
Definition UnitDefines.h:43
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:34
@ UNIT_STAND_STATE_SIT
Definition UnitDefines.h:35
@ UNIT_FLAG_UNINTERACTIBLE
static const Position CoreSpawnPosition
AhuneSpells
@ SPELL_SUMMONING_RHYME_AURA
@ SPELL_SUMMON_LOOT_MISSILE
@ SPELL_FIND_OPENING_BEAM_END
@ SPELL_BONFIRE_DISGUISE
@ SPELL_ICE_SPEAR_CONTROL_AURA
@ SPELL_FROZEN_CORE_GETS_HIT
@ SPELL_AHUNES_SHIELD
@ SPELL_AHUNE_SELF_STUN
@ SPELL_SUBMERGED
@ SPELL_COLD_SLAP
@ SPELL_FIND_OPENING_VISUAL_TRIGGER
@ SPELL_BEAM_ATTACK_AGAINST_AHUNE
@ SPELL_SLIPPERY_FLOOR_YOU_SLIPPED
@ SPELL_FORCE_WHISP_FLIGHT_MISSILE
@ SPELL_IS_DEAD_CHECK
@ SPELL_MINION_DESPAWNER
@ SPELL_ICE_SPEAR_VISUAL
@ SPELL_FIND_OPENING_VISUAL
@ SPELL_SUMMONING_VISUAL_1
@ SPELL_ICE_SPEAR_TARGET_PICKER
@ SPELL_SUMMON_ICE_SPEAR_GO
@ SPELL_SUMMON_ICE_SPEAR_BUNNY
@ SPELL_ICE_BOMBARD
@ SPELL_STAY_SUBMERGED
@ SPELL_FIND_OPENING_CHANNEL
@ SPELL_ICE_SPEAR_KNOCKBACK
@ SPELL_SLIPPERY_FLOOR_SLIP
@ SPELL_STAND
@ SPELL_ICE_BOMBARDMENT
@ SPELL_FOUND_OPENING
@ SPELL_AHUNE_RESURFACES
@ SPELL_SUMMONING_RHYME_BONFIRE
@ SPELL_SUICIDE
@ SPELL_SYNCH_HEALTH
@ SPELL_SHAMANS_LOOK_FOR_OPENING
@ SPELL_SUMMON_FROSTWIND
@ SPELL_ICE_SPEAR_DELAY
@ SPELL_AHUNE_SPANKY_HANDS
@ SPELL_AHUNE_DIES_ACHIEVEMENT
@ SPELL_SPANK_KNOCK_TO
@ SPELL_SUMMON_COLDWEAVE
@ SPELL_SUMMON_HAILSTONE
@ SPELL_CLOSE_OPENING_VISUAL
void AddSC_boss_ahune()
AhuneMisc
@ POINT_HOME
@ DATA_SUMMON_COUNT
@ LFG_DUNGEON_ID_AHUNE
@ DATA_GHOST_OF_AHUNE
AhuneTexts
@ TEXT_INTRO_1
@ EMOTE_EARTHEN_ASSAULT
@ EMOTE_WON
@ EMOTE_RETREAT
@ TEXT_INTRO_3
@ EMOTE_RESURFACE
@ TEXT_INTRO_2
AhunePaths
@ PATH_FLAMECALLER_2
@ PATH_FLAMECALLER_1
@ PATH_FLAMECALLER_3
static const Position AhuneSpawnPosition
AhuneEvents
@ EVENT_INTRO_1
@ EVENT_RESURFACE_3
@ EVENT_RESURFACE_1
@ EVENT_INTRO_2
@ EVENT_SUMMON_HAILSTONE
@ EVENT_SUICIDE
@ EVENT_SUBMERGE
@ EVENT_SUMMON_FROZEN_CORE
@ EVENT_RESURFACE_2
@ EVENT_INTRO_3
@ EVENT_SYNCH_HEALTH
AhuneActions
@ ACTION_START_VISUALS
@ ACTION_STOP_EVENT_WIN
@ ACTION_START_EVENT
@ ACTION_RESURFACE_EMOTE
@ ACTION_RETREAT_EMOTE
@ ACTION_STOP_EVENT_WIPE
@ ACTION_STOP_VISUALS
@ ACTION_ACTIVATE_CORE
@ ACTION_RESET_CREATURES
@ ACTION_DEACTIVATE_CORE
uint32 GetTickNumber() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
Unit * GetTarget() const
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
HookList< EffectProcHandler > OnEffectProc
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
SummonList summons
EventMap events
void DoZoneInCombat(Creature *creature=nullptr)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
void SetImmuneToPC(bool apply) override
Definition Creature.h:138
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:304
void SetReactState(ReactStates st)
Definition Creature.h:128
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool HasStringId(std::string_view id) const
void SetRegenerateHealth(bool value)
Definition Creature.h:294
void SetCorpseDelay(uint32 delay, bool ignoreCorpseDecayRatio=false)
Definition Creature.h:98
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
void Reset()
Definition EventMap.cpp:21
GameObject *const me
GameObjectAI(GameObject *go)
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
void DespawnOrUnsummon(Milliseconds delay=0ms, Seconds forceRespawnTime=0s)
Definition Group.h:165
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
Creature * GetCreature(uint32 type)
bool isEmpty() const
Definition LinkedList.h:108
iterator begin()
PlayerList const & GetPlayers() const
Definition Map.h:468
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MovePath(uint32 pathId, bool repeatable)
uint32 GetEntry() const
Definition Object.h:81
Group * GetGroup()
Definition Player.h:2159
Unit * GetActionTarget() const
Definition Unit.h:523
Unit * GetActor()
Definition Unit.h:522
FROM * GetSource() const
Definition Reference.h:96
uint32 Id
Definition SpellInfo.h:289
HookList< CastHandler > AfterCast
WorldLocation * GetHitDest() const
Unit * GetCaster() const
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void Summon(Creature const *summon)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
virtual void InitializeAI()
Definition UnitAI.cpp:36
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:783
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition Unit.cpp:3116
MotionMaster * GetMotionMaster()
Definition Unit.h:1683
void SetHealth(uint32 val)
Definition Unit.cpp:9338
void SetFacingToObject(WorldObject const *object, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13235
bool isMoving() const
Definition Unit.h:1775
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3807
void HandleEmoteCommand(Emote emoteId)
Definition Unit.cpp:1579
void SetStandState(UnitStandStateType state)
Definition Unit.cpp:10340
void SetUnitFlag(UnitFlags flags)
Definition Unit.h:968
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:969
Map * GetMap() const
Definition Object.h:451
Creature * FindNearestCreatureWithOptions(float range, FindCreatureOptions const &options) const
Definition Object.cpp:2109
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1088
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2833
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:1993
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition Object.cpp:2016
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
PrepareAuraScript(spell_ahune_ahunes_shield)
void OnPeriodic(AuraEffect const *)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_ahune_find_opening_beam_end)
void OnPeriodic(AuraEffect const *)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_ahune_find_opening_visual)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_ahune_ice_bombardment_dest_picker)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_ahune_ice_spear_control_aura)
bool Validate(SpellInfo const *) override
void OnPeriodic(AuraEffect const *)
PrepareSpellScript(spell_ahune_ice_spear_target_picker)
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_ahune_make_ahunes_ghost_burst)
PrepareAuraScript(spell_ahune_minion_despawner)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareSpellScript(spell_ahune_slippery_floor_periodic)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_ahune_spank_force_bunny_to_knock_you_to)
void HandleProc(AuraEffect const *, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_ahune_spanky_hands)
bool Validate(SpellInfo const *) override
void OnPeriodic(AuraEffect const *)
PrepareAuraScript(spell_ahune_summon_ice_spear_delayer)
bool Validate(SpellInfo const *) override
void OnPeriodic(AuraEffect const *aurEff)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_ahune_summoning_rhyme_aura)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_ahune_synch_health)
void Register() override
void HandleScript(SpellEffIndex)
void RandomResize(C &container, std::size_t requestedSize)
Definition Containers.h:66
ScriptedAI(Creature *creature)
uint32 GetData(uint32 type) const override
void SetData(uint32 type, uint32 value) override
void EnterEvadeMode(EvadeReason) override
void ExecuteEvent(uint32 eventId) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void JustSummoned(Creature *summon) override
void JustAppeared() override
boss_ahune(Creature *creature)
void JustEngagedWith(Unit *who) override
uint32 _summonCount
void JustDied(Unit *) override
void InitializeAI() override
TaskScheduler _scheduler
void Reset() override
void UpdateAI(uint32 diff) override
bool OnGossipSelect(Player *player, uint32, uint32) override
void JustSummoned(Creature *summon) override
void DoResetCreatures()
SummonList _summons
InstanceScript * _instance
void UpdateAI(uint32 diff) override
void DoAction(int32 action) override
npc_ahune_bunny(Creature *creature)
void UpdateAI(uint32 diff) override
void JustAppeared() override
void WaypointPathEnded(uint32, uint32 pathId) override
void DoAction(int32 action) override
void MovementInform(uint32 type, uint32 pointId) override
void UpdateAI(uint32 diff) override
npc_earthen_ring_flamecaller(Creature *creature)
void Reset() override
void JustDied(Unit *) override
void DoAction(int32 action) override
void JustAppeared() override
InstanceScript * _instance
void InitializeAI() override
npc_frozen_core(Creature *creature)
void UpdateAI(uint32 diff) override
InstanceScript * _instance
npc_shaman_bonfire_bunny(Creature *creature)
void DoAction(int32 action) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
@ GO_ICE_STONE
@ NPC_SHAMAN_BONFIRE_BUNNY_001
@ NPC_SHAMAN_BEAM_BUNNY_001
@ NPC_SHAMAN_BEAM_BUNNY_000
@ NPC_FROZEN_CORE
@ NPC_AHUNE
@ NPC_EARTHEN_RING_FLAMECALLER
@ NPC_GHOST_OF_AHUNE
@ NPC_SHAMAN_BONFIRE_BUNNY_002
@ NPC_SHAMAN_BONFIRE_BUNNY_000
@ NPC_SHAMAN_BEAM_BUNNY_002
#define RegisterSlavePensGameObjectAI(ai_name)
@ DATA_BONFIRE_BUNNY_000
@ DATA_BEAM_BUNNY_002
@ DATA_AHUNE_BUNNY
@ DATA_FROZEN_CORE
@ DATA_AHUNE
@ DATA_BEAM_BUNNY_001
@ DATA_BONFIRE_BUNNY_001
@ DATA_LUMA_SKYMOTHER
@ DATA_BEAM_BUNNY_000
@ DATA_BONFIRE_BUNNY_002
#define RegisterSlavePensCreatureAI(ai_name)