Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_freya.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#include "ScriptMgr.h"
7#include "ScriptedCreature.h"
8#include "SpellScript.h"
9#include "Cell.h"
10#include "CellImpl.h"
11#include "GridNotifiers.h"
12#include "GridNotifiersImpl.h"
13#include "ulduar.h"
14
36
38{
39 // Freya
43 SPELL_ENRAGE = 47008,
51
52 // Stonebark
57
58 // Ironbranch
59 SPELL_IMPALE = 62310,
62
63 // Brightleaf
65 SPELL_FLUX = 62262,
69 SPELL_UNSTABLE_SUN_BEAM_SUMMON = 62207, // Trigger 62221
70
71 // Stack Removing of Attuned to Nature
75
76 // Achievement spells
79
80 // Wave summoning spells
84
85 // Detonating Lasher
88
89 // Ancient Water Spirit
92
93 // Storm Lasher
96
97 // Snaplasher
100
101 // Ancient Conservator
105 SPELL_SPORE_SUMMON_NW = 62582, // Not used, triggered by SPELL_SUMMON_PERIODIC
109
110 // Healthly Spore
112 SPELL_GROW = 62559,
114
115 // Eonar's Gift
119
120 // Nature Bomb
124
125 // Unstable Sun Beam
130 SPELL_FREYA_UNSTABLE_SUNBEAM = 62450, // Or maybe 62866?
131
132 // Sun Beam
135
136 // Attuned To Nature spells
140};
141
159
165
193
195{
196 WAVE_TIME = 60000, // Normal wave is one minute
197 TIME_DIFFERENCE = 10000, // If difference between waveTime and WAVE_TIME is bigger then TIME_DIFFERENCE, schedule EVENT_WAVE in 10 seconds
200};
201
203{
204 public:
205 npc_iron_roots() : CreatureScript("npc_iron_roots") { }
206
208 {
209 npc_iron_rootsAI(Creature* creature) : ScriptedAI(creature)
210 {
211 SetCombatMovement(false);
212
213 me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
214 me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip
215 me->setFaction(14);
216 me->SetReactState(REACT_PASSIVE);
217 summonerGUID = 0;
218 }
219
220 void IsSummonedBy(Unit* summoner) OVERRIDE
221 {
222 if (summoner->GetTypeId() != TypeID::TYPEID_PLAYER)
223 return;
224 // Summoner is a player, who should have root aura on self
225 summonerGUID = summoner->GetGUID();
226 me->SetFacingToObject(summoner);
227 me->SetInCombatWith(summoner);
228 }
229
230 void JustDied(Unit* /*killer*/) OVERRIDE
231 {
233 {
234 target->RemoveAurasDueToSpell(SPELL_ROOTS_IRONBRANCH);
235 target->RemoveAurasDueToSpell(SPELL_ROOTS_FREYA);
236 }
237
238 me->RemoveCorpse(false);
239 }
240
241 private:
243 };
244
246 {
247 return new npc_iron_rootsAI(creature);
248 }
249};
250
252{
253 public:
254 boss_freya() : CreatureScript("boss_freya") { }
255
256 struct boss_freyaAI : public BossAI
257 {
258 boss_freyaAI(Creature* creature) : BossAI(creature, BOSS_FREYA) { }
259
261
270
273 bool random[3];
274
276 {
277 _Reset();
278 trioWaveCount = 0;
280 waveCount = 0;
281 elderCount = 0;
282
283 for (uint8 i = 0; i < 3; ++i)
284 for (uint8 n = 0; n < 2; ++n)
285 ElementalGUID[i][n] = 0;
286 for (uint8 i = 0; i < 6; ++i)
287 for (uint8 n = 0; n < 2; ++n)
288 deforestation[i][n] = 0;
289 for (uint8 n = 0; n < 2; ++n)
290 {
291 checkElementalAlive[n] = true;
292 trioDefeated[n] = false;
293 }
294 for (uint8 n = 0; n < 3; ++n)
295 random[n] = false;
296 }
297
299 {
300 if (who->GetTypeId() == TypeID::TYPEID_PLAYER)
301 Talk(SAY_SLAY);
302 }
303
304 void DamageTaken(Unit* who, uint32& damage) OVERRIDE
305 {
306 if (damage >= me->GetHealth())
307 {
308 damage = 0;
309 JustDied(who);
310 }
311 }
312
314 {
315 _EnterCombat();
317 Creature* Elder[3];
318 for (uint8 n = 0; n < 3; ++n)
319 {
320 Elder[n] = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF + n));
321 if (Elder[n] && Elder[n]->IsAlive())
322 {
323 me->AddAura(SPELL_DRAINED_OF_POWER, Elder[n]);
324 Elder[n]->CastSpell(me, SPELL_IRONBRANCH_ESSENCE, true);
326 Elder[n]->AI()->AttackStart(who);
327 Elder[n]->AddThreat(who, 250.0f);
328 Elder[n]->SetInCombatWith(who);
329 ++elderCount;
330 }
331 }
332
333 if (Elder[0] && Elder[0]->IsAlive())
334 {
335 Elder[0]->CastSpell(me, SPELL_BRIGHTLEAF_ESSENCE, true);
336 events.ScheduleEvent(EVENT_UNSTABLE_ENERGY, std::rand() % 20000 + 10000);
337 }
338
339 if (Elder[1] && Elder[1]->IsAlive())
340 {
341 Elder[1]->CastSpell(me, SPELL_STONEBARK_ESSENCE, true);
342 events.ScheduleEvent(EVENT_GROUND_TREMOR, std::rand() % 20000 + 10000);
343 }
344
345 if (Elder[2] && Elder[2]->IsAlive())
346 {
347 Elder[2]->CastSpell(me, SPELL_IRONBRANCH_ESSENCE, true);
348 events.ScheduleEvent(EVENT_STRENGTHENED_IRON_ROOTS, std::rand() % 20000 + 10000);
349 }
350
351 if (elderCount == 0)
353 else
355
356 me->CastCustomSpell(SPELL_ATTUNED_TO_NATURE, SPELLVALUE_AURA_STACK, 150, me, true);
357
358 events.ScheduleEvent(EVENT_WAVE, 10000);
359 events.ScheduleEvent(EVENT_EONAR_GIFT, 25000);
360 events.ScheduleEvent(EVENT_ENRAGE, 600000);
361 events.ScheduleEvent(EVENT_SUNBEAM, std::rand() % 15000 + 5000);
362 }
363
365 {
366 switch (type)
367 {
369 return attunedToNature;
371 return elderCount;
372 }
373
374 return 0;
375 }
376
378 {
379 if (!UpdateVictim())
380 return;
381
382 events.Update(diff);
383
384 if (me->HasUnitState(UNIT_STATE_CASTING))
385 return;
386
387 while (uint32 eventId = events.ExecuteEvent())
388 {
389 switch (eventId)
390 {
391 case EVENT_ENRAGE:
394 break;
395 case EVENT_SUNBEAM:
396 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
397 DoCast(target, SPELL_SUNBEAM);
398 events.ScheduleEvent(EVENT_SUNBEAM, std::rand() % 15000 + 10000);
399 break;
402 events.ScheduleEvent(EVENT_NATURE_BOMB, std::rand() % 12000 + 10000);
403 break;
405 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
407 events.ScheduleEvent(EVENT_UNSTABLE_ENERGY, std::rand() % 20000 + 15000);
408 break;
409 case EVENT_WAVE:
410 SpawnWave();
411 if (waveCount <= 6) // If set to 6 The Bombs appear during the Final Add wave
412 events.ScheduleEvent(EVENT_WAVE, WAVE_TIME);
413 else
414 events.ScheduleEvent(EVENT_NATURE_BOMB, std::rand() % 20000 + 10000);
415 break;
416 case EVENT_EONAR_GIFT:
419 events.ScheduleEvent(EVENT_EONAR_GIFT, std::rand() % 50000 + 40000);
420 break;
423 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true, -SPELL_ROOTS_FREYA))
424 target->CastSpell(target, SPELL_ROOTS_FREYA, true); // This must be casted by Target self
425 events.ScheduleEvent(EVENT_STRENGTHENED_IRON_ROOTS, std::rand() % 20000 + 12000);
426 break;
430 events.ScheduleEvent(EVENT_GROUND_TREMOR, std::rand() % 28000 + 25000);
431 break;
432 }
433 }
434
435 if (!me->HasAura(SPELL_TOUCH_OF_EONAR))
436 me->CastSpell(me, SPELL_TOUCH_OF_EONAR, true);
437
438 // For achievement check
439 if (Aura* aura = me->GetAura(SPELL_ATTUNED_TO_NATURE))
440 attunedToNature = aura->GetStackAmount();
441 else
442 attunedToNature = 0;
443
444 diffTimer += diff; // For getting time difference for Deforestation achievement
445
446 // Elementals must be killed within 12 seconds of each other, or they will all revive and heal
447 Creature* Elemental[3][2];
448 for (uint8 i = 0; i < 2; ++i)
449 {
450 if (checkElementalAlive[i])
451 elementalTimer[i] = 0;
452 else
453 {
454 elementalTimer[i] += diff;
455 for (uint8 k = 0; k < 3; ++k)
456 Elemental[k][i] = ObjectAccessor::GetCreature(*me, ElementalGUID[k][i]);
457 if (elementalTimer[i] > 12000)
458 {
459 if (!trioDefeated[i]) // Do *NOT* merge this bool with bool few lines below!
460 {
461 if (Elemental[0][i] && Elemental[1][i] && Elemental[2][i])
462 {
463 for (uint8 n = 0; n < 3; ++n)
464 {
465 if (Elemental[n][i]->IsAlive())
466 Elemental[n][i]->SetHealth(Elemental[n][i]->GetMaxHealth());
467 else
468 Elemental[n][i]->Respawn();
469 }
470 }
471 }
472 checkElementalAlive[i] = true;
473 }
474 else
475 {
476 if (!trioDefeated[i])
477 {
478 if (Elemental[0][i] && Elemental[1][i] && Elemental[2][i])
479 {
480 if (Elemental[0][i]->isDead() && Elemental[1][i]->isDead() && Elemental[2][i]->isDead())
481 {
482 for (uint8 n = 0; n < 3; ++n)
483 {
484 summons.Despawn(Elemental[n][i]);
485 Elemental[n][i]->DespawnOrUnsummon(5000);
486 trioDefeated[i] = true;
487 Elemental[n][i]->CastSpell(me, SPELL_REMOVE_10STACK, true);
488 }
489 }
490 }
491 }
492 }
493 }
494 }
495
497 }
498
499 // Check if all Trio NPCs are dead - achievement check
500 void LasherDead(uint32 type) // Type must be in format of a binary mask
501 {
502 uint8 n = 0;
503
504 // Handling received data
505 for (uint8 i = 0; i < 5; ++i) // We have created "instances" for keeping informations about last 6 death lashers - needed because of respawning
506 {
507 deforestation[i][0] = deforestation[(i + 1)][0]; // Time
508 deforestation[i][1] = deforestation[(i + 1)][1]; // Type
509 }
510 deforestation[5][0] = diffTimer;
511 deforestation[5][1] = type;
512
513 // Check for achievement completion
514 if (deforestation[0][1]) // Check for proper functionality of binary masks (overflow would not be problem)
515 {
516 for (uint8 i = 0; i < 6; ++i) // Count binary mask
517 {
518 n += deforestation[i][1];
519 }
520 if ((deforestation[5][0] - deforestation[0][0]) < 10000) // Time check
521 {
522 if (n == 14 && instance) // Binary mask check - verification of lasher types
523 {
524 instance->DoCastSpellOnPlayers(SPELL_DEFORESTATION_CREDIT);
525 }
526 }
527 }
528 }
529
530 // Random order of spawning waves
532 {
533 if (random[0] && random[1] && random[2])
534 for (uint8 n = 0; n < 3; ++n)
535 random[n] = false;
536
537 uint8 randomId = std::rand() % 2;
538
539 while (random[randomId])
540 randomId = std::rand() % 2;
541
542 random[randomId] = true;
543 return randomId;
544 }
545
547 {
548 switch (GetWaveId())
549 {
550 case 0:
552 for (uint8 n = 0; n < 10; ++n)
554 break;
555 case 1:
559 break;
560 case 2:
563 break;
564 }
566 waveCount++;
567 }
568
569 void JustDied(Unit* /*killer*/) OVERRIDE
570 {
572 const uint32 summonSpell[2][4] =
573 {
574 /* 0Elder, 1Elder, 2Elder, 3Elder */
575 /* 10N */ {62950, 62953, 62955, 62957},
576 /* 25N */ {62952, 62954, 62956, 62958}
577 };
578
579 me->CastSpell((Unit*)NULL, summonSpell[me->GetMap()->GetDifficulty()][elderCount], true);
580
582 me->SetReactState(REACT_PASSIVE);
583 _JustDied();
584 me->RemoveAllAuras();
585 me->AttackStop();
586 me->setFaction(35);
587 me->DeleteThreatList();
588 me->CombatStop(true);
589 me->DespawnOrUnsummon(7500);
590 me->CastSpell(me, SPELL_KNOCK_ON_WOOD_CREDIT, true);
591
592 Creature* Elder[3];
593 for (uint8 n = 0; n < 3; ++n)
594 {
595 Elder[n] = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF + n));
596 if (Elder[n] && Elder[n]->IsAlive())
597 {
598 Elder[n]->RemoveAllAuras();
599 Elder[n]->AttackStop();
600 Elder[n]->CombatStop(true);
601 Elder[n]->DeleteThreatList();
603 }
604 }
605 }
606
608 {
609 switch (summoned->GetEntry())
610 {
611 case NPC_SNAPLASHER:
613 case NPC_STORM_LASHER:
614 ElementalGUID[trioWaveController][trioWaveCount] = summoned->GetGUID();
615 summons.Summon(summoned);
617 if (trioWaveController > 2)
619 break;
622 default:
623 summons.Summon(summoned);
624 break;
625 }
626
627 // Need to have it there, or summoned units would do nothing untill attacked
628 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 250.0f, true))
629 {
630 summoned->AI()->AttackStart(target);
631 summoned->AddThreat(target, 250.0f);
632 DoZoneInCombat(summoned);
633 }
634 }
635
637 {
638 switch (summoned->GetEntry())
639 {
641 summoned->CastSpell(me, SPELL_REMOVE_2STACK, true);
642 summoned->CastSpell(who, SPELL_DETONATE, true);
643 summoned->DespawnOrUnsummon(5000);
644 summons.Despawn(summoned);
645 break;
647 summoned->CastSpell(me, SPELL_REMOVE_25STACK, true);
648 summoned->DespawnOrUnsummon(5000);
649 summons.Despawn(summoned);
650 break;
651 }
652 }
653 };
654
656 {
657 return GetUlduarAI<boss_freyaAI>(creature);
658 }
659};
660
662{
663 public:
664 boss_elder_brightleaf() : CreatureScript("boss_elder_brightleaf") { }
665
667 {
669 {
670 }
671
673 {
674 _Reset();
675 if (me->HasAura(SPELL_DRAINED_OF_POWER))
676 me->RemoveAurasDueToSpell(SPELL_DRAINED_OF_POWER);
677 events.ScheduleEvent(EVENT_SOLAR_FLARE, std::rand() % 7000 + 5000);
678 events.ScheduleEvent(EVENT_UNSTABLE_SUN_BEAM, std::rand() % 12000 + 7000);
679 events.ScheduleEvent(EVENT_FLUX, 5000);
680 elderCount = 0;
681 lumberjack = false;
682 }
683
685 {
686 if (who->GetTypeId() == TypeID::TYPEID_PLAYER)
688 }
689
690 void JustDied(Unit* killer) OVERRIDE
691 {
692 _JustDied();
694
695 if (killer->GetTypeId() == TypeID::TYPEID_PLAYER)
696 {
697 if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_IRONBRANCH)))
698 Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH);
699
700 if (Creature* Stonebark = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STONEBARK)))
701 Stonebark->AI()->DoAction(ACTION_ELDER_DEATH);
702 }
703 }
704
705 void EnterCombat(Unit* /*who*/) OVERRIDE
706 {
707 _EnterCombat();
708 if (!me->HasAura(SPELL_DRAINED_OF_POWER))
710 }
711
713 {
714 if (!UpdateVictim() || me->HasAura(SPELL_DRAINED_OF_POWER))
715 return;
716
717 events.Update(diff);
718
719 if (me->HasUnitState(UNIT_STATE_CASTING))
720 return;
721
722 while (uint32 eventId = events.ExecuteEvent())
723 {
724 switch (eventId)
725 {
727 me->CastSpell(me, SPELL_UNSTABLE_SUN_BEAM_SUMMON, true);
728 events.ScheduleEvent(EVENT_UNSTABLE_SUN_BEAM, std::rand() % 15000 + 10000);
729 break;
731 {
732 uint8 stackAmount = 0;
733 if (me->GetAura(SPELL_FLUX_AURA))
734 stackAmount = me->GetAura(SPELL_FLUX_AURA)->GetStackAmount();
735 me->CastCustomSpell(SPELL_SOLAR_FLARE, SPELLVALUE_MAX_TARGETS, stackAmount, me, false);
736 events.ScheduleEvent(EVENT_SOLAR_FLARE, std::rand() % 10000 + 5000);
737 break;
738 }
739 case EVENT_FLUX:
740 me->RemoveAurasDueToSpell(SPELL_FLUX_AURA);
741 me->AddAura(SPELL_FLUX_AURA, me);
742 if (Aura* Flux = me->GetAura(SPELL_FLUX_AURA))
743 Flux->SetStackAmount(std::rand() % 8 + 1);
744 events.ScheduleEvent(EVENT_FLUX, 7500);
745 break;
746 }
747 }
748
749 if (lumberjack)
750 lumberjackTimer += diff;
751
753 }
754
756 {
757 switch (action)
758 {
760 ++elderCount;
761 lumberjack = true;
762 break;
764 me->DespawnOrUnsummon(10000);
765 _JustDied();
766 break;
767 }
768 }
769
770 private:
774 };
775
777 {
779 }
780};
781
783{
784 public:
785 boss_elder_stonebark() : CreatureScript("boss_elder_stonebark") { }
786
788 {
790 {
791 elderCount = 0;
792 lumberjack = false;
793 lumberjackTimer = 0;
794 }
795
797 {
798 _Reset();
799 if (me->HasAura(SPELL_DRAINED_OF_POWER))
800 me->RemoveAurasDueToSpell(SPELL_DRAINED_OF_POWER);
801 events.ScheduleEvent(EVENT_TREMOR, std::rand() % 12000 + 10000);
802 events.ScheduleEvent(EVENT_FISTS, std::rand() % 35000 + 25000);
803 events.ScheduleEvent(EVENT_BARK, std::rand() % 40000 + 37500);
804 elderCount = 0;
805 lumberjack = false;
806 }
807
809 {
810 if (who->GetTypeId() == TypeID::TYPEID_PLAYER)
812 }
813
814 void JustDied(Unit* killer) OVERRIDE
815 {
816 _JustDied();
818
819 if (killer->GetTypeId() == TypeID::TYPEID_PLAYER)
820 {
821 if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_IRONBRANCH)))
822 Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH);
823
824 if (Creature* Brightleaf = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF)))
825 Brightleaf->AI()->DoAction(ACTION_ELDER_DEATH);
826 }
827 }
828
829 void EnterCombat(Unit* /*who*/) OVERRIDE
830 {
831 _EnterCombat();
832 if (!me->HasAura(SPELL_DRAINED_OF_POWER))
834 }
835
836 void DamageTaken(Unit* who, uint32& damage) OVERRIDE
837 {
838 if (who == me)
839 return;
840
841 if (me->HasAura(SPELL_PETRIFIED_BARK))
842 {
843 int32 reflect = damage;
844 who->CastCustomSpell(who, SPELL_PETRIFIED_BARK_DMG, &reflect, NULL, NULL, true);
845 damage = 0;
846 }
847 }
848
850 {
851 if (!UpdateVictim() || me->HasAura(SPELL_DRAINED_OF_POWER))
852 return;
853
854 events.Update(diff);
855
856 if (me->HasUnitState(UNIT_STATE_CASTING))
857 return;
858
859 while (uint32 eventId = events.ExecuteEvent())
860 {
861 switch (eventId)
862 {
863 case EVENT_BARK:
865 events.ScheduleEvent(EVENT_BARK, std::rand() % 50000 + 30000);
866 break;
867 case EVENT_FISTS:
869 events.ScheduleEvent(EVENT_FISTS, std::rand() % 30000 + 20000);
870 break;
871 case EVENT_TREMOR:
872 if (!me->HasAura(SPELL_FISTS_OF_STONE))
874 events.ScheduleEvent(EVENT_TREMOR, std::rand() % 20000 + 10000);
875 break;
876 }
877 }
878
879 if (lumberjack)
880 lumberjackTimer += diff;
881
883 }
884
886 {
887 switch (action)
888 {
890 ++elderCount;
891 lumberjack = true;
892 break;
894 me->DespawnOrUnsummon(10000);
895 _JustDied();
896 break;
897 }
898 }
899
900 private:
904 };
905
907 {
909 }
910};
911
913{
914 public:
915 boss_elder_ironbranch() : CreatureScript("boss_elder_ironbranch") { }
916
918 {
920 {
921 }
922
924 {
925 _Reset();
926 if (me->HasAura(SPELL_DRAINED_OF_POWER))
927 me->RemoveAurasDueToSpell(SPELL_DRAINED_OF_POWER);
928 events.ScheduleEvent(EVENT_IMPALE, std::rand() % 22000 + 18000);
929 events.ScheduleEvent(EVENT_IRON_ROOTS, std::rand() % 17000 + 12000);
930 events.ScheduleEvent(EVENT_THORN_SWARM, std::rand() % 12500 + 7500);
931 elderCount = 0;
932 lumberjack = false;
933 }
934
936 {
937 if (who->GetTypeId() == TypeID::TYPEID_PLAYER)
939 }
940
941 void JustDied(Unit* killer) OVERRIDE
942 {
943 _JustDied();
945
946 if (killer->GetTypeId() == TypeID::TYPEID_PLAYER)
947 {
948 if (Creature* Brightleaf = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF)))
949 Brightleaf->AI()->DoAction(ACTION_ELDER_DEATH);
950
951 if (Creature* Stonebark = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STONEBARK)))
952 Stonebark->AI()->DoAction(ACTION_ELDER_DEATH);
953 }
954 }
955
956 void EnterCombat(Unit* /*who*/) OVERRIDE
957 {
958 _EnterCombat();
959 if (!me->HasAura(SPELL_DRAINED_OF_POWER))
961 }
962
964 {
965 if (!UpdateVictim() || me->HasAura(SPELL_DRAINED_OF_POWER))
966 return;
967
968 events.Update(diff);
969
970 if (me->HasUnitState(UNIT_STATE_CASTING))
971 return;
972
973 while (uint32 eventId = events.ExecuteEvent())
974 {
975 switch (eventId)
976 {
977 case EVENT_IMPALE:
979 events.ScheduleEvent(EVENT_IMPALE, std::rand() % 25000 + 15000);
980 break;
981 case EVENT_IRON_ROOTS:
982 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true, -SPELL_ROOTS_IRONBRANCH))
983 target->CastSpell(target, SPELL_ROOTS_IRONBRANCH, true);
984 events.ScheduleEvent(EVENT_IRON_ROOTS, std::rand() % 20000 + 10000);
985 break;
988 events.ScheduleEvent(EVENT_THORN_SWARM, std::rand() % 13000 + 8000);
989 break;
990 }
991 }
992
993 if (lumberjack)
994 lumberjackTimer += diff;
995
997 }
998
1000 {
1001 switch (action)
1002 {
1003 case ACTION_ELDER_DEATH:
1004 ++elderCount;
1005 lumberjack = true;
1006 break;
1008 me->DespawnOrUnsummon(10000);
1009 _JustDied();
1010 break;
1011 }
1012 }
1013
1014 private:
1018 };
1019
1021 {
1022 return GetUlduarAI<boss_elder_ironbranchAI>(creature);
1023 }
1024};
1025
1027{
1028 public:
1029 npc_detonating_lasher() : CreatureScript("npc_detonating_lasher") { }
1030
1032 {
1034 {
1035 me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
1036 }
1037
1039 {
1040 lashTimer = 5000;
1041 changeTargetTimer = 7500;
1042 }
1043
1045 {
1046 if (!UpdateVictim())
1047 return;
1048
1049 if (lashTimer <= diff)
1050 {
1052 lashTimer = std::rand() % 10000 + 5000;
1053 }
1054 else
1055 lashTimer -= diff;
1056
1057 if (changeTargetTimer <= diff)
1058 {
1059 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
1060 {
1061 // Switching to other target - modify aggro of new target by 20% from current target's aggro
1062 me->AddThreat(target, me->getThreatManager().getThreat(me->GetVictim(), false) * 1.2f);
1063 me->AI()->AttackStart(target);
1064 }
1065 changeTargetTimer = std::rand() % 10000 + 5000;
1066 }
1067 else
1068 changeTargetTimer -= diff;
1069
1071 }
1072
1073 private:
1076 };
1077
1079 {
1080 return new npc_detonating_lasherAI(creature);
1081 }
1082};
1083
1085{
1086 public:
1087 npc_ancient_water_spirit() : CreatureScript("npc_ancient_water_spirit") { }
1088
1090 {
1092 {
1093 instance = me->GetInstanceScript();
1095 waveCount = CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->trioWaveCount;
1096 }
1097
1099 {
1100 tidalWaveTimer = 10000;
1101 }
1102
1104 {
1105 if (!UpdateVictim())
1106 return;
1107
1108 if (tidalWaveTimer <= diff)
1109 {
1110 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
1111 {
1112 DoCast(target, SPELL_TIDAL_WAVE);
1113 DoCast(target, SPELL_TIDAL_WAVE_EFFECT, true);
1114 }
1115 tidalWaveTimer = std::rand() % 25000 + 12000;
1116 }
1117 else
1118 tidalWaveTimer -= diff;
1119
1121 }
1122
1123 void JustDied(Unit* /*killer*/) OVERRIDE
1124 {
1126 {
1127 CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->checkElementalAlive[waveCount] = false;
1128 CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->LasherDead(1);
1129 }
1130 }
1131
1132 private:
1136 };
1137
1139 {
1140 return new npc_ancient_water_spiritAI(creature);
1141 }
1142};
1143
1145{
1146 public:
1147 npc_storm_lasher() : CreatureScript("npc_storm_lasher") { }
1148
1150 {
1152 {
1153 instance = me->GetInstanceScript();
1155 waveCount = CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->trioWaveCount;
1156 }
1157
1159 {
1160 lightningLashTimer = 10000;
1161 stormboltTimer = 5000;
1162 }
1163
1165 {
1166 if (!UpdateVictim())
1167 return;
1168
1169 if (lightningLashTimer <= diff)
1170 {
1172 lightningLashTimer = std::rand() % 14000 + 7000;
1173 }
1174 else
1175 lightningLashTimer -= diff;
1176
1177 if (stormboltTimer <= diff)
1178 {
1179 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
1180 DoCast(target, SPELL_STORMBOLT);
1181 stormboltTimer = std::rand() % 12000 + 8000;
1182 }
1183 else
1184 stormboltTimer -= diff;
1185
1187 }
1188
1189 void JustDied(Unit* /*killer*/) OVERRIDE
1190 {
1192 {
1193 CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->checkElementalAlive[waveCount] = false;
1194 CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->LasherDead(2);
1195 }
1196 }
1197
1198 private:
1203 };
1204
1206 {
1207 return new npc_storm_lasherAI(creature);
1208 }
1209};
1210
1212{
1213 public:
1214 npc_snaplasher() : CreatureScript("npc_snaplasher") { }
1215
1217 {
1218 npc_snaplasherAI(Creature* creature) : ScriptedAI(creature)
1219 {
1220 instance = me->GetInstanceScript();
1222 waveCount = CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->trioWaveCount;
1223 }
1224
1225 void UpdateAI(uint32 /*diff*/) OVERRIDE
1226 {
1227 if (!UpdateVictim())
1228 return;
1229
1230 if (!me->HasAura(SPELL_BARK_AURA))
1232
1234 }
1235
1236 void JustDied(Unit* /*killer*/) OVERRIDE
1237 {
1239 {
1240 CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->checkElementalAlive[waveCount] = false;
1241 CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->LasherDead(4);
1242 }
1243 }
1244
1245 private:
1248 };
1249
1251 {
1252 return new npc_snaplasherAI(creature);
1253 }
1254};
1255
1257{
1258 public:
1259 npc_ancient_conservator() : CreatureScript("npc_ancient_conservator") { }
1260
1262 {
1264 {
1265 }
1266
1268 {
1269 natureFuryTimer = 7500;
1270 healthySporeTimer = 3500;
1272 }
1273
1274 void SummonHealthySpores(uint8 sporesCount)
1275 {
1276 for (uint8 n = 0; n < sporesCount; ++n)
1277 {
1282 }
1283 }
1284
1286 {
1287 DoCast(who, SPELL_CONSERVATOR_GRIP, true);
1288 }
1289
1291 {
1292 if (!UpdateVictim())
1293 return;
1294
1295 if (healthySporeTimer <= diff)
1296 {
1298 healthySporeTimer = std::rand() % 17500 + 15000;
1299 }
1300 else
1301 healthySporeTimer -= diff;
1302
1303 if (natureFuryTimer <= diff)
1304 {
1305 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true, -SPELL_NATURE_FURY))
1306 DoCast(target, SPELL_NATURE_FURY);
1307 me->AddAura(SPELL_CONSERVATOR_GRIP, me);
1308 natureFuryTimer = 5000;
1309 }
1310 else
1311 natureFuryTimer -= diff;
1312
1314 }
1315
1316 private:
1319 };
1320
1322 {
1323 return new npc_ancient_conservatorAI(creature);
1324 }
1325};
1326
1328{
1329 public:
1330 npc_sun_beam() : CreatureScript("npc_sun_beam") { }
1331
1333 {
1334 npc_sun_beamAI(Creature* creature) : ScriptedAI(creature)
1335 {
1336 SetCombatMovement(false);
1337 me->SetReactState(REACT_PASSIVE);
1340 }
1341 };
1342
1344 {
1345 return new npc_sun_beamAI(creature);
1346 }
1347};
1348
1350{
1351 public:
1352 npc_healthy_spore() : CreatureScript("npc_healthy_spore") { }
1353
1355 {
1357 {
1358 SetCombatMovement(false);
1360 me->SetReactState(REACT_PASSIVE);
1364 lifeTimer = std::rand() % 30000 + 22000;
1365 }
1366
1368 {
1369 if (lifeTimer <= diff)
1370 {
1371 me->RemoveAurasDueToSpell(SPELL_GROW);
1372 me->DespawnOrUnsummon(2200);
1373 lifeTimer = std::rand() % 30000 + 22000;
1374 }
1375 else
1376 lifeTimer -= diff;
1377 }
1378
1379 private:
1381 };
1382
1384 {
1385 return new npc_healthy_sporeAI(creature);
1386 }
1387};
1388
1390{
1391 public:
1392 npc_eonars_gift() : CreatureScript("npc_eonars_gift") { }
1393
1395 {
1397 {
1398 SetCombatMovement(false);
1399
1400 lifeBindersGiftTimer = 12000;
1402 DoCast(me, SPELL_PHEROMONES, true);
1404 }
1405
1407 {
1408 if (lifeBindersGiftTimer <= diff)
1409 {
1410 me->RemoveAurasDueToSpell(SPELL_GROW);
1412 me->DespawnOrUnsummon(2500);
1413 lifeBindersGiftTimer = 12000;
1414 }
1415 else
1416 lifeBindersGiftTimer -= diff;
1417 }
1418
1419 private:
1421 };
1422
1424 {
1425 return new npc_eonars_giftAI(creature);
1426 }
1427};
1428
1430{
1431 public:
1432 npc_nature_bomb() : CreatureScript("npc_nature_bomb") { }
1433
1435 {
1437 {
1438 SetCombatMovement(false);
1439
1440 bombTimer = std::rand() % 10000 + 8000;
1442 }
1443
1445 {
1446 if (bombTimer <= diff)
1447 {
1448 if (GameObject* go = me->FindNearestGameObject(OBJECT_NATURE_BOMB, 1.0f))
1449 {
1451 me->RemoveGameObject(go, true);
1452 me->RemoveFromWorld();
1453 }
1454
1455 bombTimer = 10000;
1456 }
1457 else
1458 bombTimer -= diff;
1459 }
1460
1461 private:
1463 };
1464
1466 {
1467 return new npc_nature_bombAI(creature);
1468 }
1469};
1470
1472{
1473 public:
1474 npc_unstable_sun_beam() : CreatureScript("npc_unstable_sun_beam") { }
1475
1477 {
1479 {
1480 SetCombatMovement(false);
1481
1482 despawnTimer = std::rand() % 12000 + 7000;
1483 instance = me->GetInstanceScript();
1486 me->SetReactState(REACT_PASSIVE);
1487 }
1488
1490 {
1491 if (despawnTimer <= diff)
1492 {
1494 me->DisappearAndDie();
1495 }
1496 else
1497 despawnTimer -= diff;
1498 }
1499
1500 void SpellHitTarget(Unit* target, SpellInfo const* spell) OVERRIDE
1501 {
1502 if (target && spell->Id == SPELL_UNSTABLE_ENERGY)
1503 {
1504 target->RemoveAurasDueToSpell(SPELL_UNSTABLE_SUN_BEAM);
1505 target->RemoveAurasDueToSpell(SPELL_UNSTABLE_SUN_BEAM_TRIGGERED);
1506 }
1507 }
1508
1509 private:
1512 };
1513
1515 {
1516 return new npc_unstable_sun_beamAI(creature);
1517 }
1518};
1519
1521{
1522 public:
1523 spell_freya_attuned_to_nature_dose_reduction() : SpellScriptLoader("spell_freya_attuned_to_nature_dose_reduction") { }
1524
1526 {
1528
1529 void HandleScript(SpellEffIndex /*effIndex*/)
1530 {
1531 Unit* target = GetHitUnit();
1532
1533 switch (GetSpellInfo()->Id)
1534 {
1536 if (target->HasAura(GetEffectValue()))
1537 for (uint8 n = 0; n < 2; ++n)
1539 break;
1541 if (target->HasAura(GetEffectValue()))
1542 for (uint8 n = 0; n < 10; ++n)
1544 break;
1546 if (target->HasAura(GetEffectValue()))
1547 for (uint8 n = 0; n < 25; ++n)
1549 break;
1550 default:
1551 break;
1552 }
1553 }
1554
1559 };
1560
1565};
1566
1568{
1569 public:
1570 spell_freya_iron_roots() : SpellScriptLoader("spell_freya_iron_roots") { }
1571
1573 {
1575
1577 {
1578 PreventHitDefaultEffect(effIndex);
1579 uint32 entry = uint32(GetSpellInfo()->Effects[effIndex].MiscValue);
1580
1581 Position pos;
1582 GetCaster()->GetPosition(&pos);
1583 // Not good at all, but this prevents having roots in a different position then player
1584 if (Creature* Roots = GetCaster()->SummonCreature(entry, pos))
1585 GetCaster()->NearTeleportTo(Roots->GetPositionX(), Roots->GetPositionY(), Roots->GetPositionZ(), GetCaster()->GetOrientation());
1586 }
1587
1592 };
1593
1598};
1599
1601{
1602 public:
1603 achievement_getting_back_to_nature() : AchievementCriteriaScript("achievement_getting_back_to_nature") { }
1604
1605 bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
1606 {
1607 return target && target->GetAI()->GetData(DATA_GETTING_BACK_TO_NATURE) >= 25;
1608 }
1609};
1610
1612{
1613 public:
1614 achievement_knock_on_wood() : AchievementCriteriaScript("achievement_knock_on_wood") { }
1615
1616 bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
1617 {
1618 return target && target->GetAI()->GetData(DATA_KNOCK_ON_WOOD) >= 1;
1619 }
1620};
1621
1623{
1624 public:
1625 achievement_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_on_wood") { }
1626
1627 bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
1628 {
1629 return target && target->GetAI()->GetData(DATA_KNOCK_ON_WOOD) >= 2;
1630 }
1631};
1632
1634{
1635 public:
1636 achievement_knock_knock_knock_on_wood() : AchievementCriteriaScript("achievement_knock_knock_knock_on_wood") { }
1637
1638 bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
1639 {
1640 return target && target->GetAI()->GetData(DATA_KNOCK_ON_WOOD) == 3;
1641 }
1642};
1643
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
std::uint64_t uint64
Definition Define.h:76
@ TYPEID_PLAYER
Definition Object.h:55
#define CAST_AI(a, b)
SpellEffIndex
@ EFFECT_0
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SUMMON
@ SPELL_EFFECT_KNOCK_BACK
@ IMMUNITY_STATE
@ IMMUNITY_EFFECT
@ IMMUNITY_ID
@ LOOT_MODE_DEFAULT
@ SPELL_AURA_MOD_TAUNT
#define SpellEffectFn(F, I, N)
@ SPELLVALUE_AURA_STACK
Definition Unit.h:119
@ SPELLVALUE_MAX_TARGETS
Definition Unit.h:118
@ AURA_REMOVE_BY_DEFAULT
Definition Unit.h:407
@ UNIT_STATE_CASTING
Definition Unit.h:527
@ REACT_PASSIVE
Definition Unit.h:1156
@ UNIT_FLAG_NON_ATTACKABLE
Definition Unit.h:626
@ UNIT_FLAG_NOT_SELECTABLE
Definition Unit.h:650
@ UNIT_FLAG_IMMUNE_TO_PC
Definition Unit.h:633
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ UNIT_FIELD_FLAGS
@ SPELL_ENRAGE
@ EVENT_ENRAGE
@ SAY_BERSERK
@ SAY_SLAY
@ SPELL_GROUND_TREMOR
#define SAY_DEATH
#define SAY_AGGRO
@ TIME_DIFFERENCE
@ DATA_KNOCK_ON_WOOD
@ DATA_GETTING_BACK_TO_NATURE
@ WAVE_TIME
void AddSC_boss_freya()
FreyaYells
@ SAY_DEATH
@ SAY_SUMMON_CONSERVATOR
@ SAY_AGGRO_WITH_ELDER
@ SAY_ELDER_AGGRO
@ EMOTE_IRON_ROOTS
@ SAY_ELDER_DEATH
@ SAY_AGGRO
@ SAY_SUMMON_TRIO
@ SAY_SUMMON_LASHERS
@ SAY_ELDER_SLAY
@ EMOTE_ALLIES_OF_NATURE
@ SAY_SLAY
@ EMOTE_GROUND_TREMOR
@ EMOTE_LIFEBINDERS_GIFT
@ SAY_BERSERK
FreyaEvents
@ EVENT_THORN_SWARM
@ EVENT_IRON_ROOTS
@ EVENT_EONAR_GIFT
@ EVENT_ENRAGE
@ EVENT_GROUND_TREMOR
@ EVENT_UNSTABLE_ENERGY
@ EVENT_SOLAR_FLARE
@ EVENT_STRENGTHENED_IRON_ROOTS
@ EVENT_TREMOR
@ EVENT_FLUX
@ EVENT_FISTS
@ EVENT_BARK
@ EVENT_SUNBEAM
@ EVENT_WAVE
@ EVENT_UNSTABLE_SUN_BEAM
@ EVENT_IMPALE
@ EVENT_NATURE_BOMB
FreyaSpells
@ SPELL_FISTS_OF_STONE
@ SPELL_SUMMON_ANCIENT_CONSERVATOR
@ SPELL_ATTUNED_TO_NATURE_10_DOSE_REDUCTION
@ SPELL_DETONATE
@ SPELL_REMOVE_25STACK
@ SPELL_SUNBEAM
@ SPELL_HEALTHY_SPORE_VISUAL
@ SPELL_UNSTABLE_SUN_BEAM_TRIGGERED
@ SPELL_IRONBRANCH_ESSENCE
@ SPELL_DEFORESTATION_CREDIT
@ SPELL_FREYA_UNSTABLE_ENERGY_VISUAL
@ SPELL_SOLAR_FLARE
@ SPELL_ENRAGE
@ SPELL_EONAR_VISUAL
@ SPELL_OBJECT_BOMB
@ SPELL_POTENT_PHEROMONES
@ SPELL_SPORE_SUMMON_NE
@ SPELL_ROOTS_IRONBRANCH
@ SPELL_DRAINED_OF_POWER
@ SPELL_BRIGHTLEAF_ESSENCE
@ SPELL_FLUX_PLUS
@ SPELL_SUMMON_PERIODIC
@ SPELL_UNSTABLE_SUN_BEAM
@ SPELL_LIGHTNING_LASH
@ SPELL_BARK_AURA
@ SPELL_UNSTABLE_ENERGY
@ SPELL_UNSTABLE_SUN_BEAM_SUMMON
@ SPELL_SUMMON_EONAR_GIFT
@ SPELL_SPORE_SUMMON_SE
@ SPELL_SPORE_SUMMON_NW
@ SPELL_PHEROMONES
@ SPELL_THORN_SWARM
@ SPELL_SUMMON_NATURE_BOMB
@ SPELL_PETRIFIED_BARK_DMG
@ SPELL_STORMBOLT
@ SPELL_NATURE_BOMB
@ SPELL_ATTUNED_TO_NATURE_25_DOSE_REDUCTION
@ SPELL_NATURE_FURY
@ SPELL_HARDENED_BARK
@ SPELL_SPORE_SUMMON_SW
@ SPELL_PHOTOSYNTHESIS
@ SPELL_LIFEBINDERS_GIFT
@ SPELL_TIDAL_WAVE_EFFECT
@ SPELL_ROOTS_FREYA
@ SPELL_PETRIFIED_BARK
@ SPELL_GROUND_TREMOR
@ SPELL_FLUX_MINUS
@ SPELL_TIDAL_WAVE
@ SPELL_FREYA_UNSTABLE_ENERGY
@ SPELL_FLAME_LASH
@ SPELL_FREYA_GROUND_TREMOR
@ SPELL_SUMMON_LASHERS
@ SPELL_FREYA_UNSTABLE_SUNBEAM
@ SPELL_KNOCK_ON_WOOD_CREDIT
@ SPELL_REMOVE_2STACK
@ SPELL_FLUX_AURA
@ SPELL_CONSERVATOR_GRIP
@ SPELL_STONEBARK_ESSENCE
@ SPELL_REMOVE_10STACK
@ SPELL_ATTUNED_TO_NATURE_2_DOSE_REDUCTION
@ SPELL_SUMMON_TRIO
@ SPELL_TOUCH_OF_EONAR
@ SPELL_GROW
@ SPELL_IMPALE
@ SPELL_FLUX
@ SPELL_ATTUNED_TO_NATURE
FreyaNpcs
@ NPC_STRENGTHENED_IRON_ROOTS
@ NPC_IRON_ROOTS
@ OBJECT_NATURE_BOMB
@ NPC_SUN_BEAM
@ NPC_ANCIENT_WATER_SPIRIT
@ NPC_EONARS_GIFT
@ NPC_STORM_LASHER
@ NPC_DETONATING_LASHER
@ NPC_NATURE_BOMB
@ NPC_HEALTHY_SPORE
@ NPC_UNSTABLE_SUN_BEAM
@ NPC_ANCIENT_CONSERVATOR
@ NPC_SNAPLASHER
FreyaActions
@ ACTION_ELDER_DEATH
@ ACTION_ELDER_FREYA_KILLED
@ EVENT_WAVE
Definition boss_noth.cpp:55
@ SPELL_STORMBOLT
AchievementCriteriaScript(const char *name)
InstanceScript *const instance
SummonList summons
EventMap events
BossAI(Creature *creature, uint32 bossId)
void _EnterCombat()
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
void RemoveLootMode(uint16 lootMode)
Definition Creature.h:559
void Respawn(bool force=false)
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
CreatureAI * AI() const
Definition Creature.h:483
CreatureScript(const char *name)
static Creature * GetCreature(WorldObject const &u, uint64 guid)
static Player * GetPlayer(WorldObject const &, uint64 guid)
SpellInfo const * GetSpellInfo()
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
HookList< EffectHandler > OnEffectHitTarget
Unit * GetHitUnit()
int32 GetEffectValue()
Unit * GetCaster()
SpellScriptLoader(const char *name)
virtual void DoAction(int32)
Definition UnitAI.h:126
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition UnitAI.cpp:66
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:176
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:16
Definition Unit.h:1367
void CombatStop(bool includingCast=false)
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
Definition Unit.cpp:4463
void RemoveAuraFromStack(uint32 spellId, uint64 casterGUID=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void NearTeleportTo(float x, float y, float z, float orientation, bool casting=false)
Definition Unit.cpp:8393
void SetHealth(uint32 val)
Definition Unit.cpp:5162
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
void DeleteThreatList()
Definition Unit.cpp:4472
UnitAI * GetAI()
Definition Unit.h:1393
void RemoveAllAuras()
bool AttackStop()
void SetInCombatWith(Unit *enemy)
bool OnCheck(Player *, Unit *target) OVERRIDE
bool OnCheck(Player *, Unit *target) OVERRIDE
bool OnCheck(Player *, Unit *target) OVERRIDE
bool OnCheck(Player *, Unit *target) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_freya_iron_roots_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
void GetPosition(float &x, float &y) const
Definition Object.h:333
void SetCombatMovement(bool allowMovement)
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void DamageTaken(Unit *who, uint32 &damage) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void LasherDead(uint32 type)
void KilledUnit(Unit *who) OVERRIDE
void JustDied(Unit *) OVERRIDE
void SummonedCreatureDies(Creature *summoned, Unit *who) OVERRIDE
void DamageTaken(Unit *who, uint32 &damage) OVERRIDE
boss_freyaAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void EnterCombat(Unit *who) OVERRIDE
uint32 GetData(uint32 type) const OVERRIDE
void JustSummoned(Creature *summoned) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_eonars_giftAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void JustDied(Unit *) OVERRIDE
void IsSummonedBy(Unit *summoner) OVERRIDE
npc_iron_rootsAI(Creature *creature)
npc_nature_bombAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
npc_snaplasherAI(Creature *creature)
void JustDied(Unit *) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_sun_beamAI(Creature *creature)
void SpellHitTarget(Unit *target, SpellInfo const *spell) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
@ BOSS_BRIGHTLEAF
Definition ulduar.h:31
@ BOSS_STONEBARK
Definition ulduar.h:33
@ BOSS_IRONBRANCH
Definition ulduar.h:32
@ BOSS_FREYA
Definition ulduar.h:30
AI * GetUlduarAI(T *obj)
Definition ulduar.h:336
@ SPELL_GROW