TrinityCore
boss_guarm.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 "AreaTrigger.h"
19#include "AreaTriggerAI.h"
20#include "Containers.h"
21#include "Conversation.h"
22#include "CreatureAI.h"
23#include "CreatureAIImpl.h"
24#include "InstanceScript.h"
25#include "Map.h"
26#include "MotionMaster.h"
27#include "ObjectAccessor.h"
28#include "Player.h"
29#include "ScriptedCreature.h"
30#include "ScriptMgr.h"
31#include "SharedDefines.h"
32#include "SpellAuras.h"
33#include "SpellHistory.h"
34#include "SpellScript.h"
35#include "TemporarySummon.h"
36#include "trial_of_valor.h"
37
39{
46
47 SPELL_FLAME_LICK_SELECTOR = 228226, // triggers 228227 missile
48 SPELL_SHADOW_LICK_SELECTOR = 228250, // triggers 228251 missile
49 SPELL_FROST_LICK_SELECTOR = 228246, // triggers 228247 missile
50
53 SPELL_BERSERK_CHARGE_AT = 232173, // triggers 232197
54
56 SPELL_GUARDIANS_BREATH_SUMMON_ATS_RGB = 232811, // Red Green Blue
57 SPELL_GUARDIANS_BREATH_SUMMON_ATS_RBG = 232810, // Red Blue Green
58 SPELL_GUARDIANS_BREATH_SUMMON_ATS_GRB = 232775, // Green Red Blue
59 SPELL_GUARDIANS_BREATH_SUMMON_ATS_GBR = 232808, // Green Blue Red
60 SPELL_GUARDIANS_BREATH_SUMMON_ATS_BRG = 232809, // Blue Red Green
61 SPELL_GUARDIANS_BREATH_SUMMON_ATS_BGR = 232807, // Blue Green Red
63 SPELL_GUARDIANS_BREATH_CAST_RGB = 227673, // Red Green Blue
64 SPELL_GUARDIANS_BREATH_CAST_RBG = 227667, // Red Blue Green
65 SPELL_GUARDIANS_BREATH_CAST_GRB = 227669, // Green Red Blue
66 SPELL_GUARDIANS_BREATH_CAST_GBR = 227660, // Green Blue Red
67 SPELL_GUARDIANS_BREATH_CAST_BRG = 227666, // Blue Red Green
68 SPELL_GUARDIANS_BREATH_CAST_BGR = 227658, // Blue Green Red
69 SPELL_FIERY_PHLEGM = 232777, // Red
71 SPELL_SALTY_SPITTLE = 232798, // Green
73 SPELL_DARK_DISCHARGE = 232800, // Blue
75 SPELL_FROTHING_RAGE = 228174, // applied x times where x players not getting hit by breath
76
77 SPELL_ROARING_LEAP_SELECTOR = 227894, // @TODO: requires TARGET_DEST_CASTER_CLUMP_CENTROID
79 SPELL_ROARING_LEAP_JUMP = 229350, // triggers 227902
83 SPELL_HEADLONG_CHARGE_AT = 227833, // triggers 227843
84
85 // Mythic
90};
91
93{
102};
103
105{
106 TALK_GUARDIANS_BREATH_ANNOUNCE = 0, // |TInterface\Icons\SPELL_FIRE_TWILIGHTFLAMEBREATH.BLP:20|t%s begins to cast |cFFFF0000|Hspell:227573|h[Guardian's Breath]|h|r!
107 TALK_BERSERK = 1, // %s goes into a berserker rage!
108};
109
111{
113
116};
117
119{
120 PATH_HEADLONG_CHARGE1 = (114323 * 100) + 0,
121 PATH_HEADLONG_CHARGE2 = (114323 * 100) + 1,
122 PATH_HEADLONG_CHARGE3 = (114323 * 100) + 2,
123 PATH_HEADLONG_CHARGE4 = (114323 * 100) + 3,
124 PATH_BERSERK = (114323 * 100) + 4,
125};
126
128{
130};
131
133{
134 CONVERSATION_DEATH = 3917
136
138{
141};
142
144{
147};
148
150{
151 { { 478.535f, 446.623f, 4.88632f }, PATH_HEADLONG_CHARGE1 },
152 { { 460.708f, 445.918f, 4.91909f }, PATH_HEADLONG_CHARGE2 },
153 { { 454.967f, 543.651f, 2.99177f }, PATH_HEADLONG_CHARGE3 },
154 { { 475.189f, 543.391f, 3.25487f }, PATH_HEADLONG_CHARGE4 },
155};
156
158{
161};
162
164{
171};
172
173JumpMovePathPair const BerserkerPair = { { 464.035f, 549.979f, 2.95187f }, PATH_BERSERK };
174
175// 114323 - Guarm
176struct boss_guarm : public BossAI
177{
179
180 void JustAppeared() override
181 {
183 me->SetMaxPower(POWER_ENERGY, 100); // power is set to 0 in Creature::UpdateMaxPower
184 }
185
186 void JustDied(Unit* /*killer*/) override
187 {
189
191
192 _JustDied();
193 }
194
195 void EnterEvadeMode(EvadeReason /*why*/) override
196 {
198
202 }
203
204 void JustEngagedWith(Unit* who) override
205 {
208
211
216
217 if (IsMythic())
218 {
221 }
222 else if (IsHeroic())
226 else // LFR
228 }
229
230 void UpdateAI(uint32 diff) override
231 {
232 if (!UpdateVictim())
233 return;
234
235 events.Update(diff);
236
238 return;
239
240 switch (events.ExecuteEvent())
241 {
245 break;
246 case EVENT_LICK:
247 _lickCount++;
249 events.ScheduleEvent(EVENT_LICK, (_lickCount % 2) ? 4s : 10s);
250 break;
252 {
254 if (me->GetPower(POWER_ENERGY) < 100)
255 break;
256
260
261 break;
262 }
265 break;
268 break;
277 break;
281 break;
282 case EVENT_BERSERK:
287 me->GetMotionMaster()->Clear(); // remove ChaseMovementGen
290 break;
291 default:
292 break;
293 }
294 }
295
296 void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
297 {
301 if (IsMythic())
303
304 // Headlong Charge
305 if (pathId != BerserkerPair.PathID)
306 {
310 }
311 else // Berserk
312 {
314 }
315 }
316
317 void MovementInform(uint32 type, uint32 pointId) override
318 {
319 if (type == EFFECT_MOTION_TYPE)
320 {
321 if (pointId >= POINT_HEADLONG_CHARGE && pointId <= POINT_HEADLONG_CHARGE_MAX)
322 {
323 uint32 headlongChargeId = pointId - POINT_HEADLONG_CHARGE;
324 DoCastAOE(SPELL_HEADLONG_CHARGE_DAMAGE, true); // manually trigger first damage tick
327
328 me->GetMotionMaster()->MovePath(HeadlongChargePairs[headlongChargeId].PathID, false, {}, 35.0f);
329 }
330 else if (pointId == POINT_BERSERK_JUMP)
331 {
335
336 me->GetMotionMaster()->MovePath(BerserkerPair.PathID, false, {}, 35.0f);
337 }
338 }
339 }
340
341 void DoAction(int32 param) override
342 {
343 switch (param)
344 {
347 break;
349 {
350 uint32 engagedPlayers = 0;
351 for (auto const& itr : me->GetThreatManager().GetUnsortedThreatList())
352 {
353 if (itr->GetVictim()->IsPlayer())
354 engagedPlayers++;
355 }
356
357 uint32 frothingRageStacks = engagedPlayers - _unitsHitByBreathCount;
358 if (frothingRageStacks > 0)
359 {
360 if (Aura* aura = me->GetAura(SPELL_FROTHING_RAGE))
361 frothingRageStacks += aura->GetStackAmount();
362 me->SetAuraStack(SPELL_FROTHING_RAGE, me, frothingRageStacks);
363 }
364 break;
365 }
366 default:
367 break;
368 }
369 }
370
371private:
374};
375
376// 227512 - Multi-Headed
378{
379 void HandleProc(ProcEventInfo& eventInfo)
380 {
382 }
383
384 void Register() override
385 {
387 }
388};
389
390// 227642 - Multi-Headed
392{
393 void FilterTargets(std::list<WorldObject*>& targets)
394 {
395 if (targets.size() < 2)
396 return;
397
399 targets.pop_front(); // skip expl target if multiple players are in range
400 targets.resize(1);
401 }
402
403 void Register() override
404 {
406 }
407};
408
409// 228226 - Flame Lick
410// 228250 - Shadow Lick
411// 228246 - Frost Lick
413{
414 bool Validate(SpellInfo const* spellInfo) override
415 {
416 return ValidateSpellInfo({ (uint32)spellInfo->GetEffect(EFFECT_0).BasePoints }) && ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } });
417 }
418
420 {
422 }
423
424 void Register() override
425 {
427 }
428};
429
430// 228187 - Guardian's Breath
432{
433 bool Validate(SpellInfo const* /*spellInfo*/) override
434 {
435 return ValidateSpellInfo(
436 {
450 });
451 }
452
453 void HandleHit(SpellEffIndex /*effIndex*/)
454 {
455 Unit* caster = GetCaster();
457 caster->CastSpell(nullptr, pair.CastSpellID);
458 caster->CastSpell(nullptr, pair.SummonATSpellID);
459 caster->CastSpell(nullptr, SPELL_GUARDIANS_BREATH_UNK);
460 }
461
462 void Register() override
463 {
465 }
466};
467
468// 227673 - Guardian's Breath
469// 227667 - Guardian's Breath
470// 227669 - Guardian's Breath
471// 227660 - Guardian's Breath
472// 227666 - Guardian's Breath
473// 227658 - Guardian's Breath
475{
476 void HandleHit(SpellEffIndex /*effIndex*/)
477 {
478 Unit* caster = GetCaster();
479 if (!caster->IsAIEnabled())
480 return;
481
483 }
484
485 void Register() override
486 {
488 }
489};
490
491/*
492 Guarm
493 v
494 Color: R-- Spell: 232803 AreaTrigger: 13352
495 Color: -R- Spell: 232773 AreaTrigger: 13352
496 Color: --R Spell: 232804 AreaTrigger: 13352
497 Color: G-- Spell: 232774 AreaTrigger: 13353
498 Color: -G- Spell: 232805 AreaTrigger: 13353
499 Color: --G Spell: 232806 AreaTrigger: 13353
500 Color: B-- Spell: 232801 AreaTrigger: 13354
501 Color: -B- Spell: 232802 AreaTrigger: 13354
502 Color: --B Spell: 232776 AreaTrigger: 13354
503*/
504
505// 232803 - Guardian's Breath
506// 232773 - Guardian's Breath
507// 232804 - Guardian's Breath
508// 232774 - Guardian's Breath
509// 232805 - Guardian's Breath
510// 232806 - Guardian's Breath
511// 232801 - Guardian's Breath
512// 232802 - Guardian's Breath
513// 232776 - Guardian's Breath
514template<uint32 ColorSpellId>
516{
517public:
518 at_guardians_breath(char const* script) : AreaTriggerEntityScript(script) { }
519
520 template<uint32 ColorSpell>
522 {
524
526 {
527 switch (breathDamageSpell)
528 {
535 }
536 return 0;
537 }
538
539 void OnRemove() override
540 {
541 InstanceScript* instance = at->GetInstanceScript();
542 if (!instance)
543 return;
544
545 Creature* guarm = instance->GetCreature(DATA_GUARM);
546 if (!guarm)
547 return;
548
549 if (!guarm->IsAIEnabled())
550 return;
551
552 for (ObjectGuid const& guid : at->GetInsideUnits())
553 {
554 Player* player = ObjectAccessor::GetPlayer(*at, guid);
555 if (!player)
556 continue;
557
558 if (player->isDead())
559 continue;
560
562 guarm->CastSpell(player, ColorSpell, true);
563 player->CastSpell(nullptr, GetBreathDebuffByDamageSpell(ColorSpell));
564 }
565 }
566 };
567
568 AreaTriggerAI* GetAI(AreaTrigger* at) const override
569 {
571 }
572};
573
574// 227720 - Mixed Elements
575// 227721 - Mixed Elements
576// 227735 - Mixed Elements
577template<uint32 SpellId1, uint32 SpellId2>
579{
580 bool Validate(SpellInfo const* /*spellInfo*/) override
581 {
582 return ValidateSpellInfo(
583 {
584 SpellId1,
585 SpellId2
586 });
587 }
588
589 void FilterTargets(std::list<WorldObject*>& targets)
590 {
591 targets.remove_if([](WorldObject* target)
592 {
593 Player* unit = target->ToPlayer();
594 if (!unit)
595 return true;
596
597 if (!unit->HasAura(SpellId1) || !unit->HasAura(SpellId2))
598 return true;
599
600 return false;
601 });
602 }
603
604 void Register() override
605 {
607 }
608};
609
610// 227894 - Roaring Leap
612{
613 bool Validate(SpellInfo const* /*spellInfo*/) override
614 {
616 }
617
619 {
620 Unit* caster = GetCaster();
621 // @TODO: cast 232036 + implement (achievement)
622 // @TODO: related to achievement aswell: 232393
623 caster->CastSpell(nullptr, SPELL_ROARING_LEAP_INITIAL_KNOCKBACK, true);
625 }
626
627 void Register() override
628 {
630 }
631};
632
633// 227816 - Headlong Charge
635{
636 void HandleHit(SpellEffIndex /*effIndex*/)
637 {
638 Creature* caster = GetCaster()->ToCreature();
639 if (!caster)
640 return;
641
642 uint8 pairId = urand(0, 3);
643 caster->GetMotionMaster()->Clear(); // remove ChaseMovementGen
645 caster->GetMotionMaster()->MoveJump(HeadlongChargePairs[pairId].JumpPos, 42.0f, 21.5f, POINT_HEADLONG_CHARGE + pairId);
646 }
647
648 void Register() override
649 {
651 }
652};
653
654// 228201 - Off the Leash
656{
657 bool Validate(SpellInfo const* /*spellInfo*/) override
658 {
660 }
661
662 void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/ )
663 {
665 }
666
667 void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
668 {
670 }
671
672 void Register() override
673 {
676 }
677};
678
679// 228824 - Volatile Foam
681{
682 bool Validate(SpellInfo const* /*spellInfo*/) override
683 {
684 return ValidateSpellInfo(
685 {
689 });
690 }
691
692 void HandleHit(SpellEffIndex /*effIndex*/)
693 {
695 }
696
697 void Register() override
698 {
700 }
701};
702
703// 228684 - Volatile Foam // Red
704// 228809 - Volatile Foam // Green
705// 228817 - Volatile Foam // Blue
706template<uint32 ExcludeSpellId>
708{
709 bool Validate(SpellInfo const* spellInfo) override
710 {
711 return ValidateSpellInfo({ (uint32)spellInfo->GetEffect(EFFECT_0).BasePoints });
712 }
713
714 void FilterTargets(std::list<WorldObject*>& targets)
715 {
716 targets.remove_if([](WorldObject* target)
717 {
718 Unit* unit = target->ToUnit();
719 if (!unit)
720 return true;
721
722 if (unit->HasAura(ExcludeSpellId))
723 return true;
724
725 return false;
726 });
727 }
728
730 {
732 }
733
734 void Register() override
735 {
738 }
739};
740
741// 228794 - Flaming Volatile Foam // after dispel
742// 228811 - Briney Volatile Foam // after dispel
743// 228819 - Shadowy Volatile Foam // after dispel
745{
746 void FilterTargets(std::list<WorldObject*>& targets)
747 {
749 }
750
751 void Register() override
752 {
756 }
757};
758
759// 228744 - Flaming Volatile Foam // initial
760// 228794 - Flaming Volatile Foam // after dispel
761// 228810 - Briney Volatile Foam // initial
762// 228811 - Briney Volatile Foam // after dispel
763// 228818 - Shadowy Volatile Foam // initial
764// 228819 - Shadowy Volatile Foam // after dispel
765template<uint32 SpellIdOnExpire>
767{
768 bool Validate(SpellInfo const* spellInfo) override
769 {
770 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo(
771 {
772 (uint32)spellInfo->GetEffect(EFFECT_0).CalcValue(), // SpellIdOnDispel
773 SpellIdOnExpire
774 });
775 }
776
777 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
778 {
779 Unit* target = GetTarget();
780
782 if (removeMode == AURA_REMOVE_BY_EXPIRE)
783 target->CastSpell(target, SpellIdOnExpire);
784 else if (removeMode == AURA_REMOVE_BY_ENEMY_SPELL)
785 target->CastSpell(nullptr, GetSpellInfo()->GetEffect(EFFECT_0).CalcValue());
786 }
787
788 void Register() override
789 {
791 }
792};
793
795{
802 new at_guardians_breath<SPELL_FIERY_PHLEGM>("at_guardians_breath_red");
803 new at_guardians_breath<SPELL_SALTY_SPITTLE>("at_guardians_breath_green");
804 new at_guardians_breath<SPELL_DARK_DISCHARGE>("at_guardians_breath_blue");
821}
First const & RAND(First const &first, Second const &second, Rest const &... rest)
@ DIFFICULTY_NORMAL_RAID
Definition: DBCEnums.h:886
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
@ ENCOUNTER_FRAME_DISENGAGE
@ ENCOUNTER_FRAME_ENGAGE
@ EFFECT_MOTION_TYPE
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
Definition: ScriptMgr.h:1368
#define RegisterSpellAndAuraScriptPairWithArgs(script_1, script_2, script_name,...)
Definition: ScriptMgr.h:1370
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ EFFECT_2
Definition: SharedDefines.h:32
@ TARGET_UNIT_DEST_AREA_ENEMY
@ TARGET_UNIT_SRC_AREA_ALLY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ POWER_ENERGY
@ SPELL_CAST_OK
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
AuraRemoveMode
@ AURA_REMOVE_BY_EXPIRE
@ AURA_REMOVE_BY_ENEMY_SPELL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_DUMMY
#define AuraProcFn(F)
Definition: SpellScript.h:2150
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition: SpellScript.h:864
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:2040
EvadeReason
Definition: UnitAICommon.h:30
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
@ UNIT_STATE_CASTING
Definition: Unit.h:270
GuarmConversations
Definition: boss_guarm.cpp:133
@ CONVERSATION_DEATH
Definition: boss_guarm.cpp:134
GuarmActions
Definition: boss_guarm.cpp:138
@ ACTION_HANDLE_FROTHING_RAGE
Definition: boss_guarm.cpp:140
@ ACTION_BREATH_HIT_TARGET
Definition: boss_guarm.cpp:139
GuardiansBreathSpellPair const GuardiansBreathSpellPairs[]
Definition: boss_guarm.cpp:163
GuarmPaths
Definition: boss_guarm.cpp:119
@ PATH_HEADLONG_CHARGE1
Definition: boss_guarm.cpp:120
@ PATH_HEADLONG_CHARGE2
Definition: boss_guarm.cpp:121
@ PATH_BERSERK
Definition: boss_guarm.cpp:124
@ PATH_HEADLONG_CHARGE4
Definition: boss_guarm.cpp:123
@ PATH_HEADLONG_CHARGE3
Definition: boss_guarm.cpp:122
GuarmPoints
Definition: boss_guarm.cpp:111
@ POINT_BERSERK_JUMP
Definition: boss_guarm.cpp:112
@ POINT_HEADLONG_CHARGE_MAX
Definition: boss_guarm.cpp:115
@ POINT_HEADLONG_CHARGE
Definition: boss_guarm.cpp:114
JumpMovePathPair const BerserkerPair
Definition: boss_guarm.cpp:173
GuarmSpells
Definition: boss_guarm.cpp:39
@ SPELL_HEADLONG_CHARGE_INITIAL
Definition: boss_guarm.cpp:80
@ SPELL_GUARDIANS_BREATH_UNK
Definition: boss_guarm.cpp:62
@ SPELL_HEADLONG_CHARGE_DAMAGE
Definition: boss_guarm.cpp:82
@ SPELL_OFF_THE_LEASH
Definition: boss_guarm.cpp:45
@ SPELL_GUARDIANS_BREATH_SUMMON_ATS_GRB
Definition: boss_guarm.cpp:58
@ SPELL_GUARDIANS_BREATH_COLOR_SELECTOR
Definition: boss_guarm.cpp:55
@ SPELL_VOLATILE_FOAM_INITIAL
Definition: boss_guarm.cpp:86
@ SPELL_GUARDIANS_BREATH_SUMMON_ATS_RGB
Definition: boss_guarm.cpp:56
@ SPELL_SALTY_SPITTLE
Definition: boss_guarm.cpp:71
@ SPELL_HEADLONG_CHARGE_AT
Definition: boss_guarm.cpp:83
@ SPELL_ROARING_LEAP_JUMP
Definition: boss_guarm.cpp:79
@ SPELL_VOLATILE_FOAM_SELECTOR_BLUE
Definition: boss_guarm.cpp:89
@ SPELL_SHADOW_LICK_SELECTOR
Definition: boss_guarm.cpp:48
@ SPELL_ROARING_LEAP_INITIAL_KNOCKBACK
Definition: boss_guarm.cpp:78
@ SPELL_MULTI_HEADED_AURA
Definition: boss_guarm.cpp:42
@ SPELL_GUARDIANS_BREATH_SUMMON_ATS_BRG
Definition: boss_guarm.cpp:60
@ SPELL_GUARDIANS_BREATH_CAST_BRG
Definition: boss_guarm.cpp:67
@ SPELL_BERSERK_TRAMPLE_AOE
Definition: boss_guarm.cpp:52
@ SPELL_GUARDIANS_BREATH_CAST_GBR
Definition: boss_guarm.cpp:66
@ SPELL_FROST_LICK_SELECTOR
Definition: boss_guarm.cpp:49
@ SPELL_FIERY_PHLEGM
Definition: boss_guarm.cpp:69
@ SPELL_GUARDIANS_BREATH_CAST_GRB
Definition: boss_guarm.cpp:65
@ SPELL_ROARING_LEAP_SELECTOR
Definition: boss_guarm.cpp:77
@ SPELL_FROTHING_RAGE
Definition: boss_guarm.cpp:75
@ SPELL_GUARDIANS_BREATH_CAST_RGB
Definition: boss_guarm.cpp:63
@ SPELL_HELYATOSIS_AURA
Definition: boss_guarm.cpp:40
@ SPELL_FLAME_LICK_SELECTOR
Definition: boss_guarm.cpp:47
@ SPELL_SALTY_SPITTLE_AURA
Definition: boss_guarm.cpp:72
@ SPELL_DARK_DISCHARGE_AURA
Definition: boss_guarm.cpp:74
@ SPELL_GUARDIANS_BREATH_SUMMON_ATS_BGR
Definition: boss_guarm.cpp:61
@ SPELL_BERSERK_CHARGE_AT
Definition: boss_guarm.cpp:53
@ SPELL_HELYATOSIS_INITIAL_ENERGIZE
Definition: boss_guarm.cpp:41
@ SPELL_VOLATILE_FOAM_SELECTOR_RED
Definition: boss_guarm.cpp:87
@ SPELL_DARK_DISCHARGE
Definition: boss_guarm.cpp:73
@ SPELL_FLASHING_FANGS
Definition: boss_guarm.cpp:44
@ SPELL_GUARDIANS_BREATH_SUMMON_ATS_GBR
Definition: boss_guarm.cpp:59
@ SPELL_BERSERK
Definition: boss_guarm.cpp:51
@ SPELL_VOLATILE_FOAM_SELECTOR_GREEN
Definition: boss_guarm.cpp:88
@ SPELL_GUARDIANS_BREATH_CAST_BGR
Definition: boss_guarm.cpp:68
@ SPELL_GUARDIANS_BREATH_SUMMON_ATS_RBG
Definition: boss_guarm.cpp:57
@ SPELL_MULTI_HEADED_DAMAGE
Definition: boss_guarm.cpp:43
@ SPELL_HEADLONG_CHARGE_PERIODIC_DAMAGE
Definition: boss_guarm.cpp:81
@ SPELL_FIERY_PHLEGM_AURA
Definition: boss_guarm.cpp:70
@ SPELL_GUARDIANS_BREATH_CAST_RBG
Definition: boss_guarm.cpp:64
GuarmSpellCategories
Definition: boss_guarm.cpp:128
@ SPELL_CATEGORY_GUARM
Definition: boss_guarm.cpp:129
JumpMovePathPair const HeadlongChargePairs[]
Definition: boss_guarm.cpp:149
GuarmEvents
Definition: boss_guarm.cpp:93
@ EVENT_ROARING_LEAP
Definition: boss_guarm.cpp:97
@ EVENT_HEADLONG_CHARGE
Definition: boss_guarm.cpp:98
@ EVENT_LICK
Definition: boss_guarm.cpp:96
@ EVENT_FLASHING_FANGS
Definition: boss_guarm.cpp:94
@ EVENT_CHECK_ENERGY
Definition: boss_guarm.cpp:95
@ EVENT_BERSERK
Definition: boss_guarm.cpp:101
@ EVENT_OFF_THE_LEASH
Definition: boss_guarm.cpp:99
@ EVENT_VOLATILE_FOAM
Definition: boss_guarm.cpp:100
void AddSC_boss_guarm()
Definition: boss_guarm.cpp:794
GuarmTalks
Definition: boss_guarm.cpp:105
@ TALK_BERSERK
Definition: boss_guarm.cpp:107
@ TALK_GUARDIANS_BREATH_ANNOUNCE
Definition: boss_guarm.cpp:106
AreaTrigger *const at
Definition: AreaTriggerAI.h:33
GuidUnorderedSet const & GetInsideUnits() const
Definition: AreaTrigger.h:135
AuraRemoveMode GetRemoveMode() const
Definition: SpellAuras.h:91
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
SpellInfo const * GetSpellInfo() const
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
AuraEffect * GetEffect(uint8 effIndex) const
Unit * GetTarget() const
HookList< AuraProcHandler > OnProc
Definition: SpellScript.h:2145
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
SummonList summons
EventMap events
void _JustDied()
static Conversation * CreateConversation(uint32 conversationEntry, Unit *creator, Position const &pos, ObjectGuid privateObjectOwner, SpellInfo const *spellInfo=nullptr, bool autoStart=true)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:299
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
void SetReactState(ReactStates st)
Definition: Creature.h:160
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:131
Creature * GetCreature(uint32 type)
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false, JumpArrivalCastArgs const *arrivalCast=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr)
void MovePath(uint32 pathId, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, bool generatePath=true)
static ObjectGuid const Empty
Definition: ObjectGuid.h:274
static Creature * ToCreature(Object *o)
Definition: Object.h:219
static Unit * ToUnit(Object *o)
Definition: Object.h:225
static Player * ToPlayer(Object *o)
Definition: Object.h:213
Unit * GetProcTarget() const
Definition: Unit.h:495
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
Definition: SpellInfo.cpp:495
float BasePoints
Definition: SpellInfo.h:221
uint32 const Id
Definition: SpellInfo.h:325
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition: SpellInfo.h:577
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Definition: SpellScript.h:173
WorldLocation * GetHitDest() const
Unit * GetCaster() const
HookList< EffectHandler > OnEffectHit
Definition: SpellScript.h:839
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
Unit * GetExplTargetUnit() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition: SpellScript.h:863
Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > GetUnsortedThreatList() const
virtual void DoAction(int32)
Definition: UnitAI.h:72
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
Definition: Unit.h:627
ThreatManager & GetThreatManager()
Definition: Unit.h:1063
void SetAuraStack(uint32 spellId, Unit *target, uint32 stack)
Definition: Unit.cpp:11665
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
UnitAI * GetAI() const
Definition: Unit.h:660
bool IsAIEnabled() const
Definition: Unit.h:658
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4560
int32 GetPower(Powers power) const
Definition: Unit.cpp:9401
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
void SetMaxPower(Powers power, int32 val)
Definition: Unit.cpp:9456
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
bool isDead() const
Definition: Unit.h:1166
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1042
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
at_guardians_breath(char const *script)
Definition: boss_guarm.cpp:518
AreaTriggerAI * GetAI(AreaTrigger *at) const override
Definition: boss_guarm.cpp:568
bool Validate(SpellInfo const *) override
Definition: boss_guarm.cpp:433
void Register() override
Definition: boss_guarm.cpp:485
void HandleHit(SpellEffIndex)
Definition: boss_guarm.cpp:476
void HandleHit(SpellEffIndex)
Definition: boss_guarm.cpp:636
void HandleHitTarget(SpellEffIndex)
Definition: boss_guarm.cpp:419
void Register() override
Definition: boss_guarm.cpp:424
bool Validate(SpellInfo const *spellInfo) override
Definition: boss_guarm.cpp:414
void FilterTargets(std::list< WorldObject * > &targets)
Definition: boss_guarm.cpp:589
bool Validate(SpellInfo const *) override
Definition: boss_guarm.cpp:580
void Register() override
Definition: boss_guarm.cpp:604
void FilterTargets(std::list< WorldObject * > &targets)
Definition: boss_guarm.cpp:393
void HandleProc(ProcEventInfo &eventInfo)
Definition: boss_guarm.cpp:379
void Register() override
Definition: boss_guarm.cpp:672
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
Definition: boss_guarm.cpp:662
bool Validate(SpellInfo const *) override
Definition: boss_guarm.cpp:657
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
Definition: boss_guarm.cpp:667
void HandleHitTarget(SpellEffIndex)
Definition: boss_guarm.cpp:618
bool Validate(SpellInfo const *) override
Definition: boss_guarm.cpp:613
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
Definition: boss_guarm.cpp:777
bool Validate(SpellInfo const *spellInfo) override
Definition: boss_guarm.cpp:768
void Register() override
Definition: boss_guarm.cpp:788
bool Validate(SpellInfo const *) override
Definition: boss_guarm.cpp:682
void HandleHit(SpellEffIndex)
Definition: boss_guarm.cpp:692
void FilterTargets(std::list< WorldObject * > &targets)
Definition: boss_guarm.cpp:714
bool Validate(SpellInfo const *spellInfo) override
Definition: boss_guarm.cpp:709
void HandleHitTarget(SpellEffIndex)
Definition: boss_guarm.cpp:729
void Register() override
Definition: boss_guarm.cpp:751
void FilterTargets(std::list< WorldObject * > &targets)
Definition: boss_guarm.cpp:746
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
constexpr void GetPosition(float &x, float &y) const
Definition: Position.h:81
bool IsHeroic() const
bool IsMythic() const
Difficulty GetDifficulty() const
uint32 GetBreathDebuffByDamageSpell(uint32 breathDamageSpell) const
Definition: boss_guarm.cpp:525
uint8 _lickCount
Definition: boss_guarm.cpp:372
uint8 _unitsHitByBreathCount
Definition: boss_guarm.cpp:373
void WaypointPathEnded(uint32, uint32 pathId) override
Definition: boss_guarm.cpp:296
boss_guarm(Creature *creature)
Definition: boss_guarm.cpp:178
void JustDied(Unit *) override
Definition: boss_guarm.cpp:186
void DoAction(int32 param) override
Definition: boss_guarm.cpp:341
void UpdateAI(uint32 diff) override
Definition: boss_guarm.cpp:230
void EnterEvadeMode(EvadeReason) override
Definition: boss_guarm.cpp:195
void MovementInform(uint32 type, uint32 pointId) override
Definition: boss_guarm.cpp:317
void JustEngagedWith(Unit *who) override
Definition: boss_guarm.cpp:204
void JustAppeared() override
Definition: boss_guarm.cpp:180
@ DATA_GUARM
#define RegisterTrialOfValorCreatureAI(ai_name)