TrinityCore
Loading...
Searching...
No Matches
spell_druid.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_DRUID and SPELLFAMILY_GENERIC spells used by druid players.
20 * Ordered alphabetically using scriptname.
21 * Scriptnames of files in this file should be prefixed with "spell_dru_".
22 */
23
24#include "AreaTrigger.h"
25#include "AreaTriggerAI.h"
26#include "ScriptMgr.h"
27#include "CellImpl.h"
28#include "Containers.h"
29#include "DB2Stores.h"
30#include "GridNotifiersImpl.h"
31#include "ObjectAccessor.h"
32#include "Player.h"
33#include "Spell.h"
34#include "SpellAuraEffects.h"
35#include "SpellHistory.h"
36#include "SpellMgr.h"
37#include "SpellScript.h"
38#include "TaskScheduler.h"
39
41{
173
174// 774 - Rejuvenation
175// 155777 - Rejuvenation (Germination)
177{
178 bool Validate(SpellInfo const* /*spellInfo*/) override
179 {
181 }
182
184 {
185 Unit* caster = GetCaster();
186 if (!caster || !caster->HasAura(SPELL_DRUID_ABUNDANCE))
187 return;
188
189 // Note: caster only casts Abundance when first applied on the target, otherwise that given stack is refreshed.
190 if (mode & AURA_EFFECT_HANDLE_REAL)
191 caster->CastSpell(caster, SPELL_DRUID_ABUNDANCE_EFFECT, CastSpellExtraArgs().SetTriggeringAura(aurEff));
192 else if (Aura* abundanceAura = caster->GetAura(SPELL_DRUID_ABUNDANCE_EFFECT))
193 abundanceAura->RefreshDuration();
194 }
195
196 void HandleOnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
197 {
198 Unit* caster = GetCaster();
199 if (!caster)
200 return;
201
202 if (Aura* abundanceEffect = caster->GetAura(SPELL_DRUID_ABUNDANCE_EFFECT))
203 abundanceEffect->ModStackAmount(-1);
204 }
205
211};
212
213// 102560 - Incarnation: Chosen of Elune
214// 194223 - Celestial Alignment
215// 383410 - Celestial Alignment
216// 390414 - Incarnation: Chosen of Elune
241
242// 394058 - Astral Smolder
244{
245 bool Validate(SpellInfo const* /*spellInfo*/) override
246 {
248 && sSpellMgr->AssertSpellInfo(SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE, DIFFICULTY_NONE)->GetEffect(EFFECT_0).GetPeriodicTickCount() > 0;
249 }
250
251 void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
252 {
254
255 SpellEffectInfo const& astralSmolderDmg = sSpellMgr->AssertSpellInfo(SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE, GetCastDifficulty())->GetEffect(EFFECT_0);
256 SpellEffectValue pct = aurEff->GetAmount();
257
258 SpellEffectValue amount = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), pct) / astralSmolderDmg.GetPeriodicTickCount();
259
260 CastSpellExtraArgs args(aurEff);
263 }
264
269};
270
272{
273protected:
274 bool Validate(SpellInfo const* /*spellInfo*/) override
275 {
277 }
278
280 {
281 // Change into cat form
284 }
285
290
291 virtual bool ToCatForm() const = 0;
292
295};
296
297// 22812 - Barkskin
299{
300 bool Validate(SpellInfo const* /*spellInfo*/) override
301 {
303 }
304
305 void HandlePeriodic(AuraEffect const* /*aurEff*/)
306 {
307 Unit* target = GetTarget();
309 target->CastSpell(target, SPELL_DRUID_BRAMBLES_DAMAGE_AURA, true);
310 }
311
316};
317
318// 50334 - Berserk
320{
321 bool Validate(SpellInfo const* spellInfo) override
322 {
324 return false;
325
327 }
328
335
341
342protected:
343 bool ToCatForm() const override { return false; }
344};
345
346// 203953 - Brambles - SPELL_DRUID_BRAMBLES_PASSIVE
348{
349 bool Validate(SpellInfo const* /*spellInfo*/) override
350 {
352 }
353
354 void HandleAbsorb(AuraEffect* /*aurEff*/, DamageInfo& /*dmgInfo*/, uint32& /*absorbAmount*/)
355 {
356 // Prevent Removal
358 }
359
360 void HandleAfterAbsorb(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32& absorbAmount)
361 {
362 // reflect back damage to the attacker
363 Unit* target = GetTarget();
364 if (Unit* attacker = dmgInfo.GetAttacker())
366 }
367
373};
374
375// 155835 - Bristling Fur
377{
378 bool Validate(SpellInfo const* /*spellInfo*/) override
379 {
381 }
382
383 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
384 {
385 // BristlingFurRage = 100 * Damage / MaxHealth.
386 if (DamageInfo* damageInfo = eventInfo.GetDamageInfo())
387 {
388 Unit* target = GetTarget();
389 uint32 rage = target->GetMaxPower(POWER_RAGE) * (float)damageInfo->GetDamage() / (float)target->GetMaxHealth();
390 if (rage > 0)
392 }
393 }
394
399};
400
401// 768 - CatForm - SPELL_DRUID_CAT_FORM
419
420// 102560 - Incarnation: Chosen of Elune
421// 194223 - Celestial Alignment
422// 383410 - Celestial Alignment
423// 390414 - Incarnation: Chosen of Elune
455
456// 774 - Rejuvenation
457// 155777 - Rejuventation (Germination)
459{
460 bool Validate(SpellInfo const* /*spellInfo*/) override
461 {
464 }
465
466 void HandleOnTick(AuraEffect const* aurEff) const
467 {
468 Unit* caster = GetCaster();
469 if (!caster)
470 return;
471
472 Unit* target = GetTarget();
473 if (AuraEffect const* cultivationEffect = caster->GetAuraEffect(SPELL_DRUID_CULTIVATION, EFFECT_0))
474 if (target->HealthBelowPct(cultivationEffect->GetAmount()))
475 caster->CastSpell(target, SPELL_DRUID_CULTIVATION_HEAL, CastSpellExtraArgs().SetTriggeringAura(aurEff));
476 }
477
482};
483
484// 1850 - Dash
486{
487 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
488 {
489 // do not set speed if not in cat form
490 if (GetUnitOwner()->GetShapeshiftForm() != FORM_CAT_FORM)
491 amount = 0;
492 }
493
498};
499
500// 372119 - Dream of Cenarius (Guardian)
502{
503 bool Validate(SpellInfo const* /*spellInfo*/) override
504 {
506 }
507
508 bool CheckEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& /*eventInfo*/) const
509 {
511 return false;
512
513 return roll_chance(GetUnitOwner()->GetUnitCriticalChanceDone(BASE_ATTACK));
514 }
515
516 void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& /*procInfo*/) const
517 {
518 Unit* target = GetTarget();
520 args.SetTriggeringAura(aurEff);
522
523 target->CastSpell(target, SPELL_DRUID_DREAM_OF_CENARIUS, args);
525 }
526
532};
533
534// 203974 - Earthwarden
536{
537 bool Validate(SpellInfo const* /*spellInfo*/) override
538 {
540 }
541
542 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
543 {
544 Unit* target = GetTarget();
545 target->CastSpell(target, SPELL_DRUID_EARTHWARDEN_AURA, true);
546 }
547
552};
553
555{
556public:
557 static void SetSpellCount(Unit* unitOwner, uint32 spellId, uint32 amount)
558 {
559 Aura* aura = unitOwner->GetAura(spellId);
560 if (!aura)
561 unitOwner->CastSpell(unitOwner, spellId, CastSpellExtraArgs(TRIGGERED_FULL_MASK).AddSpellMod(SPELLVALUE_AURA_STACK, amount));
562 else
563 aura->SetStackAmount(amount);
564 }
565};
566
567// 48517 Eclipse (Solar) + 48518 Eclipse (Lunar)
590
591// 79577 - Eclipse - SPELL_DRUID_ECLIPSE_DUMMY
593{
610
623
624 void HandleProc(ProcEventInfo& eventInfo)
625 {
626 if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
627 {
628 if (spellInfo->SpellFamilyFlags & flag128(0x4, 0x0, 0x0, 0x0)) // Starfire
630 else if (spellInfo->SpellFamilyFlags & flag128(0x1, 0x0, 0x0, 0x0)) // Wrath
632 }
633 }
634
635 void HandleApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
636 {
637 // counters are applied with a delay
639 }
640
646
647 void OnOwnerOutOfCombat(bool isNowInCombat)
648 {
649 if (!isNowInCombat)
651 }
652
660
661private:
662 void OnSpellCast(uint32 cntSpellId, uint32 otherCntSpellId, uint32 eclipseAuraSpellId)
663 {
664 Unit* target = GetTarget();
665 if (Aura* aura = target->GetAura(cntSpellId))
666 {
667 uint32 remaining = aura->GetStackAmount();
668 if (remaining == 0)
669 return;
670
671 if (remaining > 1)
672 aura->SetStackAmount(remaining - 1);
673 else
674 {
675 // cast eclipse
676 target->CastSpell(target, eclipseAuraSpellId, TRIGGERED_FULL_MASK);
677
680
681 // Remove stacks from other one as well
682 // reset remaining power on other spellId
683 target->RemoveAura(cntSpellId);
684 target->RemoveAura(otherCntSpellId);
685 }
686 }
687 }
688};
689
690// 329910 - Eclipse out of combat - SPELL_DRUID_ECLIPSE_OOC
692{
697
698 void Tick(AuraEffect const* /*aurEff*/)
699 {
700 Unit* owner = GetTarget();
701 AuraEffect const* auraEffDummy = owner->GetAuraEffect(SPELL_DRUID_ECLIPSE_DUMMY, EFFECT_0);
702 if (!auraEffDummy)
703 return;
704
706 {
707 // Restore 2 stacks to each spell when out of combat
710 }
711 }
712
717};
718
719// 145205 - Efflorescence
721{
722 void RemoveOldAreaTrigger(SpellEffIndex /*effIndex*/) const
723 {
724 // if caster has any Efflorescence areatrigger, we remove it.
726 }
727
735
741};
742
743// 81262 - Efflorescence (Dummy)
745{
746 bool Validate(SpellInfo const* /*spellInfo*/) override
747 {
749 }
750
751 void HandlePeriodicDummy(AuraEffect const* /*aurEff*/) const
752 {
753 Unit* target = GetTarget();
754 Unit* summoner = target->GetOwner();
755 if (!summoner)
756 return;
757
759 }
760
765};
766
767// 81269 - Efflorescence (Heal)
780
781// 370586 - Elune's Favored (attached to 5487 - Bear Form)
809
810// 370588 - Elune's Favored (Proc)
812{
813 bool Validate(SpellInfo const* /*spellInfo*/) override
814 {
817 }
818
819 void HandleProc(ProcEventInfo const& eventInfo)
820 {
821 _arcaneDamage += eventInfo.GetDamageInfo()->GetDamage();
822 }
823
824 void HandlePeriodic(AuraEffect const* aurEff)
825 {
826 Unit* caster = GetTarget();
827 if (!_arcaneDamage)
828 return;
829
830 AuraEffect const* elunesFavored = caster->GetAuraEffect(SPELL_DRUID_ELUNES_FAVORED, EFFECT_0);
831 if (!elunesFavored)
832 return;
833
834 SpellEffectValue heal = CalculatePct(_arcaneDamage, elunesFavored->GetAmount());
835
838 .TriggeringAura = aurEff,
839 .SpellValueOverrides = { { SPELLVALUE_BASE_POINT0, heal } }
840 });
841
842 _arcaneDamage = 0;
843 }
844
850
852};
853
854// 392124 - Embrace of the Dream
856{
857 bool Validate(SpellInfo const* spellInfo) override
858 {
860 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
861 }
862
863 bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& /*eventInfo*/) const
864 {
865 return roll_chance(GetEffectInfo(EFFECT_2).CalcValue(GetCaster()));
866 }
867
868 void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo) const
869 {
872 .SetTriggeringAura(aurEff)
873 .SetTriggeringSpell(eventInfo.GetProcSpell()));
874 }
875
881};
882
883// 392146 - Embrace of the Dream (Selector)
885{
896
897 void FilterTargets(std::list<WorldObject*>& targets) const
898 {
899 targets.remove_if([&](WorldObject const* target)
900 {
901 Unit const* unitTarget = target->ToUnit();
902 return !unitTarget || !unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, flag128(0x50, 0, 0, 0), GetCaster()->GetGUID());
903 });
904 }
905
912
918};
919
920// 339 - Entangling Roots
921// 102359 - Mass Entanglement
948
950{
951 bool Validate(SpellInfo const* /*spellInfo*/) override
952 {
954 }
955
956 bool CheckProc(ProcEventInfo& eventInfo)
957 {
958 if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
959 {
960 // dont subtract dmg caused by roots from dmg required to break root
961 if (spellInfo->Id == SPELL_DRUID_ENTANGLING_ROOTS || spellInfo->Id == SPELL_DRUID_MASS_ENTANGLEMENT)
962 return false;
963 }
964 return true;
965 }
966
971};
972
973// 22568 - Ferocious Bite
975{
976 bool Validate(SpellInfo const* /*spellInfo*/) override
977 {
979 }
980
982 {
984 SetEffectValue(newValue);
985 }
986
988 {
989 int32 newValue = int32(float(GetHitDamage()) * (1.0f + _damageMultiplier));
990 SetHitDamage(newValue);
991 }
992
994 {
995 Unit* caster = GetCaster();
996
997 SpellEffectValue maxExtraConsumedPower = GetEffectValue();
998
1000 {
1001 SpellEffectValue multiplier = 1.0 + auraEffect->GetAmount() / 100.0;
1002 maxExtraConsumedPower = maxExtraConsumedPower * multiplier;
1003 SetEffectValue(maxExtraConsumedPower);
1004 }
1005
1006 _damageMultiplier = std::min<SpellEffectValue>(caster->GetPower(POWER_ENERGY), maxExtraConsumedPower) / maxExtraConsumedPower;
1007 }
1008
1015
1016private:
1017 float _damageMultiplier = 0.0f;
1018};
1019
1020// 439901 - Flower Walk
1021// Triggered by 22812 - Barkskin
1023{
1024 bool Validate(SpellInfo const* spellInfo) override
1025 {
1027 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
1028 }
1029
1030 bool Load() override
1031 {
1033 }
1034
1040
1045};
1046
1047// 439902 - Flower Walk (Heal)
1049{
1050 bool Validate(SpellInfo const* spellInfo) override
1051 {
1052 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
1053 }
1054
1055 void FilterTargets(std::list<WorldObject*>& targets)
1056 {
1057 Unit* caster = GetCaster();
1058 int32 maxTargets = GetEffectInfo(EFFECT_1).CalcValueAsInt(caster);
1059
1060 if (targets.size() > 1)
1061 targets.remove(caster);
1062
1063 Trinity::SelectRandomInjuredTargets(targets, maxTargets, true, caster);
1064
1065 if (targets.empty())
1066 targets.push_back(caster);
1067 }
1068
1070 {
1071 if (target->ToUnit() == GetCaster())
1072 target = nullptr;
1073 }
1074
1080};
1081
1082// 37336 - Druid Forms Trinket
1084{
1096
1097 bool CheckProc(ProcEventInfo& eventInfo)
1098 {
1099 Unit* target = eventInfo.GetActor();
1100
1101 switch (target->GetShapeshiftForm())
1102 {
1103 case FORM_BEAR_FORM:
1105 case FORM_CAT_FORM:
1106 case FORM_MOONKIN_FORM:
1107 case FORM_NONE:
1108 case FORM_TREE_OF_LIFE:
1109 return true;
1110 default:
1111 break;
1112 }
1113
1114 return false;
1115 }
1116
1117 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1118 {
1120 Unit* target = eventInfo.GetActor();
1121 uint32 triggerspell = 0;
1122
1123 switch (target->GetShapeshiftForm())
1124 {
1125 case FORM_BEAR_FORM:
1127 triggerspell = SPELL_DRUID_FORMS_TRINKET_BEAR;
1128 break;
1129 case FORM_CAT_FORM:
1130 triggerspell = SPELL_DRUID_FORMS_TRINKET_CAT;
1131 break;
1132 case FORM_MOONKIN_FORM:
1133 triggerspell = SPELL_DRUID_FORMS_TRINKET_MOONKIN;
1134 break;
1135 case FORM_NONE:
1136 triggerspell = SPELL_DRUID_FORMS_TRINKET_NONE;
1137 break;
1138 case FORM_TREE_OF_LIFE:
1139 triggerspell = SPELL_DRUID_FORMS_TRINKET_TREE;
1140 break;
1141 default:
1142 return;
1143 }
1144
1145 target->CastSpell(target, triggerspell, aurEff);
1146 }
1147
1153};
1154
1155// 203964 - Galactic Guardian
1157{
1162
1163 static bool CheckEffectProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
1164 {
1165 return roll_chance(aurEff->GetAmount());
1166 }
1167
1168 static void HandleProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
1169 {
1170 Unit* caster = eventInfo.GetActor();
1171 Unit* target = eventInfo.GetActionTarget();
1172
1173 // free automatic moonfire on target
1175
1176 // Cast aura
1178 }
1179
1185};
1186
1187// 213708 - Galactic Guardian (attached to 164812 - Moonfire)
1189{
1190 bool Validate(SpellInfo const* /*spellInfo*/) override
1191 {
1193 }
1194
1195 bool Load() override
1196 {
1198 }
1199
1200 void CalculateDamage(SpellEffectInfo const& /*effectInfo*/, Unit* /*victim*/, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const
1201 {
1202 if (AuraEffect const* galactic = GetCaster()->GetAuraEffect(SPELL_DRUID_GALACTIC_GUARDIAN_AURA, EFFECT_2))
1203 AddPct(pctMod, galactic->GetAmount());
1204 }
1205
1210};
1211
1212// 774 - Rejuvenation
1214{
1219
1221 {
1222 Unit* caster = GetCaster();
1223
1224 // Germination talent.
1225 if (caster->HasAura(SPELL_DRUID_GERMINATION))
1226 {
1227 Unit* unitTarget = target->ToUnit();
1228 Aura* rejuvenationAura = unitTarget->GetAura(SPELL_DRUID_REJUVENATION, caster->GetGUID());
1229 Aura* germinationAura = unitTarget->GetAura(SPELL_DRUID_REJUVENATION_GERMINATION, caster->GetGUID());
1230
1231 // if target doesn't have Rejuventation, cast passes through.
1232 if (!rejuvenationAura)
1233 return;
1234
1235 // if target has Rejuvenation, but not Germination, or Germination has lower remaining duration than Rejuvenation, then cast Germination
1236 if (germinationAura && germinationAura->GetDuration() >= rejuvenationAura->GetDuration())
1237 return;
1238
1241 .SetTriggeringSpell(GetSpell()));
1242
1243 // prevent aura refresh (but cast must still happen to consume mana)
1244 target = nullptr;
1245 }
1246 }
1247
1252};
1253
1254// 24858 - Moonkin Form
1280
1281// 210706 - Gore
1283{
1284 bool Validate(SpellInfo const* /*spellInfo*/) override
1285 {
1287 }
1288
1289 bool CheckEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
1290 {
1291 return roll_chance(aurEff->GetAmount());
1292 }
1293
1294 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*procInfo*/)
1295 {
1296 Unit* owner = GetTarget();
1297 owner->CastSpell(owner, SPELL_DRUID_GORE_PROC);
1299 }
1300
1306};
1307
1308// 213680 - Guardian of Elune
1309// Triggered by 22842 - Frenzied Regeneration
1311{
1312 bool Validate(SpellInfo const* /*spellInfo*/) override
1313 {
1315 }
1316
1317 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& canBeRecalculated)
1318 {
1319 canBeRecalculated = false;
1320
1321 Unit* caster = GetCaster();
1322 if (!caster)
1323 return;
1324
1326 AddPct(amount, guardianOfElune->GetAmount());
1327 }
1328
1333};
1334
1335// 99 - Incapacitating Roar
1337{
1338protected:
1339 bool ToCatForm() const override { return false; }
1340};
1341
1342// 29166 - Innervate
1344{
1346 {
1348 if (!target)
1350
1352 if (!spec || spec->GetRole() != ChrSpecializationRole::Healer)
1354
1355 return SPELL_CAST_OK;
1356 }
1357
1359 {
1360 Unit* caster = GetCaster();
1361 if (caster != GetHitUnit())
1362 if (AuraEffect const* innervateR2 = caster->GetAuraEffect(SPELL_DRUID_INNERVATE_RANK_2, EFFECT_0))
1363 caster->CastSpell(caster, SPELL_DRUID_INNERVATE,
1365 .SetTriggeringSpell(GetSpell())
1366 .AddSpellMod(SPELLVALUE_BASE_POINT0, -innervateR2->GetAmount()));
1367
1368 }
1369
1375};
1376
1377// 117679 - Incarnation (Passive)
1395
1396// 33891 - Incarnation: Tree of Life (Talent, Shapeshift)
1415
1416// 740 - Tranquility
1418{
1419 bool Validate(SpellInfo const* spellInfo) override
1420 {
1422 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_4 } })
1425 }
1426
1427 void PreventEffect(WorldObject*& target) const
1428 {
1429 // Note: Inner Peace talent.
1431 target = nullptr;
1432 }
1433
1439};
1440
1441// 40442 - Druid Tier 6 Trinket
1443{
1444 bool Validate(SpellInfo const* /*spellInfo*/) override
1445 {
1446 return ValidateSpellInfo(
1447 {
1451 });
1452 }
1453
1454 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1455 {
1457 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
1458 if (!spellInfo)
1459 return;
1460
1461 uint32 spellId;
1462 int32 chance;
1463
1464 // Starfire
1465 if (spellInfo->SpellFamilyFlags[0] & 0x00000004)
1466 {
1468 chance = 25;
1469 }
1470 // Rejuvenation
1471 else if (spellInfo->SpellFamilyFlags[0] & 0x00000010)
1472 {
1474 chance = 25;
1475 }
1476 // Mangle (Bear) and Mangle (Cat)
1477 else if (spellInfo->SpellFamilyFlags[1] & 0x00000440)
1478 {
1480 chance = 40;
1481 }
1482 else
1483 return;
1484
1485 if (roll_chance(chance))
1486 eventInfo.GetActor()->CastSpell(nullptr, spellId, aurEff);
1487 }
1488
1493};
1494
1495// 33763 - Lifebloom
1497{
1498 bool Validate(SpellInfo const* /*spell*/) override
1499 {
1501 }
1502
1503 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1504 {
1505 // Final heal only on duration end
1506 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE || GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL)
1508 }
1509
1514};
1515
1516// 204066 - Lunar Beam
1518{
1520
1521 void OnCreate(Spell const* /*creatingSpell*/) override
1522 {
1523 _scheduler.Schedule(500ms, [this](TaskContext& task)
1524 {
1525 if (Unit* caster = at->GetCaster())
1526 {
1527 caster->CastSpell(caster, SPELL_DRUID_LUNAR_BEAM_HEAL, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
1528 caster->CastSpell(at->GetPosition(), SPELL_DRUID_LUNAR_BEAM_DAMAGE, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
1529 }
1530 task.Repeat(1s);
1531 });
1532 }
1533
1534 void OnUpdate(uint32 diff) override
1535 {
1536 _scheduler.Update(diff);
1537 }
1538
1539private:
1541};
1542
1543// 155580 - Lunar Inspiration
1567
1568// 1253600 - Lunar Wrath
1570{
1571 static bool CheckProc(AuraScript const&, ProcEventInfo const& procEvent)
1572 {
1573 if (procEvent.GetProcSpell()->GetPowerTypeCostAmount(POWER_RAGE) <= 0)
1574 return false;
1575
1576 Unit* caster = procEvent.GetActor();
1577 Unit* result = nullptr;
1578 Trinity::UnitAuraCheck check(true, SPELL_DRUID_RED_MOON, caster->GetGUID());
1579 Trinity::UnitSearcher searcher(caster, result, check);
1580 Cell::VisitAllObjects(caster, searcher, 40.0f);
1581
1582 return result != nullptr;
1583 }
1584
1589};
1590
1591// 392315 - Luxuriant Soil
1593{
1594 bool Validate(SpellInfo const* /*spellInfo*/) override
1595 {
1597 }
1598
1599 static bool CheckProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/)
1600 {
1601 return roll_chance(aurEff->GetAmount());
1602 }
1603
1604 void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) const
1605 {
1606 Unit* rejuvCaster = GetTarget();
1607
1608 // let's use the ProcSpell's max. range.
1609 SpellRange spellRange = eventInfo.GetSpellInfo()->GetMinMaxRange();
1610
1611 std::vector<Unit*> targetList;
1612 Trinity::WorldObjectSpellAreaTargetCheck check(spellRange, rejuvCaster, rejuvCaster, rejuvCaster, eventInfo.GetSpellInfo(), TARGET_CHECK_ALLY, nullptr, TARGET_OBJECT_TYPE_UNIT);
1613 Trinity::UnitListSearcher searcher(rejuvCaster, targetList, check);
1614 Cell::VisitAllObjects(rejuvCaster, searcher, spellRange.Max);
1615
1616 if (targetList.empty())
1617 return;
1618
1620 }
1621
1627};
1628
1629// 22570 - Maim
1631{
1632 bool Validate(SpellInfo const* /*spellInfo*/) override
1633 {
1635 }
1636
1637 void CalculateDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit* /*victim*/, int32& /*damage*/, int32& /*flatMod*/, float& pctMod)
1638 {
1639 int32 comboPoints = GetSpell()->GetPowerTypeCostAmount(POWER_COMBO_POINTS).value_or(0);
1640
1641 pctMod *= comboPoints;
1642 }
1643
1645 {
1646 int32 comboPoints = GetSpell()->GetPowerTypeCostAmount(POWER_COMBO_POINTS).value_or(0);
1647
1650 .SpellValueOverrides = { { SPELLVALUE_DURATION, comboPoints * IN_MILLISECONDS } }
1651 });
1652 }
1653
1659};
1660
1661// 33917 - Mangle
1663{
1664 bool Validate(SpellInfo const* spellInfo) override
1665 {
1667 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
1668 }
1669
1670 bool Load() override
1671 {
1673 }
1674
1675 void CalculateDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit* victim, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const
1676 {
1677 if (victim->HasAuraState(AURA_STATE_BLEED))
1678 AddPct(pctMod, GetEffectInfo(EFFECT_2).CalcValue(GetCaster()));
1679 }
1680
1685};
1686
1687// 385787 - Matted Fur (Absorb)
1689{
1690 bool Validate(SpellInfo const* /*spellInfo*/) override
1691 {
1693 }
1694
1695 static void CalculateAmount(AuraScript const&, AuraEffect const* /*aurEff*/, Unit const* victim, int32& baseAbsorb, int32& /*flatMod*/, float& /*pctMod*/)
1696 {
1697 if (AuraEffect const* passiveEffect = victim->GetAuraEffect(SPELL_DRUID_MATTED_FUR, EFFECT_0))
1698 baseAbsorb = static_cast<int32>(victim->GetTotalAttackPowerValue(BASE_ATTACK) * 0.0125 * passiveEffect->GetAmount());
1699 }
1700
1705};
1706
1707// 8921 - Moonfire
1709{
1710 bool Validate(SpellInfo const* /*spellInfo*/) override
1711 {
1713 }
1714
1715 void HandleOnHit(SpellEffIndex /*effIndex*/)
1716 {
1718 }
1719
1724};
1725
1726// 400278 - Moonless Night
1728{
1729 bool Validate(SpellInfo const* /*spellInfo*/) override
1730 {
1732 }
1733
1738
1739 void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1740 {
1741 Unit* caster = eventInfo.GetActor();
1742 Unit* target = eventInfo.GetActionTarget();
1743 SpellEffectValue damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount());
1744
1747 .SpellValueOverrides = { { SPELLVALUE_BASE_POINT0, damage } }
1748 });
1749 }
1750
1756};
1757
1758// 450347 - Nature's Grace
1760{
1761public:
1762 bool Validate(SpellInfo const* spellInfo) override
1763 {
1765 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
1766 }
1767
1768 static void Trigger(Unit* caster, AuraEffect const* naturesGraceEffect)
1769 {
1771 .SpellValueOverrides = { { SPELLVALUE_AURA_STACK, naturesGraceEffect->GetAmountAsInt() } }
1772 });
1773
1774 }
1775
1776 void OnOwnerInCombat(bool isNowInCombat) const
1777 {
1778 if (isNowInCombat)
1780 }
1781
1786};
1787
1788// 48517 Eclipse (Solar) + 48518 Eclipse (Lunar)
1812
1813// 274283 - Full Moon
1814// 274282 - Half Moon
1815// 274281 - New Moon
1817{
1818public:
1819 explicit spell_dru_new_moon(Optional<uint32> newOverrideSpell, Optional<uint32> removeOverrideSpell)
1820 : _newOverrideSpell(newOverrideSpell), _removeOverrideSpell(removeOverrideSpell) { }
1821
1822private:
1823 bool Validate(SpellInfo const* /*spellInfo*/) override
1824 {
1827 }
1828
1829 void OverrideMoon() const
1830 {
1831 Unit* caster = GetCaster();
1835 .SetTriggeringSpell(GetSpell()));
1836
1839 }
1840
1841 void Register() override
1842 {
1844 }
1845
1848};
1849
1850// 16864 - Omen of Clarity
1852{
1853 bool Validate(SpellInfo const* /*spellInfo*/) override
1854 {
1856 }
1857
1858 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
1859 {
1860 Unit* target = GetTarget();
1862 target->CastSpell(nullptr, SPELL_DRUID_BALANCE_T10_BONUS_PROC, true);
1863 }
1864
1869};
1870
1871// 113043 - Omen of Clarity
1873{
1874 bool CheckProc(AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/) const
1875 {
1876 return roll_chance(aurEff->GetAmount());
1877 }
1878
1883};
1884
1885// 392303 - Power of the Archdruid
1887{
1888 bool Validate(SpellInfo const* /*spellInfo*/) override
1889 {
1891 }
1892
1893 static bool CheckProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
1894 {
1896 }
1897
1898 static void HandleProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
1899 {
1900 Unit* druid = eventInfo.GetActor();
1901 Unit const* procTarget = eventInfo.GetActionTarget();
1902
1903 // range is EFFECT_0's BasePoints.
1904 float spellRange = aurEff->GetAmount();
1905
1906 std::vector<Unit*> targetList;
1907 Trinity::WorldObjectSpellAreaTargetCheck checker({ .Max = spellRange }, procTarget, druid, druid, eventInfo.GetSpellInfo(), TARGET_CHECK_ALLY, nullptr, TARGET_OBJECT_TYPE_UNIT);
1908 Trinity::UnitListSearcher searcher(procTarget, targetList, checker);
1909 Cell::VisitAllObjects(procTarget, searcher, spellRange);
1910 std::erase(targetList, procTarget);
1911
1912 if (targetList.empty())
1913 return;
1914
1915 AuraEffect const* powerOfTheArchdruidEffect = druid->GetAuraEffect(SPELL_DRUID_POWER_OF_THE_ARCHDRUID, EFFECT_0);
1916
1917 // max. targets is SPELL_DRUID_POWER_OF_THE_ARCHDRUID's EFFECT_0 BasePoints.
1918 int32 maxTargets = powerOfTheArchdruidEffect->GetAmountAsInt();
1919
1920 Trinity::Containers::RandomResize(targetList, maxTargets);
1921
1922 for (Unit* chosenTarget : targetList)
1923 druid->CastSpell(chosenTarget, eventInfo.GetProcSpell()->GetSpellInfo()->Id, aurEff);
1924 }
1925
1931};
1932
1933// 5215 - Prowl
1935{
1936protected:
1937 bool ToCatForm() const override { return true; }
1938};
1939
1940// 80313 - Pulverize
1942{
1943 bool Validate(SpellInfo const* spellInfo) override
1944 {
1946 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
1947 }
1948
1950 {
1951 Unit* caster = GetCaster();
1952 Unit* target = GetHitUnit();
1953 Aura* bleedAura = target->GetAura(SPELL_DRUID_THRASH_BEAR_BLEED, caster->GetGUID());
1954 if (!bleedAura)
1955 return;
1956
1957 int32 stacksToRemove = GetEffectInfo(EFFECT_2).CalcValueAsInt(caster);
1958
1959 bleedAura->ModStackAmount(-stacksToRemove);
1961 }
1962
1967};
1968
1969// 80313 - Pulverize (Trigger)
1970// Triggered by 77758 - Thrash (Bear Form)
1972{
1973 bool Validate(SpellInfo const* /*spellInfo*/) override
1974 {
1975 return ValidateSpellInfo
1976 ({
1980 })
1982 }
1983
1984 bool Load() override
1985 {
1987 }
1988
1990 {
1991 Unit* caster = GetCaster();
1992 Unit* target = GetHitUnit();
1993
1994 Aura* bleedAura = target->GetAura(SPELL_DRUID_THRASH_BEAR_BLEED, caster->GetGUID());
1995 if (!bleedAura)
1996 return;
1997
1998 int32 thresholdStacks = sSpellMgr->AssertSpellInfo(SPELL_DRUID_PULVERIZE, GetCastDifficulty())->GetEffect(EFFECT_2).CalcValueAsInt(caster);
1999 if (bleedAura->GetStackAmount() >= thresholdStacks)
2000 caster->CastSpell(target, SPELL_DRUID_THRASH_PULVERIZE_TRIGGER, CastSpellExtraArgs().SetTriggeringSpell(GetSpell()));
2001 }
2002
2007};
2008
2009// 158790 - Thrash
2011{
2012 bool Validate(SpellInfo const* /*spellInfo*/) override
2013 {
2015 }
2016
2017 void OnTick(AuraEffect const* /*aurEff*/)
2018 {
2019 Unit* caster = GetCaster();
2020 if (!caster)
2021 {
2022 Remove();
2023 return;
2024 }
2025
2026 // in case bleed aura is removed due to e.g. dwarf racial
2028 Remove();
2029
2030 // threshold stacks don't have to be checked here, duration of the trigger is less than Thrash uptime
2031 }
2032
2037};
2038
2039// 1822 - Rake
2041{
2042 bool Validate(SpellInfo const* spellInfo) override
2043 {
2045 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_3 } });
2046 }
2047
2048 bool Load() override
2049 {
2051 return true;
2052 }
2053
2054 void CalculateDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit* /*victim*/, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const
2055 {
2056 if (_wasStealth)
2057 AddPct(pctMod, GetEffectInfo(EFFECT_3).CalcValue(GetCaster()));
2058 }
2059
2068
2074
2075private:
2076 bool _wasStealth = false;
2077};
2078
2079// 1079 - Rip
2081{
2082 bool Load() override
2083 {
2084 Unit* caster = GetCaster();
2085 return caster && caster->GetTypeId() == TYPEID_PLAYER;
2086 }
2087
2088 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& canBeRecalculated)
2089 {
2090 canBeRecalculated = false;
2091
2092 if (Unit* caster = GetCaster())
2093 {
2094 // 0.01 * $AP * cp
2095 int32 cp = caster->GetPower(POWER_COMBO_POINTS);
2096
2097 // Idol of Feral Shadows. Can't be handled as SpellMod due its dependency from CPs
2098 if (AuraEffect const* auraEffIdolOfFeralShadows = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
2099 amount += cp * auraEffIdolOfFeralShadows->GetAmount();
2100 // Idol of Worship. Can't be handled as SpellMod due its dependency from CPs
2101 else if (AuraEffect const* auraEffIdolOfWorship = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
2102 amount += cp * auraEffIdolOfWorship->GetAmount();
2103
2104 amount += CalculatePct(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp);
2105 }
2106 }
2107
2112};
2113
2114// 52610 - Savage Roar
2116{
2118 {
2119 Unit* caster = GetCaster();
2120 if (caster->GetShapeshiftForm() != FORM_CAT_FORM)
2122
2123 return SPELL_CAST_OK;
2124 }
2125
2130};
2131
2157
2158// 202342 - Shooting Stars
2160{
2168
2169 void OnTick(AuraEffect const* aurEff) const
2170 {
2171 Unit* caster = GetTarget();
2172 std::vector<Unit*> moonfires;
2173 std::vector<Unit*> sunfires;
2174 auto work = [&, druid = caster->GetGUID()](Unit* target)
2175 {
2176 if (target->HasAuraEffect(SPELL_DRUID_MOONFIRE_DAMAGE, EFFECT_1, druid))
2177 moonfires.push_back(target);
2178
2179 if (target->HasAuraEffect(SPELL_DRUID_SUNFIRE_DAMAGE, EFFECT_1, druid))
2180 sunfires.push_back(target);
2181 };
2182 Trinity::UnitWorker worker(caster, work);
2183 Cell::VisitAllObjects(caster, worker, 100.0f);
2184
2185 ProcessDoT(aurEff, caster, moonfires);
2186 ProcessDoT(aurEff, caster, sunfires);
2187 }
2188
2189 static void ProcessDoT(AuraEffect const* aurEff, Unit* caster, std::vector<Unit*>& targets)
2190 {
2191 if (targets.empty())
2192 return;
2193
2194 float chance = float(aurEff->GetAmount()) * std::sqrt(float(targets.size()));
2195 float procs;
2196 if (roll_chance(std::modf(chance / 100.0f, &procs) * 100.0f))
2197 procs += 1.0f;
2198
2199 if (procs <= 0.0f)
2200 return;
2201
2202 Trinity::Containers::RandomResize(targets, procs);
2203 for (Unit* target : targets)
2204 {
2206 AuraEffect const* crashingStarTalent = caster->GetAuraEffect(SPELL_DRUID_CRASHING_STAR_TALENT, EFFECT_0);
2207 if (crashingStarTalent && roll_chance(crashingStarTalent->GetAmount()))
2209
2210 caster->CastSpell(target, spellId, CastSpellExtraArgsInit{
2212 });
2213 }
2214 }
2215
2220};
2221
2222// 106839 - Skull Bash
2241
2242// 81269 - Efflorescence (Heal)
2261
2262// 106898 - Stampeding Roar
2264{
2265protected:
2266 bool ToCatForm() const override { return false; }
2267};
2268
2269// 50286 - Starfall (Dummy)
2271{
2272 void FilterTargets(std::list<WorldObject*>& targets)
2273 {
2275 }
2276
2277 void HandleDummy(SpellEffIndex /*effIndex*/)
2278 {
2279 Unit* caster = GetCaster();
2280 // Shapeshifting into an animal form or mounting cancels the effect
2281 if (caster->GetCreatureType() == CREATURE_TYPE_BEAST || caster->IsMounted())
2282 {
2283 if (SpellInfo const* spellInfo = GetTriggeringSpell())
2284 caster->RemoveAurasDueToSpell(spellInfo->Id);
2285 return;
2286 }
2287
2288 // Any effect which causes you to lose control of your character will supress the starfall effect.
2290 return;
2291
2292 caster->CastSpell(GetHitUnit(), uint32(GetEffectValueAsInt()), true);
2293 }
2294
2300};
2301
2302// 202347 - Stellar Flare
2304{
2305 bool Validate(SpellInfo const* /*spellInfo*/) override
2306 {
2308 }
2309
2310 void HandleDispel(DispelInfo* dispelInfo)
2311 {
2312 if (Unit* caster = GetCaster())
2313 caster->CastSpell(dispelInfo->GetDispeller(), SPELL_DRUID_STAR_BURST, true);
2314 }
2315
2320};
2321
2322// 340694 - Sudden Ambush
2323// 384667 - Sudden Ambush
2325{
2326 bool CheckProc(AuraEffect const* aurEff, ProcEventInfo& procInfo)
2327 {
2328 Spell const* procSpell = procInfo.GetProcSpell();
2329 if (!procSpell)
2330 return false;
2331
2333 if (!comboPoints)
2334 return false;
2335
2336 return roll_chance(*comboPoints * aurEff->GetAmount());
2337 }
2338
2343};
2344
2345// 93402 - Sunfire
2358
2359// 61336 - Survival Instincts
2383
2384// 40121 - Swift Flight Form (Passive)
2386{
2387 bool Load() override
2388 {
2389 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2390 }
2391
2392 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
2393 {
2394 if (Player* caster = GetCaster()->ToPlayer())
2395 if (caster->GetSkillValue(SKILL_RIDING) >= 375)
2396 amount = 310;
2397 }
2398
2403};
2404
2405// 28744 - Regrowth
2407{
2408 bool Validate(SpellInfo const* /*spellInfo*/) override
2409 {
2411 }
2412
2413 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2414 {
2416 eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_DRUID_BLESSING_OF_THE_CLAW, aurEff);
2417 }
2418
2423};
2424
2425// 28719 - Healing Touch
2427{
2428 bool Validate(SpellInfo const* /*spellInfo*/) override
2429 {
2431 }
2432
2433 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2434 {
2436 Spell const* spell = eventInfo.GetProcSpell();
2437 if (!spell)
2438 return;
2439
2440 Unit* caster = eventInfo.GetActor();
2442 if (!manaCost)
2443 return;
2444
2445 SpellEffectValue amount = CalculatePct(*manaCost, aurEff->GetAmount());
2446 CastSpellExtraArgs args(aurEff);
2447 args.AddSpellBP0(amount);
2448 caster->CastSpell(nullptr, SPELL_DRUID_EXHILARATE, args);
2449 }
2450
2455};
2456
2457// 37288 - Mana Restore
2458// 37295 - Mana Restore
2460{
2461 bool Validate(SpellInfo const* /*spellInfo*/) override
2462 {
2464 }
2465
2466 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2467 {
2469 eventInfo.GetActor()->CastSpell(nullptr, SPELL_DRUID_INFUSION, aurEff);
2470 }
2471
2476};
2477
2478// 70723 - Item - Druid T10 Balance 4P Bonus
2480{
2481 bool Validate(SpellInfo const* /*spellInfo*/) override
2482 {
2484 && sSpellMgr->AssertSpellInfo(SPELL_DRUID_LANGUISH, DIFFICULTY_NONE)->GetEffect(EFFECT_0).GetPeriodicTickCount() > 0;
2485 }
2486
2487 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2488 {
2490
2491 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
2492 if (!damageInfo || !damageInfo->GetDamage())
2493 return;
2494
2495 Unit* caster = eventInfo.GetActor();
2496 Unit* target = eventInfo.GetActionTarget();
2497
2498 SpellEffectInfo const& spellEffect = sSpellMgr->AssertSpellInfo(SPELL_DRUID_LANGUISH, GetCastDifficulty())->GetEffect(EFFECT_0);
2499 SpellEffectValue amount = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), aurEff->GetAmount());
2500
2501 amount /= spellEffect.GetPeriodicTickCount();
2502
2503 CastSpellExtraArgs args(aurEff);
2504 args.AddSpellMod(SPELLVALUE_BASE_POINT0, amount);
2505 caster->CastSpell(target, SPELL_DRUID_LANGUISH, args);
2506 }
2507
2512};
2513
2514// 70691 - Item T10 Restoration 4P Bonus
2516{
2517 bool Load() override
2518 {
2519 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2520 }
2521
2522 void FilterTargets(std::list<WorldObject*>& targets)
2523 {
2524 if (!GetCaster()->ToPlayer()->GetGroup())
2525 {
2526 targets.clear();
2527 targets.push_back(GetCaster());
2528 }
2529 else
2530 {
2531 targets.remove(GetExplTargetUnit());
2532 std::list<Unit*> tempTargets;
2533 for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
2534 if ((*itr)->GetTypeId() == TYPEID_PLAYER && GetCaster()->IsInRaidWith((*itr)->ToUnit()))
2535 tempTargets.push_back((*itr)->ToUnit());
2536
2537 if (tempTargets.empty())
2538 {
2539 targets.clear();
2541 return;
2542 }
2543
2545 targets.clear();
2546 targets.push_back(target);
2547 }
2548 }
2549
2554};
2555
2556// 70664 - Druid T10 Restoration 4P Bonus (Rejuvenation)
2558{
2559 bool Validate(SpellInfo const* /*spellInfo*/) override
2560 {
2562 }
2563
2564 bool CheckProc(ProcEventInfo& eventInfo)
2565 {
2566 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
2567 if (!spellInfo || spellInfo->Id == SPELL_DRUID_REJUVENATION_T10_PROC)
2568 return false;
2569
2570 HealInfo* healInfo = eventInfo.GetHealInfo();
2571 if (!healInfo || !healInfo->GetHeal())
2572 return false;
2573
2574 Player* caster = eventInfo.GetActor()->ToPlayer();
2575 if (!caster)
2576 return false;
2577
2578 return caster->GetGroup() || caster != eventInfo.GetActionTarget();
2579 }
2580
2581 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2582 {
2584
2585 CastSpellExtraArgs args(aurEff);
2587 eventInfo.GetActor()->CastSpell(nullptr, SPELL_DRUID_REJUVENATION_T10_PROC, args);
2588 }
2589
2595};
2596
2597// 400223 - Thorns of Iron (Damage)
2599{
2601 {
2602 Unit* caster = GetCaster();
2603
2604 int32 noTargets = GetUnitTargetCountForEffect(effIndex);
2605 SpellEffectValue pct = GetTriggeringSpell()->GetEffect(effIndex).CalcValue(caster);
2606 int32 damage = CalculatePct(caster->GetArmor(), pct) / noTargets;
2607
2608 SetHitDamage(damage);
2609 }
2610
2615};
2616
2617// 77758 - Thrash (Bear Form)
2618// 106830 - Thrash (Cat Form)
2645
2646// 192090 - Thrash (Bear Bleed)
2648{
2649 bool Validate(SpellInfo const* /*spellInfo*/) override
2650 {
2651 return ValidateSpellInfo
2652 ({
2655 });
2656 }
2657
2658 void HandlePeriodic(AuraEffect const* /*aurEff*/)
2659 {
2660 Unit* caster = GetCaster();
2661 if (!caster)
2662 return;
2663
2665 caster->CastSpell(caster, SPELL_DRUID_BLOOD_FRENZY_RAGE_GAIN, true);
2666 }
2667
2672};
2673
2674// 1066 - Aquatic Form
2675// 33943 - Flight Form
2676// 40120 - Swift Flight Form
2677// 165961 - Stag Form
2679{
2684
2685 bool Load() override
2686 {
2687 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2688 }
2689
2690 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2691 {
2692 // If it stays 0, it removes Travel Form dummy in AfterRemove.
2693 triggeredSpellId = 0;
2694
2695 // We should only handle aura interrupts.
2696 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_INTERRUPT)
2697 return;
2698
2699 // Check what form is appropriate
2701
2702 // If chosen form is current aura, just don't remove it.
2705 }
2706
2707 void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
2708 {
2710 return;
2711
2712 Player* player = GetTarget()->ToPlayer();
2713
2714 if (triggeredSpellId) // Apply new form
2715 player->CastSpell(player, triggeredSpellId, aurEff);
2716 else // If not set, simply remove Travel Form dummy
2718 }
2719
2725
2726public:
2727 static uint32 GetFormSpellId(Player const* player, Difficulty difficulty, bool requiresOutdoor)
2728 {
2729 // Check what form is appropriate
2730 if (player->HasSpell(SPELL_DRUID_FORM_AQUATIC_PASSIVE) && player->IsInWater()) // Aquatic form
2732
2733 if (!player->IsInCombat() && player->GetSkillValue(SKILL_RIDING) >= 225 && CheckLocationForForm(player, difficulty, requiresOutdoor, SPELL_DRUID_FORM_FLIGHT) == SPELL_CAST_OK) // Flight form
2735
2736 if (!player->IsInWater() && CheckLocationForForm(player, difficulty, requiresOutdoor, SPELL_DRUID_FORM_STAG) == SPELL_CAST_OK) // Stag form
2737 return SPELL_DRUID_FORM_STAG;
2738
2739 return 0;
2740 }
2741
2742private:
2743 static SpellCastResult CheckLocationForForm(Player const* targetPlayer, Difficulty difficulty, bool requireOutdoors, uint32 spell_id)
2744 {
2745 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id, difficulty);
2746
2747 if (requireOutdoors && !targetPlayer->IsOutdoors())
2749
2750 return spellInfo->CheckLocation(targetPlayer->GetMapId(), targetPlayer->GetZoneId(), targetPlayer->GetAreaId(), targetPlayer);
2751 }
2752
2754};
2755
2756// 783 - Travel Form (dummy)
2758{
2763
2765 {
2766 Player* player = GetCaster()->ToPlayer();
2767 if (!player)
2769
2771
2772 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId, GetCastDifficulty());
2773 return spellInfo->CheckLocation(player->GetMapId(), player->GetZoneId(), player->GetAreaId(), player);
2774 }
2775
2780};
2781
2783{
2788
2789 bool Load() override
2790 {
2791 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2792 }
2793
2794 void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
2795 {
2796 Player* player = GetTarget()->ToPlayer();
2797
2798 // Outdoor check already passed - Travel Form (dummy) has SPELL_ATTR0_OUTDOORS_ONLY attribute.
2799 uint32 triggeredSpellId = spell_dru_travel_form::GetFormSpellId(player, GetCastDifficulty(), false);
2800
2801 player->CastSpell(player, triggeredSpellId, aurEff);
2802 }
2803
2804 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2805 {
2806 // No need to check remove mode, it's safe for auras to remove each other in AfterRemove hook.
2811 }
2812
2818};
2819
2820// 252216 - Tiger Dash
2822{
2823protected:
2824 bool ToCatForm() const override { return true; }
2825};
2826
2827// 252216 - Tiger Dash (Aura)
2829{
2830 void HandlePeriodic(AuraEffect const* aurEff)
2831 {
2832 if (AuraEffect* effRunSpeed = GetEffect(EFFECT_0))
2833 {
2834 SpellEffectValue reduction = aurEff->GetAmount();
2835 effRunSpeed->ChangeAmount(effRunSpeed->GetAmount() - reduction);
2836 }
2837 }
2838
2843};
2844
2845// 8921 - Moonfire
2847{
2848 bool Validate(SpellInfo const* /*spellInfo*/) override
2849 {
2851 }
2852
2853 bool Load() override
2854 {
2856 }
2857
2859 {
2860 Unit* caster = GetCaster();
2861 Unit* hitUnit = GetHitUnit();
2862
2863 SpellInfo const* moonfireSpellInfo = sSpellMgr->AssertSpellInfo(SPELL_DRUID_MOONFIRE_DAMAGE, GetCastDifficulty());
2864 float maxRange = sSpellMgr->AssertSpellInfo(SPELL_DRUID_TWIN_MOONS, GetCastDifficulty())->GetEffect(EFFECT_0).CalcValue(caster);
2865
2866 std::list<Unit*> targets;
2867 Trinity::WorldObjectSpellAreaTargetCheck check({ .Max = maxRange }, hitUnit, caster, caster, moonfireSpellInfo, TARGET_CHECK_ENEMY, nullptr, TARGET_OBJECT_TYPE_UNIT);
2868 Trinity::UnitListSearcher searcher(hitUnit, targets, check);
2869 Cell::VisitAllObjects(hitUnit, searcher, maxRange);
2870
2871 if (targets.empty())
2872 return;
2873
2874 targets.remove_if([hitUnit](Unit* target) -> bool
2875 {
2876 return !target || target == hitUnit || target->HasBreakableByDamageCrowdControlAura() || !target->IsInCombat();
2877 });
2878
2879 if (targets.empty())
2880 return;
2881
2882 targets.sort([caster, hitUnit](Unit const* lhs, Unit const* rhs) -> bool
2883 {
2884 Aura* auraA = lhs->GetAura(SPELL_DRUID_MOONFIRE_DAMAGE, caster->GetGUID());
2885 Aura* auraB = rhs->GetAura(SPELL_DRUID_MOONFIRE_DAMAGE, caster->GetGUID());
2886
2887 if (!auraA)
2888 {
2889 if (auraB)
2890 return true;
2891 return hitUnit->GetExactDist(lhs) < hitUnit->GetExactDist(rhs);
2892 }
2893
2894 if (!auraB)
2895 return false;
2896
2897 return auraA->GetDuration() < auraB->GetDuration();
2898 });
2899
2900 caster->CastSpell(targets.front(), SPELL_DRUID_MOONFIRE, CastSpellExtraArgsInit{
2902 .TriggeringSpell = GetSpell()
2903 });
2904 }
2905
2910};
2911
2912// 393763 - Umbral Embrace
2914{
2915 bool Validate(SpellInfo const* /*spellInfo*/) override
2916 {
2918 }
2919
2920 static bool CheckEclipse(AuraScript const&, ProcEventInfo const& eventInfo)
2921 {
2923 }
2924
2929};
2930
2931// 393763 - Umbral Embrace (attached to 190984 - Wrath and 194153 - Starfire)
2933{
2939
2944
2945 void HandleDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit const* /*victim*/, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const
2946 {
2947 if (AuraEffect const* umbralEmbrace = GetCaster()->GetAuraEffect(SPELL_DRUID_UMBRAL_EMBRACE, EFFECT_0))
2948 AddPct(pctMod, umbralEmbrace->GetAmount());
2949 }
2950
2955};
2956
2957// Called by 393763 - Umbral Embrace
2959{
2960 bool Validate(SpellInfo const* /*spellInfo*/) override
2961 {
2963 }
2964
2965 bool Load() override
2966 {
2968 }
2969
2970 void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/) const
2971 {
2972 Unit* target = GetTarget();
2975 .TriggeringAura = aurEff
2976 });
2977 }
2978
2983};
2984
2985// 377210 - Ursoc's Fury
2987{
2988 bool Validate(SpellInfo const* /*spellInfo*/) override
2989 {
2991 }
2992
2993 static void HandleProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
2994 {
2995 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
2996 if (!damageInfo || !damageInfo->GetDamage())
2997 return;
2998
2999 Unit* caster = eventInfo.GetActor();
3000 SpellEffectValue amount = CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount());
3001
3004 .SpellValueOverrides = { { SPELLVALUE_BASE_POINT0, amount } }
3005 });
3006 }
3007
3012};
3013
3014// 48438 - Wild Growth
3016{
3017 bool Validate(SpellInfo const* spellInfo) override
3018 {
3019 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 }, { SPELL_DRUID_TREE_OF_LIFE, EFFECT_2 } });
3020 }
3021
3022 void FilterTargets(std::list<WorldObject*>& targets) const
3023 {
3024 Unit* caster = GetCaster();
3025 int32 maxTargets = GetEffectInfo(EFFECT_1).CalcValueAsInt(caster);
3026
3027 if (AuraEffect const* treeOfLife = caster->GetAuraEffect(SPELL_DRUID_TREE_OF_LIFE, EFFECT_2))
3028 maxTargets += treeOfLife->GetAmountAsInt();
3029
3030 // Note: Wild Growth became a smart heal which prioritizes players and their pets in their group before any unit outside their group.
3031 Trinity::SelectRandomInjuredTargets(targets, maxTargets, true, caster);
3032 }
3033
3038};
3039
3041{
3042 bool Validate(SpellInfo const* /*spellInfo*/) override
3043 {
3045 }
3046
3048 {
3049 Unit* caster = GetCaster();
3050 if (!caster)
3051 return;
3052
3053 // calculate from base damage, not from aurEff->GetAmount() (already modified)
3054 SpellEffectValue damage = aurEff->GetSpellEffectInfo().CalcValue(caster, nullptr, GetUnitOwner());
3055
3056 // Wild Growth = first tick gains a 6% bonus, reduced by 2% each tick
3057 float reduction = 2.f;
3059 reduction -= CalculatePct(reduction, bonus->GetAmount());
3060 reduction *= aurEff->GetTickNumber() - 1;
3061
3062 AddPct(damage, 6.f - reduction);
3063 aurEff->SetAmount(damage);
3064 }
3065
3070};
3071
3072// 145108 - Ysera's Gift
3074{
3075 bool Validate(SpellInfo const* /*spellInfo*/) override
3076 {
3077 return ValidateSpellInfo
3078 ({
3081 });
3082 }
3083
3085 {
3086 SpellEffectValue healAmount = GetTarget()->CountPctFromMaxHealth(aurEff->GetAmount());
3087
3088 if (!GetTarget()->IsFullHealth())
3090 else
3092 }
3093
3098};
3099
3100// 145110 - Ysera's Gift (heal)
3102{
3103 static void SelectTargets(SpellScript const&, std::list<WorldObject*>& targets)
3104 {
3105 Trinity::SelectRandomInjuredTargets(targets, 1, true);
3106 }
3107
3112};
3113
3115{
3211}
@ IN_MILLISECONDS
Definition Common.h:38
Difficulty
Definition DBCEnums.h:935
@ DIFFICULTY_NONE
Definition DBCEnums.h:936
int32_t int32
Definition Define.h:150
uint64_t uint64
Definition Define.h:153
uint32_t uint32
Definition Define.h:154
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
bool roll_chance(float chance, PseudoRandomDistributionState &state)
Definition Random.cpp:131
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition ScriptMgr.h:1381
#define RegisterAreaTriggerAI(ai_name)
Definition ScriptMgr.h:1428
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
Definition ScriptMgr.h:1382
SpellEffIndex
@ EFFECT_3
@ EFFECT_1
@ EFFECT_0
@ EFFECT_4
@ EFFECT_2
@ SPELL_EFFECT_CREATE_AREATRIGGER
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_POWER_BURN
@ SPELL_EFFECT_HEAL
@ SPELL_EFFECT_SUMMON
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ SPELL_EFFECT_APPLY_AURA
@ SPELL_ATTR5_TREAT_AS_AREA_EFFECT
@ TARGET_UNIT_DEST_AREA_ALLY
@ TARGET_UNIT_DEST_AREA_ENEMY
@ TARGET_UNIT_TARGET_ALLY
@ TARGET_UNIT_CASTER_AREA_RAID
@ TARGET_UNIT_TARGET_ENEMY
@ TARGET_UNIT_CASTER
@ CREATURE_TYPE_BEAST
@ BASE_ATTACK
@ POWER_RAGE
@ POWER_ENERGY
@ POWER_COMBO_POINTS
@ POWER_MANA
SpellCastResult
@ SPELL_FAILED_CUSTOM_ERROR
@ SPELL_FAILED_DONT_REPORT
@ SPELL_FAILED_ONLY_SHAPESHIFT
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_FAILED_ONLY_OUTDOORS
@ SPELL_CAST_OK
@ AURA_STATE_BLEED
@ SPELLFAMILY_DRUID
@ SKILL_RIDING
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_EXPIRE
@ AURA_REMOVE_BY_ENEMY_SPELL
@ AURA_REMOVE_BY_INTERRUPT
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_MOD_SHAPESHIFT
@ SPELL_AURA_OBS_MOD_HEALTH
@ SPELL_AURA_ADD_PCT_MODIFIER
@ SPELL_AURA_MOD_INCREASE_SPEED
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED
@ SPELL_AURA_PERIODIC_HEAL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
@ SPELL_AURA_IGNORE_SPELL_COOLDOWN
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_OVERRIDE_CLASS_SCRIPTS
@ SPELL_AURA_MECHANIC_IMMUNITY_MASK
ShapeshiftForm
@ FORM_BEAR_FORM
@ FORM_DIRE_BEAR_FORM
@ FORM_MOONKIN_FORM
@ FORM_TREE_OF_LIFE
@ FORM_CAT_FORM
@ FORM_NONE
@ SPELLVALUE_AURA_STACK
@ SPELLVALUE_DURATION
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
@ TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD
Will ignore Spell and Category cooldowns.
@ TRIGGERED_IGNORE_CAST_IN_PROGRESS
Will not check if a current cast is in progress.
@ TRIGGERED_IGNORE_POWER_COST
Will ignore power and reagent cost.
@ TRIGGERED_IGNORE_GCD
Will ignore GCD.
@ TRIGGERED_DONT_REPORT_CAST_ERROR
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ TRIGGERED_SUPPRESS_CASTER_ANIM
Will not play cast animations on caster.
@ SPELLVALUE_BASE_POINT0
@ TARGET_CHECK_ENEMY
Definition SpellInfo.h:83
@ TARGET_CHECK_ALLY
Definition SpellInfo.h:84
@ TARGET_OBJECT_TYPE_UNIT
Definition SpellInfo.h:68
#define sSpellMgr
Definition SpellMgr.h:812
#define AuraProcFn(F)
#define SpellObjectTargetSelectFn(F, I, N)
#define SpellCheckCastFn(F)
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define AuraEffectCalcAbsorbFn(F, I)
#define AuraEffectCalcAmountFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraCheckEffectProcFn(F, I, N)
#define AuraEffectUpdatePeriodicFn(F, I, N)
#define SpellCalcDamageFn(F)
#define SpellCastFn(F)
#define AuraEffectAbsorbFn(F, I)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckProcFn(F)
#define SpellHitFn(F)
#define AuraEnterLeaveCombatFn(F)
#define AuraDispelFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_STATE_CONTROLLED
Definition Unit.h:315
T AddPct(T &base, U pct)
Definition Util.h:85
T CalculatePct(T base, U pct)
Definition Util.h:72
AreaTrigger *const at
AreaTriggerAI(AreaTrigger *a, uint32 scriptId={}) noexcept
Unit * GetCaster() const
uint32 GetTickNumber() const
SpellEffectInfo const & GetSpellEffectInfo() const
void SetAmount(SpellEffectValue amount)
int32 GetAmountAsInt() const
SpellEffectValue GetAmount() const
HookList< EffectCalcDamageAndHealingHandler > DoEffectCalcDamageAndHealing
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< CheckEffectProcHandler > DoCheckEffectProc
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectAbsorbHandler > AfterEffectAbsorb
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Unit * GetCaster() const
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
HookList< EnterLeaveCombatHandler > OnEnterLeaveCombat
SpellEffectInfo const & GetEffectInfo(SpellEffIndex effIndex) const
AuraEffect * GetEffect(uint8 effIndex) const
HookList< EffectAbsorbHandler > OnEffectAbsorb
Aura * GetAura() const
Unit * GetTarget() const
ObjectGuid GetCasterGUID() const
Difficulty GetCastDifficulty() const
HookList< CheckProcHandler > DoCheckProc
HookList< EffectApplyHandler > OnEffectRemove
HookList< AuraDispelHandler > AfterDispel
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
HookList< AuraProcHandler > OnProc
HookList< EffectApplyHandler > OnEffectApply
ObjectGuid GetCastId() const
Definition SpellAuras.h:186
void SetStackAmount(uint8 num)
int32 GetDuration() const
Definition SpellAuras.h:222
AuraEffect * GetEffect(uint32 index) const
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, bool resetPeriodicTimer=true)
uint8 GetStackAmount() const
Definition SpellAuras.h:238
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
TypeID GetTypeId() const
Definition BaseEntity.h:166
Unit * GetAttacker() const
Definition Unit.h:460
uint32 GetDamage() const
Definition Unit.h:466
WorldObject * GetDispeller() const
Definition Unit.h:410
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
uint32 GetHeal() const
Definition Unit.h:496
Player * ToPlayer()
Definition Object.h:126
Unit * ToUnit()
Definition Object.h:116
uint16 GetSkillValue(uint32 skill) const
Definition Player.cpp:5920
bool HasSpell(uint32 spell) const override
Definition Player.cpp:3626
Group * GetGroup(Optional< uint8 > partyIndex)
Definition Player.h:2781
ChrSpecializationEntry const * GetPrimarySpecializationEntry() const
Definition Player.cpp:30736
HealInfo * GetHealInfo() const
Definition Unit.h:525
Unit * GetActionTarget() const
Definition Unit.h:514
Spell const * GetProcSpell() const
Definition Unit.h:527
SpellInfo const * GetSpellInfo() const
Definition Unit.cpp:281
DamageInfo * GetDamageInfo() const
Definition Unit.h:524
Unit * GetActor() const
Definition Unit.h:513
SpellEffectValue CalcValue(WorldObject const *caster=nullptr, SpellEffectValue const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
uint32 GetPeriodicTickCount() const
bool IsAura() const
int32 CalcValueAsInt(WorldObject const *caster=nullptr, SpellEffectValue const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
void ResetCooldown(uint32 spellId, bool update=false)
SpellRange GetMinMaxRange(bool positive=false, WorldObject const *caster=nullptr, Spell *spell=nullptr) const
uint32 const Id
Definition SpellInfo.h:328
SpellCastResult CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player const *player=nullptr) const
flag128 SpellFamilyFlags
Definition SpellInfo.h:415
bool HasAttribute(SpellAttr0 attribute) const
Definition SpellInfo.h:456
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:590
uint32 m_scriptSpellId
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
HookList< DamageAndHealingCalcHandler > CalcDamage
HookList< CastHandler > AfterCast
HookList< CheckCastHandler > OnCheckCast
int32 GetHitDamage() const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
void SetEffectValue(SpellEffectValue value)
SpellEffectValue GetEffectValue() const
int32 GetEffectValueAsInt() const
HookList< HitHandler > OnHit
int64 GetUnitTargetCountForEffect(SpellEffIndex effect) const
SpellInfo const * GetTriggeringSpell() const
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
HookList< CastHandler > BeforeCast
Spell * GetSpell() const
void FinishCast(SpellCastResult result, int32 *param1=nullptr, int32 *param2=nullptr)
HookList< EffectHandler > OnEffectLaunchTarget
Difficulty GetCastDifficulty() const
void SetHitDamage(int32 damage)
HookList< EffectHandler > OnEffectLaunch
Unit * GetExplTargetUnit() const
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition Spell.h:277
SpellInfo const * GetSpellInfo() const
Definition Spell.h:702
Optional< int32 > GetPowerTypeCostAmount(Powers power) const
Definition Spell.cpp:8093
std::vector< T > & GetExecuteLogEffectTargets(SpellEffects effect, Optional< std::vector< T > > SpellLogEffect::*member)
Definition Spell.h:572
bool IsTriggered() const
Definition Spell.cpp:8287
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & Update()
Update the scheduler to the current time.
Definition Unit.h:647
void RemoveAreaTrigger(uint32 spellId)
Definition Unit.cpp:5504
void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3769
uint64 CountPctFromMaxHealth(float pct) const
Definition Unit.h:809
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3846
ShapeshiftForm GetShapeshiftForm() const
Definition Unit.h:1527
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition Unit.cpp:4622
int32 GetMaxPower(Powers power) const
Definition Unit.cpp:10105
bool HasStealthAura() const
Definition Unit.h:1103
virtual bool HasSpell(uint32) const
Definition Unit.h:1099
uint32 GetCreatureType() const
Definition Unit.cpp:9478
uint64 GetMaxHealth() const
Definition Unit.h:801
bool HasAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid caster=ObjectGuid::Empty) const
Definition Unit.cpp:4792
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4718
bool IsInWater() const
Definition Unit.cpp:3349
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
Definition Unit.cpp:6165
uint32 GetArmor() const
Definition Unit.h:786
bool IsMounted() const
Definition Unit.h:927
int32 GetPower(Powers power) const
Definition Unit.cpp:10096
float GetTotalAttackPowerValue(WeaponAttackType attType, bool includeWeapon=true) const
Definition Unit.cpp:9975
bool HealthBelowPct(float pct) const
Definition Unit.h:804
bool HasUnitState(const uint32 f) const
Definition Unit.h:755
bool IsInRaidWith(Unit const *unit) const
Definition Unit.cpp:12272
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4822
SpellHistory * GetSpellHistory()
Definition Unit.h:1521
bool HasBreakableByDamageCrowdControlAura(Unit const *excludeCasterChannel=nullptr) const
Definition Unit.cpp:783
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3992
bool IsInCombat() const
Definition Unit.h:1073
constexpr uint32 GetMapId() const
Definition Position.h:216
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2222
Unit * GetOwner() const
Definition Object.cpp:1603
bool IsOutdoors() const
Definition Object.h:336
EventProcessor m_Events
Definition Object.h:561
uint32 GetAreaId() const
Definition Object.h:333
uint32 GetZoneId() const
Definition Object.h:332
void HandleOnApplyOrReapply(AuraEffect const *aurEff, AuraEffectHandleModes mode) const
void HandleOnRemove(AuraEffect const *, AuraEffectHandleModes) const
bool Validate(SpellInfo const *) override
void Register() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo const &eventInfo)
void Register() override
bool Validate(SpellInfo const *) override
void HandlePeriodic(AuraEffect const *)
ShapeshiftForm GetShapeshiftForm() const
uint32 GetShapeshiftFormSpell() const
virtual bool ToCatForm() const =0
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *spellInfo) override
void Register() override
bool ToCatForm() const override
void HandleAbsorb(AuraEffect *, DamageInfo &, uint32 &)
bool Validate(SpellInfo const *) override
void Register() override
void HandleAfterAbsorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &absorbAmount)
void HandleProc(AuraEffect *, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void Register() override
void HandleAfterRemove(AuraEffect const *, AuraEffectHandleModes)
void Register() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleOnTick(AuraEffect const *aurEff) const
bool Validate(SpellInfo const *) override
void Register() override
void Register() override
void CalculateAmount(AuraEffect const *, SpellEffectValue &amount, bool &)
bool CheckEffectProc(AuraEffect const *, ProcEventInfo const &) const
void HandleProc(AuraEffect const *aurEff, ProcEventInfo const &) const
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void Register() override
void HandleProc(AuraEffect *, ProcEventInfo &)
bool Validate(SpellInfo const *) override
void Register() override
void HandleRemoved(AuraEffect const *, AuraEffectHandleModes)
static void SetSpellCount(Unit *unitOwner, uint32 spellId, uint32 amount)
void HandleApply(AuraEffect const *aurEff, AuraEffectHandleModes)
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
void OnOwnerOutOfCombat(bool isNowInCombat)
void HandleProc(ProcEventInfo &eventInfo)
void OnSpellCast(uint32 cntSpellId, uint32 otherCntSpellId, uint32 eclipseAuraSpellId)
bool Validate(SpellInfo const *) override
void Register() override
void Register() override
void Tick(AuraEffect const *)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandlePeriodicDummy(AuraEffect const *) const
void FilterTargets(std::list< WorldObject * > &targets) const
void Register() override
void RemoveOldAreaTrigger(SpellEffIndex) const
void HandlePeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
void HandleProc(ProcEventInfo const &eventInfo)
void HandleApply(AuraEffect const *, AuraEffectHandleModes) const
bool Validate(SpellInfo const *) override
void HandleRemove(AuraEffect const *, AuraEffectHandleModes) const
bool Validate(SpellInfo const *) override
void HandleEffect(SpellEffIndex) const
void FilterTargets(std::list< WorldObject * > &targets) const
void HandleProc(AuraEffect const *aurEff, ProcEventInfo const &eventInfo) const
bool Validate(SpellInfo const *spellInfo) override
bool CheckProc(AuraEffect const *, ProcEventInfo const &) const
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleCuriousBramblepatch(WorldObject *&target)
bool Validate(SpellInfo const *) override
void HandleCuriousBramblepatchAOE(std::list< WorldObject * > &targets)
void HandleLaunchTarget(SpellEffIndex)
void HandleHitTargetBurn(SpellEffIndex)
void HandleHitTargetDmg(SpellEffIndex)
bool Validate(SpellInfo const *) override
void PreventEffect(WorldObject *&target)
bool Validate(SpellInfo const *spellInfo) override
void FilterTargets(std::list< WorldObject * > &targets)
void Register() override
void HandlePeriodic(AuraEffect const *)
bool Validate(SpellInfo const *spellInfo) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void CalculateDamage(SpellEffectInfo const &, Unit *, int32 &, int32 &, float &pctMod) const
bool Validate(SpellInfo const *) override
static bool CheckEffectProc(AuraScript const &, AuraEffect const *aurEff, ProcEventInfo &)
bool Validate(SpellInfo const *) override
static void HandleProc(AuraScript const &, AuraEffect const *, ProcEventInfo const &eventInfo)
void PickRejuvenationVariant(WorldObject *&target) const
void Register() override
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool CheckEffectProc(AuraEffect const *aurEff, ProcEventInfo &)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *, ProcEventInfo &)
void Register() override
void CalculateAmount(AuraEffect const *, SpellEffectValue &amount, bool &canBeRecalculated)
bool Validate(SpellInfo const *) override
bool ToCatForm() const override
bool Validate(SpellInfo const *) override
void AfterApply(AuraEffect const *, AuraEffectHandleModes) const
void OnRemove(AuraEffect const *, AuraEffectHandleModes) const
bool Validate(SpellInfo const *) override
void Register() override
bool Validate(SpellInfo const *spellInfo) override
void Register() override
void PreventEffect(WorldObject *&target) const
SpellCastResult CheckCast()
void Register() override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void Register() override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
static bool CheckProc(AuraScript const &, ProcEventInfo const &procEvent)
void Register() override
static bool CheckProc(AuraScript const &, AuraEffect const *aurEff, ProcEventInfo const &)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *, ProcEventInfo const &eventInfo) const
void HandleEffectHit(SpellEffIndex)
void Register() override
bool Validate(SpellInfo const *) override
void CalculateDamage(SpellEffectInfo const &, Unit *, int32 &, int32 &, float &pctMod)
bool Validate(SpellInfo const *spellInfo) override
void CalculateDamage(SpellEffectInfo const &, Unit *victim, int32 &, int32 &, float &pctMod) const
bool Load() override
void Register() override
static void CalculateAmount(AuraScript const &, AuraEffect const *, Unit const *victim, int32 &baseAbsorb, int32 &, float &)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void Register() override
void HandleOnHit(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleEffectProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleRemoved(AuraEffect const *, AuraEffectHandleModes) const
void OnOwnerInCombat(bool isNowInCombat) const
bool Validate(SpellInfo const *spellInfo) override
static void Trigger(Unit *caster, AuraEffect const *naturesGraceEffect)
Optional< uint32 > _newOverrideSpell
bool Validate(SpellInfo const *) override
spell_dru_new_moon(Optional< uint32 > newOverrideSpell, Optional< uint32 > removeOverrideSpell)
void Register() override
void OverrideMoon() const
Optional< uint32 > _removeOverrideSpell
bool CheckProc(AuraEffect const *aurEff, ProcEventInfo const &) const
void HandleProc(AuraEffect *, ProcEventInfo &)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
static void HandleProc(AuraScript const &, AuraEffect const *aurEff, ProcEventInfo const &eventInfo)
static bool CheckProc(AuraScript const &, AuraEffect const *, ProcEventInfo const &eventInfo)
bool ToCatForm() const override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *spellInfo) override
void Register() override
void HandleEffectHit(SpellEffIndex)
void CalculateDamage(SpellEffectInfo const &, Unit *, int32 &, int32 &, float &pctMod) const
bool Load() override
void Register() override
void HandleEffectHit(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
void Register() override
bool Load() override
void CalculateAmount(AuraEffect const *, SpellEffectValue &amount, bool &canBeRecalculated)
void AfterApply(AuraEffect const *aurEff, AuraEffectHandleModes)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void Register() override
SpellCastResult CheckCast()
bool Validate(SpellInfo const *) override
static void ProcessDoT(AuraEffect const *aurEff, Unit *caster, std::vector< Unit * > &targets)
void OnTick(AuraEffect const *aurEff) const
void Register() override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleOnHit(SpellEffIndex) const
bool ToCatForm() const override
void HandleDummy(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void HandleDispel(DispelInfo *dispelInfo)
bool CheckProc(AuraEffect const *aurEff, ProcEventInfo &procInfo)
void HandleOnHit(SpellEffIndex)
void Register() override
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void CalculateAmount(AuraEffect const *, SpellEffectValue &amount, bool &)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
void FilterTargets(std::list< WorldObject * > &targets)
void Register() override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void Register() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void Register() override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void HandleEffectHit(SpellEffIndex effIndex)
void HandlePeriodic(AuraEffect const *)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleOnHitTarget(SpellEffIndex)
void Register() override
void HandlePeriodic(AuraEffect const *aurEff)
bool ToCatForm() const override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void OnApply(AuraEffect const *aurEff, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
static SpellCastResult CheckLocationForForm(Player const *targetPlayer, Difficulty difficulty, bool requireOutdoors, uint32 spell_id)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
static uint32 GetFormSpellId(Player const *player, Difficulty difficulty, bool requiresOutdoor)
void Register() override
void AfterRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleEffectHit(SpellEffIndex)
void HandleDamage(SpellEffectInfo const &, Unit const *, int32 &, int32 &, float &pctMod) const
bool Validate(SpellInfo const *) override
static bool CheckEclipse(AuraScript const &, ProcEventInfo const &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo const &) const
bool Validate(SpellInfo const *) override
static void HandleProc(AuraScript const &, AuraEffect const *aurEff, ProcEventInfo const &eventInfo)
void Register() override
bool Validate(SpellInfo const *) override
void HandleTickUpdate(AuraEffect *aurEff)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *spellInfo) override
void FilterTargets(std::list< WorldObject * > &targets) const
void Register() override
static void SelectTargets(SpellScript const &, std::list< WorldObject * > &targets)
void Register() override
bool Validate(SpellInfo const *) override
void HandleEffectPeriodic(AuraEffect const *aurEff)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
Definition Containers.h:110
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:9516
void AddSC_druid_spell_scripts()
DruidSpells
@ SPELL_DRUID_SPRING_BLOSSOMS
@ SPELL_DRUID_STAR_BURST
@ SPELL_DRUID_THRASH_CAT_BLEED
@ SPELL_DRUID_ELUNES_FAVORED
@ SPELL_DRUID_ASTRAL_COMMUNION_ENERGIZE
@ SPELL_DRUID_GUARDIAN_OF_ELUNE_AURA
@ SPELL_DRUID_BRAMBLES_REFLECT
@ SPELL_DRUID_SHOOTING_STARS
@ SPELL_DRUID_BLESSING_OF_CENARIUS
@ SPELL_DRUID_CULTIVATION_HEAL
@ SPELL_DRUID_BLESSING_OF_ELUNE
@ SPELL_DRUID_UMBRAL_EMBRACE
@ SPELL_DRUID_GLYPH_OF_STARS_VISUAL
@ SPELL_DRUID_TWIN_MOONS
@ SPELL_DRUID_MASS_ENTANGLEMENT
@ SPELL_DRUID_FORM_AQUATIC_PASSIVE
@ SPELL_DRUID_BLESSING_OF_THE_CLAW
@ SPELL_DRUID_BLOOD_FRENZY_RAGE_GAIN
@ SPELL_DRUID_POWER_OF_THE_ARCHDRUID
@ SPELL_DRUID_MANGLE
@ SPELL_DRUID_ECLIPSE_VISUAL_LUNAR
@ SPELL_DRUID_BLESSING_OF_REMULOS
@ SPELL_DRUID_EFFLORESCENCE_HEAL
@ SPELL_DRUID_FORMS_TRINKET_BEAR
@ SPELL_DRUID_SUNFIRE_DAMAGE
@ SPELL_DRUID_UMBRAL_INSPIRATION_TALENT
@ SPELL_DRUID_INCARNATION_TREE_OF_LIFE
@ SPELL_DRUID_MOONFIRE_DAMAGE
@ SPELL_DRUID_EARTHWARDEN_AURA
@ SPELL_DRUID_URSOCS_FURY_SHIELD
@ SPELL_DRUID_GORE_PROC
@ SPELL_DRUID_DREAM_OF_CENARIUS
@ SPELL_DRUID_EMBRACE_OF_THE_DREAM_EFFECT
@ SPELL_DRUID_ECLIPSE_VISUAL_SOLAR
@ SPELL_DRUID_THRASH_PULVERIZE_TRIGGER
@ SPELL_DRUID_FORMS_TRINKET_CAT
@ SPELL_DRUID_ELUNES_FAVORED_HEAL
@ SPELL_DRUID_ECLIPSE_LUNAR_SPELL_CNT
@ SPELL_DRUID_CULTIVATION
@ SPELL_DRUID_CRASHING_STAR_DAMAGE
@ SPELL_DRUID_EXHILARATE
@ SPELL_DRUID_REJUVENATION_T10_PROC
@ SPELL_DRUID_FORM_AQUATIC
@ SPELL_DRUID_RED_MOON
@ SPELL_DRUID_MOONFIRE
@ SPELL_DRUID_PULVERIZE
@ SPELL_DRUID_MANGLE_TALENT
@ SPELL_DRUID_MATTED_FUR
@ SPELL_DRUID_INCARNATION
@ SPELL_DRUID_BALANCE_T10_BONUS_PROC
@ SPELL_DRUID_PROWL
@ SPELL_DRUID_LUNAR_WRATH
@ SPELL_DRUID_ECLIPSE_LUNAR_AURA
@ SPELL_DRUID_BEAR_FORM
@ SPELL_DRUID_THRASH_CAT
@ SPELL_DRUID_REGROWTH
@ SPELL_DRUID_LUNAR_BEAM_DAMAGE
@ SPELL_DRUID_SHOOTING_STARS_DAMAGE
@ SPELL_DRUID_NEW_MOON_OVERRIDE
@ SPELL_DRUID_CRASHING_STAR_TALENT
@ SPELL_DRUID_LUNAR_BEAM_HEAL
@ SPELL_DRUID_THRASH_BEAR_BLEED
@ SPELL_DRUID_GROWL
@ SPELL_DRUID_RAKE_STUN
@ SPELL_DRUID_SAVAGE_ROAR
@ SPELL_DRUID_LIFEBLOOM_FINAL_HEAL
@ SPELL_DRUID_FORM_FLIGHT
@ SPELL_DRUID_UMBRAL_INSPIRATION_AURA
@ SPELL_DRUID_BRISTLING_FUR_GAIN_RAGE
@ SPELL_DRUID_REJUVENATION
@ SPELL_DRUID_BRAMBLES_PASSIVE
@ SPELL_DRUID_TWIN_MOONFIRE
@ SPELL_DRUID_HALF_MOON
@ SPELL_DRUID_REJUVENATION_GERMINATION
@ SPELL_DRUID_BRAMBLES_DAMAGE_AURA
@ SPELL_DRUID_YSERAS_GIFT_HEAL_PARTY
@ SPELL_DRUID_DREAMSTATE
@ SPELL_DRUID_SURVIVAL_INSTINCTS
@ SPELL_DRUID_HALF_MOON_OVERRIDE
@ SPELL_DRUID_GLYPH_OF_STARS
@ SPELL_DRUID_ABUNDANCE_EFFECT
@ SPELL_DRUID_ELUNES_FAVORED_PROC
@ SPELL_DRUID_YSERAS_GIFT_HEAL_SELF
@ SPELL_DRUID_THRASH_BEAR
@ SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE
@ SPELL_DRUID_IDOL_OF_FERAL_SHADOWS
@ SPELL_DRUID_INNER_PEACE
@ SPELL_DRUID_BLOOD_FRENZY_AURA
@ SPELL_DRUID_INFUSION
@ SPELL_DRUID_IDOL_OF_WORSHIP
@ SPELL_DRUID_FORM_STAG
@ SPELL_DRUID_MOONLESS_NIGHT
@ SPELL_DRUID_FORMS_TRINKET_NONE
@ SPELL_DRUID_INNERVATE_RANK_2
@ SPELL_DRUID_GERMINATION
@ SPELL_DRUID_FORMS_TRINKET_MOONKIN
@ SPELL_DRUID_DREAM_OF_CENARIUS_COOLDOWN
@ SPELL_DRUID_NATURES_GRACE_TALENT
@ SPELL_DRUID_LUNAR_INSPIRATION_OVERRIDE
@ SPELL_DRUID_INNERVATE
@ SPELL_DRUID_EFFLORESCENCE_AURA
@ SPELL_DRUID_FORM_SWIFT_FLIGHT
@ SPELL_DRUID_SKULL_BASH_CHARGE
@ SPELL_DRUID_BALANCE_T10_BONUS
@ SPELL_DRUID_ECLIPSE_DUMMY
@ SPELL_DRUID_ECLIPSE_SOLAR_AURA
@ SPELL_DRUID_SKULL_BASH_INTERRUPT
@ SPELL_DRUID_FORMS_TRINKET_TREE
@ SPELL_DRUID_GALACTIC_GUARDIAN_AURA
@ SPELL_DRUID_FLOWER_WALK
@ SPELL_DRUID_MAIM_STUN
@ SPELL_DRUID_NEW_MOON
@ SPELL_DRUID_MOONLESS_NIGHT_DAMAGE
@ SPELL_DRUID_CURIOUS_BRAMBLEPATCH
@ SPELL_DRUID_FLOWER_WALK_HEAL
@ SPELL_DRUID_LANGUISH
@ SPELL_DRUID_TREE_OF_LIFE
@ SPELL_DRUID_BARKSKIN
@ SPELL_DRUID_INCARNATION_KING_OF_THE_JUNGLE
@ SPELL_DRUID_SPRING_BLOSSOMS_HEAL
@ SPELL_DRUID_ECLIPSE_SOLAR_SPELL_CNT
@ SPELL_DRUID_ENTANGLING_ROOTS
@ SPELL_DRUID_ECLIPSE_OOC
@ SPELL_DRUID_ASTRAL_COMMUNION_TALENT
@ SPELL_DRUID_ABUNDANCE
@ SPELL_DRUID_EMBRACE_OF_THE_DREAM_HEAL
@ SPELL_DRUID_FULL_MOON
@ SPELL_DRUID_CAT_FORM
@ SPELL_DRUID_RESTORATION_T10_2P_BONUS
@ SPELL_DRUID_TRAVEL_FORM
std::vector< SpellValueOverride > SpellValueOverrides
TriggerCastFlags TriggerFlags
Spell const * TriggeringSpell
CastSpellExtraArgs & SetTriggeringSpell(Spell const *triggeringSpell)
Definition Spell.cpp:9646
CastSpellExtraArgs & SetTriggerFlags(TriggerCastFlags flag)
CastSpellExtraArgs & AddSpellBP0(SpellEffectValue val)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
CastSpellExtraArgs & SetTriggeringAura(AuraEffect const *triggeringAura)
static void VisitAllObjects(WorldObject const *obj, T &visitor, float radius)
Definition CellImpl.h:160
ChrSpecializationRole GetRole() const
float GetExactDist(float x, float y, float z) const
Definition Position.h:129
Optional< std::vector< SpellLogEffectGenericVictimParams > > GenericVictimTargets
Definition Spell.h:234
void OnUpdate(uint32 diff) override
TaskScheduler _scheduler
void OnCreate(Spell const *) override