Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
spell_druid.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6/*
7 * Scripts for spells with SPELLFAMILY_DRUID and SPELLFAMILY_GENERIC spells used by druid players.
8 * Ordered alphabetically using scriptname.
9 * Scriptnames of files in this file should be prefixed with "spell_dru_".
10 */
11
12#include "Player.h"
13#include "ScriptMgr.h"
14#include "SpellScript.h"
15#include "SpellAuraEffects.h"
16#include "Containers.h"
17
49
50// 1850 - Dash
52{
53public:
54 spell_dru_dash() : SpellScriptLoader("spell_dru_dash") { }
55
57 {
59
60 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
61 {
62 // do not set speed if not in cat form
63 if (GetUnitOwner()->GetShapeshiftForm() != FORM_CAT)
64 amount = 0;
65 }
66
71 };
72
73 AuraScript* GetAuraScript() const override
74 {
75 return new spell_dru_dash_AuraScript();
76 }
77};
78
79// 48517 - Eclipse (Solar)
80// 48518 - Eclipse (Lunar)
82{
83public:
84 spell_dru_eclipse(char const* scriptName) : SpellScriptLoader(scriptName) { }
85
87 {
89
90 bool Validate(SpellInfo const* /*spellInfo*/) override
91 {
92 if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_NATURES_GRACE) ||
94 return false;
95 return true;
96 }
97
98 bool Load() override
99 {
101 }
102
103 void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
104 {
105 Unit* caster = GetCaster();
106 if (!caster)
107 return;
108
111 }
112
117 };
118
119 AuraScript* GetAuraScript() const override
120 {
121 return new spell_dru_eclipse_AuraScript();
122 }
123};
124
125// 2912, 5176, 78674 - Starfire, Wrath, and Starsurge
127{
128public:
129 spell_dru_eclipse_energize() : SpellScriptLoader("spell_dru_eclipse_energize") { }
130
132 {
134
136
137 bool Load() override
138 {
139 if (GetCaster()->GetTypeId() != TypeID::TYPEID_PLAYER)
140 return false;
141
142 if (GetCaster()->ToPlayer()->getClass() != CLASS_DRUID)
143 return false;
144
145 energizeAmount = 0;
146
147 return true;
148 }
149
151 {
152 Player* caster = GetCaster()->ToPlayer();
153
154 // No boomy, no deal.
156 return;
157
158 switch (GetSpellInfo()->Id)
159 {
161 {
162 energizeAmount = -GetSpellInfo()->Effects[effIndex].BasePoints; // -13
163 // If we are set to fill the lunar side or we've just logged in with 0 power..
165 || caster->GetPower(POWER_ECLIPSE) == 0)
166 {
168 // If the energize was due to 0 power, cast the eclipse marker aura
170 caster->CastSpell(caster, SPELL_DRUID_LUNAR_ECLIPSE_MARKER, true);
171 }
172 // The energizing effect brought us out of the solar eclipse, remove the aura
173 if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) <= 0)
175 break;
176 }
178 {
179 energizeAmount = GetSpellInfo()->Effects[effIndex].BasePoints; // 20
180 // If we are set to fill the solar side or we've just logged in with 0 power..
182 || caster->GetPower(POWER_ECLIPSE) == 0)
183 {
185 // If the energize was due to 0 power, cast the eclipse marker aura
187 caster->CastSpell(caster, SPELL_DRUID_SOLAR_ECLIPSE_MARKER, true);
188 }
189 // The energizing effect brought us out of the lunar eclipse, remove the aura
190 if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) >= 0)
192 break;
193 }
195 {
196 // If we are set to fill the solar side or we've just logged in with 0 power (confirmed with sniffs)
198 || caster->GetPower(POWER_ECLIPSE) == 0)
199 {
200 energizeAmount = GetSpellInfo()->Effects[effIndex].BasePoints; // 15
202
203 // If the energize was due to 0 power, cast the eclipse marker aura
205 caster->CastSpell(caster, SPELL_DRUID_SOLAR_ECLIPSE_MARKER, true);
206 }
208 {
209 energizeAmount = -GetSpellInfo()->Effects[effIndex].BasePoints; // -15
211 }
212 // The energizing effect brought us out of the lunar eclipse, remove the aura
213 if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) >= 0)
215 // The energizing effect brought us out of the solar eclipse, remove the aura
216 else if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) <= 0)
218 break;
219 }
220 }
221 }
222
227 };
228
229 SpellScript* GetSpellScript() const override
230 {
232 }
233};
234
235// 54832 - Glyph of Innervate
237{
238public:
239 spell_dru_glyph_of_innervate() : SpellScriptLoader("spell_dru_glyph_of_innervate") { }
240
242 {
244
245 bool Validate(SpellInfo const* /*spellInfo*/) override
246 {
247 if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_GLYPH_OF_INNERVATE))
248 return false;
249 return true;
250 }
251
252 bool CheckProc(ProcEventInfo& eventInfo)
253 {
254 // Not proc from self Innervate
255 return GetTarget() != eventInfo.GetProcTarget();
256 }
257
258 void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
259 {
262 }
263
269 };
270
271 AuraScript* GetAuraScript() const override
272 {
274 }
275};
276
277// 54846 - Glyph of Starfire
279{
280public:
281 spell_dru_glyph_of_starfire() : SpellScriptLoader("spell_dru_glyph_of_starfire") { }
282
284 {
286
287 bool Validate(SpellInfo const* /*spellInfo*/) override
288 {
290 return false;
291 return true;
292 }
293
295 {
296 Unit* caster = GetCaster();
297 if (Unit* unitTarget = GetHitUnit())
298 if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x2, 0, 0, caster->GetGUID()))
299 {
300 Aura* aura = aurEff->GetBase();
301
302 uint32 countMin = aura->GetMaxDuration();
303 uint32 countMax = aura->GetSpellInfo()->GetMaxDuration() + 9000;
305 countMax += 3000;
306
307 if (countMin < countMax)
308 {
309 aura->SetDuration(uint32(aura->GetDuration() + 3000));
310 aura->SetMaxDuration(countMin + 3000);
311 }
312 }
313 }
314
319 };
320
321 SpellScript* GetSpellScript() const override
322 {
324 }
325};
326
327// 54845 - Glyph of Starfire
329{
330public:
331 spell_dru_glyph_of_starfire_proc() : SpellScriptLoader("spell_dru_glyph_of_starfire_proc") { }
332
334 {
336
337 bool Validate(SpellInfo const* /*spellInfo*/) override
338 {
339 if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_GLYPH_OF_STARFIRE))
340 return false;
341 return true;
342 }
343
344 void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
345 {
347 GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_GLYPH_OF_STARFIRE, true, NULL, aurEff);
348 }
349
354 };
355
356 AuraScript* GetAuraScript() const override
357 {
359 }
360};
361
362// 29166 - Innervate
364{
365public:
366 spell_dru_innervate() : SpellScriptLoader("spell_dru_innervate") { }
367
369 {
371
372 void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
373 {
374 amount = CalculatePct(int32(GetUnitOwner()->GetCreatePowers(POWER_MANA) / aurEff->GetTotalTicks()), amount);
375 }
376
381 };
382
383 AuraScript* GetAuraScript() const override
384 {
386 }
387};
388
389// 33763 - Lifebloom
391{
392public:
393 spell_dru_lifebloom() : SpellScriptLoader("spell_dru_lifebloom") { }
394
396 {
398
399 bool Validate(SpellInfo const* /*spell*/) override
400 {
402 return false;
403 if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_ENERGIZE))
404 return false;
405 return true;
406 }
407
408 void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
409 {
410 // Final heal only on duration end
411 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
412 return;
413
414 // final heal
415 int32 stack = GetStackAmount();
416 int32 healAmount = aurEff->GetAmount();
417 if (Unit* caster = GetCaster())
418 {
419 healAmount = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), healAmount, HEAL, stack);
420 healAmount = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, HEAL, stack);
421
422 GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
423 }
424
425 GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
426 }
427
428 void HandleDispel(DispelInfo* dispelInfo)
429 {
430 if (Unit* target = GetUnitOwner())
431 {
432 if (AuraEffect const* aurEff = GetEffect(EFFECT_1))
433 {
434 // final heal
435 int32 healAmount = aurEff->GetAmount();
436 if (Unit* caster = GetCaster())
437 {
438 healAmount = caster->SpellHealingBonusDone(target, GetSpellInfo(), healAmount, HEAL, dispelInfo->GetRemovedCharges());
439 healAmount = target->SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, HEAL, dispelInfo->GetRemovedCharges());
440 target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, NULL, GetCasterGUID());
441 }
442
443 target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, NULL, GetCasterGUID());
444 }
445 }
446 }
447
453 };
454
455 AuraScript* GetAuraScript() const override
456 {
458 }
459};
460
461// -48496 - Living Seed
463{
464public:
465 spell_dru_living_seed() : SpellScriptLoader("spell_dru_living_seed") { }
466
468 {
470
471 bool Validate(SpellInfo const* /*spellInfo*/) override
472 {
473 if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIVING_SEED_PROC))
474 return false;
475 return true;
476 }
477
478 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
479 {
481 int32 amount = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount());
483 }
484
489 };
490
491 AuraScript* GetAuraScript() const override
492 {
494 }
495};
496
497// 48504 - Living Seed (Proc)
499{
500public:
501 spell_dru_living_seed_proc() : SpellScriptLoader("spell_dru_living_seed_proc") { }
502
504 {
506
507 bool Validate(SpellInfo const* /*spellInfo*/) override
508 {
509 if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIVING_SEED_HEAL))
510 return false;
511 return true;
512 }
513
514 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
515 {
518 }
519
524 };
525
526 AuraScript* GetAuraScript() const override
527 {
529 }
530};
531
532// 106922 - Might of Ursoc
534{
535public:
536 spell_dru_might_of_ursoc() : SpellScriptLoader("spell_dru_might_of_ursoc") { }
537
539 {
541
542 bool Validate(SpellInfo const* /*spellInfo*/) override
543 {
544 if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_BEAR_FORM))
545 return false;
546 return true;
547 }
548
549 void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
550 {
551 if (Unit* caster = GetCaster())
552 {
553 // cast bear form first
554 if (caster->GetShapeshiftForm() != FORM_BEAR)
555 caster->CastSpell(caster, SPELL_DRUID_BEAR_FORM, true); // activate bear form
556 // then calculate amount
557 amount = aurEff->GetBase()->GetUnitOwner()->CountPctFromMaxHealth(amount);
558 }
559 }
560
565 };
566
568 {
570 }
571};
572
573// -16972 - Predatory Strikes
601
602// 62606 - Savage Defense
604{
605public:
606 spell_dru_savage_defense() : SpellScriptLoader("spell_dru_savage_defense") { }
607
609 {
611
613
614 bool Load() override
615 {
617 return true;
618 }
619
620 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
621 {
622 // Set absorbtion amount to unlimited
623 amount = -1;
624 }
625
626 void Absorb(AuraEffect* aurEff, DamageInfo& /*dmgInfo*/, uint32& absorbAmount)
627 {
628 absorbAmount = uint32(CalculatePct(GetTarget()->GetTotalAttackPowerValue(WeaponAttackType::BASE_ATTACK), absorbPct));
629 aurEff->SetAmount(0);
630 }
631
637 };
638
639 AuraScript* GetAuraScript() const override
640 {
642 }
643};
644
645// 52610 - Savage Roar
647{
648public:
649 spell_dru_savage_roar() : SpellScriptLoader("spell_dru_savage_roar") { }
650
669
671 {
673
674 bool Validate(SpellInfo const* /*spellInfo*/) override
675 {
676 if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_SAVAGE_ROAR))
677 return false;
678 return true;
679 }
680
681 void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
682 {
683 if (Player* caster = GetCaster()->ToPlayer())
684 {
685 if (Aura* savageRoar = caster->GetAura(SPELL_DRUID_SAVAGE_ROAR))
686 {
687 caster->CastSpell(caster, SPELL_DRUID_SAVAGE_ROAR_TRIGGER, true, NULL, aurEff, GetCasterGUID());
688 uint8 comboPoints = caster->GetComboPoints();
689
690 int32 minduration = GetSpellInfo()->GetDuration();
691 int32 maxduration = GetSpellInfo()->GetMaxDuration();
692 int32 duration = minduration + int32((maxduration - minduration) * comboPoints / 5);
693
694 savageRoar->SetDuration(duration);
695 }
696 }
697 }
698
703 };
704
705 SpellScript* GetSpellScript() const override
706 {
708 }
709
710 AuraScript* GetAuraScript() const override
711 {
713 }
714};
715
716// 50286 - Starfall (Dummy)
718{
719public:
720 spell_dru_starfall_dummy() : SpellScriptLoader("spell_dru_starfall_dummy") { }
721
723 {
725
726 void FilterTargets(std::list<WorldObject*>& targets)
727 {
729 }
730
731 void HandleDummy(SpellEffIndex /*effIndex*/)
732 {
733 Unit* caster = GetCaster();
734 // Shapeshifting into an animal form or mounting cancels the effect
735 if (caster->GetCreatureType() == CREATURE_TYPE_BEAST || caster->IsMounted())
736 {
737 if (SpellInfo const* spellInfo = GetTriggeringSpell())
738 caster->RemoveAurasDueToSpell(spellInfo->Id);
739 return;
740 }
741
742 // Any effect which causes you to lose control of your character will supress the starfall effect.
744 return;
745
746 caster->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true);
747 }
748
754 };
755
756 SpellScript* GetSpellScript() const override
757 {
759 }
760};
761
762// -78892 - Stampede
764{
765public:
766 spell_dru_stampede() : SpellScriptLoader("spell_dru_stampede") { }
767
769 {
771
772 bool Validate(SpellInfo const* /*spellInfo*/) override
773 {
774 if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_STAMPEDE_BAER_RANK_1) ||
777 !sSpellMgr->GetSpellInfo(SPELL_DRUID_FERAL_CHARGE_CAT) ||
779 return false;
780 return true;
781 }
782
783 void HandleEffectCatProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
784 {
786 if (GetTarget()->GetShapeshiftForm() != FORM_CAT || eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_DRUID_FERAL_CHARGE_CAT)
787 return;
788
789 GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_CAT_RANK_1, GetSpellInfo()->GetRank()), true, NULL, aurEff);
791 }
792
793 void HandleEffectBearProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
794 {
796 if (GetTarget()->GetShapeshiftForm() != FORM_BEAR || eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_DRUID_FERAL_CHARGE_BEAR)
797 return;
798
799 GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_BAER_RANK_1, GetSpellInfo()->GetRank()), true, NULL, aurEff);
800 }
801
807 };
808
809 AuraScript* GetAuraScript() const override
810 {
812 }
813};
814
815// 61336 - Survival Instincts
817{
818public:
819 spell_dru_survival_instincts() : SpellScriptLoader("spell_dru_survival_instincts") { }
820
839
869
870 SpellScript* GetSpellScript() const override
871 {
873 }
874
875 AuraScript* GetAuraScript() const override
876 {
878 }
879};
880
881// 40121 - Swift Flight Form (Passive)
883{
884public:
885 spell_dru_swift_flight_passive() : SpellScriptLoader("spell_dru_swift_flight_passive") { }
886
888 {
890
891 bool Load() override
892 {
894 }
895
896 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
897 {
898 if (Player* caster = GetCaster()->ToPlayer())
899 if (caster->GetSkillValue(SKILL_RIDING) >= 375)
900 amount = 310;
901 }
902
907 };
908
909 AuraScript* GetAuraScript() const override
910 {
912 }
913};
914
915// 70691 - Item T10 Restoration 4P Bonus
917{
918public:
919 spell_dru_t10_restoration_4p_bonus() : SpellScriptLoader("spell_dru_t10_restoration_4p_bonus") { }
920
922 {
924
925 bool Load() override
926 {
928 }
929
930 void FilterTargets(std::list<WorldObject*>& targets)
931 {
932 if (!GetCaster()->ToPlayer()->GetGroup())
933 {
934 targets.clear();
935 targets.push_back(GetCaster());
936 }
937 else
938 {
939 targets.remove(GetExplTargetUnit());
940 std::list<Unit*> tempTargets;
941 for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
942 if ((*itr)->GetTypeId() == TypeID::TYPEID_PLAYER && GetCaster()->IsInRaidWith((*itr)->ToUnit()))
943 tempTargets.push_back((*itr)->ToUnit());
944
945 if (tempTargets.empty())
946 {
947 targets.clear();
949 return;
950 }
951
953 targets.clear();
954 targets.push_back(target);
955 }
956 }
957
962 };
963
964 SpellScript* GetSpellScript() const override
965 {
967 }
968};
969
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
@ TYPEID_PLAYER
Definition Object.h:55
@ TALENT_TREE_DRUID_BALANCE
Definition Player.h:158
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ POWER_ECLIPSE
@ POWER_MANA
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ TARGET_UNIT_DEST_AREA_ALLY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ CREATURE_TYPE_BEAST
@ CLASS_DRUID
@ SPELLFAMILY_DRUID
#define EFFECT_ALL
@ SKILL_RIDING
SpellCastResult
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_MOD_INCREASE_SPEED
@ SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_INCREASE_HEALTH_2
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_SCHOOL_ABSORB
@ SPELL_AURA_PERIODIC_ENERGIZE
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK
@ AURA_EFFECT_HANDLE_REAL
#define sSpellMgr
Definition SpellMgr.h:744
#define SpellCheckCastFn(F)
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define AuraEffectCalcAmountFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectAbsorbFn(F, I)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckProcFn(F)
#define AuraDispelFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ SPELLVALUE_BASE_POINT0
Definition Unit.h:114
@ AURA_REMOVE_BY_EXPIRE
Definition Unit.h:410
@ FORM_CAT
Definition Unit.h:208
@ FORM_BEAR
Definition Unit.h:212
@ UNIT_STATE_CONTROLLED
Definition Unit.h:543
@ HEAL
Definition Unit.h:617
T CalculatePct(T base, U pct)
Definition Util.h:103
int32 GetTotalTicks() const
void SetAmount(int32 amount)
Aura * GetBase() const
int32 GetAmount() const
int32 GetMaxDuration() const
Definition SpellAuras.h:115
Unit * GetUnitOwner() const
Definition SpellAuras.h:94
int32 GetDuration() const
Definition SpellAuras.h:119
void SetDuration(int32 duration, bool withMods=false)
SpellInfo const * GetSpellInfo() const
Definition SpellAuras.h:87
void SetMaxDuration(int32 duration)
Definition SpellAuras.h:116
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
SpellInfo const * GetSpellInfo() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
uint64 GetCasterGUID() const
Unit * GetCaster() const
AuraEffect * GetEffect(uint8 effIndex) const
HookList< EffectAbsorbHandler > OnEffectAbsorb
Unit * GetTarget() const
HookList< CheckProcHandler > DoCheckProc
HookList< AuraDispelHandler > AfterDispel
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
uint8 GetStackAmount() const
HookList< EffectApplyHandler > OnEffectApply
SpellInfo const * GetSpellInfo() const
Definition Unit.h:907
uint8 GetRemovedCharges() const
Definition Unit.h:848
uint32 GetHeal() const
Definition Unit.h:959
uint64 GetGUID() const
Definition Object.h:119
Player * ToPlayer()
Definition Object.h:204
TypeID GetTypeId() const
Definition Object.h:131
uint32 GetTalentSpecialization(uint8 spec) const
Definition Player.h:2075
uint8 GetActiveSpec() const
Definition Player.h:2077
void RemoveSpellCooldown(uint32 spell_id, bool update=false)
Definition Player.cpp:4284
HealInfo * GetHealInfo() const
Definition Unit.h:986
DamageInfo * GetDamageInfo() const
Definition Unit.h:985
Unit * GetProcTarget() const
Definition Unit.h:974
int32 CalcValue(Unit const *caster=NULL, int32 const *basePoints=NULL, Unit const *target=NULL) const
SpellEffectInfo Effects[MAX_SPELL_EFFECTS]
Definition SpellInfo.h:255
uint32 Id
Definition SpellInfo.h:160
int32 GetMaxDuration() const
int32 GetDuration() const
Unit * GetExplTargetUnit()
HookList< CheckCastHandler > OnCheckCast
void FinishCast(SpellCastResult result)
SpellInfo const * GetSpellInfo()
HookList< EffectHandler > OnEffectHitTarget
Unit * GetHitUnit()
int32 GetEffectValue()
SpellInfo const * GetTriggeringSpell()
Unit * GetCaster()
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
SpellScriptLoader(const char *name)
Definition Unit.h:1367
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
ShapeshiftForm GetShapeshiftForm() const
Definition Unit.h:2377
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
uint32 SpellHealingBonusTaken(Unit *caster, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack=1) const
uint32 GetCreatureType() const
Definition Unit.cpp:4910
bool IsMounted() const
Definition Unit.h:1742
int32 GetPower(Powers power) const
Definition Unit.cpp:5237
bool HasUnitState(const uint32 f) const
Definition Unit.h:1485
void CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
bool IsInFeralForm() const
Definition Unit.cpp:4936
uint32 CountPctFromMaxHealth(int32 pct) const
Definition Unit.h:1633
Aura * GetAuraOfRankedSpell(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
PrepareAuraScript(spell_dru_dash_AuraScript)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
AuraScript * GetAuraScript() const override
void ApplyEffect(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_dru_eclipse_AuraScript)
PrepareSpellScript(spell_dru_eclipse_energize_SpellScript)
SpellScript * GetSpellScript() const override
spell_dru_eclipse(char const *scriptName)
AuraScript * GetAuraScript() const override
void HandleEffectProc(AuraEffect const *aurEff, ProcEventInfo &)
AuraScript * GetAuraScript() const override
PrepareSpellScript(spell_dru_glyph_of_starfire_SpellScript)
void HandleEffectProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const override
SpellScript * GetSpellScript() const override
PrepareAuraScript(spell_dru_innervate_AuraScript)
void CalculateAmount(AuraEffect const *aurEff, int32 &amount, bool &)
AuraScript * GetAuraScript() const override
void AfterRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareAuraScript(spell_dru_lifebloom_AuraScript)
AuraScript * GetAuraScript() const override
PrepareAuraScript(spell_dru_living_seed_AuraScript)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
PrepareAuraScript(spell_dru_living_seed_proc_AuraScript)
AuraScript * GetAuraScript() const override
AuraScript * GetAuraScript() const override
PrepareAuraScript(spell_dru_might_of_ursoc_AuraScript)
void CalculateAmount(AuraEffect const *aurEff, int32 &amount, bool &)
AuraScript * GetAuraScript() const
void UpdateAmount(AuraEffect const *, AuraEffectHandleModes)
AuraScript * GetAuraScript() const override
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_dru_savage_defense_AuraScript)
void Absorb(AuraEffect *aurEff, DamageInfo &, uint32 &absorbAmount)
AuraScript * GetAuraScript() const override
void OnApply(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareAuraScript(spell_dru_savage_roar_AuraScript)
PrepareSpellScript(spell_dru_savage_roar_SpellScript)
AuraScript * GetAuraScript() const override
SpellScript * GetSpellScript() const override
bool Validate(SpellInfo const *) override
void HandleEffectCatProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void HandleEffectBearProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_dru_stampede_AuraScript)
AuraScript * GetAuraScript() const override
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_dru_starfall_dummy_SpellScript)
SpellScript * GetSpellScript() const override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void AfterApply(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareSpellScript(spell_dru_survival_instincts_SpellScript)
AuraScript * GetAuraScript() const override
SpellScript * GetSpellScript() const override
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
AuraScript * GetAuraScript() const override
SpellScript * GetSpellScript() const override
void RandomResizeList(std::list< T > &list, uint32 size)
Definition Containers.h:19
C::value_type const & SelectRandomContainerElement(C const &container)
Definition Containers.h:48
void AddSC_druid_spell_scripts()
DruidSpells
@ SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE
@ SPELL_DRUID_FERAL_CHARGE_CAT
@ SPELL_DRUID_NATURES_GRACE_TRIGGER
@ SPELL_DRUID_LIFEBLOOM_ENERGIZE
@ SPELL_DRUID_LIVING_SEED_PROC
@ SPELL_DRUID_STARSURGE_ENERGIZE
@ SPELL_DRUID_SOLAR_ECLIPSE_MARKER
@ SPELL_DRUID_LIVING_SEED_HEAL
@ SPELL_DRUID_LUNAR_ECLIPSE_MARKER
@ SPELL_DRUID_STAMPEDE_CAT_RANK_1
@ SPELL_DRUID_GLYPH_OF_STARFIRE
@ SPELL_DRUID_GLYPH_OF_INNERVATE
@ SPELL_DRUID_SAVAGE_ROAR_TRIGGER
@ SPELL_DRUID_BEAR_FORM
@ SPELL_DRUID_SAVAGE_ROAR
@ SPELL_DRUID_LIFEBLOOM_FINAL_HEAL
@ SPELL_DRUID_INCREASED_MOONFIRE_DURATION
@ SPELL_DRUID_SURVIVAL_INSTINCTS
@ SPELL_DRUID_LUNAR_ECLIPSE
@ SPELL_DRUID_NATURES_GRACE
@ SPELL_DRUID_STAMPEDE_BAER_RANK_1
@ SPELL_DRUID_STARSURGE
@ SPELL_DRUID_FERAL_CHARGE_BEAR
@ SPELL_DRUID_TIGER_S_FURY_ENERGIZE
@ SPELL_DRUID_SOLAR_ECLIPSE
@ SPELL_DRUID_STAMPEDE_CAT_STATE
@ SPELL_DRUID_STARFIRE
@ SPELL_DRUID_WRATH