TrinityCore
spell_shaman.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/*
19 * Scripts for spells with SPELLFAMILY_SHAMAN and SPELLFAMILY_GENERIC spells used by shaman players.
20 * Ordered alphabetically using scriptname.
21 * Scriptnames of files in this file should be prefixed with "spell_sha_".
22 */
23
24#include "ScriptMgr.h"
25#include "AreaTriggerAI.h"
26#include "CellImpl.h"
27#include "Containers.h"
28#include "CreatureAIImpl.h" // for RAND()
29#include "GridNotifiersImpl.h"
30#include "Item.h"
31#include "ObjectAccessor.h"
32#include "Player.h"
33#include "SpellAuraEffects.h"
34#include "SpellHistory.h"
35#include "SpellMgr.h"
36#include "SpellScript.h"
37#include "TemporarySummon.h"
38
40{
125
127{
129};
130
132{
135
136// 273221 - Aftershock
138{
139 bool Validate(SpellInfo const* /*spellEntry*/) override
140 {
142 }
143
144 bool CheckProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
145 {
146 if (Spell const* procSpell = eventInfo.GetProcSpell())
147 if (Optional<int32> cost = procSpell->GetPowerTypeCostAmount(POWER_MAELSTROM))
148 return cost > 0 && roll_chance_i(aurEff->GetAmount());
149
150 return false;
151 }
152
153 void HandleEffectProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
154 {
155 Spell const* procSpell = eventInfo.GetProcSpell();
156 int32 energize = *procSpell->GetPowerTypeCostAmount(POWER_MAELSTROM);
157
159 .AddSpellMod(SPELLVALUE_BASE_POINT0, energize));
160 }
161
162 void Register() override
163 {
166 }
167};
168
169// 108281 - Ancestral Guidance
171{
172 bool Validate(SpellInfo const* /*spellInfo*/) override
173 {
175 }
176
177 bool CheckProc(ProcEventInfo& eventInfo)
178 {
179 if (eventInfo.GetHealInfo() && eventInfo.GetSpellInfo() && eventInfo.GetSpellInfo()->Id == SPELL_SHAMAN_ANCESTRAL_GUIDANCE_HEAL)
180 return false;
181
182 if (!eventInfo.GetHealInfo() && !eventInfo.GetDamageInfo())
183 return false;
184
185 return true;
186 }
187
188 void HandleEffectProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
189 {
191 int32 bp0 = CalculatePct(int32(eventInfo.GetDamageInfo() ? eventInfo.GetDamageInfo()->GetDamage() : eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount());
192 if (bp0)
193 {
194 CastSpellExtraArgs args(aurEff);
196 eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHAMAN_ANCESTRAL_GUIDANCE_HEAL, args);
197 }
198 }
199
200 void Register() override
201 {
204 }
205};
206
207// 114911 - Ancestral Guidance Heal
209{
210 bool Validate(SpellInfo const* /*spellInfo*/) override
211 {
213 }
214
215 static void ResizeTargets(std::list<WorldObject*>& targets)
216 {
217 Trinity::SelectRandomInjuredTargets(targets, 3, true);
218 }
219
220 void Register() override
221 {
223 }
224};
225
226// 114052 - Ascendance (Restoration)
228{
229 bool Validate(SpellInfo const* /*spellInfo*/) override
230 {
232 }
233
234 bool CheckProc(ProcEventInfo& procInfo)
235 {
236 return procInfo.GetHealInfo() && procInfo.GetHealInfo()->GetOriginalHeal() && procInfo.GetSpellInfo()->Id != SPELL_SHAMAN_RESTORATIVE_MISTS_INITIAL;
237 }
238
239 void OnProcHeal(AuraEffect* /*aurEff*/, ProcEventInfo& procInfo)
240 {
242 }
243
245 {
247 return;
248
249 CastSpellExtraArgs args(aurEff);
253 }
254
255 void Register() override
256 {
260 }
261
262private:
264};
265
266// 188443 - Chain Lightning
268{
269 bool Validate(SpellInfo const* /*spellInfo*/) override
270 {
273 }
274
275 void HandleScript(SpellEffIndex /*effIndex*/)
276 {
277 if (AuraEffect const* energizeAmount = GetCaster()->GetAuraEffect(SPELL_SHAMAN_MAELSTROM_CONTROLLER, EFFECT_4))
279 .AddSpellMod(SPELLVALUE_BASE_POINT0, energizeAmount->GetAmount() * GetUnitTargetCountForEffect(EFFECT_0)));
280 }
281
282 void Register() override
283 {
285 }
286};
287
288// 45297 - Chain Lightning Overload
290{
291 bool Validate(SpellInfo const* /*spellInfo*/) override
292 {
295 }
296
297 void HandleScript(SpellEffIndex /*effIndex*/)
298 {
299 if (AuraEffect const* energizeAmount = GetCaster()->GetAuraEffect(SPELL_SHAMAN_MAELSTROM_CONTROLLER, EFFECT_5))
301 .AddSpellMod(SPELLVALUE_BASE_POINT0, energizeAmount->GetAmount() * GetUnitTargetCountForEffect(EFFECT_0)));
302 }
303
304 void Register() override
305 {
307 }
308};
309
310// 187874 - Crash Lightning
312{
313 bool Validate(SpellInfo const* /*spellInfo*/) override
314 {
316 }
317
318 void CountTargets(std::list<WorldObject*>& targets)
319 {
320 _targetsHit = targets.size();
321 }
322
324 {
325 if (_targetsHit >= 2)
327
328 if (AuraEffect const* gatheringStorms = GetCaster()->GetAuraEffect(SPELL_SHAMAN_GATHERING_STORMS, EFFECT_0))
329 {
331 args.AddSpellMod(SPELLVALUE_BASE_POINT0, int32(gatheringStorms->GetAmount() * _targetsHit));
333 }
334 }
335
336 void Register() override
337 {
340 }
341
342 size_t _targetsHit = 0;
343};
344
345// 378270 - Deeply Rooted Elements
347{
348 bool Validate(SpellInfo const* spellInfo) override
349 {
352 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } })
353 && spellInfo->GetEffect(EFFECT_0).IsAura();
354 }
355
356 bool Load() override
357 {
358 return GetUnitOwner()->IsPlayer();
359 }
360
361 template<uint32 requiredSpellId>
362 bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& procInfo)
363 {
364 if (!procInfo.GetSpellInfo())
365 return false;
366
367 if (procInfo.GetSpellInfo()->Id != requiredSpellId)
368 return false;
369
370 return roll_chance_i(_procAttempts++ - 2);
371 }
372
373 template<uint32 ascendanceSpellId>
374 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
375 {
376 _procAttempts = 0;
377
378 Unit* target = eventInfo.GetActor();
379
380 int32 duration = GetEffect(EFFECT_0)->GetAmount();
381 if (Aura const* ascendanceAura = target->GetAura(ascendanceSpellId))
382 duration += ascendanceAura->GetDuration();
383
384 target->CastSpell(target, ascendanceSpellId,
386 .SetTriggeringAura(aurEff)
387 .SetTriggeringSpell(eventInfo.GetProcSpell())
388 .AddSpellMod(SPELLVALUE_DURATION, duration));
389 }
390
391 void Register() override
392 {
393 if (!GetAura() || GetUnitOwner()->ToPlayer()->GetPrimarySpecialization() == ChrSpecialization::ShamanElemental)
394 {
395 DoCheckEffectProc += AuraCheckEffectProcFn(spell_sha_deeply_rooted_elements::CheckProc<SPELL_SHAMAN_LAVA_BURST>, EFFECT_1, SPELL_AURA_DUMMY);
396 OnEffectProc += AuraEffectProcFn(spell_sha_deeply_rooted_elements::HandleProc<SPELL_SHAMAN_ASCENDANCE_ELEMENTAL>, EFFECT_1, SPELL_AURA_DUMMY);
397 }
398
399 if (!GetAura() || GetUnitOwner()->ToPlayer()->GetPrimarySpecialization() == ChrSpecialization::ShamanEnhancement)
400 {
401 DoCheckEffectProc += AuraCheckEffectProcFn(spell_sha_deeply_rooted_elements::CheckProc<SPELL_SHAMAN_STORMSTRIKE>, EFFECT_2, SPELL_AURA_DUMMY);
402 OnEffectProc += AuraEffectProcFn(spell_sha_deeply_rooted_elements::HandleProc<SPELL_SHAMAN_ASCENDANCE_ENHANCEMENT>, EFFECT_2, SPELL_AURA_DUMMY);
403 }
404
405 if (!GetAura() || GetUnitOwner()->ToPlayer()->GetPrimarySpecialization() == ChrSpecialization::ShamanRestoration)
406 {
407 DoCheckEffectProc += AuraCheckEffectProcFn(spell_sha_deeply_rooted_elements::CheckProc<SPELL_SHAMAN_RIPTIDE>, EFFECT_3, SPELL_AURA_DUMMY);
408 OnEffectProc += AuraEffectProcFn(spell_sha_deeply_rooted_elements::HandleProc<SPELL_SHAMAN_ASCENDANCE_RESTORATION>, EFFECT_3, SPELL_AURA_DUMMY);
409 }
410 }
411
413};
414
415// 335902 - Doom Winds
417{
418 bool Validate(SpellInfo const* /*spellInfo*/) override
419 {
421 }
422
423 bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& procInfo)
424 {
426 return false;
427
428 SpellInfo const* spellInfo = procInfo.GetSpellInfo();
429 if (!spellInfo)
430 return false;
431
433 }
434
435 void Register() override
436 {
438 }
439};
440
441// 207778 - Downpour
443{
444 bool Validate(SpellInfo const* spellInfo) override
445 {
446 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
447 }
448
449 void FilterTargets(std::list<WorldObject*>& targets)
450 {
451 Trinity::SelectRandomInjuredTargets(targets, 6, true);
452 }
453
455 {
456 // Cooldown increased for each target effectively healed
457 if (GetHitHeal())
459 }
460
462 {
464 GetCaster()->GetSpellHistory()->StartCooldown(GetSpellInfo(), 0, GetSpell(), false, cooldown);
465 }
466
467 void Register() override
468 {
472 }
473
475};
476
477// 204288 - Earth Shield
479{
480 bool Validate(SpellInfo const* /*spellInfo*/) override
481 {
483 }
484
485 bool CheckProc(ProcEventInfo& eventInfo)
486 {
487 if (!eventInfo.GetDamageInfo() || !HasEffect(EFFECT_1) || eventInfo.GetDamageInfo()->GetDamage() < GetTarget()->CountPctFromMaxHealth(GetEffect(EFFECT_1)->GetAmount()))
488 return false;
489 return true;
490 }
491
492 void HandleProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
493 {
495
497 .SetOriginalCaster(GetCasterGUID()));
498 }
499
500 void Register() override
501 {
504 }
505};
506
507// 8042 - Earth Shock
509{
510 bool Validate(SpellInfo const* /*spellInfo*/) override
511 {
513 }
514
516 {
518 {
519 SetHitDamage(CalculatePct(GetHitDamage(), 100 + t29->GetAmount()));
520 t29->GetBase()->Remove();
521 }
522 }
523
524 void Register() override
525 {
527 }
528};
529
530// 170374 - Earthen Rage (Passive)
532{
533 bool Validate(SpellInfo const* /*spellInfo*/) override
534 {
536 }
537
538 bool CheckProc(ProcEventInfo& procInfo)
539 {
540 return procInfo.GetSpellInfo() && procInfo.GetSpellInfo()->Id != SPELL_SHAMAN_EARTHEN_RAGE_DAMAGE;
541 }
542
543 void HandleEffectProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
544 {
546 _procTargetGuid = eventInfo.GetProcTarget()->GetGUID();
547 eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHAMAN_EARTHEN_RAGE_PERIODIC, true);
548 }
549
550 void Register() override
551 {
554 }
555
557
558public:
560 {
561 return _procTargetGuid;
562 }
563};
564
565// 170377 - Earthen Rage (Proc Aura)
567{
568 bool Validate(SpellInfo const* /*spellInfo*/) override
569 {
571 }
572
573 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
574 {
577 if (spell_sha_earthen_rage_passive* script = aura->GetScript<spell_sha_earthen_rage_passive>())
578 if (Unit* procTarget = ObjectAccessor::GetUnit(*GetCaster(), script->GetProcTargetGuid()))
580 }
581
582 void Register() override
583 {
585 }
586};
587
588// 61882 - Earthquake
589// 8382 - AreaTriggerId
591{
593
594 void OnCreate(Spell const* creatingSpell) override
595 {
596 if (Unit* caster = at->GetCaster())
597 if (AuraEffect const* earthquake = caster->GetAuraEffect(SPELL_SHAMAN_EARTHQUAKE, EFFECT_1))
598 _period = Milliseconds(earthquake->GetPeriod());
599
600 if (creatingSpell)
601 if (float const* damageMultiplier = std::any_cast<float>(&creatingSpell->m_customArg))
602 _damageMultiplier = *damageMultiplier;
603 }
604
605 void OnUpdate(uint32 diff) override
606 {
608 while (_refreshTimer <= 0s)
609 {
610 if (Unit* caster = at->GetCaster())
612 .SetOriginalCaster(at->GetGUID())
613 .AddSpellMod(SPELLVALUE_BASE_POINT0, caster->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_NATURE) * 0.213f * _damageMultiplier));
614
616 }
617 }
618
619 // Each target can only be stunned once by each earthquake - keep track of who we already stunned
620 bool AddStunnedTarget(ObjectGuid const& guid)
621 {
622 return _stunnedUnits.insert(guid).second;
623 }
624
625private:
630};
631
632// 61882 - Earthquake
634{
635 static constexpr std::array<std::pair<uint32, SpellEffIndex>, 3> DamageBuffs =
636 { {
640 } };
641
642 bool Validate(SpellInfo const* /*spellInfo*/) override
643 {
645 }
646
648 {
649 float damageMultiplier = 1.0f;
650 for (auto const& [spellId, effect] : DamageBuffs)
651 {
652 if (AuraEffect* buff = GetCaster()->GetAuraEffect(spellId, effect))
653 {
654 AddPct(damageMultiplier, buff->GetAmount());
655 buff->GetBase()->Remove();
656 }
657 }
658
659 if (damageMultiplier != 1.0f)
660 GetSpell()->m_customArg = damageMultiplier;
661 }
662
663 void Register() override
664 {
666 }
667};
668
669// 77478 - Earthquake tick
671{
672 bool Validate(SpellInfo const* spellInfo) override
673 {
675 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
676 }
677
679 {
680 if (Unit* target = GetHitUnit())
681 {
682 if (roll_chance_i(GetEffectInfo(EFFECT_1).CalcValue()))
683 {
684 std::vector<AreaTrigger*> areaTriggers = GetCaster()->GetAreaTriggers(SPELL_SHAMAN_EARTHQUAKE);
685 auto itr = std::find_if(areaTriggers.begin(), areaTriggers.end(), [&](AreaTrigger const* at)
686 {
687 return at->GetGUID() == GetSpell()->GetOriginalCasterGUID();
688 });
689 if (itr != areaTriggers.end())
691 if (eq->AddStunnedTarget(target->GetGUID()))
693 }
694 }
695 }
696
697 void Register() override
698 {
700 }
701};
702
703// 117014 - Elemental Blast
704// 120588 - Elemental Blast Overload
706{
708
709 bool Validate(SpellInfo const* /*spellInfo*/) override
710 {
711 return ValidateSpellInfo(
712 {
718 }) && ValidateSpellEffect({
721 });
722 }
723
724 void HandleEnergize(SpellEffIndex /*effIndex*/)
725 {
728 .AddSpellMod(SPELLVALUE_BASE_POINT0, energizeAmount->GetAmount()));
729 }
730
732 {
733 Unit* caster = GetCaster();
735 {
736 return !caster->HasAura(buffSpellId) ? 1.0 : 0.0;
737 });
738
740 }
741
743 {
745 {
746 SetHitDamage(CalculatePct(GetHitDamage(), 100 + t29->GetAmount()));
747 t29->GetBase()->Remove();
748 }
749 }
750
751 void Register() override
752 {
756 }
757};
758
759// 318038 - Flametongue Weapon
761{
762 bool Validate(SpellInfo const* /*spellInfo*/) override
763 {
765 }
766
767 bool Load() override
768 {
769 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
770 }
771
773 {
774 Player* player = GetCaster()->ToPlayer();
778
779 Item* targetItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot);
780 if (!targetItem || !targetItem->GetTemplate()->IsWeapon())
781 return;
782
783 player->CastSpell(targetItem, SPELL_SHAMAN_FLAMETONGUE_WEAPON_ENCHANT, true);
784 }
785
786 void Register() override
787 {
789 }
790};
791
792// 319778 - Flametongue - SPELL_SHAMAN_FLAMETONGUE_WEAPON_AURA
794{
795 bool Validate(SpellInfo const* /*spellInfo*/) override
796 {
798 }
799
800 void HandleEffectProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
801 {
803
804 Unit* attacker = eventInfo.GetActor();
805 CastSpellExtraArgs args(aurEff);
806 args.AddSpellMod(SPELLVALUE_BASE_POINT0, std::max(1, int32(attacker->GetTotalAttackPowerValue(BASE_ATTACK) * 0.0264f)));
807 attacker->CastSpell(eventInfo.GetActionTarget(), SPELL_SHAMAN_FLAMETONGUE_ATTACK, args);
808 }
809
810 void Register() override
811 {
813 }
814};
815
816// 73920 - Healing Rain (Aura)
818{
819public:
821 {
822 _visualDummy = summon->GetGUID();
823 _dest = summon->GetPosition();
824 }
825
826private:
828 {
830 }
831
832 void HandleEffecRemoved(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
833 {
835 summon->DespawnOrUnsummon();
836 }
837
838 void Register() override
839 {
842 }
843
846};
847
848// 73920 - Healing Rain
850{
852 {
853 if (Aura* aura = GetHitAura())
854 {
855 if (WorldLocation const* dest = GetExplTargetDest())
856 {
857 Milliseconds duration = Milliseconds(GetSpellInfo()->CalcDuration(GetOriginalCaster()));
859 if (!summon)
860 return;
861
862 summon->CastSpell(summon, SPELL_SHAMAN_HEALING_RAIN_VISUAL, true);
863
864 if (spell_sha_healing_rain_aura* script = aura->GetScript<spell_sha_healing_rain_aura>())
865 script->SetVisualDummy(summon);
866 }
867 }
868 }
869
870 void Register() override
871 {
873 }
874};
875
876// 73921 - Healing Rain
878{
879 void SelectTargets(std::list<WorldObject*>& targets)
880 {
881 Trinity::SelectRandomInjuredTargets(targets, 6, true);
882 }
883
884 void Register() override
885 {
887 }
888};
889
890// 52042 - Healing Stream Totem
892{
893 void SelectTargets(std::list<WorldObject*>& targets)
894 {
895 Trinity::SelectRandomInjuredTargets(targets, 1, true);
896 }
897
898 void Register() override
899 {
901 }
902};
903
904// 210714 - Icefury
906{
907 bool Validate(SpellInfo const* /*spellInfo*/) override
908 {
910 }
911
912 void HandleEffectProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
913 {
914 if (Unit* caster = GetCaster())
916 }
917
918 void Register() override
919 {
921 }
922};
923
924// 23551 - Lightning Shield T2 Bonus
926{
927 bool Validate(SpellInfo const* /*spellInfo*/) override
928 {
930 }
931
932 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
933 {
936 }
937
938 void Register() override
939 {
941 }
942};
943
944// 23552 - Lightning Shield T2 Bonus
946{
947 bool Validate(SpellInfo const* /*spellInfo*/) override
948 {
950 }
951
952 void HandleProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
953 {
956 }
957
958 void Register() override
959 {
961 }
962};
963
964// 23572 - Mana Surge
966{
967 bool Validate(SpellInfo const* /*spellInfo*/) override
968 {
970 }
971
972 bool CheckProc(ProcEventInfo& eventInfo)
973 {
974 return eventInfo.GetProcSpell() != nullptr;
975 }
976
977 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
978 {
980
981 std::vector<SpellPowerCost> const& costs = eventInfo.GetProcSpell()->GetPowerCost();
982 auto m = std::find_if(costs.begin(), costs.end(), [](SpellPowerCost const& cost) { return cost.Power == POWER_MANA; });
983 if (m != costs.end())
984 {
985 int32 mana = CalculatePct(m->Amount, 35);
986 if (mana > 0)
987 {
988 CastSpellExtraArgs args(aurEff);
991 }
992 }
993 }
994
995 void Register() override
996 {
999 }
1000};
1001
1002// 40463 - Shaman Tier 6 Trinket
1004{
1005 bool Validate(SpellInfo const* /*spellInfo*/) override
1006 {
1007 return ValidateSpellInfo(
1008 {
1011 });
1012 }
1013
1014 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
1015 {
1017 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
1018 if (!spellInfo)
1019 return;
1020
1021 uint32 spellId;
1022 int32 chance;
1023
1024 // Lesser Healing Wave
1025 if (spellInfo->SpellFamilyFlags[0] & 0x00000080)
1026 {
1027 spellId = SPELL_SHAMAN_ENERGY_SURGE;
1028 chance = 10;
1029 }
1030 // Lightning Bolt
1031 else if (spellInfo->SpellFamilyFlags[0] & 0x00000001)
1032 {
1033 spellId = SPELL_SHAMAN_ENERGY_SURGE;
1034 chance = 15;
1035 }
1036 // Stormstrike
1037 else if (spellInfo->SpellFamilyFlags[1] & 0x00000010)
1038 {
1039 spellId = SPELL_SHAMAN_POWER_SURGE;
1040 chance = 50;
1041 }
1042 else
1043 return;
1044
1045 if (roll_chance_i(chance))
1046 eventInfo.GetActor()->CastSpell(nullptr, spellId, true);
1047 }
1048
1049 void Register() override
1050 {
1052 }
1053};
1054
1055// 70811 - Item - Shaman T10 Elemental 2P Bonus
1057{
1058 bool Validate(SpellInfo const* /*spellInfo*/) override
1059 {
1061 }
1062
1063 void HandleEffectProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
1064 {
1066 if (Player* target = GetTarget()->ToPlayer())
1067 target->GetSpellHistory()->ModifyCooldown(SPELL_SHAMAN_ELEMENTAL_MASTERY, Milliseconds(-aurEff->GetAmount()));
1068 }
1069
1070 void Register() override
1071 {
1073 }
1074};
1075
1076// 189063 - Lightning Vortex (proc 185881 Item - Shaman T18 Elemental 4P Bonus)
1078{
1079 void DiminishHaste(AuraEffect const* aurEff)
1080 {
1082 if (AuraEffect* hasteBuff = GetEffect(EFFECT_0))
1083 hasteBuff->ChangeAmount(hasteBuff->GetAmount() - aurEff->GetAmount());
1084 }
1085
1086 void Register() override
1087 {
1089 }
1090};
1091
1092// 51505 - Lava burst
1094{
1095 bool Validate(SpellInfo const* /*spellInfo*/) override
1096 {
1098 }
1099
1100 void HandleScript(SpellEffIndex /*effIndex*/)
1101 {
1102 if (Unit* caster = GetCaster())
1103 if (caster->HasAura(SPELL_SHAMAN_PATH_OF_FLAMES_TALENT))
1105 }
1106
1108 {
1109 Unit* caster = GetCaster();
1110
1111 if (Aura* lavaSurge = caster->GetAura(SPELL_SHAMAN_LAVA_SURGE))
1112 {
1113 if (!GetSpell()->m_appliedMods.count(lavaSurge))
1114 {
1115 uint32 chargeCategoryId = GetSpellInfo()->ChargeCategoryId;
1116
1117 // Ensure we have at least 1 usable charge after cast to allow next cast immediately
1118 if (!caster->GetSpellHistory()->HasCharge(chargeCategoryId))
1119 caster->GetSpellHistory()->RestoreCharge(chargeCategoryId);
1120 }
1121 }
1122 }
1123
1124 void Register() override
1125 {
1128 }
1129};
1130
1131// 285452 - Lava Burst damage
1132// 285466 - Lava Burst Overload damage
1134{
1135 bool Validate(SpellInfo const* /*spellInfo*/) override
1136 {
1138 }
1139
1140 void CalcCritChance(Unit const* victim, float& chance)
1141 {
1142 Unit* caster = GetCaster();
1143
1144 if (!caster || !victim)
1145 return;
1146
1147 if (victim->HasAura(SPELL_SHAMAN_FLAME_SHOCK, caster->GetGUID()))
1149 chance = 100.f;
1150 }
1151
1152 void Register() override
1153 {
1155 }
1156};
1157
1158// 77756 - Lava Surge
1160{
1161 bool Validate(SpellInfo const* /*spellInfo*/) override
1162 {
1164 }
1165
1166 bool CheckProcChance(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
1167 {
1168 int32 procChance = aurEff->GetAmount();
1169 if (AuraEffect const* igneousPotential = GetTarget()->GetAuraEffect(SPELL_SHAMAN_IGNEOUS_POTENTIAL, EFFECT_0))
1170 procChance += igneousPotential->GetAmount();
1171
1172 return roll_chance_i(procChance);
1173 }
1174
1175 void HandleEffectProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
1176 {
1179 }
1180
1181 void Register() override
1182 {
1185 }
1186};
1187
1188// 77762 - Lava Surge
1190{
1191 bool Validate(SpellInfo const* /*spellInfo*/) override
1192 {
1194 }
1195
1196 bool Load() override
1197 {
1198 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1199 }
1200
1202 {
1203 GetCaster()->GetSpellHistory()->RestoreCharge(sSpellMgr->AssertSpellInfo(SPELL_SHAMAN_LAVA_BURST, GetCastDifficulty())->ChargeCategoryId);
1204 }
1205
1206 void Register() override
1207 {
1209 }
1210};
1211
1212// 188196 - Lightning Bolt
1214{
1215 bool Validate(SpellInfo const* /*spellInfo*/) override
1216 {
1219 }
1220
1221 void HandleScript(SpellEffIndex /*effIndex*/)
1222 {
1223 if (AuraEffect const* energizeAmount = GetCaster()->GetAuraEffect(SPELL_SHAMAN_MAELSTROM_CONTROLLER, EFFECT_0))
1225 .AddSpellMod(SPELLVALUE_BASE_POINT0, energizeAmount->GetAmount()));
1226 }
1227
1228 void Register() override
1229 {
1231 }
1232};
1233
1234// 45284 - Lightning Bolt Overload
1236{
1237 bool Validate(SpellInfo const* /*spellInfo*/) override
1238 {
1241 }
1242
1243 void HandleScript(SpellEffIndex /*effIndex*/)
1244 {
1245 if (AuraEffect const* energizeAmount = GetCaster()->GetAuraEffect(SPELL_SHAMAN_MAELSTROM_CONTROLLER, EFFECT_1))
1247 .AddSpellMod(SPELLVALUE_BASE_POINT0, energizeAmount->GetAmount()));
1248 }
1249
1250 void Register() override
1251 {
1253 }
1254};
1255
1256// 192223 - Liquid Magma Totem (erupting hit spell)
1258{
1259 bool Validate(SpellInfo const* /*spellInfo*/) override
1260 {
1262 }
1263
1265 {
1266 if (Unit* hitUnit = GetHitUnit())
1268 }
1269
1270 void HandleTargetSelect(std::list<WorldObject*>& targets)
1271 {
1272 // choose one random target from targets
1273 if (targets.size() > 1)
1274 {
1276 targets.clear();
1277 targets.push_back(selected);
1278 }
1279 }
1280
1281 void Register() override
1282 {
1285 }
1286};
1287
1288// 168534 - Mastery: Elemental Overload (passive)
1290{
1291 bool Validate(SpellInfo const* /*spellInfo*/) override
1292 {
1293 return ValidateSpellInfo
1294 ({
1308 });
1309 }
1310
1311 bool CheckProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1312 {
1313 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
1314 if (!spellInfo || !eventInfo.GetProcSpell())
1315 return false;
1316
1317 if (!GetTriggeredSpellId(spellInfo->Id))
1318 return false;
1319
1320 float chance = aurEff->GetAmount(); // Mastery % amount
1321
1322 if (spellInfo->Id == SPELL_SHAMAN_CHAIN_LIGHTNING)
1323 chance /= 3.0f;
1324
1325 if (Aura* stormkeeper = eventInfo.GetActor()->GetAura(SPELL_SHAMAN_STORMKEEPER))
1326 if (eventInfo.GetProcSpell()->m_appliedMods.find(stormkeeper) != eventInfo.GetProcSpell()->m_appliedMods.end())
1327 chance = 100.0f;
1328
1329 return roll_chance_f(chance);
1330 }
1331
1332 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& procInfo)
1333 {
1335
1336 Unit* caster = procInfo.GetActor();
1337
1338 caster->m_Events.AddEventAtOffset([caster,
1339 targets = CastSpellTargetArg(procInfo.GetProcTarget()),
1340 overloadSpellId = GetTriggeredSpellId(procInfo.GetSpellInfo()->Id),
1341 originalCastId = procInfo.GetProcSpell()->m_castId]() mutable
1342 {
1343 if (!targets.Targets)
1344 return;
1345
1346 targets.Targets->Update(caster);
1347
1348 CastSpellExtraArgs args;
1349 args.OriginalCastId = originalCastId;
1350 caster->CastSpell(targets, overloadSpellId, args);
1351 }, 400ms);
1352 }
1353
1354 void Register() override
1355 {
1358 }
1359
1361 {
1362 switch (triggeringSpellId)
1363 {
1370 default:
1371 break;
1372 }
1373 return 0;
1374 }
1375};
1376
1377// 45284 - Lightning Bolt Overload
1378// 45297 - Chain Lightning Overload
1379// 114738 - Lava Beam Overload
1380// 120588 - Elemental Blast Overload
1381// 219271 - Icefury Overload
1382// 285466 - Lava Burst Overload
1384{
1385 bool Validate(SpellInfo const* /*spellInfo*/) override
1386 {
1388 }
1389
1391 {
1392 if (AuraEffect const* elementalOverload = GetCaster()->GetAuraEffect(SPELL_SHAMAN_MASTERY_ELEMENTAL_OVERLOAD, EFFECT_1))
1393 SetHitDamage(CalculatePct(GetHitDamage(), elementalOverload->GetAmount()));
1394 }
1395
1396 void Register() override
1397 {
1399 }
1400};
1401
1402// 30884 - Nature's Guardian
1404{
1405 bool CheckProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1406 {
1407 return eventInfo.GetActionTarget()->HealthBelowPct(aurEff->GetAmount());
1408 }
1409
1410 void Register() override
1411 {
1413 }
1414};
1415
1416// 210621 - Path of Flames Spread
1418{
1419 bool Validate(SpellInfo const* /*spellInfo*/) override
1420 {
1422 }
1423
1424 void FilterTargets(std::list<WorldObject*>& targets)
1425 {
1426 targets.remove(GetExplTargetUnit());
1427 Trinity::Containers::RandomResize(targets, [this](WorldObject* target)
1428 {
1429 return target->GetTypeId() == TYPEID_UNIT && !target->ToUnit()->HasAura(SPELL_SHAMAN_FLAME_SHOCK, GetCaster()->GetGUID());
1430 }, 1);
1431 }
1432
1433 void HandleScript(SpellEffIndex /*effIndex*/)
1434 {
1435 if (Unit* mainTarget = GetExplTargetUnit())
1436 {
1437 if (Aura* flameShock = mainTarget->GetAura(SPELL_SHAMAN_FLAME_SHOCK, GetCaster()->GetGUID()))
1438 {
1439 if (Aura* newAura = GetCaster()->AddAura(SPELL_SHAMAN_FLAME_SHOCK, GetHitUnit()))
1440 {
1441 newAura->SetDuration(flameShock->GetDuration());
1442 newAura->SetMaxDuration(flameShock->GetDuration());
1443 }
1444 }
1445 }
1446 }
1447
1448 void Register() override
1449 {
1452 }
1453};
1454
1455// 114083 - Restorative Mists
1456// 294020 - Restorative Mists
1458{
1459 void FilterTargets(std::list<WorldObject*>& targets)
1460 {
1461 _targetCount = uint32(targets.size());
1462 }
1463
1464 void HandleHeal(SpellEffIndex /*effIndex*/)
1465 {
1466 if (_targetCount)
1468 }
1469
1470 void Register() override
1471 {
1474 }
1475
1476private:
1478};
1479
1480// 2645 - Ghost Wolf
1481// 260878 - Spirit Wolf
1483{
1484 bool Validate(SpellInfo const* /*spellInfo*/) override
1485 {
1487 }
1488
1489 void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
1490 {
1491 Unit* target = GetTarget();
1493 target->CastSpell(target, SPELL_SHAMAN_SPIRIT_WOLF_PERIODIC, aurEff);
1494 }
1495
1496 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1497 {
1500 }
1501
1502 void Register() override
1503 {
1506 }
1507};
1508
1509// 51564 - Tidal Waves
1511{
1512 bool Validate(SpellInfo const* /*spellInfo*/) override
1513 {
1515 }
1516
1517 void HandleEffectProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
1518 {
1520 CastSpellExtraArgs args(aurEff);
1523
1525 }
1526
1527 void Register() override
1528 {
1530 }
1531};
1532
1533// 28823 - Totemic Power
1535{
1536 bool Validate(SpellInfo const* /*spellInfo*/) override
1537 {
1538 return ValidateSpellInfo(
1539 {
1544 });
1545 }
1546
1547 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1548 {
1550
1551 uint32 spellId;
1552 Unit* caster = eventInfo.GetActor();
1553 Unit* target = eventInfo.GetProcTarget();
1554
1555 switch (target->GetClass())
1556 {
1557 case CLASS_PALADIN:
1558 case CLASS_PRIEST:
1559 case CLASS_SHAMAN:
1560 case CLASS_DRUID:
1562 break;
1563 case CLASS_MAGE:
1564 case CLASS_WARLOCK:
1566 break;
1567 case CLASS_HUNTER:
1568 case CLASS_ROGUE:
1570 break;
1571 case CLASS_WARRIOR:
1573 break;
1574 default:
1575 return;
1576 }
1577
1578 caster->CastSpell(target, spellId, aurEff);
1579 }
1580
1581 void Register() override
1582 {
1584 }
1585};
1586
1587// 28820 - Lightning Shield
1589{
1590 void PeriodicTick(AuraEffect const* /*aurEff*/)
1591 {
1593
1594 // Need remove self if Lightning Shield not active
1595 if (!GetTarget()->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_SHAMAN, flag128(0x400), GetCaster()->GetGUID()))
1596 Remove();
1597 }
1598
1599 void Register() override
1600 {
1602 }
1603};
1604
1605// 64928 - Item - Shaman T8 Elemental 4P Bonus
1607{
1608 bool Validate(SpellInfo const* /*spellInfo*/) override
1609 {
1611 }
1612
1613 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1614 {
1616
1617 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1618 if (!damageInfo || !damageInfo->GetDamage())
1619 return;
1620
1621 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_SHAMAN_ELECTRIFIED, GetCastDifficulty());
1622 int32 amount = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), aurEff->GetAmount());
1623
1624 ASSERT(spellInfo->GetMaxTicks() > 0);
1625 amount /= spellInfo->GetMaxTicks();
1626
1627 Unit* caster = eventInfo.GetActor();
1628 Unit* target = eventInfo.GetProcTarget();
1629
1630 CastSpellExtraArgs args(aurEff);
1631 args.AddSpellBP0(amount);
1632 caster->CastSpell(target, SPELL_SHAMAN_ELECTRIFIED, args);
1633 }
1634
1635 void Register() override
1636 {
1638 }
1639};
1640
1641// 67228 - Item - Shaman T9 Elemental 4P Bonus (Lava Burst)
1643{
1644 bool Validate(SpellInfo const* /*spellInfo*/) override
1645 {
1647 }
1648
1649 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1650 {
1652
1653 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1654 if (!damageInfo || !damageInfo->GetDamage())
1655 return;
1656
1657 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_SHAMAN_LAVA_BURST_BONUS_DAMAGE, GetCastDifficulty());
1658 int32 amount = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), aurEff->GetAmount());
1659
1660 ASSERT(spellInfo->GetMaxTicks() > 0);
1661 amount /= spellInfo->GetMaxTicks();
1662
1663 Unit* caster = eventInfo.GetActor();
1664 Unit* target = eventInfo.GetProcTarget();
1665
1666 CastSpellExtraArgs args(aurEff);
1667 args.AddSpellBP0(amount);
1668 caster->CastSpell(target, SPELL_SHAMAN_LAVA_BURST_BONUS_DAMAGE, args);
1669 }
1670
1671 void Register() override
1672 {
1674 }
1675};
1676
1677// 70817 - Item - Shaman T10 Elemental 4P Bonus
1679{
1680 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1681 {
1683
1684 Unit* caster = eventInfo.GetActor();
1685 Unit* target = eventInfo.GetProcTarget();
1686
1687 // try to find spell Flame Shock on the target
1688 AuraEffect* flameShock = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, flag128(0x10000000), caster->GetGUID());
1689 if (!flameShock)
1690 return;
1691
1692 Aura* flameShockAura = flameShock->GetBase();
1693
1694 int32 maxDuration = flameShockAura->GetMaxDuration();
1695 int32 newDuration = flameShockAura->GetDuration() + aurEff->GetAmount() * IN_MILLISECONDS;
1696
1697 flameShockAura->SetDuration(newDuration);
1698 // is it blizzlike to change max duration for FS?
1699 if (newDuration > maxDuration)
1700 flameShockAura->SetMaxDuration(newDuration);
1701 }
1702
1703 void Register() override
1704 {
1706 }
1707};
1708
1709// 70808 - Item - Shaman T10 Restoration 4P Bonus
1711{
1712 bool Validate(SpellInfo const* /*spellInfo*/) override
1713 {
1715 }
1716
1717 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1718 {
1720
1721 HealInfo* healInfo = eventInfo.GetHealInfo();
1722 if (!healInfo || !healInfo->GetHeal())
1723 return;
1724
1725 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_SHAMAN_CHAINED_HEAL, GetCastDifficulty());
1726 int32 amount = CalculatePct(static_cast<int32>(healInfo->GetHeal()), aurEff->GetAmount());
1727
1728 ASSERT(spellInfo->GetMaxTicks() > 0);
1729 amount /= spellInfo->GetMaxTicks();
1730
1731 Unit* caster = eventInfo.GetActor();
1732 Unit* target = eventInfo.GetProcTarget();
1733
1734 CastSpellExtraArgs args(aurEff);
1735 args.AddSpellBP0(amount);
1736 caster->CastSpell(target, SPELL_SHAMAN_CHAINED_HEAL, args);
1737 }
1738
1739 void Register() override
1740 {
1742 }
1743};
1744
1745// 260895 - Unlimited Power
1747{
1748 bool Validate(SpellInfo const* /*spellInfo*/) override
1749 {
1751 }
1752
1753 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& procInfo)
1754 {
1755 Unit* caster = procInfo.GetActor();
1756 if (Aura* aura = caster->GetAura(SPELL_SHAMAN_UNLIMITED_POWER_BUFF))
1757 aura->SetStackAmount(aura->GetStackAmount() + 1);
1758 else
1759 caster->CastSpell(caster, SPELL_SHAMAN_UNLIMITED_POWER_BUFF, procInfo.GetProcSpell());
1760 }
1761
1762 void Register() override
1763 {
1765 }
1766};
1767
1768// 200071 - Undulation
1770{
1771 bool Validate(SpellInfo const* /*spellInfo*/) override
1772 {
1774 }
1775
1776 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
1777 {
1778 if (++_castCounter == 3)
1779 {
1781 _castCounter = 0;
1782 }
1783 }
1784
1785 void Register() override
1786 {
1788 }
1789
1790 uint8 _castCounter = 1; // first proc happens after two casts, then one every 3 casts
1791};
1792
1793// 33757 - Windfury Weapon
1795{
1796 bool Validate(SpellInfo const* /*spellInfo*/) override
1797 {
1799 }
1800
1801 bool Load() override
1802 {
1803 return GetCaster()->IsPlayer();
1804 }
1805
1807 {
1808 PreventHitDefaultEffect(effIndex);
1809
1810 if (Item* mainHand = GetCaster()->ToPlayer()->GetWeaponForAttack(BASE_ATTACK, false))
1812 }
1813
1814 void Register() override
1815 {
1817 }
1818};
1819
1820// 319773 - Windfury Weapon (proc)
1822{
1823 bool Validate(SpellInfo const* /*spellInfo*/) override
1824 {
1826 }
1827
1829 {
1831
1832 for (uint32 i = 0; i < 2; ++i)
1833 eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_SHAMAN_WINDFURY_ATTACK, aurEff);
1834 }
1835
1836 void Register() override
1837 {
1839 }
1840};
1841
1842// 378269 - Windspeaker's Lava Resurgence
1844{
1845 bool Validate(SpellInfo const* /*spellInfo*/) override
1846 {
1848 }
1849
1851 {
1853 PreventHitDefaultEffect(effIndex);
1854 }
1855
1857 {
1859 PreventHitDefaultEffect(effIndex);
1860 }
1861
1862 void Register() override
1863 {
1866 }
1867};
1868
1869// 192078 - Wind Rush Totem (Spell)
1870// 12676 - AreaTriggerId
1872{
1873 static constexpr uint32 REFRESH_TIME = 4500;
1874
1876
1877 void OnUpdate(uint32 diff) override
1878 {
1879 _refreshTimer -= diff;
1880 if (_refreshTimer <= 0)
1881 {
1882 if (Unit* caster = at->GetCaster())
1883 {
1884 for (ObjectGuid const& guid : at->GetInsideUnits())
1885 {
1886 if (Unit* unit = ObjectAccessor::GetUnit(*caster, guid))
1887 {
1888 if (!caster->IsFriendlyTo(unit))
1889 continue;
1890
1891 caster->CastSpell(unit, SPELL_SHAMAN_WIND_RUSH, true);
1892 }
1893 }
1894 }
1896 }
1897 }
1898
1899 void OnUnitEnter(Unit* unit) override
1900 {
1901 if (Unit* caster = at->GetCaster())
1902 {
1903 if (!caster->IsFriendlyTo(unit))
1904 return;
1905
1906 caster->CastSpell(unit, SPELL_SHAMAN_WIND_RUSH, true);
1907 }
1908 }
1909private:
1911};
1912
1914{
1971}
@ IN_MILLISECONDS
Definition: Common.h:35
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: Duration.h:32
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition: Duration.h:29
#define ASSERT
Definition: Errors.h:68
std::unordered_set< ObjectGuid > GuidUnorderedSet
Definition: ObjectGuid.h:396
@ TYPEID_UNIT
Definition: ObjectGuid.h:40
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
@ EQUIPMENT_SLOT_MAINHAND
Definition: Player.h:646
@ EQUIPMENT_SLOT_OFFHAND
Definition: Player.h:647
#define INVENTORY_SLOT_BAG_0
Definition: Player.h:625
bool roll_chance_f(float chance)
Definition: Random.h:53
bool roll_chance_i(int chance)
Definition: Random.h:59
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition: ScriptMgr.h:1371
#define RegisterAreaTriggerAI(ai_name)
Definition: ScriptMgr.h:1416
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_3
Definition: SharedDefines.h:33
@ EFFECT_9
Definition: SharedDefines.h:39
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_5
Definition: SharedDefines.h:35
@ EFFECT_0
Definition: SharedDefines.h:30
@ EFFECT_4
Definition: SharedDefines.h:34
@ EFFECT_10
Definition: SharedDefines.h:40
@ EFFECT_2
Definition: SharedDefines.h:32
@ CLASS_HUNTER
@ CLASS_DRUID
@ CLASS_SHAMAN
@ CLASS_PRIEST
@ CLASS_WARRIOR
@ CLASS_WARLOCK
@ CLASS_MAGE
@ CLASS_PALADIN
@ CLASS_ROGUE
@ TARGET_UNIT_DEST_AREA_ALLY
@ TARGET_UNIT_DEST_AREA_ENEMY
@ TARGET_UNIT_SRC_AREA_ALLY
@ TARGET_UNIT_CONE_CASTER_TO_DEST_ENEMY
@ SPELL_SCHOOL_MASK_NATURE
@ SPELL_EFFECT_CREATE_AREATRIGGER
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_TRIGGER_MISSILE
@ SPELL_EFFECT_HEAL
@ SPELL_EFFECT_TRIGGER_SPELL
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ BASE_ATTACK
@ POWER_MAELSTROM
@ SPELLFAMILY_SHAMAN
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_ADD_PCT_MODIFIER
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE
@ SPELL_AURA_DUMMY
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
Definition: SpellDefines.h:266
@ TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD
Will ignore Spell and Category cooldowns.
Definition: SpellDefines.h:248
@ TRIGGERED_IGNORE_CAST_IN_PROGRESS
Will not check if a current cast is in progress.
Definition: SpellDefines.h:252
@ TRIGGERED_IGNORE_GCD
Will ignore GCD.
Definition: SpellDefines.h:247
@ SPELLVALUE_BASE_POINT1
Definition: SpellDefines.h:197
@ SPELLVALUE_BASE_POINT0
Definition: SpellDefines.h:196
@ SPELLVALUE_DURATION
Definition: SpellDefines.h:234
#define sSpellMgr
Definition: SpellMgr.h:849
#define SpellOnCalcCritChanceFn(F)
Definition: SpellScript.h:859
#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
#define AuraCheckEffectProcFn(F, I, N)
Definition: SpellScript.h:2136
#define SpellCastFn(F)
Definition: SpellScript.h:825
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
#define AuraCheckProcFn(F)
Definition: SpellScript.h:2130
#define SpellHitFn(F)
Definition: SpellScript.h:854
#define SPELL_AURA_ANY
Definition: SpellScript.h:59
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:2040
#define CAST_AI(a, b)
Definition: UnitAI.h:28
T AddPct(T &base, U pct)
Definition: Util.h:85
T CalculatePct(T base, U pct)
Definition: Util.h:72
AreaTrigger *const at
Definition: AreaTriggerAI.h:33
GuidUnorderedSet const & GetInsideUnits() const
Definition: AreaTrigger.h:135
Unit * GetCaster() const
Aura * GetBase() const
int32 GetAmount() const
void PreventDefaultAction()
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
HookList< CheckEffectProcHandler > DoCheckEffectProc
Definition: SpellScript.h:2135
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
Unit * GetCaster() const
AuraEffect * GetEffect(uint8 effIndex) const
Aura * GetAura() const
Unit * GetTarget() const
ObjectGuid GetCasterGUID() const
Difficulty GetCastDifficulty() const
HookList< CheckProcHandler > DoCheckProc
Definition: SpellScript.h:2129
HookList< EffectApplyHandler > OnEffectRemove
Definition: SpellScript.h:2035
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
HookList< EffectProcHandler > OnEffectProc
Definition: SpellScript.h:2155
Unit * GetUnitOwner() const
bool HasEffect(uint8 effIndex) const
int32 GetMaxDuration() const
Definition: SpellAuras.h:168
int32 GetDuration() const
Definition: SpellAuras.h:173
void SetDuration(int32 duration, bool withMods=false)
Definition: SpellAuras.cpp:892
void SetMaxDuration(int32 duration)
Definition: SpellAuras.h:169
uint32 GetDamage() const
Definition: Unit.h:446
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
Definition: Unit.h:456
uint32 GetOriginalHeal() const
Definition: Unit.h:477
uint32 GetHeal() const
Definition: Unit.h:476
Definition: Item.h:170
ItemTemplate const * GetTemplate() const
Definition: Item.cpp:1141
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, Milliseconds duration=0ms, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty, SmoothPhasingInfo const *smoothPhasingInfo=nullptr)
Definition: Object.cpp:1836
bool IsPlayer() const
Definition: Object.h:212
static Unit * ToUnit(Object *o)
Definition: Object.h:225
TypeID GetTypeId() const
Definition: Object.h:173
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
static Player * ToPlayer(Object *o)
Definition: Object.h:213
ChrSpecialization GetPrimarySpecialization() const
Definition: Player.h:1841
Item * GetItemByPos(uint16 pos) const
Definition: Player.cpp:9582
HealInfo * GetHealInfo() const
Definition: Unit.h:506
Unit * GetActionTarget() const
Definition: Unit.h:494
Spell const * GetProcSpell() const
Definition: Unit.h:508
SpellInfo const * GetSpellInfo() const
Definition: Unit.cpp:280
DamageInfo * GetDamageInfo() const
Definition: Unit.h:505
Unit * GetProcTarget() const
Definition: Unit.h:495
Unit * GetActor() const
Definition: Unit.h:493
bool IsAura() const
Definition: SpellInfo.cpp:461
void RestoreCharge(uint32 chargeCategoryId)
bool HasCharge(uint32 chargeCategoryId) const
Milliseconds Duration
Definition: SpellHistory.h:50
void StartCooldown(SpellInfo const *spellInfo, uint32 itemId, Spell *spell=nullptr, bool onHold=false, Optional< Duration > forcedCooldown={})
uint32 GetMaxTicks() const
Definition: SpellInfo.cpp:3823
uint32 const Id
Definition: SpellInfo.h:325
flag128 SpellFamilyFlags
Definition: SpellInfo.h:409
uint32 ChargeCategoryId
Definition: SpellInfo.h:414
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition: SpellInfo.h:577
bool HasLabel(uint32 labelId) const
Definition: SpellInfo.cpp:4937
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
HookList< CastHandler > AfterCast
Definition: SpellScript.h:824
int32 GetHitDamage() const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
Definition: SpellScript.h:852
HookList< HitHandler > OnHit
Definition: SpellScript.h:850
void PreventHitDefaultEffect(SpellEffIndex effIndex)
int64 GetUnitTargetCountForEffect(SpellEffIndex effect) const
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
Aura * GetHitAura(bool dynObjAura=false) const
Spell * GetSpell() const
Definition: SpellScript.h:987
Difficulty GetCastDifficulty() const
int32 GetHitHeal() const
void SetHitDamage(int32 damage)
HookList< OnCalcCritChanceHandler > OnCalcCritChance
Definition: SpellScript.h:858
WorldLocation const * GetExplTargetDest() const
HookList< EffectHandler > OnEffectLaunch
Definition: SpellScript.h:837
void SetHitHeal(int32 heal)
Unit * GetExplTargetUnit() const
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition: SpellScript.h:863
Unit * GetOriginalCaster() const
Definition: Spell.h:255
std::any m_customArg
Definition: Spell.h:605
Optional< int32 > GetPowerTypeCostAmount(Powers power) const
Definition: Spell.cpp:7958
std::vector< SpellPowerCost > const & GetPowerCost() const
Definition: Spell.h:652
UsedSpellMods m_appliedMods
Definition: Spell.h:610
ObjectGuid m_castId
Definition: Spell.h:568
Definition: Unit.h:627
uint8 GetClass() const
Definition: Unit.h:752
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition: Unit.cpp:4464
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:780
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4560
int32 GetTotalAuraModifier(AuraType auraType) const
Definition: Unit.cpp:4929
float GetTotalAttackPowerValue(WeaponAttackType attType, bool includeWeapon=true) const
Definition: Unit.cpp:9285
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
SpellHistory * GetSpellHistory()
Definition: Unit.h:1457
std::vector< AreaTrigger * > GetAreaTriggers(uint32 spellId) const
Definition: Unit.cpp:5335
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
Map * GetMap() const
Definition: Object.h:624
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
EventProcessor m_Events
Definition: Object.h:777
void Register() override
bool CheckProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void HandleEffectProc(AuraEffect *, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
static void ResizeTargets(std::list< WorldObject * > &targets)
void HandleEffectProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleEffectPeriodic(AuraEffect const *aurEff)
void OnProcHeal(AuraEffect *, ProcEventInfo &procInfo)
bool CheckProc(ProcEventInfo &procInfo)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void CountTargets(std::list< WorldObject * > &targets)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *spellInfo) override
bool CheckProc(AuraEffect const *, ProcEventInfo &procInfo)
bool Validate(SpellInfo const *) override
bool CheckProc(AuraEffect const *, ProcEventInfo &procInfo)
void Register() override
void CountEffectivelyHealedTarget()
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *spellInfo) override
void Register() override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void Register() override
bool CheckProc(ProcEventInfo &procInfo)
ObjectGuid const & GetProcTargetGuid() const
void HandleEffectProc(AuraEffect *, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleEffectPeriodic(AuraEffect const *)
bool Validate(SpellInfo const *spellInfo) override
void SnapshotDamageMultiplier(SpellEffIndex)
void Register() override
static constexpr std::array< std::pair< uint32, SpellEffIndex >, 3 > DamageBuffs
bool Validate(SpellInfo const *) override
void HandleEnergize(SpellEffIndex)
bool Validate(SpellInfo const *) override
static constexpr uint32 BuffSpells[]
void HandleEffectProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleEffectHitTarget(SpellEffIndex)
void HandleEffectPeriodic(AuraEffect const *aurEff)
void HandleEffecRemoved(AuraEffect const *, AuraEffectHandleModes)
void SetVisualDummy(TempSummon *summon)
void SelectTargets(std::list< WorldObject * > &targets)
void Register() override
void SelectTargets(std::list< WorldObject * > &targets)
void HandleEffectProc(AuraEffect *, ProcEventInfo &)
void Register() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void HandleEffectProc(AuraEffect *aurEff, ProcEventInfo &)
bool Validate(SpellInfo const *) override
void DiminishHaste(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void Register() override
void EnsureLavaSurgeCanBeImmediatelyConsumed()
bool Validate(SpellInfo const *) override
void CalcCritChance(Unit const *victim, float &chance)
bool Validate(SpellInfo const *) override
bool CheckProcChance(AuraEffect const *aurEff, ProcEventInfo &)
bool Validate(SpellInfo const *) override
void Register() override
void HandleEffectProc(AuraEffect *, ProcEventInfo &)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleEffectHitTarget(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleTargetSelect(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
bool CheckProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void HandleProc(AuraEffect *, ProcEventInfo &procInfo)
uint32 GetTriggeredSpellId(uint32 triggeringSpellId)
bool Validate(SpellInfo const *) override
bool CheckProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleHeal(SpellEffIndex)
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *aurEff, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void Register() override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void Register() override
void PeriodicTick(AuraEffect const *)
void Register() override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleEffectProc(AuraEffect *aurEff, ProcEventInfo &)
void Register() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *, ProcEventInfo &)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *, ProcEventInfo &procInfo)
void HandleEffectProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleEffect(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
void PreventLavaSurge(SpellEffIndex effIndex)
void PreventVolcanicSurge(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomWeightedContainerElement(C const &container, std::span< double > const &weights) -> decltype(std::begin(container))
Definition: Containers.h:126
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:109
void RandomResize(C &container, std::size_t requestedSize)
Definition: Containers.h:67
void SelectRandomInjuredTargets(std::list< WorldObject * > &targets, size_t maxTargets, bool prioritizePlayers, Unit const *prioritizeGroupMembersOf)
Definition: Spell.cpp:9306
ShamanSpells
Definition: pet_shaman.cpp:27
void AddSC_shaman_spell_scripts()
ShamanSpellLabels
@ SPELL_LABEL_SHAMAN_WINDFURY_TOTEM
@ SPELL_SHAMAN_FLAMETONGUE_WEAPON_AURA
@ SPELL_SHAMAN_EARTHEN_RAGE_PERIODIC
@ SPELL_SHAMAN_EARTHQUAKE
@ SPELL_SHAMAN_ELEMENTAL_BLAST_HASTE
@ SPELL_SHAMAN_ICEFURY_OVERLOAD
@ SPELL_SHAMAN_LIGHTNING_BOLT_ENERGIZE
@ SPELL_SHAMAN_ASCENDANCE_RESTORATION
@ SPELL_SHAMAN_FLAMETONGUE_ATTACK
@ SPELL_SHAMAN_CRASH_LIGHTNING_CLEAVE
@ SPELL_SHAMAN_LAVA_SURGE
@ SPELL_SHAMAN_LIQUID_MAGMA_HIT
@ SPELL_SHAMAN_UNLIMITED_POWER_BUFF
@ SPELL_SHAMAN_LAVA_BEAM
@ SPELL_SHAMAN_SPIRIT_WOLF_AURA
@ SPELL_SHAMAN_HEALING_RAIN_HEAL
@ SPELL_SHAMAN_TOTEMIC_POWER_SPELL_POWER
@ SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD
@ SPELL_SHAMAN_LAVA_BURST_BONUS_DAMAGE
@ SPELL_SHAMAN_CHAIN_LIGHTNING
@ SPELL_SHAMAN_PATH_OF_FLAMES_TALENT
@ SPELL_SHAMAN_MASTERY_ELEMENTAL_OVERLOAD
@ SPELL_SHAMAN_FLAME_SHOCK
@ SPELL_SHAMAN_CHAIN_LIGHTNING_OVERLOAD_ENERGIZE
@ SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD_DAMAGE
@ SPELL_SHAMAN_EARTHEN_RAGE_DAMAGE
@ SPELL_SHAMAN_LIGHTNING_BOLT
@ SPELL_SHAMAN_DOOM_WINDS_LEGENDARY_COOLDOWN
@ SPELL_SHAMAN_EARTHQUAKE_KNOCKING_DOWN
@ SPELL_SHAMAN_STORMSTRIKE
@ SPELL_SHAMAN_STORMKEEPER
@ SPELL_SHAMAN_LAVA_BEAM_OVERLOAD
@ SPELL_SHAMAN_POWER_SURGE
@ SPELL_SHAMAN_LIGHTNING_BOLT_OVERLOAD
@ SPELL_SHAMAN_ICEFURY
@ SPELL_SHAMAN_TOTEMIC_POWER_MP5
@ SPELL_SHAMAN_ELEMENTAL_BLAST_OVERLOAD
@ SPELL_SHAMAN_ELEMENTAL_MASTERY
@ SPELL_SHAMAN_ELEMENTAL_BLAST_CRIT
@ SPELL_SHAMAN_CHAINED_HEAL
@ SPELL_SHAMAN_ELEMENTAL_BLAST_ENERGIZE
@ SPELL_SHAMAN_RESTORATIVE_MISTS_INITIAL
@ SPELL_SHAMAN_LAVA_BURST_OVERLOAD
@ SPELL_SHAMAN_LIGHTNING_BOLT_OVERLOAD_ENERGIZE
@ SPELL_SHAMAN_RESTORATIVE_MISTS
@ SPELL_SHAMAN_GATHERING_STORMS
@ SPELL_SHAMAN_SPIRIT_WOLF_TALENT
@ SPELL_SHAMAN_UNDULATION_PROC
@ SPELL_SHAMAN_IGNEOUS_POTENTIAL
@ SPELL_SHAMAN_FLAMETONGUE_WEAPON_ENCHANT
@ SPELL_SHAMAN_GATHERING_STORMS_BUFF
@ SPELL_SHAMAN_TOTEMIC_POWER_ARMOR
@ SPELL_SHAMAN_T29_2P_ELEMENTAL_DAMAGE_BUFF
@ SPELL_SHAMAN_GHOST_WOLF
@ SPELL_SHAMAN_LAVA_BURST
@ SPELL_SHAMAN_ELECTRIFIED
@ SPELL_SHAMAN_ECHOES_OF_GREAT_SUNDERING_LEGENDARY
@ SPELL_SHAMAN_CHAIN_LIGHTNING_ENERGIZE
@ SPELL_SHAMAN_AFTERSHOCK_ENERGIZE
@ SPELL_SHAMAN_MAELSTROM_CONTROLLER
@ SPELL_SHAMAN_WINDFURY_ATTACK
@ SPELL_SHAMAN_TOTEMIC_POWER_ATTACK_POWER
@ SPELL_SHAMAN_VOLCANIC_SURGE
@ SPELL_SHAMAN_WINDFURY_ENCHANTMENT
@ SPELL_SHAMAN_ENERGY_SURGE
@ SPELL_SHAMAN_SPIRIT_WOLF_PERIODIC
@ SPELL_SHAMAN_WIND_RUSH
@ SPELL_SHAMAN_ASCENDANCE_ELEMENTAL
@ SPELL_SHAMAN_ASCENDANCE_ENHANCEMENT
@ SPELL_SHAMAN_PATH_OF_FLAMES_SPREAD
@ SPELL_SHAMAN_EARTHEN_RAGE_PASSIVE
@ SPELL_SHAMAN_ELEMENTAL_BLAST
@ SPELL_SHAMAN_ANCESTRAL_GUIDANCE
@ SPELL_SHAMAN_EARTHQUAKE_TICK
@ SPELL_SHAMAN_EARTH_SHIELD_HEAL
@ SPELL_SHAMAN_CHAIN_LIGHTNING_OVERLOAD
@ SPELL_SHAMAN_ECHOES_OF_GREAT_SUNDERING_TALENT
@ SPELL_SHAMAN_ITEM_MANA_SURGE
@ SPELL_SHAMAN_ELEMENTAL_BLAST_MASTERY
@ SPELL_SHAMAN_HEALING_RAIN_VISUAL
@ SPELL_SHAMAN_ANCESTRAL_GUIDANCE_HEAL
@ SPELL_SHAMAN_FROST_SHOCK_ENERGIZE
@ SPELL_SHAMAN_TIDAL_WAVES
@ SPELL_SHAMAN_RIPTIDE
MiscNpcs
@ NPC_HEALING_RAIN_INVISIBLE_STALKER
CastSpellExtraArgs & AddSpellBP0(int32 val)
Definition: SpellDefines.h:475
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
Definition: SpellDefines.h:474
bool IsWeapon() const
Definition: ItemTemplate.h:860
constexpr void GetPosition(float &x, float &y) const
Definition: Position.h:81
GuidUnorderedSet _stunnedUnits
void OnCreate(Spell const *creatingSpell) override
areatrigger_sha_earthquake(AreaTrigger *areatrigger)
void OnUpdate(uint32 diff) override
bool AddStunnedTarget(ObjectGuid const &guid)
void OnUpdate(uint32 diff) override
void OnUnitEnter(Unit *unit) override
static constexpr uint32 REFRESH_TIME
areatrigger_sha_wind_rush_totem(AreaTrigger *areatrigger)