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 bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) const
252 {
253 return eventInfo.GetProcTarget() != nullptr;
254 }
255
256 void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
257 {
259
260 SpellEffectInfo const& astralSmolderDmg = sSpellMgr->AssertSpellInfo(SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE, GetCastDifficulty())->GetEffect(EFFECT_0);
261 SpellEffectValue pct = aurEff->GetAmount();
262
263 SpellEffectValue amount = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), pct) / astralSmolderDmg.GetPeriodicTickCount();
264
265 CastSpellExtraArgs args(aurEff);
268 }
269
275};
276
278{
279protected:
280 bool Validate(SpellInfo const* /*spellInfo*/) override
281 {
283 }
284
286 {
287 // Change into cat form
290 }
291
296
297 virtual bool ToCatForm() const = 0;
298
301};
302
303// 22812 - Barkskin
305{
306 bool Validate(SpellInfo const* /*spellInfo*/) override
307 {
309 }
310
311 void HandlePeriodic(AuraEffect const* /*aurEff*/)
312 {
313 Unit* target = GetTarget();
315 target->CastSpell(target, SPELL_DRUID_BRAMBLES_DAMAGE_AURA, true);
316 }
317
322};
323
324// 50334 - Berserk
326{
327 bool Validate(SpellInfo const* spellInfo) override
328 {
330 return false;
331
333 }
334
341
347
348protected:
349 bool ToCatForm() const override { return false; }
350};
351
352// 203953 - Brambles - SPELL_DRUID_BRAMBLES_PASSIVE
354{
355 bool Validate(SpellInfo const* /*spellInfo*/) override
356 {
358 }
359
360 void HandleAbsorb(AuraEffect* /*aurEff*/, DamageInfo& /*dmgInfo*/, uint32& /*absorbAmount*/)
361 {
362 // Prevent Removal
364 }
365
366 void HandleAfterAbsorb(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32& absorbAmount)
367 {
368 // reflect back damage to the attacker
369 Unit* target = GetTarget();
370 if (Unit* attacker = dmgInfo.GetAttacker())
372 }
373
379};
380
381// 155835 - Bristling Fur
383{
384 bool Validate(SpellInfo const* /*spellInfo*/) override
385 {
387 }
388
389 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
390 {
391 // BristlingFurRage = 100 * Damage / MaxHealth.
392 if (DamageInfo* damageInfo = eventInfo.GetDamageInfo())
393 {
394 Unit* target = GetTarget();
395 uint32 rage = target->GetMaxPower(POWER_RAGE) * (float)damageInfo->GetDamage() / (float)target->GetMaxHealth();
396 if (rage > 0)
398 }
399 }
400
405};
406
407// 768 - CatForm - SPELL_DRUID_CAT_FORM
425
426// 102560 - Incarnation: Chosen of Elune
427// 194223 - Celestial Alignment
428// 383410 - Celestial Alignment
429// 390414 - Incarnation: Chosen of Elune
461
462// 774 - Rejuvenation
463// 155777 - Rejuventation (Germination)
465{
466 bool Validate(SpellInfo const* /*spellInfo*/) override
467 {
470 }
471
472 void HandleOnTick(AuraEffect const* aurEff) const
473 {
474 Unit* caster = GetCaster();
475 if (!caster)
476 return;
477
478 Unit* target = GetTarget();
479 if (AuraEffect const* cultivationEffect = caster->GetAuraEffect(SPELL_DRUID_CULTIVATION, EFFECT_0))
480 if (target->HealthBelowPct(cultivationEffect->GetAmount()))
481 caster->CastSpell(target, SPELL_DRUID_CULTIVATION_HEAL, CastSpellExtraArgs().SetTriggeringAura(aurEff));
482 }
483
488};
489
490// 1850 - Dash
492{
493 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
494 {
495 // do not set speed if not in cat form
496 if (GetUnitOwner()->GetShapeshiftForm() != FORM_CAT_FORM)
497 amount = 0;
498 }
499
504};
505
506// 372119 - Dream of Cenarius (Guardian)
508{
509 bool Validate(SpellInfo const* /*spellInfo*/) override
510 {
512 }
513
514 bool CheckEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& /*eventInfo*/) const
515 {
517 return false;
518
519 return roll_chance(GetUnitOwner()->GetUnitCriticalChanceDone(BASE_ATTACK));
520 }
521
522 void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& /*procInfo*/) const
523 {
524 Unit* target = GetTarget();
526 args.SetTriggeringAura(aurEff);
528
529 target->CastSpell(target, SPELL_DRUID_DREAM_OF_CENARIUS, args);
531 }
532
538};
539
540// 203974 - Earthwarden
542{
543 bool Validate(SpellInfo const* /*spellInfo*/) override
544 {
546 }
547
548 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
549 {
550 Unit* target = GetTarget();
551 target->CastSpell(target, SPELL_DRUID_EARTHWARDEN_AURA, true);
552 }
553
558};
559
561{
562public:
563 static void SetSpellCount(Unit* unitOwner, uint32 spellId, uint32 amount)
564 {
565 Aura* aura = unitOwner->GetAura(spellId);
566 if (!aura)
567 unitOwner->CastSpell(unitOwner, spellId, CastSpellExtraArgs(TRIGGERED_FULL_MASK).AddSpellMod(SPELLVALUE_AURA_STACK, amount));
568 else
569 aura->SetStackAmount(amount);
570 }
571};
572
573// 48517 Eclipse (Solar) + 48518 Eclipse (Lunar)
596
597// 79577 - Eclipse - SPELL_DRUID_ECLIPSE_DUMMY
599{
616
629
630 void HandleProc(ProcEventInfo& eventInfo)
631 {
632 if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
633 {
634 if (spellInfo->SpellFamilyFlags & flag128(0x4, 0x0, 0x0, 0x0)) // Starfire
636 else if (spellInfo->SpellFamilyFlags & flag128(0x1, 0x0, 0x0, 0x0)) // Wrath
638 }
639 }
640
641 void HandleApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
642 {
643 // counters are applied with a delay
645 }
646
652
653 void OnOwnerOutOfCombat(bool isNowInCombat)
654 {
655 if (!isNowInCombat)
657 }
658
666
667private:
668 void OnSpellCast(uint32 cntSpellId, uint32 otherCntSpellId, uint32 eclipseAuraSpellId)
669 {
670 Unit* target = GetTarget();
671 if (Aura* aura = target->GetAura(cntSpellId))
672 {
673 uint32 remaining = aura->GetStackAmount();
674 if (remaining == 0)
675 return;
676
677 if (remaining > 1)
678 aura->SetStackAmount(remaining - 1);
679 else
680 {
681 // cast eclipse
682 target->CastSpell(target, eclipseAuraSpellId, TRIGGERED_FULL_MASK);
683
686
687 // Remove stacks from other one as well
688 // reset remaining power on other spellId
689 target->RemoveAura(cntSpellId);
690 target->RemoveAura(otherCntSpellId);
691 }
692 }
693 }
694};
695
696// 329910 - Eclipse out of combat - SPELL_DRUID_ECLIPSE_OOC
698{
703
704 void Tick(AuraEffect const* /*aurEff*/)
705 {
706 Unit* owner = GetTarget();
707 AuraEffect const* auraEffDummy = owner->GetAuraEffect(SPELL_DRUID_ECLIPSE_DUMMY, EFFECT_0);
708 if (!auraEffDummy)
709 return;
710
712 {
713 // Restore 2 stacks to each spell when out of combat
716 }
717 }
718
723};
724
725// 145205 - Efflorescence
727{
728 void RemoveOldAreaTrigger(SpellEffIndex /*effIndex*/) const
729 {
730 // if caster has any Efflorescence areatrigger, we remove it.
732 }
733
741
747};
748
749// 81262 - Efflorescence (Dummy)
751{
752 bool Validate(SpellInfo const* /*spellInfo*/) override
753 {
755 }
756
757 void HandlePeriodicDummy(AuraEffect const* /*aurEff*/) const
758 {
759 Unit* target = GetTarget();
760 Unit* summoner = target->GetOwner();
761 if (!summoner)
762 return;
763
765 }
766
771};
772
773// 81269 - Efflorescence (Heal)
786
787// 370586 - Elune's Favored (attached to 5487 - Bear Form)
815
816// 370588 - Elune's Favored (Proc)
818{
819 bool Validate(SpellInfo const* /*spellInfo*/) override
820 {
823 }
824
825 void HandleProc(ProcEventInfo const& eventInfo)
826 {
827 _arcaneDamage += eventInfo.GetDamageInfo()->GetDamage();
828 }
829
830 void HandlePeriodic(AuraEffect const* aurEff)
831 {
832 Unit* caster = GetTarget();
833 if (!_arcaneDamage)
834 return;
835
836 AuraEffect const* elunesFavored = caster->GetAuraEffect(SPELL_DRUID_ELUNES_FAVORED, EFFECT_0);
837 if (!elunesFavored)
838 return;
839
840 SpellEffectValue heal = CalculatePct(_arcaneDamage, elunesFavored->GetAmount());
841
844 .TriggeringAura = aurEff,
845 .SpellValueOverrides = { { SPELLVALUE_BASE_POINT0, heal } }
846 });
847
848 _arcaneDamage = 0;
849 }
850
856
858};
859
860// 392124 - Embrace of the Dream
862{
863 bool Validate(SpellInfo const* spellInfo) override
864 {
866 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
867 }
868
869 bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& /*eventInfo*/) const
870 {
871 return roll_chance(GetEffectInfo(EFFECT_2).CalcValue(GetCaster()));
872 }
873
874 void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo) const
875 {
878 .SetTriggeringAura(aurEff)
879 .SetTriggeringSpell(eventInfo.GetProcSpell()));
880 }
881
887};
888
889// 392146 - Embrace of the Dream (Selector)
891{
902
903 void FilterTargets(std::list<WorldObject*>& targets) const
904 {
905 targets.remove_if([&](WorldObject const* target)
906 {
907 Unit const* unitTarget = target->ToUnit();
908 return !unitTarget || !unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, flag128(0x50, 0, 0, 0), GetCaster()->GetGUID());
909 });
910 }
911
918
924};
925
926// 339 - Entangling Roots
927// 102359 - Mass Entanglement
954
956{
957 bool Validate(SpellInfo const* /*spellInfo*/) override
958 {
960 }
961
962 bool CheckProc(ProcEventInfo& eventInfo)
963 {
964 if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
965 {
966 // dont subtract dmg caused by roots from dmg required to break root
967 if (spellInfo->Id == SPELL_DRUID_ENTANGLING_ROOTS || spellInfo->Id == SPELL_DRUID_MASS_ENTANGLEMENT)
968 return false;
969 }
970 return true;
971 }
972
977};
978
979// 22568 - Ferocious Bite
981{
982 bool Validate(SpellInfo const* /*spellInfo*/) override
983 {
985 }
986
988 {
990 SetEffectValue(newValue);
991 }
992
994 {
995 int32 newValue = int32(float(GetHitDamage()) * (1.0f + _damageMultiplier));
996 SetHitDamage(newValue);
997 }
998
1000 {
1001 Unit* caster = GetCaster();
1002
1003 SpellEffectValue maxExtraConsumedPower = GetEffectValue();
1004
1006 {
1007 SpellEffectValue multiplier = 1.0 + auraEffect->GetAmount() / 100.0;
1008 maxExtraConsumedPower = maxExtraConsumedPower * multiplier;
1009 SetEffectValue(maxExtraConsumedPower);
1010 }
1011
1012 _damageMultiplier = std::min<SpellEffectValue>(caster->GetPower(POWER_ENERGY), maxExtraConsumedPower) / maxExtraConsumedPower;
1013 }
1014
1021
1022private:
1023 float _damageMultiplier = 0.0f;
1024};
1025
1026// 439901 - Flower Walk
1027// Triggered by 22812 - Barkskin
1029{
1030 bool Validate(SpellInfo const* spellInfo) override
1031 {
1033 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
1034 }
1035
1036 bool Load() override
1037 {
1039 }
1040
1046
1051};
1052
1053// 439902 - Flower Walk (Heal)
1055{
1056 bool Validate(SpellInfo const* spellInfo) override
1057 {
1058 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
1059 }
1060
1061 void FilterTargets(std::list<WorldObject*>& targets)
1062 {
1063 Unit* caster = GetCaster();
1064 int32 maxTargets = GetEffectInfo(EFFECT_1).CalcValueAsInt(caster);
1065
1066 if (targets.size() > 1)
1067 targets.remove(caster);
1068
1069 Trinity::SelectRandomInjuredTargets(targets, maxTargets, true, caster);
1070
1071 if (targets.empty())
1072 targets.push_back(caster);
1073 }
1074
1076 {
1077 if (target->ToUnit() == GetCaster())
1078 target = nullptr;
1079 }
1080
1086};
1087
1088// 37336 - Druid Forms Trinket
1090{
1102
1103 bool CheckProc(ProcEventInfo& eventInfo)
1104 {
1105 Unit* target = eventInfo.GetActor();
1106
1107 switch (target->GetShapeshiftForm())
1108 {
1109 case FORM_BEAR_FORM:
1111 case FORM_CAT_FORM:
1112 case FORM_MOONKIN_FORM:
1113 case FORM_NONE:
1114 case FORM_TREE_OF_LIFE:
1115 return true;
1116 default:
1117 break;
1118 }
1119
1120 return false;
1121 }
1122
1123 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1124 {
1126 Unit* target = eventInfo.GetActor();
1127 uint32 triggerspell = 0;
1128
1129 switch (target->GetShapeshiftForm())
1130 {
1131 case FORM_BEAR_FORM:
1133 triggerspell = SPELL_DRUID_FORMS_TRINKET_BEAR;
1134 break;
1135 case FORM_CAT_FORM:
1136 triggerspell = SPELL_DRUID_FORMS_TRINKET_CAT;
1137 break;
1138 case FORM_MOONKIN_FORM:
1139 triggerspell = SPELL_DRUID_FORMS_TRINKET_MOONKIN;
1140 break;
1141 case FORM_NONE:
1142 triggerspell = SPELL_DRUID_FORMS_TRINKET_NONE;
1143 break;
1144 case FORM_TREE_OF_LIFE:
1145 triggerspell = SPELL_DRUID_FORMS_TRINKET_TREE;
1146 break;
1147 default:
1148 return;
1149 }
1150
1151 target->CastSpell(target, triggerspell, aurEff);
1152 }
1153
1159};
1160
1161// 203964 - Galactic Guardian
1163{
1168
1169 static bool CheckEffectProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
1170 {
1171 return roll_chance(aurEff->GetAmount());
1172 }
1173
1174 static void HandleProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
1175 {
1176 Unit* caster = eventInfo.GetActor();
1177 Unit* target = eventInfo.GetActionTarget();
1178
1179 // free automatic moonfire on target
1181
1182 // Cast aura
1184 }
1185
1191};
1192
1193// 213708 - Galactic Guardian (attached to 164812 - Moonfire)
1195{
1196 bool Validate(SpellInfo const* /*spellInfo*/) override
1197 {
1199 }
1200
1201 bool Load() override
1202 {
1204 }
1205
1206 void CalculateDamage(SpellEffectInfo const& /*effectInfo*/, Unit* /*victim*/, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const
1207 {
1208 if (AuraEffect const* galactic = GetCaster()->GetAuraEffect(SPELL_DRUID_GALACTIC_GUARDIAN_AURA, EFFECT_2))
1209 AddPct(pctMod, galactic->GetAmount());
1210 }
1211
1216};
1217
1218// 774 - Rejuvenation
1220{
1225
1227 {
1228 Unit* caster = GetCaster();
1229
1230 // Germination talent.
1231 if (caster->HasAura(SPELL_DRUID_GERMINATION))
1232 {
1233 Unit* unitTarget = target->ToUnit();
1234 Aura* rejuvenationAura = unitTarget->GetAura(SPELL_DRUID_REJUVENATION, caster->GetGUID());
1235 Aura* germinationAura = unitTarget->GetAura(SPELL_DRUID_REJUVENATION_GERMINATION, caster->GetGUID());
1236
1237 // if target doesn't have Rejuventation, cast passes through.
1238 if (!rejuvenationAura)
1239 return;
1240
1241 // if target has Rejuvenation, but not Germination, or Germination has lower remaining duration than Rejuvenation, then cast Germination
1242 if (germinationAura && germinationAura->GetDuration() >= rejuvenationAura->GetDuration())
1243 return;
1244
1247 .SetTriggeringSpell(GetSpell()));
1248
1249 // prevent aura refresh (but cast must still happen to consume mana)
1250 target = nullptr;
1251 }
1252 }
1253
1258};
1259
1260// 24858 - Moonkin Form
1286
1287// 210706 - Gore
1289{
1290 bool Validate(SpellInfo const* /*spellInfo*/) override
1291 {
1293 }
1294
1295 bool CheckEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
1296 {
1297 return roll_chance(aurEff->GetAmount());
1298 }
1299
1300 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*procInfo*/)
1301 {
1302 Unit* owner = GetTarget();
1303 owner->CastSpell(owner, SPELL_DRUID_GORE_PROC);
1305 }
1306
1312};
1313
1314// 213680 - Guardian of Elune
1315// Triggered by 22842 - Frenzied Regeneration
1317{
1318 bool Validate(SpellInfo const* /*spellInfo*/) override
1319 {
1321 }
1322
1323 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& canBeRecalculated)
1324 {
1325 canBeRecalculated = false;
1326
1327 Unit* caster = GetCaster();
1328 if (!caster)
1329 return;
1330
1332 AddPct(amount, guardianOfElune->GetAmount());
1333 }
1334
1339};
1340
1341// 99 - Incapacitating Roar
1343{
1344protected:
1345 bool ToCatForm() const override { return false; }
1346};
1347
1348// 29166 - Innervate
1350{
1352 {
1354 if (!target)
1356
1358 if (!spec || spec->GetRole() != ChrSpecializationRole::Healer)
1360
1361 return SPELL_CAST_OK;
1362 }
1363
1365 {
1366 Unit* caster = GetCaster();
1367 if (caster != GetHitUnit())
1368 if (AuraEffect const* innervateR2 = caster->GetAuraEffect(SPELL_DRUID_INNERVATE_RANK_2, EFFECT_0))
1369 caster->CastSpell(caster, SPELL_DRUID_INNERVATE,
1371 .SetTriggeringSpell(GetSpell())
1372 .AddSpellMod(SPELLVALUE_BASE_POINT0, -innervateR2->GetAmount()));
1373
1374 }
1375
1381};
1382
1383// 117679 - Incarnation (Passive)
1401
1402// 33891 - Incarnation: Tree of Life (Talent, Shapeshift)
1421
1422// 740 - Tranquility
1424{
1425 bool Validate(SpellInfo const* spellInfo) override
1426 {
1428 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_4 } })
1431 }
1432
1433 void PreventEffect(WorldObject*& target) const
1434 {
1435 // Note: Inner Peace talent.
1437 target = nullptr;
1438 }
1439
1445};
1446
1447// 40442 - Druid Tier 6 Trinket
1449{
1450 bool Validate(SpellInfo const* /*spellInfo*/) override
1451 {
1452 return ValidateSpellInfo(
1453 {
1457 });
1458 }
1459
1460 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1461 {
1463 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
1464 if (!spellInfo)
1465 return;
1466
1467 uint32 spellId;
1468 int32 chance;
1469
1470 // Starfire
1471 if (spellInfo->SpellFamilyFlags[0] & 0x00000004)
1472 {
1474 chance = 25;
1475 }
1476 // Rejuvenation
1477 else if (spellInfo->SpellFamilyFlags[0] & 0x00000010)
1478 {
1480 chance = 25;
1481 }
1482 // Mangle (Bear) and Mangle (Cat)
1483 else if (spellInfo->SpellFamilyFlags[1] & 0x00000440)
1484 {
1486 chance = 40;
1487 }
1488 else
1489 return;
1490
1491 if (roll_chance(chance))
1492 eventInfo.GetActor()->CastSpell(nullptr, spellId, aurEff);
1493 }
1494
1499};
1500
1501// 33763 - Lifebloom
1503{
1504 bool Validate(SpellInfo const* /*spell*/) override
1505 {
1507 }
1508
1509 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1510 {
1511 // Final heal only on duration end
1512 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE || GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL)
1514 }
1515
1520};
1521
1522// 204066 - Lunar Beam
1524{
1526
1527 void OnCreate(Spell const* /*creatingSpell*/) override
1528 {
1529 _scheduler.Schedule(500ms, [this](TaskContext& task)
1530 {
1531 if (Unit* caster = at->GetCaster())
1532 {
1533 caster->CastSpell(caster, SPELL_DRUID_LUNAR_BEAM_HEAL, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
1534 caster->CastSpell(at->GetPosition(), SPELL_DRUID_LUNAR_BEAM_DAMAGE, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
1535 }
1536 task.Repeat(1s);
1537 });
1538 }
1539
1540 void OnUpdate(uint32 diff) override
1541 {
1542 _scheduler.Update(diff);
1543 }
1544
1545private:
1547};
1548
1549// 155580 - Lunar Inspiration
1573
1574// 1253600 - Lunar Wrath
1576{
1577 static bool CheckProc(AuraScript const&, ProcEventInfo const& procEvent)
1578 {
1579 if (procEvent.GetProcSpell()->GetPowerTypeCostAmount(POWER_RAGE) <= 0)
1580 return false;
1581
1582 Unit* caster = procEvent.GetActor();
1583 Unit* result = nullptr;
1584 Trinity::UnitAuraCheck check(true, SPELL_DRUID_RED_MOON, caster->GetGUID());
1585 Trinity::UnitSearcher searcher(caster, result, check);
1586 Cell::VisitAllObjects(caster, searcher, 40.0f);
1587
1588 return result != nullptr;
1589 }
1590
1595};
1596
1597// 392315 - Luxuriant Soil
1599{
1600 bool Validate(SpellInfo const* /*spellInfo*/) override
1601 {
1603 }
1604
1605 static bool CheckProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/)
1606 {
1607 return roll_chance(aurEff->GetAmount());
1608 }
1609
1610 void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) const
1611 {
1612 Unit* rejuvCaster = GetTarget();
1613
1614 // let's use the ProcSpell's max. range.
1615 SpellRange spellRange = eventInfo.GetSpellInfo()->GetMinMaxRange();
1616
1617 std::vector<Unit*> targetList;
1618 Trinity::WorldObjectSpellAreaTargetCheck check(spellRange, rejuvCaster, rejuvCaster, rejuvCaster, eventInfo.GetSpellInfo(), TARGET_CHECK_ALLY, nullptr, TARGET_OBJECT_TYPE_UNIT);
1619 Trinity::UnitListSearcher searcher(rejuvCaster, targetList, check);
1620 Cell::VisitAllObjects(rejuvCaster, searcher, spellRange.Max);
1621
1622 if (targetList.empty())
1623 return;
1624
1626 }
1627
1633};
1634
1635// 22570 - Maim
1637{
1638 bool Validate(SpellInfo const* /*spellInfo*/) override
1639 {
1641 }
1642
1643 void CalculateDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit* /*victim*/, int32& /*damage*/, int32& /*flatMod*/, float& pctMod)
1644 {
1645 int32 comboPoints = GetSpell()->GetPowerTypeCostAmount(POWER_COMBO_POINTS).value_or(0);
1646
1647 pctMod *= comboPoints;
1648 }
1649
1651 {
1652 int32 comboPoints = GetSpell()->GetPowerTypeCostAmount(POWER_COMBO_POINTS).value_or(0);
1653
1656 .SpellValueOverrides = { { SPELLVALUE_DURATION, comboPoints * IN_MILLISECONDS } }
1657 });
1658 }
1659
1665};
1666
1667// 33917 - Mangle
1669{
1670 bool Validate(SpellInfo const* spellInfo) override
1671 {
1673 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
1674 }
1675
1676 bool Load() override
1677 {
1679 }
1680
1681 void CalculateDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit* victim, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const
1682 {
1683 if (victim->HasAuraState(AURA_STATE_BLEED))
1684 AddPct(pctMod, GetEffectInfo(EFFECT_2).CalcValue(GetCaster()));
1685 }
1686
1691};
1692
1693// 385787 - Matted Fur (Absorb)
1695{
1696 bool Validate(SpellInfo const* /*spellInfo*/) override
1697 {
1699 }
1700
1701 static void CalculateAmount(AuraScript const&, AuraEffect const* /*aurEff*/, Unit const* victim, int32& baseAbsorb, int32& /*flatMod*/, float& /*pctMod*/)
1702 {
1703 if (AuraEffect const* passiveEffect = victim->GetAuraEffect(SPELL_DRUID_MATTED_FUR, EFFECT_0))
1704 baseAbsorb = static_cast<int32>(victim->GetTotalAttackPowerValue(BASE_ATTACK) * 0.0125 * passiveEffect->GetAmount());
1705 }
1706
1711};
1712
1713// 8921 - Moonfire
1715{
1716 bool Validate(SpellInfo const* /*spellInfo*/) override
1717 {
1719 }
1720
1721 void HandleOnHit(SpellEffIndex /*effIndex*/)
1722 {
1724 }
1725
1730};
1731
1732// 400278 - Moonless Night
1734{
1735 bool Validate(SpellInfo const* /*spellInfo*/) override
1736 {
1738 }
1739
1744
1745 void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1746 {
1747 Unit* caster = eventInfo.GetActor();
1748 Unit* target = eventInfo.GetActionTarget();
1749 SpellEffectValue damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount());
1750
1753 .SpellValueOverrides = { { SPELLVALUE_BASE_POINT0, damage } }
1754 });
1755 }
1756
1762};
1763
1764// 450347 - Nature's Grace
1766{
1767public:
1768 bool Validate(SpellInfo const* spellInfo) override
1769 {
1771 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
1772 }
1773
1774 static void Trigger(Unit* caster, AuraEffect const* naturesGraceEffect)
1775 {
1777 .SpellValueOverrides = { { SPELLVALUE_AURA_STACK, naturesGraceEffect->GetAmountAsInt() } }
1778 });
1779
1780 }
1781
1782 void OnOwnerInCombat(bool isNowInCombat) const
1783 {
1784 if (isNowInCombat)
1786 }
1787
1792};
1793
1794// 48517 Eclipse (Solar) + 48518 Eclipse (Lunar)
1818
1819// 274283 - Full Moon
1820// 274282 - Half Moon
1821// 274281 - New Moon
1823{
1824public:
1825 explicit spell_dru_new_moon(Optional<uint32> newOverrideSpell, Optional<uint32> removeOverrideSpell)
1826 : _newOverrideSpell(newOverrideSpell), _removeOverrideSpell(removeOverrideSpell) { }
1827
1828private:
1829 bool Validate(SpellInfo const* /*spellInfo*/) override
1830 {
1833 }
1834
1835 void OverrideMoon() const
1836 {
1837 Unit* caster = GetCaster();
1841 .SetTriggeringSpell(GetSpell()));
1842
1845 }
1846
1847 void Register() override
1848 {
1850 }
1851
1854};
1855
1856// 16864 - Omen of Clarity
1858{
1859 bool Validate(SpellInfo const* /*spellInfo*/) override
1860 {
1862 }
1863
1864 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
1865 {
1866 Unit* target = GetTarget();
1868 target->CastSpell(nullptr, SPELL_DRUID_BALANCE_T10_BONUS_PROC, true);
1869 }
1870
1875};
1876
1877// 113043 - Omen of Clarity
1879{
1880 bool CheckProc(AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/) const
1881 {
1882 return roll_chance(aurEff->GetAmount());
1883 }
1884
1889};
1890
1891// 392303 - Power of the Archdruid
1893{
1894 bool Validate(SpellInfo const* /*spellInfo*/) override
1895 {
1897 }
1898
1899 static bool CheckProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
1900 {
1902 }
1903
1904 static void HandleProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
1905 {
1906 Unit* druid = eventInfo.GetActor();
1907 Unit const* procTarget = eventInfo.GetActionTarget();
1908
1909 // range is EFFECT_0's BasePoints.
1910 float spellRange = aurEff->GetAmount();
1911
1912 std::vector<Unit*> targetList;
1913 Trinity::WorldObjectSpellAreaTargetCheck checker({ .Max = spellRange }, procTarget, druid, druid, eventInfo.GetSpellInfo(), TARGET_CHECK_ALLY, nullptr, TARGET_OBJECT_TYPE_UNIT);
1914 Trinity::UnitListSearcher searcher(procTarget, targetList, checker);
1915 Cell::VisitAllObjects(procTarget, searcher, spellRange);
1916 std::erase(targetList, procTarget);
1917
1918 if (targetList.empty())
1919 return;
1920
1921 AuraEffect const* powerOfTheArchdruidEffect = druid->GetAuraEffect(SPELL_DRUID_POWER_OF_THE_ARCHDRUID, EFFECT_0);
1922
1923 // max. targets is SPELL_DRUID_POWER_OF_THE_ARCHDRUID's EFFECT_0 BasePoints.
1924 int32 maxTargets = powerOfTheArchdruidEffect->GetAmountAsInt();
1925
1926 Trinity::Containers::RandomResize(targetList, maxTargets);
1927
1928 for (Unit* chosenTarget : targetList)
1929 druid->CastSpell(chosenTarget, eventInfo.GetProcSpell()->GetSpellInfo()->Id, aurEff);
1930 }
1931
1937};
1938
1939// 5215 - Prowl
1941{
1942protected:
1943 bool ToCatForm() const override { return true; }
1944};
1945
1946// 80313 - Pulverize
1948{
1949 bool Validate(SpellInfo const* spellInfo) override
1950 {
1952 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } });
1953 }
1954
1956 {
1957 Unit* caster = GetCaster();
1958 Unit* target = GetHitUnit();
1959 Aura* bleedAura = target->GetAura(SPELL_DRUID_THRASH_BEAR_BLEED, caster->GetGUID());
1960 if (!bleedAura)
1961 return;
1962
1963 int32 stacksToRemove = GetEffectInfo(EFFECT_2).CalcValueAsInt(caster);
1964
1965 bleedAura->ModStackAmount(-stacksToRemove);
1967 }
1968
1973};
1974
1975// 80313 - Pulverize (Trigger)
1976// Triggered by 77758 - Thrash (Bear Form)
1978{
1979 bool Validate(SpellInfo const* /*spellInfo*/) override
1980 {
1981 return ValidateSpellInfo
1982 ({
1986 })
1988 }
1989
1990 bool Load() override
1991 {
1993 }
1994
1996 {
1997 Unit* caster = GetCaster();
1998 Unit* target = GetHitUnit();
1999
2000 Aura* bleedAura = target->GetAura(SPELL_DRUID_THRASH_BEAR_BLEED, caster->GetGUID());
2001 if (!bleedAura)
2002 return;
2003
2004 int32 thresholdStacks = sSpellMgr->AssertSpellInfo(SPELL_DRUID_PULVERIZE, GetCastDifficulty())->GetEffect(EFFECT_2).CalcValueAsInt(caster);
2005 if (bleedAura->GetStackAmount() >= thresholdStacks)
2006 caster->CastSpell(target, SPELL_DRUID_THRASH_PULVERIZE_TRIGGER, CastSpellExtraArgs().SetTriggeringSpell(GetSpell()));
2007 }
2008
2013};
2014
2015// 158790 - Thrash
2017{
2018 bool Validate(SpellInfo const* /*spellInfo*/) override
2019 {
2021 }
2022
2023 void OnTick(AuraEffect const* /*aurEff*/)
2024 {
2025 Unit* caster = GetCaster();
2026 if (!caster)
2027 {
2028 Remove();
2029 return;
2030 }
2031
2032 // in case bleed aura is removed due to e.g. dwarf racial
2034 Remove();
2035
2036 // threshold stacks don't have to be checked here, duration of the trigger is less than Thrash uptime
2037 }
2038
2043};
2044
2045// 1822 - Rake
2047{
2048 bool Validate(SpellInfo const* spellInfo) override
2049 {
2051 && ValidateSpellEffect({ { spellInfo->Id, EFFECT_3 } });
2052 }
2053
2054 bool Load() override
2055 {
2057 return true;
2058 }
2059
2060 void CalculateDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit* /*victim*/, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const
2061 {
2062 if (_wasStealth)
2063 AddPct(pctMod, GetEffectInfo(EFFECT_3).CalcValue(GetCaster()));
2064 }
2065
2074
2080
2081private:
2082 bool _wasStealth = false;
2083};
2084
2085// 1079 - Rip
2087{
2088 bool Load() override
2089 {
2090 Unit* caster = GetCaster();
2091 return caster && caster->GetTypeId() == TYPEID_PLAYER;
2092 }
2093
2094 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& canBeRecalculated)
2095 {
2096 canBeRecalculated = false;
2097
2098 if (Unit* caster = GetCaster())
2099 {
2100 // 0.01 * $AP * cp
2101 int32 cp = caster->GetPower(POWER_COMBO_POINTS);
2102
2103 // Idol of Feral Shadows. Can't be handled as SpellMod due its dependency from CPs
2104 if (AuraEffect const* auraEffIdolOfFeralShadows = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
2105 amount += cp * auraEffIdolOfFeralShadows->GetAmount();
2106 // Idol of Worship. Can't be handled as SpellMod due its dependency from CPs
2107 else if (AuraEffect const* auraEffIdolOfWorship = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
2108 amount += cp * auraEffIdolOfWorship->GetAmount();
2109
2110 amount += CalculatePct(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp);
2111 }
2112 }
2113
2118};
2119
2120// 52610 - Savage Roar
2122{
2124 {
2125 Unit* caster = GetCaster();
2126 if (caster->GetShapeshiftForm() != FORM_CAT_FORM)
2128
2129 return SPELL_CAST_OK;
2130 }
2131
2136};
2137
2163
2164// 202342 - Shooting Stars
2166{
2174
2175 void OnTick(AuraEffect const* aurEff) const
2176 {
2177 Unit* caster = GetTarget();
2178 std::vector<Unit*> moonfires;
2179 std::vector<Unit*> sunfires;
2180 auto work = [&, druid = caster->GetGUID()](Unit* target)
2181 {
2182 if (target->HasAuraEffect(SPELL_DRUID_MOONFIRE_DAMAGE, EFFECT_1, druid))
2183 moonfires.push_back(target);
2184
2185 if (target->HasAuraEffect(SPELL_DRUID_SUNFIRE_DAMAGE, EFFECT_1, druid))
2186 sunfires.push_back(target);
2187 };
2188 Trinity::UnitWorker worker(caster, work);
2189 Cell::VisitAllObjects(caster, worker, 100.0f);
2190
2191 ProcessDoT(aurEff, caster, moonfires);
2192 ProcessDoT(aurEff, caster, sunfires);
2193 }
2194
2195 static void ProcessDoT(AuraEffect const* aurEff, Unit* caster, std::vector<Unit*>& targets)
2196 {
2197 if (targets.empty())
2198 return;
2199
2200 float chance = float(aurEff->GetAmount()) * std::sqrt(float(targets.size()));
2201 float procs;
2202 if (roll_chance(std::modf(chance / 100.0f, &procs) * 100.0f))
2203 procs += 1.0f;
2204
2205 if (procs <= 0.0f)
2206 return;
2207
2208 Trinity::Containers::RandomResize(targets, procs);
2209 for (Unit* target : targets)
2210 {
2212 AuraEffect const* crashingStarTalent = caster->GetAuraEffect(SPELL_DRUID_CRASHING_STAR_TALENT, EFFECT_0);
2213 if (crashingStarTalent && roll_chance(crashingStarTalent->GetAmount()))
2215
2216 caster->CastSpell(target, spellId, CastSpellExtraArgsInit{
2218 });
2219 }
2220 }
2221
2226};
2227
2228// 106839 - Skull Bash
2247
2248// 81269 - Efflorescence (Heal)
2267
2268// 106898 - Stampeding Roar
2270{
2271protected:
2272 bool ToCatForm() const override { return false; }
2273};
2274
2275// 50286 - Starfall (Dummy)
2277{
2278 void FilterTargets(std::list<WorldObject*>& targets)
2279 {
2281 }
2282
2283 void HandleDummy(SpellEffIndex /*effIndex*/)
2284 {
2285 Unit* caster = GetCaster();
2286 // Shapeshifting into an animal form or mounting cancels the effect
2287 if (caster->GetCreatureType() == CREATURE_TYPE_BEAST || caster->IsMounted())
2288 {
2289 if (SpellInfo const* spellInfo = GetTriggeringSpell())
2290 caster->RemoveAurasDueToSpell(spellInfo->Id);
2291 return;
2292 }
2293
2294 // Any effect which causes you to lose control of your character will supress the starfall effect.
2296 return;
2297
2298 caster->CastSpell(GetHitUnit(), uint32(GetEffectValueAsInt()), true);
2299 }
2300
2306};
2307
2308// 202347 - Stellar Flare
2310{
2311 bool Validate(SpellInfo const* /*spellInfo*/) override
2312 {
2314 }
2315
2316 void HandleDispel(DispelInfo* dispelInfo)
2317 {
2318 if (Unit* caster = GetCaster())
2319 caster->CastSpell(dispelInfo->GetDispeller(), SPELL_DRUID_STAR_BURST, true);
2320 }
2321
2326};
2327
2328// 340694 - Sudden Ambush
2329// 384667 - Sudden Ambush
2331{
2332 bool CheckProc(AuraEffect const* aurEff, ProcEventInfo& procInfo)
2333 {
2334 Spell const* procSpell = procInfo.GetProcSpell();
2335 if (!procSpell)
2336 return false;
2337
2339 if (!comboPoints)
2340 return false;
2341
2342 return roll_chance(*comboPoints * aurEff->GetAmount());
2343 }
2344
2349};
2350
2351// 93402 - Sunfire
2364
2365// 61336 - Survival Instincts
2389
2390// 40121 - Swift Flight Form (Passive)
2392{
2393 bool Load() override
2394 {
2395 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2396 }
2397
2398 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
2399 {
2400 if (Player* caster = GetCaster()->ToPlayer())
2401 if (caster->GetSkillValue(SKILL_RIDING) >= 375)
2402 amount = 310;
2403 }
2404
2409};
2410
2411// 28744 - Regrowth
2413{
2414 bool Validate(SpellInfo const* /*spellInfo*/) override
2415 {
2417 }
2418
2419 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2420 {
2422 eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_BLESSING_OF_THE_CLAW, aurEff);
2423 }
2424
2429};
2430
2431// 28719 - Healing Touch
2433{
2434 bool Validate(SpellInfo const* /*spellInfo*/) override
2435 {
2437 }
2438
2439 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2440 {
2442 Spell const* spell = eventInfo.GetProcSpell();
2443 if (!spell)
2444 return;
2445
2446 Unit* caster = eventInfo.GetActor();
2448 if (!manaCost)
2449 return;
2450
2451 SpellEffectValue amount = CalculatePct(*manaCost, aurEff->GetAmount());
2452 CastSpellExtraArgs args(aurEff);
2453 args.AddSpellBP0(amount);
2454 caster->CastSpell(nullptr, SPELL_DRUID_EXHILARATE, args);
2455 }
2456
2461};
2462
2463// 37288 - Mana Restore
2464// 37295 - Mana Restore
2466{
2467 bool Validate(SpellInfo const* /*spellInfo*/) override
2468 {
2470 }
2471
2472 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2473 {
2475 eventInfo.GetActor()->CastSpell(nullptr, SPELL_DRUID_INFUSION, aurEff);
2476 }
2477
2482};
2483
2484// 70723 - Item - Druid T10 Balance 4P Bonus
2486{
2487 bool Validate(SpellInfo const* /*spellInfo*/) override
2488 {
2490 && sSpellMgr->AssertSpellInfo(SPELL_DRUID_LANGUISH, DIFFICULTY_NONE)->GetEffect(EFFECT_0).GetPeriodicTickCount() > 0;
2491 }
2492
2493 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2494 {
2496
2497 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
2498 if (!damageInfo || !damageInfo->GetDamage())
2499 return;
2500
2501 Unit* caster = eventInfo.GetActor();
2502 Unit* target = eventInfo.GetProcTarget();
2503
2504 SpellEffectInfo const& spellEffect = sSpellMgr->AssertSpellInfo(SPELL_DRUID_LANGUISH, GetCastDifficulty())->GetEffect(EFFECT_0);
2505 SpellEffectValue amount = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), aurEff->GetAmount());
2506
2507 amount /= spellEffect.GetPeriodicTickCount();
2508
2509 CastSpellExtraArgs args(aurEff);
2510 args.AddSpellMod(SPELLVALUE_BASE_POINT0, amount);
2511 caster->CastSpell(target, SPELL_DRUID_LANGUISH, args);
2512 }
2513
2518};
2519
2520// 70691 - Item T10 Restoration 4P Bonus
2522{
2523 bool Load() override
2524 {
2525 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2526 }
2527
2528 void FilterTargets(std::list<WorldObject*>& targets)
2529 {
2530 if (!GetCaster()->ToPlayer()->GetGroup())
2531 {
2532 targets.clear();
2533 targets.push_back(GetCaster());
2534 }
2535 else
2536 {
2537 targets.remove(GetExplTargetUnit());
2538 std::list<Unit*> tempTargets;
2539 for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
2540 if ((*itr)->GetTypeId() == TYPEID_PLAYER && GetCaster()->IsInRaidWith((*itr)->ToUnit()))
2541 tempTargets.push_back((*itr)->ToUnit());
2542
2543 if (tempTargets.empty())
2544 {
2545 targets.clear();
2547 return;
2548 }
2549
2551 targets.clear();
2552 targets.push_back(target);
2553 }
2554 }
2555
2560};
2561
2562// 70664 - Druid T10 Restoration 4P Bonus (Rejuvenation)
2564{
2565 bool Validate(SpellInfo const* /*spellInfo*/) override
2566 {
2568 }
2569
2570 bool CheckProc(ProcEventInfo& eventInfo)
2571 {
2572 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
2573 if (!spellInfo || spellInfo->Id == SPELL_DRUID_REJUVENATION_T10_PROC)
2574 return false;
2575
2576 HealInfo* healInfo = eventInfo.GetHealInfo();
2577 if (!healInfo || !healInfo->GetHeal())
2578 return false;
2579
2580 Player* caster = eventInfo.GetActor()->ToPlayer();
2581 if (!caster)
2582 return false;
2583
2584 return caster->GetGroup() || caster != eventInfo.GetProcTarget();
2585 }
2586
2587 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2588 {
2590
2591 CastSpellExtraArgs args(aurEff);
2593 eventInfo.GetActor()->CastSpell(nullptr, SPELL_DRUID_REJUVENATION_T10_PROC, args);
2594 }
2595
2601};
2602
2603// 400223 - Thorns of Iron (Damage)
2605{
2607 {
2608 Unit* caster = GetCaster();
2609
2610 int32 noTargets = GetUnitTargetCountForEffect(effIndex);
2611 SpellEffectValue pct = GetTriggeringSpell()->GetEffect(effIndex).CalcValue(caster);
2612 int32 damage = CalculatePct(caster->GetArmor(), pct) / noTargets;
2613
2614 SetHitDamage(damage);
2615 }
2616
2621};
2622
2623// 77758 - Thrash (Bear Form)
2624// 106830 - Thrash (Cat Form)
2651
2652// 192090 - Thrash (Bear Bleed)
2654{
2655 bool Validate(SpellInfo const* /*spellInfo*/) override
2656 {
2657 return ValidateSpellInfo
2658 ({
2661 });
2662 }
2663
2664 void HandlePeriodic(AuraEffect const* /*aurEff*/)
2665 {
2666 Unit* caster = GetCaster();
2667 if (!caster)
2668 return;
2669
2671 caster->CastSpell(caster, SPELL_DRUID_BLOOD_FRENZY_RAGE_GAIN, true);
2672 }
2673
2678};
2679
2680// 1066 - Aquatic Form
2681// 33943 - Flight Form
2682// 40120 - Swift Flight Form
2683// 165961 - Stag Form
2685{
2690
2691 bool Load() override
2692 {
2693 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2694 }
2695
2696 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2697 {
2698 // If it stays 0, it removes Travel Form dummy in AfterRemove.
2699 triggeredSpellId = 0;
2700
2701 // We should only handle aura interrupts.
2702 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_INTERRUPT)
2703 return;
2704
2705 // Check what form is appropriate
2707
2708 // If chosen form is current aura, just don't remove it.
2711 }
2712
2713 void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
2714 {
2716 return;
2717
2718 Player* player = GetTarget()->ToPlayer();
2719
2720 if (triggeredSpellId) // Apply new form
2721 player->CastSpell(player, triggeredSpellId, aurEff);
2722 else // If not set, simply remove Travel Form dummy
2724 }
2725
2731
2732public:
2733 static uint32 GetFormSpellId(Player const* player, Difficulty difficulty, bool requiresOutdoor)
2734 {
2735 // Check what form is appropriate
2736 if (player->HasSpell(SPELL_DRUID_FORM_AQUATIC_PASSIVE) && player->IsInWater()) // Aquatic form
2738
2739 if (!player->IsInCombat() && player->GetSkillValue(SKILL_RIDING) >= 225 && CheckLocationForForm(player, difficulty, requiresOutdoor, SPELL_DRUID_FORM_FLIGHT) == SPELL_CAST_OK) // Flight form
2741
2742 if (!player->IsInWater() && CheckLocationForForm(player, difficulty, requiresOutdoor, SPELL_DRUID_FORM_STAG) == SPELL_CAST_OK) // Stag form
2743 return SPELL_DRUID_FORM_STAG;
2744
2745 return 0;
2746 }
2747
2748private:
2749 static SpellCastResult CheckLocationForForm(Player const* targetPlayer, Difficulty difficulty, bool requireOutdoors, uint32 spell_id)
2750 {
2751 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id, difficulty);
2752
2753 if (requireOutdoors && !targetPlayer->IsOutdoors())
2755
2756 return spellInfo->CheckLocation(targetPlayer->GetMapId(), targetPlayer->GetZoneId(), targetPlayer->GetAreaId(), targetPlayer);
2757 }
2758
2760};
2761
2762// 783 - Travel Form (dummy)
2764{
2769
2771 {
2772 Player* player = GetCaster()->ToPlayer();
2773 if (!player)
2775
2777
2778 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId, GetCastDifficulty());
2779 return spellInfo->CheckLocation(player->GetMapId(), player->GetZoneId(), player->GetAreaId(), player);
2780 }
2781
2786};
2787
2789{
2794
2795 bool Load() override
2796 {
2797 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2798 }
2799
2800 void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
2801 {
2802 Player* player = GetTarget()->ToPlayer();
2803
2804 // Outdoor check already passed - Travel Form (dummy) has SPELL_ATTR0_OUTDOORS_ONLY attribute.
2805 uint32 triggeredSpellId = spell_dru_travel_form::GetFormSpellId(player, GetCastDifficulty(), false);
2806
2807 player->CastSpell(player, triggeredSpellId, aurEff);
2808 }
2809
2810 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2811 {
2812 // No need to check remove mode, it's safe for auras to remove each other in AfterRemove hook.
2817 }
2818
2824};
2825
2826// 252216 - Tiger Dash
2828{
2829protected:
2830 bool ToCatForm() const override { return true; }
2831};
2832
2833// 252216 - Tiger Dash (Aura)
2835{
2836 void HandlePeriodic(AuraEffect const* aurEff)
2837 {
2838 if (AuraEffect* effRunSpeed = GetEffect(EFFECT_0))
2839 {
2840 SpellEffectValue reduction = aurEff->GetAmount();
2841 effRunSpeed->ChangeAmount(effRunSpeed->GetAmount() - reduction);
2842 }
2843 }
2844
2849};
2850
2851// 8921 - Moonfire
2853{
2854 bool Validate(SpellInfo const* /*spellInfo*/) override
2855 {
2857 }
2858
2859 bool Load() override
2860 {
2862 }
2863
2865 {
2866 Unit* caster = GetCaster();
2867 Unit* hitUnit = GetHitUnit();
2868
2869 SpellInfo const* moonfireSpellInfo = sSpellMgr->AssertSpellInfo(SPELL_DRUID_MOONFIRE_DAMAGE, GetCastDifficulty());
2870 float maxRange = sSpellMgr->AssertSpellInfo(SPELL_DRUID_TWIN_MOONS, GetCastDifficulty())->GetEffect(EFFECT_0).CalcValue(caster);
2871
2872 std::list<Unit*> targets;
2873 Trinity::WorldObjectSpellAreaTargetCheck check({ .Max = maxRange }, hitUnit, caster, caster, moonfireSpellInfo, TARGET_CHECK_ENEMY, nullptr, TARGET_OBJECT_TYPE_UNIT);
2874 Trinity::UnitListSearcher searcher(hitUnit, targets, check);
2875 Cell::VisitAllObjects(hitUnit, searcher, maxRange);
2876
2877 if (targets.empty())
2878 return;
2879
2880 targets.remove_if([hitUnit](Unit* target) -> bool
2881 {
2882 return !target || target == hitUnit || target->HasBreakableByDamageCrowdControlAura() || !target->IsInCombat();
2883 });
2884
2885 if (targets.empty())
2886 return;
2887
2888 targets.sort([caster, hitUnit](Unit const* lhs, Unit const* rhs) -> bool
2889 {
2890 Aura* auraA = lhs->GetAura(SPELL_DRUID_MOONFIRE_DAMAGE, caster->GetGUID());
2891 Aura* auraB = rhs->GetAura(SPELL_DRUID_MOONFIRE_DAMAGE, caster->GetGUID());
2892
2893 if (!auraA)
2894 {
2895 if (auraB)
2896 return true;
2897 return hitUnit->GetExactDist(lhs) < hitUnit->GetExactDist(rhs);
2898 }
2899
2900 if (!auraB)
2901 return false;
2902
2903 return auraA->GetDuration() < auraB->GetDuration();
2904 });
2905
2906 caster->CastSpell(targets.front(), SPELL_DRUID_MOONFIRE, CastSpellExtraArgsInit{
2908 .TriggeringSpell = GetSpell()
2909 });
2910 }
2911
2916};
2917
2918// 393763 - Umbral Embrace
2920{
2921 bool Validate(SpellInfo const* /*spellInfo*/) override
2922 {
2924 }
2925
2926 static bool CheckEclipse(AuraScript const&, ProcEventInfo const& eventInfo)
2927 {
2929 }
2930
2935};
2936
2937// 393763 - Umbral Embrace (attached to 190984 - Wrath and 194153 - Starfire)
2939{
2945
2950
2951 void HandleDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit const* /*victim*/, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const
2952 {
2953 if (AuraEffect const* umbralEmbrace = GetCaster()->GetAuraEffect(SPELL_DRUID_UMBRAL_EMBRACE, EFFECT_0))
2954 AddPct(pctMod, umbralEmbrace->GetAmount());
2955 }
2956
2961};
2962
2963// Called by 393763 - Umbral Embrace
2965{
2966 bool Validate(SpellInfo const* /*spellInfo*/) override
2967 {
2969 }
2970
2971 bool Load() override
2972 {
2974 }
2975
2976 void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/) const
2977 {
2978 Unit* target = GetTarget();
2981 .TriggeringAura = aurEff
2982 });
2983 }
2984
2989};
2990
2991// 377210 - Ursoc's Fury
2993{
2994 bool Validate(SpellInfo const* /*spellInfo*/) override
2995 {
2997 }
2998
2999 static void HandleProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
3000 {
3001 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
3002 if (!damageInfo || !damageInfo->GetDamage())
3003 return;
3004
3005 Unit* caster = eventInfo.GetActor();
3006 SpellEffectValue amount = CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount());
3007
3010 .SpellValueOverrides = { { SPELLVALUE_BASE_POINT0, amount } }
3011 });
3012 }
3013
3018};
3019
3020// 48438 - Wild Growth
3022{
3023 bool Validate(SpellInfo const* spellInfo) override
3024 {
3025 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 }, { SPELL_DRUID_TREE_OF_LIFE, EFFECT_2 } });
3026 }
3027
3028 void FilterTargets(std::list<WorldObject*>& targets) const
3029 {
3030 Unit* caster = GetCaster();
3031 int32 maxTargets = GetEffectInfo(EFFECT_1).CalcValueAsInt(caster);
3032
3033 if (AuraEffect const* treeOfLife = caster->GetAuraEffect(SPELL_DRUID_TREE_OF_LIFE, EFFECT_2))
3034 maxTargets += treeOfLife->GetAmountAsInt();
3035
3036 // Note: Wild Growth became a smart heal which prioritizes players and their pets in their group before any unit outside their group.
3037 Trinity::SelectRandomInjuredTargets(targets, maxTargets, true, caster);
3038 }
3039
3044};
3045
3047{
3048 bool Validate(SpellInfo const* /*spellInfo*/) override
3049 {
3051 }
3052
3054 {
3055 Unit* caster = GetCaster();
3056 if (!caster)
3057 return;
3058
3059 // calculate from base damage, not from aurEff->GetAmount() (already modified)
3060 SpellEffectValue damage = aurEff->GetSpellEffectInfo().CalcValue(caster, nullptr, GetUnitOwner());
3061
3062 // Wild Growth = first tick gains a 6% bonus, reduced by 2% each tick
3063 float reduction = 2.f;
3065 reduction -= CalculatePct(reduction, bonus->GetAmount());
3066 reduction *= aurEff->GetTickNumber() - 1;
3067
3068 AddPct(damage, 6.f - reduction);
3069 aurEff->SetAmount(damage);
3070 }
3071
3076};
3077
3078// 145108 - Ysera's Gift
3080{
3081 bool Validate(SpellInfo const* /*spellInfo*/) override
3082 {
3083 return ValidateSpellInfo
3084 ({
3087 });
3088 }
3089
3091 {
3092 SpellEffectValue healAmount = GetTarget()->CountPctFromMaxHealth(aurEff->GetAmount());
3093
3094 if (!GetTarget()->IsFullHealth())
3096 else
3098 }
3099
3104};
3105
3106// 145110 - Ysera's Gift (heal)
3108{
3109 static void SelectTargets(SpellScript const&, std::list<WorldObject*>& targets)
3110 {
3111 Trinity::SelectRandomInjuredTargets(targets, 1, true);
3112 }
3113
3118};
3119
3121{
3217}
@ IN_MILLISECONDS
Definition Common.h:38
Difficulty
Definition DBCEnums.h:932
@ DIFFICULTY_NONE
Definition DBCEnums.h:933
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(T chance)
Definition Random.h:55
#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_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
@ 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
@ 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:301
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:446
uint32 GetDamage() const
Definition Unit.h:452
WorldObject * GetDispeller() const
Definition Unit.h:396
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
uint32 GetHeal() const
Definition Unit.h:482
Player * ToPlayer()
Definition Object.h:126
Unit * ToUnit()
Definition Object.h:116
uint16 GetSkillValue(uint32 skill) const
Definition Player.cpp:6010
bool HasSpell(uint32 spell) const override
Definition Player.cpp:3735
Group * GetGroup(Optional< uint8 > partyIndex)
Definition Player.h:2796
ChrSpecializationEntry const * GetPrimarySpecializationEntry() const
Definition Player.cpp:30819
HealInfo * GetHealInfo() const
Definition Unit.h:512
Unit * GetActionTarget() const
Definition Unit.h:500
Spell const * GetProcSpell() const
Definition Unit.h:514
SpellInfo const * GetSpellInfo() const
Definition Unit.cpp:281
DamageInfo * GetDamageInfo() const
Definition Unit.h:511
Unit * GetProcTarget() const
Definition Unit.h:501
Unit * GetActor() const
Definition Unit.h:499
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:588
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:8157
bool IsTriggered() const
Definition Spell.cpp:8348
std::vector< T > & GetExecuteLogEffectTargets(SpellEffectName effect, Optional< std::vector< T > > SpellLogEffect::*member)
Definition Spell.h:572
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:635
void RemoveAreaTrigger(uint32 spellId)
Definition Unit.cpp:5485
void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3751
uint64 CountPctFromMaxHealth(float pct) const
Definition Unit.h:797
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3828
ShapeshiftForm GetShapeshiftForm() const
Definition Unit.h:1504
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition Unit.cpp:4604
int32 GetMaxPower(Powers power) const
Definition Unit.cpp:10037
bool HasStealthAura() const
Definition Unit.h:1088
virtual bool HasSpell(uint32) const
Definition Unit.h:1084
uint32 GetCreatureType() const
Definition Unit.cpp:9451
uint64 GetMaxHealth() const
Definition Unit.h:789
bool HasAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid caster=ObjectGuid::Empty) const
Definition Unit.cpp:4774
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4700
bool IsInWater() const
Definition Unit.cpp:3331
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
Definition Unit.cpp:6146
uint32 GetArmor() const
Definition Unit.h:774
bool IsMounted() const
Definition Unit.h:912
int32 GetPower(Powers power) const
Definition Unit.cpp:10028
float GetTotalAttackPowerValue(WeaponAttackType attType, bool includeWeapon=true) const
Definition Unit.cpp:9912
bool HealthBelowPct(float pct) const
Definition Unit.h:792
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
bool IsInRaidWith(Unit const *unit) const
Definition Unit.cpp:12177
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4804
SpellHistory * GetSpellHistory()
Definition Unit.h:1498
bool HasBreakableByDamageCrowdControlAura(Unit const *excludeCasterChannel=nullptr) const
Definition Unit.cpp:778
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3974
bool IsInCombat() const
Definition Unit.h:1058
constexpr uint32 GetMapId() const
Definition Position.h:216
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
Unit * GetOwner() const
Definition Object.cpp:1598
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 CheckProc(AuraEffect const *, ProcEventInfo const &eventInfo) const
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:9577
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:9707
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, bool dont_load=true)
Definition CellImpl.h:203
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