TrinityCore
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#include "ScriptMgr.h"
19#include "Containers.h"
20#include "CreatureTextMgr.h"
21#include "GameObject.h"
22#include "GameObjectAI.h"
23#include "Group.h"
24#include "InstanceScript.h"
25#include "LFGMgr.h"
26#include "Map.h"
27#include "MotionMaster.h"
28#include "ObjectAccessor.h"
29#include "Player.h"
30#include "ScriptedCreature.h"
31#include "ScriptedGossip.h"
32#include "SpellAuraEffects.h"
33#include "SpellInfo.h"
34#include "SpellScript.h"
35#include "TemporarySummon.h"
36#include "the_slave_pens.h"
37
39{
40 // Ahune
50 SPELL_STAND = 37752,
51
52 //Earther Ring Flamecaller
59
60 //Ahune Bunny
73
74 // Ice Spear
79
80 // Slippery Floor
85
86 // Frozen Core
89 SPELL_IS_DEAD_CHECK = 61976, // NYI
96};
97
99{
104
106{
111
113{
130
132{
137 ACTION_EMOTE_RESURFACE = -2575400
139
141{
143 PHASE_TWO = 1
145
147{
152
154{
157
159{
160 { -99.1021f, -233.7526f, -1.22307f, 1.588250f }, // Ahune
161 { -98.0151f, -230.4555f, -1.21089f, 1.797689f }, // Frozen Core
162 { -143.172f, -147.6801f, -3.16113f, 4.852015f }, // Bonfire Bunny 000
163 { -134.304f, -145.7803f, -1.70332f, 4.677482f }, // Bonfire Bunny 001
164 { -125.036f, -144.2065f, -1.91660f, 4.991642f } // Bonfire Bunny 002
165};
166
168{
169 { -145.2233f, -137.5543f, -1.59056f, 5.427049f },
170 { -137.4383f, -136.4050f, -1.72384f, 5.336747f },
171 { -129.0413f, -132.1494f, -2.09285f, 5.460842f }
172};
173
174struct boss_ahune : public BossAI
175{
176 boss_ahune(Creature* creature) : BossAI(creature, DATA_AHUNE)
177 {
179 }
180
181 void JustEngagedWith(Unit* who) override
182 {
186 }
187
188 void EnterEvadeMode(EvadeReason /*why*/) override
189 {
190 if (Creature* ahuneBunny = instance->GetCreature(DATA_AHUNE_BUNNY))
191 ahuneBunny->AI()->DoAction(ACTION_STOP_EVENT);
194 }
195
196 void JustDied(Unit* /*killer*/) override
197 {
199
200 if (Creature* ahuneBunny = instance->GetCreature(DATA_AHUNE_BUNNY))
201 Unit::Kill(me, ahuneBunny);
202 if (Creature* frozenCore = instance->GetCreature(DATA_FROZEN_CORE))
203 Unit::Kill(me, frozenCore);
204
205 Map::PlayerList const& players = me->GetMap()->GetPlayers();
206 if (!players.isEmpty())
207 {
208 if (Group* group = players.begin()->GetSource()->GetGroup())
209 if (group->isLFGGroup())
210 sLFGMgr->FinishDungeon(group->GetGUID(), 286, me->GetMap());
211 }
212
213 _JustDied();
214 }
215
216 void DoAction(int32 action) override
217 {
218 if (action == ACTION_AHUNE_RETREAT)
219 {
220 Submerge();
222 }
223 }
224
225 void ExecuteEvent(uint32 eventId) override
226 {
227 switch (eventId)
228 {
233 break;
234 case EVENT_EMERGE:
235 Emerge();
236 break;
238 if (Creature* frozenCore = instance->GetCreature(DATA_FROZEN_CORE))
239 DoCast(frozenCore, SPELL_SYNCH_HEALTH, true);
240 else
242 events.Repeat(3s);
243 break;
244 default:
245 break;
246 }
247 }
248
249 void Emerge()
250 {
251 if (Creature* frozenCore = instance->GetCreature(DATA_FROZEN_CORE))
252 frozenCore->AI()->DoAction(ACTION_AHUNE_RESURFACE);
253
259 me->SetUninteractible(false);
261 }
262
263 void Submerge()
264 {
265 if (Creature* frozenCore = instance->GetCreature(DATA_FROZEN_CORE))
266 frozenCore->AI()->DoAction(ACTION_AHUNE_RETREAT);
272 events.Reset();
273 }
274};
275
277{
278 npc_frozen_core(Creature* creature) : ScriptedAI(creature)
279 {
281 Initialize();
282 }
283
285 {
287 me->SetRegenerateHealth(false);
291 }
292
293 void JustDied(Unit* /*killer*/) override
294 {
296 Unit::Kill(me, ahune);
297
300 }
301
302 void DoAction(int32 action) override
303 {
304 if (action == ACTION_AHUNE_RETREAT)
305 {
306 me->SetUninteractible(false);
307 me->SetImmuneToPC(false);
310 }
311 else if (action == ACTION_AHUNE_RESURFACE)
312 {
313 _events.Reset();
315 me->SetUninteractible(true);
316 me->SetImmuneToPC(true);
317 }
318 }
319
320 void UpdateAI(uint32 diff) override
321 {
322 _events.Update(diff);
323
324 while (uint32 eventId = _events.ExecuteEvent())
325 {
326 switch (eventId)
327 {
330 DoCast(ahune, SPELL_SYNCH_HEALTH, true);
331 else
333 _events.Repeat(3s);
334 break;
335 default:
336 break;
337 }
338 }
339 }
340
341private:
344};
345
347{
349 {
351 _submerged = false;
352 }
353
354 void JustSummoned(Creature* summon) override
355 {
356 if (summon->GetEntry() == NPC_AHUNE)
357 return;
358
359 DoZoneInCombat(summon);
360 _summons.Summon(summon);
361 }
362
363 void JustDied(Unit* /*killer*/) override
364 {
367 }
368
369 void DoAction(int32 action) override
370 {
371 if (action == ACTION_START_EVENT)
372 {
377
378 for (uint8 counter = 0; counter < MAX_FLAMECALLERS; ++counter)
380 flameCaller->GetMotionMaster()->MovePoint(counter, FlameCallerSpots[counter].GetPosition());
381
382 _submerged = false;
383 _events.Reset();
390 }
391 else if (action == ACTION_STOP_EVENT)
392 {
394 _events.Reset();
396
397 me->SummonGameObject(GO_ICE_STONE, -69.90455f, -162.2449f, -2.366563f, 2.426008f, QuaternionData(0.0f, 0.0f, 0.9366722f, 0.3502074f), 0s);
398 }
399 }
400
401 void UpdateAI(uint32 diff) override
402 {
403 _events.Update(diff);
404
405 while (uint32 eventId = _events.ExecuteEvent())
406 {
407 switch (eventId)
408 {
411 for (uint8 counter = 0; counter < MAX_FLAMECALLERS; ++counter)
413 DoCast(flamecaller, SPELL_SHAMANS_LOOK_FOR_OPENING, true);
414 break;
417 break;
421 _events.Repeat(8s);
422 if (_submerged)
424 break;
427 break;
430 {
432 DoZoneInCombat(ahune);
433 DoCast(ahune, SPELL_RESURFACE);
434 }
435 break;
438 flamecaller->AI()->DoAction(ACTION_EMOTE_RESURFACE);
441 break;
444 DoCast(flamecaller, SPELL_FOUND_OPENING);
446 ahune->AI()->DoAction(ACTION_AHUNE_RETREAT);
447 _events.Reset();
451 break;
453 _submerged = true;
454 _events.Reset();
460 break;
461 default:
462 break;
463 }
464 }
465 }
466
468 {
469 for (uint8 counter = 0; counter < MAX_FLAMECALLERS; ++counter)
471 flamecaller->AI()->EnterEvadeMode();
472 }
473
474private:
479};
480
482{
484 {
486 _mySpot = 0;
487 }
488
489 void Reset() override
490 {
491 _events.Reset();
492 }
493
494 void MovementInform(uint32 motionType, uint32 pointId) override
495 {
496 if (motionType != POINT_MOTION_TYPE)
497 return;
498
499 switch (pointId)
500 {
503 me->SetOrientation(FlameCallerSpots[_mySpot].GetOrientation());
504 break;
507 me->SetOrientation(FlameCallerSpots[_mySpot].GetOrientation());
508 break;
511 me->SetOrientation(FlameCallerSpots[_mySpot].GetOrientation());
512 break;
513 default:
514 break;
515 }
516
518 }
519
520 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
521 {
522 switch (spellInfo->Id)
523 {
526 break;
529 break;
530 default:
531 break;
532 }
533 }
534
535 void DoAction(int action) override
536 {
537 if (action == ACTION_EMOTE_RESURFACE)
539 }
540
541 void UpdateAI(uint32 diff) override
542 {
543 _events.Update(diff);
544
545 while (uint32 eventId = _events.ExecuteEvent())
546 {
547 switch (eventId)
548 {
550 LookOpening(true, 0);
552 break;
554 LookOpening(true, 1);
556 break;
558 LookOpening(true, 2);
560 break;
562 LookOpening(false, _mySpot);
563 break;
564 default:
565 break;
566 }
567 }
568 }
569
570 void LookOpening(bool activate, uint8 spot)
571 {
572 if (_mySpot != spot)
573 return;
574
575 if (Creature* bonfireBunny = _instance->GetCreature(DATA_BONFIRE_BUNNY_000 + spot))
576 if (Creature* beamBunny = _instance->GetCreature(DATA_BEAM_BUNNY_000 + spot))
577 {
578 if (activate)
579 {
580 DoCast(bonfireBunny, SPELL_FIND_OPENING_TRIGGER);
581 bonfireBunny->CastSpell(beamBunny, SPELL_FIND_OPENING_VISUAL, true);
582 }
583 else
584 {
586 bonfireBunny->CastStop();
587 beamBunny->RemoveAurasDueToSpell(SPELL_FIND_OPENING_BEAM_END);
588 }
589 }
590 }
591
592private:
596};
597
599{
601
602 void JustAppeared() override
603 {
606
607 _scheduler.Schedule(2500ms, [this](TaskContext /*task*/)
608 {
610 me->DespawnOrUnsummon(3500ms);
611 });
612 }
613
614 void UpdateAI(uint32 diff) override
615 {
616 _scheduler.Update(diff);
617 }
618
619private:
621};
622
624{
626
627 void Reset() override
628 {
629 _scheduler.Schedule(2500ms, [this](TaskContext /*context*/)
630 {
632 me->DespawnOrUnsummon(3500ms);
633 });
634 }
635
636 void UpdateAI(uint32 diff) override
637 {
638 _scheduler.Update(diff);
639 }
640
641private:
643};
644
646{
647 go_ahune_ice_stone(GameObject* go) : GameObjectAI(go), _instance(go->GetInstanceScript()) { }
648
649 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
650 {
651 ClearGossipMenuFor(player);
652
654 ahuneBunny->AI()->DoAction(ACTION_START_EVENT);
655
657 luma->CastSpell(player, SPELL_SUMMONING_RHYME_AURA, true);
658 CloseGossipMenuFor(player);
659 me->Delete();
660 return true;
661 }
662
663private:
665};
666
667// 46430 - Synch Health
669{
670 void HandleScript(SpellEffIndex /*effIndex*/)
671 {
672 GetHitUnit()->SetHealth(GetCaster()->GetHealth());
673 }
674
675 void Register() override
676 {
678 }
679};
680
681// 45926 - Summoning Rhyme Aura
683{
684 bool Validate(SpellInfo const* /*spellInfo*/) override
685 {
687 }
688
689 void PeriodicTick(AuraEffect const* aurEff)
690 {
691 if (!GetCaster())
692 return;
693
694 Creature* caster = GetCaster()->ToCreature();
695 Player* player = GetTarget()->ToPlayer();
696 if (!caster || !player)
697 return;
698
699 player->CastSpell(player, SPELL_FORCE_WHISP_FLIGHT);
700
701 switch (aurEff->GetTickNumber())
702 {
703 case 1:
705 player->CastSpell(player, SPELL_SUMMONING_RHYME_BONFIRE, true);
706 break;
707 case 2:
709 break;
710 case 3:
712 Remove();
713 break;
714 }
715 }
716
717 void Register() override
718 {
720 }
721};
722
723// 46878 - Summon Ice Spear Delayer
725{
726 bool Validate(SpellInfo const* /*spellInfo*/) override
727 {
729 }
730
731 void PeriodicTick(AuraEffect const* /*aurEff*/)
732 {
733 Unit* target = GetTarget();
734 target->CastSpell(target, SPELL_ICE_SPEAR_KNOCKBACK);
735 Remove();
736 }
737
738 void Register() override
739 {
741 }
742};
743
744// 46371 - Ice Spear Control Aura
746{
747 bool Validate(SpellInfo const* /*spellInfo*/) override
748 {
750 }
751
752 void PeriodicTick(AuraEffect const* /*aurEff*/)
753 {
754 if (Unit* caster = GetCaster())
755 caster->CastSpell(caster, SPELL_ICE_SPEAR_TARGET_PICKER);
756 }
757
758 void Register() override
759 {
761 }
762};
763
764// 46372 - Ice Spear Target Picker
766{
767 bool Validate(SpellInfo const* /*spellInfo*/) override
768 {
770 }
771
772 void FilterTargets(std::list<WorldObject*>& targets)
773 {
774 if (targets.empty())
775 return;
776
778 targets.clear();
779 targets.push_back(target);
780 }
781
782 void HandleDummy(SpellEffIndex /*effIndex*/)
783 {
785 }
786
787 void Register() override
788 {
791 }
792};
793
794// 46320 - Spell Slippery Floor Periodic
796{
797 bool Validate(SpellInfo const* /*spellInfo*/) override
798 {
800 }
801
803 {
804 if (Unit* target = GetHitUnit())
805 if (target->isMoving())
806 {
807 target->CastSpell(target, SPELL_SLIPPERY_FLOOR_SLIP, true);
808 target->CastSpell(target, SPELL_SLIPPERY_FLOOR_YOU_SLIPPED, true);
809 }
810 }
811
812 void Register() override
813 {
815 }
816};
817
818// 46146 - Ahune Spanky Hands
820{
821 bool Validate(SpellInfo const* /*spellInfo*/) override
822 {
824 }
825
826 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
827 {
829 GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_COLD_SLAP, true);
830 }
831
832 void Register() override
833 {
835 }
836};
837
838// 46843 - Minion Despawner
840{
841 void HandleScript(SpellEffIndex /*effIndex*/)
842 {
843 if (GetHitCreature())
845 }
846
847 void Register() override
848 {
850 }
851};
852
853// 46398 - Spell Ice Bombardment Dest Picker
855{
856 bool Validate(SpellInfo const* /*spellInfo*/) override
857 {
859 }
860
862 {
863 GetCaster()->CastSpell(GetHitDest()->GetPosition(), SPELL_ICE_BOMBARDMENT, true);
864 }
865
866 void Register() override
867 {
869 }
870};
871
873{
890}
Actions
#define sCreatureTextMgr
@ TEXT_RANGE_NORMAL
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
#define sLFGMgr
Definition: LFGMgr.h:507
@ POINT_MOTION_TYPE
@ TEMPSUMMON_DEAD_DESPAWN
Definition: ObjectDefines.h:69
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: ObjectDefines.h:70
@ TEMPSUMMON_CORPSE_DESPAWN
Definition: ObjectDefines.h:67
Spells
Definition: PlayerAI.cpp:32
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
void ClearGossipMenuFor(Player *player)
void CloseGossipMenuFor(Player *player)
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_0
Definition: SharedDefines.h:30
@ LANG_UNIVERSAL
@ TARGET_UNIT_SRC_AREA_ENTRY
@ EMOTE_ONESHOT_SUBMERGE
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_APPLY_AURA
@ TEAM_OTHER
@ CHAT_MSG_SAY
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_PERIODIC_DUMMY
#define AuraEffectProcFn(F, I, N)
Definition: SpellScript.h:2160
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition: SpellScript.h:864
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
EvadeReason
Definition: UnitAICommon.h:30
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ UNIT_STATE_ROOT
Definition: Unit.h:265
void AddSC_boss_ahune()
Definition: boss_ahune.cpp:872
@ SAY_PLAYER_TEXT_1
Definition: boss_ahune.cpp:107
@ SAY_PLAYER_TEXT_3
Definition: boss_ahune.cpp:109
@ SAY_PLAYER_TEXT_2
Definition: boss_ahune.cpp:108
@ ACTION_START_EVENT
Definition: boss_ahune.cpp:133
@ ACTION_STOP_EVENT
Definition: boss_ahune.cpp:134
@ ACTION_AHUNE_RESURFACE
Definition: boss_ahune.cpp:136
@ ACTION_AHUNE_RETREAT
Definition: boss_ahune.cpp:135
@ ACTION_EMOTE_RESURFACE
Definition: boss_ahune.cpp:137
@ EMOTE_EARTHEN_ASSAULT
Definition: boss_ahune.cpp:100
@ EMOTE_RETREAT
Definition: boss_ahune.cpp:101
@ EMOTE_RESURFACE
Definition: boss_ahune.cpp:102
@ MAX_FLAMECALLERS
Definition: boss_ahune.cpp:155
Position const SummonPositions[]
Definition: boss_ahune.cpp:158
@ POINT_FLAMECALLER_000
Definition: boss_ahune.cpp:148
@ POINT_FLAMECALLER_002
Definition: boss_ahune.cpp:150
@ POINT_FLAMECALLER_001
Definition: boss_ahune.cpp:149
@ SPELL_SUMMONING_RHYME_AURA
Definition: boss_ahune.cpp:65
@ SPELL_SUMMON_LOOT_MISSILE
Definition: boss_ahune.cpp:93
@ SPELL_FIND_OPENING_BEAM_END
Definition: boss_ahune.cpp:54
@ SPELL_ICE_SPEAR_CONTROL_AURA
Definition: boss_ahune.cpp:87
@ SPELL_FROZEN_CORE_GETS_HIT
Definition: boss_ahune.cpp:88
@ SPELL_AHUNES_SHIELD
Definition: boss_ahune.cpp:42
@ SPELL_AHUNE_SELF_STUN
Definition: boss_ahune.cpp:44
@ SPELL_SUBMERGED
Definition: boss_ahune.cpp:49
@ SPELL_COLD_SLAP
Definition: boss_ahune.cpp:47
@ SPELL_SLIPPERY_FLOOR_YOU_SLIPPED
Definition: boss_ahune.cpp:84
@ SPELL_IS_DEAD_CHECK
Definition: boss_ahune.cpp:89
@ SPELL_MINION_DESPAWNER
Definition: boss_ahune.cpp:94
@ SPELL_ICE_SPEAR_VISUAL
Definition: boss_ahune.cpp:78
@ SPELL_FIND_OPENING_VISUAL
Definition: boss_ahune.cpp:53
@ SPELL_SUMMONING_VISUAL_1
Definition: boss_ahune.cpp:64
@ SPELL_RESURFACE
Definition: boss_ahune.cpp:48
@ SPELL_ICE_SPEAR_TARGET_PICKER
Definition: boss_ahune.cpp:90
@ SPELL_SUMMON_ICE_SPEAR_GO
Definition: boss_ahune.cpp:76
@ SPELL_SUMMON_ICE_SPEAR_BUNNY
Definition: boss_ahune.cpp:91
@ SPELL_ICE_BOMBARD
Definition: boss_ahune.cpp:70
@ SPELL_STAY_SUBMERGED
Definition: boss_ahune.cpp:43
@ SPELL_FIND_OPENING_CHANNEL
Definition: boss_ahune.cpp:56
@ SPELL_ICE_SPEAR_KNOCKBACK
Definition: boss_ahune.cpp:75
@ SPELL_SLIPPERY_FLOOR_SLIP
Definition: boss_ahune.cpp:83
@ SPELL_STAND
Definition: boss_ahune.cpp:50
@ SPELL_ICE_BOMBARDMENT
Definition: boss_ahune.cpp:72
@ SPELL_FOUND_OPENING
Definition: boss_ahune.cpp:58
@ SPELL_FORCE_WHISP_FLIGHT
Definition: boss_ahune.cpp:67
@ SPELL_SUMMONING_RHYME_BONFIRE
Definition: boss_ahune.cpp:66
@ SPELL_SLIPPERY_FLOOR_PERIODIC
Definition: boss_ahune.cpp:82
@ SPELL_SUICIDE
Definition: boss_ahune.cpp:92
@ SPELL_SYNCH_HEALTH
Definition: boss_ahune.cpp:41
@ SPELL_SHAMANS_LOOK_FOR_OPENING
Definition: boss_ahune.cpp:68
@ SPELL_SLIPPERY_FLOOR_AMBIENT
Definition: boss_ahune.cpp:81
@ SPELL_BONFIRE_VISUAL
Definition: boss_ahune.cpp:57
@ SPELL_AHUNE_ACHIEVEMENT
Definition: boss_ahune.cpp:45
@ SPELL_SUMMON_FROSTWIND
Definition: boss_ahune.cpp:62
@ SPELL_ICE_SPEAR_DELAY
Definition: boss_ahune.cpp:77
@ SPELL_GHOST_DISGUISE
Definition: boss_ahune.cpp:95
@ SPELL_AHUNE_SPANKY_HANDS
Definition: boss_ahune.cpp:46
@ SPELL_SUMMON_COLDWEAVE
Definition: boss_ahune.cpp:61
@ SPELL_FIND_OPENING_TRIGGER
Definition: boss_ahune.cpp:55
@ SPELL_ICE_BOMBARDMENT_DEST_PICKER
Definition: boss_ahune.cpp:71
@ SPELL_SUMMON_HAILSTONE
Definition: boss_ahune.cpp:63
@ SPELL_CLOSE_OPENING_VISUAL
Definition: boss_ahune.cpp:69
@ PHASE_ONE
Definition: boss_ahune.cpp:142
@ PHASE_TWO
Definition: boss_ahune.cpp:143
Position const FlameCallerSpots[]
Definition: boss_ahune.cpp:167
@ EVENT_EMERGE
Definition: boss_ahune.cpp:114
@ EVENT_SUMMON_FROSTWIND
Definition: boss_ahune.cpp:122
@ EVENT_SUMMON_AHUNE
Definition: boss_ahune.cpp:123
@ EVENT_SUMMON_COLDWEAVE
Definition: boss_ahune.cpp:121
@ EVENT_AHUNE_PHASE_ONE
Definition: boss_ahune.cpp:125
@ EVENT_SUMMON_HAILSTONE
Definition: boss_ahune.cpp:120
@ EVENT_CLOSE_OPENING
Definition: boss_ahune.cpp:124
@ EVENT_INITIAL_EMERGE
Definition: boss_ahune.cpp:115
@ EVENT_STOP_LOOKING_FOR_OPENING
Definition: boss_ahune.cpp:128
@ EVENT_LOOKFOROPENING_0
Definition: boss_ahune.cpp:117
@ EVENT_LOOKFOROPENING_2
Definition: boss_ahune.cpp:119
@ EVENT_LOOKFOROPENING_1
Definition: boss_ahune.cpp:118
@ EVENT_AHUNE_PHASE_TWO
Definition: boss_ahune.cpp:126
@ EVENT_SYNCH_HEALTH
Definition: boss_ahune.cpp:116
@ EVENT_START_LOOKING_FOR_OPENING
Definition: boss_ahune.cpp:127
Says
uint32 GetTickNumber() const
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
Unit * GetCaster() const
Unit * GetTarget() const
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
HookList< EffectProcHandler > OnEffectProc
Definition: SpellScript.h:2155
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
Creature *const me
Definition: CreatureAI.h:61
void SetImmuneToPC(bool apply) override
Definition: Creature.h:170
void SetReactState(ReactStates st)
Definition: Creature.h:160
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
void SetRegenerateHealth(bool value)
Definition: Creature.h:358
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void Repeat(Milliseconds time)
Definition: EventMap.cpp:63
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
void SetPhase(uint8 phase)
Definition: EventMap.cpp:28
void Reset()
Definition: EventMap.cpp:21
GameObject *const me
Definition: GameObjectAI.h:50
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
void Delete()
void DespawnOrUnsummon(Milliseconds delay=0ms, Seconds forceRespawnTime=0s)
Definition: Group.h:197
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
Creature * GetCreature(uint32 type)
virtual ObjectGuid GetGuidData(uint32 type) const override
bool isEmpty() const
Definition: LinkedList.h:110
iterator begin()
Definition: MapRefManager.h:34
PlayerList const & GetPlayers() const
Definition: Map.h:367
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
static Creature * ToCreature(Object *o)
Definition: Object.h:219
uint32 GetEntry() const
Definition: Object.h:161
static Player * ToPlayer(Object *o)
Definition: Object.h:213
Group * GetGroup(Optional< uint8 > partyIndex)
Definition: Player.h:2606
Unit * GetProcTarget() const
Definition: Unit.h:495
FROM * GetSource() const
Definition: Reference.h:96
uint32 const Id
Definition: SpellInfo.h:325
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
WorldLocation * GetHitDest() const
Creature * GetHitCreature() const
Unit * GetCaster() const
HookList< EffectHandler > OnEffectHit
Definition: SpellScript.h:839
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition: SpellScript.h:863
void Summon(Creature const *summon)
TaskScheduler & Schedule(std::chrono::duration< Rep, Period > time, task_handler_t task)
TaskScheduler & Update(success_t const &callback=nullptr)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:159
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void SetHealth(uint64 val)
Definition: Unit.cpp:9346
void SetControlled(bool apply, UnitState state)
Definition: Unit.cpp:10911
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
void SetUninteractible(bool apply)
Definition: Unit.cpp:8147
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition: Unit.cpp:1598
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition: Unit.cpp:10591
Map * GetMap() const
Definition: Object.h:624
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1042
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
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition: Object.cpp:2065
void HandleScript(SpellEffIndex)
Definition: boss_ahune.cpp:841
void Register() override
Definition: boss_ahune.cpp:832
bool Validate(SpellInfo const *) override
Definition: boss_ahune.cpp:821
void HandleProc(AuraEffect *, ProcEventInfo &eventInfo)
Definition: boss_ahune.cpp:826
void Register() override
Definition: boss_ahune.cpp:675
void HandleScript(SpellEffIndex)
Definition: boss_ahune.cpp:670
bool Validate(SpellInfo const *) override
Definition: boss_ahune.cpp:856
void HandleScriptEffect(SpellEffIndex)
Definition: boss_ahune.cpp:861
void PeriodicTick(AuraEffect const *)
Definition: boss_ahune.cpp:752
bool Validate(SpellInfo const *) override
Definition: boss_ahune.cpp:747
bool Validate(SpellInfo const *) override
Definition: boss_ahune.cpp:767
void FilterTargets(std::list< WorldObject * > &targets)
Definition: boss_ahune.cpp:772
void HandleDummy(SpellEffIndex)
Definition: boss_ahune.cpp:782
bool Validate(SpellInfo const *) override
Definition: boss_ahune.cpp:797
void HandleScriptEffect(SpellEffIndex)
Definition: boss_ahune.cpp:802
bool Validate(SpellInfo const *) override
Definition: boss_ahune.cpp:726
void PeriodicTick(AuraEffect const *)
Definition: boss_ahune.cpp:731
void PeriodicTick(AuraEffect const *aurEff)
Definition: boss_ahune.cpp:689
bool Validate(SpellInfo const *) override
Definition: boss_ahune.cpp:684
void Register() override
Definition: boss_ahune.cpp:717
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:109
constexpr void SetOrientation(float orientation)
Definition: Position.h:71
void EnterEvadeMode(EvadeReason) override
Definition: boss_ahune.cpp:188
void ExecuteEvent(uint32 eventId) override
Definition: boss_ahune.cpp:225
void Emerge()
Definition: boss_ahune.cpp:249
void DoAction(int32 action) override
Definition: boss_ahune.cpp:216
boss_ahune(Creature *creature)
Definition: boss_ahune.cpp:176
void Submerge()
Definition: boss_ahune.cpp:263
void JustEngagedWith(Unit *who) override
Definition: boss_ahune.cpp:181
void JustDied(Unit *) override
Definition: boss_ahune.cpp:196
go_ahune_ice_spear(GameObject *go)
Definition: boss_ahune.cpp:625
TaskScheduler _scheduler
Definition: boss_ahune.cpp:642
void Reset() override
Definition: boss_ahune.cpp:627
void UpdateAI(uint32 diff) override
Definition: boss_ahune.cpp:636
bool OnGossipSelect(Player *player, uint32, uint32) override
Definition: boss_ahune.cpp:649
InstanceScript * _instance
Definition: boss_ahune.cpp:664
go_ahune_ice_stone(GameObject *go)
Definition: boss_ahune.cpp:647
void JustSummoned(Creature *summon) override
Definition: boss_ahune.cpp:354
void ResetFlameCallers()
Definition: boss_ahune.cpp:467
void JustDied(Unit *) override
Definition: boss_ahune.cpp:363
SummonList _summons
Definition: boss_ahune.cpp:477
InstanceScript * _instance
Definition: boss_ahune.cpp:475
void UpdateAI(uint32 diff) override
Definition: boss_ahune.cpp:401
void DoAction(int32 action) override
Definition: boss_ahune.cpp:369
npc_ahune_bunny(Creature *creature)
Definition: boss_ahune.cpp:348
EventMap _events
Definition: boss_ahune.cpp:476
void UpdateAI(uint32 diff) override
Definition: boss_ahune.cpp:614
void JustAppeared() override
Definition: boss_ahune.cpp:602
npc_ahune_ice_spear_bunny(Creature *creature)
Definition: boss_ahune.cpp:600
void MovementInform(uint32 motionType, uint32 pointId) override
Definition: boss_ahune.cpp:494
InstanceScript * _instance
Definition: boss_ahune.cpp:594
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
Definition: boss_ahune.cpp:520
void UpdateAI(uint32 diff) override
Definition: boss_ahune.cpp:541
npc_earthen_ring_flamecaller(Creature *creature)
Definition: boss_ahune.cpp:483
void LookOpening(bool activate, uint8 spot)
Definition: boss_ahune.cpp:570
void DoAction(int action) override
Definition: boss_ahune.cpp:535
EventMap _events
Definition: boss_ahune.cpp:343
void JustDied(Unit *) override
Definition: boss_ahune.cpp:293
void DoAction(int32 action) override
Definition: boss_ahune.cpp:302
InstanceScript * _instance
Definition: boss_ahune.cpp:342
npc_frozen_core(Creature *creature)
Definition: boss_ahune.cpp:278
void UpdateAI(uint32 diff) override
Definition: boss_ahune.cpp:320
@ GO_ICE_STONE
@ NPC_SHAMAN_BONFIRE_BUNNY_001
@ NPC_FROZEN_CORE
@ NPC_AHUNE
@ NPC_SHAMAN_BONFIRE_BUNNY_002
@ NPC_SHAMAN_BONFIRE_BUNNY_000
#define RegisterSlavePensGameObjectAI(ai_name)
@ DATA_BONFIRE_BUNNY_000
@ DATA_AHUNE_BUNNY
@ DATA_FLAMECALLER_000
@ DATA_FROZEN_CORE
@ DATA_AHUNE
@ DATA_LUMA_SKYMOTHER
@ DATA_BEAM_BUNNY_000
#define RegisterSlavePensCreatureAI(ai_name)