TrinityCore
spell_hunter.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_HUNTER, SPELLFAMILY_PET and SPELLFAMILY_GENERIC spells used by hunter players.
20 * Ordered alphabetically using scriptname.
21 * Scriptnames of files in this file should be prefixed with "spell_hun_".
22 */
23
24#include "ScriptMgr.h"
25#include "CellImpl.h"
26#include "GridNotifiersImpl.h"
27#include "Pet.h"
28#include "SpellAuraEffects.h"
29#include "SpellHistory.h"
30#include "SpellMgr.h"
31#include "SpellScript.h"
32
34{
65};
66
68{
70};
71
72// 131894 - A Murder of Crows
74{
75 bool Validate(SpellInfo const* /*spellInfo*/) override
76 {
78 ({
83 });
84 }
85
86 void HandleDummyTick(AuraEffect const* /*aurEff*/)
87 {
88 Unit* target = GetTarget();
89
90 if (Unit* caster = GetCaster())
91 caster->CastSpell(target, SPELL_HUNTER_A_MURDER_OF_CROWS_DAMAGE, true);
92
96 target->CastSpell(target, SPELL_HUNTER_A_MURDER_OF_CROWS_VISUAL_3, true); // not a mistake, it is intended to cast twice
97 }
98
99 void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
100 {
101 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEATH)
102 if (Unit* caster = GetCaster())
103 caster->GetSpellHistory()->ResetCooldown(GetId(), true);
104 }
105
106 void Register() override
107 {
110 }
111};
112
113// 186257 - Aspect of the Cheetah
115{
116 bool Validate(SpellInfo const* /*spellInfo*/) override
117 {
118 return ValidateSpellInfo
119 ({
121 });
122 }
123
124 void HandleOnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
125 {
126 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
128 }
129
130 void Register() override
131 {
133 }
134};
135
136// 186265 - Aspect of the Turtle
138{
139 bool Validate(SpellInfo const* /*spellInfo*/) override
140 {
142 }
143
144 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
145 {
147 }
148
149 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
150 {
152 }
153
154 void Register() override
155 {
158 }
159};
160
161// 378750 - Cobra Sting
163{
164 bool Validate(SpellInfo const* spellInfo) override
165 {
166 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
167 }
168
169 bool RollProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*procInfo*/)
170 {
171 return roll_chance_i(GetEffect(EFFECT_1)->GetAmount());
172 }
173
174 void Register() override
175 {
177 }
178};
179
180// 109304 - Exhilaration
182{
183 bool Validate(SpellInfo const* /*spellInfo*/) override
184 {
186 }
187
189 {
192 }
193
194 void Register() override
195 {
197 }
198};
199
200// 212431 - Explosive Shot
202{
203 bool Validate(SpellInfo const* /*spellInfo*/) override
204 {
206 }
207
208 void HandlePeriodic(AuraEffect const* /*aurEff*/)
209 {
210 if (Unit* caster = GetCaster())
211 caster->CastSpell(GetTarget(), SPELL_HUNTER_EXPLOSIVE_SHOT_DAMAGE, true);
212 }
213
214 void Register() override
215 {
217 }
218};
219
220// 212658 - Hunting Party
222{
223 bool Validate(SpellInfo const* /*spellInfo*/) override
224 {
225 return ValidateSpellInfo(
226 {
229 });
230 }
231
232 void HandleProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
233 {
237 }
238
239 void Register() override
240 {
242 }
243};
244
245// 53478 - Last Stand Pet
247{
248 bool Validate(SpellInfo const* /*spellInfo*/) override
249 {
251 }
252
253 void HandleDummy(SpellEffIndex /*effIndex*/)
254 {
255 Unit* caster = GetCaster();
257 args.AddSpellBP0(caster->CountPctFromMaxHealth(30));
259 }
260
261 void Register() override
262 {
264 }
265};
266
267// 378016 - Latent Poison
269{
270 bool Validate(SpellInfo const* /*spellInfo*/) override
271 {
273 }
274
276 {
277 if (Aura* stack = GetHitUnit()->GetAura(SPELL_HUNTER_LATENT_POISON_STACK, GetCaster()->GetGUID()))
278 {
279 SetHitDamage(GetHitDamage() * stack->GetStackAmount());
280 stack->Remove();
281 }
282 }
283
284 void Register() override
285 {
287 }
288};
289
290// 19434 - Aimed Shot
291// 186270 - Raptor Strike
292// 217200 - Barbed Shot
293// 259387 - Mongoose Bite
295{
296 bool Validate(SpellInfo const* /*spellInfo*/) override
297 {
299 }
300
302 {
305 }
306
307 void Register() override
308 {
310 }
311};
312
313// 336904 - Latent Poison Injectors
315{
316 bool Validate(SpellInfo const* /*spellInfo*/) override
317 {
319 }
320
322 {
323 if (Aura* stack = GetHitUnit()->GetAura(SPELL_HUNTER_LATENT_POISON_INJECTORS_STACK, GetCaster()->GetGUID()))
324 {
325 SetHitDamage(GetHitDamage() * stack->GetStackAmount());
326 stack->Remove();
327 }
328 }
329
330 void Register() override
331 {
333 }
334};
335
336// 186270 - Raptor Strike
337// 259387 - Mongoose Bite
339{
340 bool Validate(SpellInfo const* /*spellInfo*/) override
341 {
343 }
344
346 {
349 }
350
351 void Register() override
352 {
354 }
355};
356
357// 53271 - Masters Call
359{
360 bool Validate(SpellInfo const* spellInfo) override
361 {
362 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } })
364 }
365
366 bool Load() override
367 {
368 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
369 }
370
372 {
374 ASSERT(pet); // checked in Spell::CheckCast
375
376 if (!pet->IsPet() || !pet->IsAlive())
377 return SPELL_FAILED_NO_PET;
378
379 // Do a mini Spell::CheckCasterAuras on the pet, no other way of doing this
381 uint32 const unitflag = pet->m_unitData->Flags;
382 if (!pet->GetCharmerGUID().IsEmpty())
383 result = SPELL_FAILED_CHARMED;
384 else if (unitflag & UNIT_FLAG_STUNNED)
385 result = SPELL_FAILED_STUNNED;
386 else if (unitflag & UNIT_FLAG_FLEEING)
387 result = SPELL_FAILED_FLEEING;
388 else if (unitflag & UNIT_FLAG_CONFUSED)
389 result = SPELL_FAILED_CONFUSED;
390
391 if (result != SPELL_CAST_OK)
392 return result;
393
394 Unit* target = GetExplTargetUnit();
395 if (!target)
397
398 if (!pet->IsWithinLOSInMap(target))
400
401 return SPELL_CAST_OK;
402 }
403
404 void HandleDummy(SpellEffIndex /*effIndex*/)
405 {
407 }
408
410 {
412 }
413
414 void Register() override
415 {
417
420 }
421};
422
423// 34477 - Misdirection
425{
426 bool Validate(SpellInfo const* /*spellInfo*/) override
427 {
429 }
430
431 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
432 {
433 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEFAULT || GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_INTERRUPT)
434 return;
435
438 }
439
440 void HandleProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
441 {
444 }
445
446 void Register() override
447 {
450 }
451};
452
453// 35079 - Misdirection (Proc)
455{
456 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
457 {
459 }
460
461 void Register() override
462 {
464 }
465};
466
467// 2643 - Multi-Shot
469{
470 bool Validate(SpellInfo const* /*spellInfo*/) override
471 {
473 }
474
475 bool Load() override
476 {
477 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
478 }
479
481 {
482 // We need to check hunter's spec because it doesn't generate focus on other specs than MM
483 if (GetCaster()->ToPlayer()->GetPrimarySpecialization() == ChrSpecialization::HunterMarksmanship)
485 }
486
487 void Register() override
488 {
490 }
491};
492
493// 55709 - Pet Heart of the Phoenix
495{
496 bool Load() override
497 {
498 if (!GetCaster()->IsPet())
499 return false;
500 return true;
501 }
502
503 bool Validate(SpellInfo const* /*spellInfo*/) override
504 {
506 }
507
508 void HandleScript(SpellEffIndex /*effIndex*/)
509 {
510 Unit* caster = GetCaster();
511 if (Unit* owner = caster->GetOwner())
512 {
514 {
516 args.AddSpellBP0(100);
517 owner->CastSpell(caster, SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED, args);
519 }
520 }
521 }
522
523 void Register() override
524 {
526 }
527};
528
529// 781 - Disengage
531{
532 bool Validate(SpellInfo const* /*spellInfo*/) override
533 {
535 }
536
538 {
540 {
543 }
544 }
545
546 void Register() override
547 {
549 }
550};
551
552// 257044 - Rapid Fire
554{
555 bool Validate(SpellInfo const* /*spellInfo*/) override
556 {
558 }
559
560 void HandlePeriodic(AuraEffect const* /*aurEff*/)
561 {
562 if (Unit* caster = GetCaster())
563 caster->CastSpell(GetTarget(), SPELL_HUNTER_RAPID_FIRE_DAMAGE, true);
564 }
565
566 void Register() override
567 {
569 }
570};
571
572// 257045 - Rapid Fire Damage
574{
575 bool Validate(SpellInfo const* /*spellInfo*/) override
576 {
578 }
579
580 void HandleHit(SpellEffIndex /*effIndex*/)
581 {
583 }
584
585 void Register() override
586 {
588 }
589};
590
591// 53480 - Roar of Sacrifice
593{
594 bool Validate(SpellInfo const* /*spellInfo*/) override
595 {
597 }
598
599 bool CheckProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
600 {
601 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
602 if (!damageInfo || !(damageInfo->GetSchoolMask() & aurEff->GetMiscValue()))
603 return false;
604
605 if (!GetCaster())
606 return false;
607
608 return true;
609 }
610
611 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
612 {
614
615 CastSpellExtraArgs args(aurEff);
616 args.AddSpellBP0(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()));
618 }
619
620 void Register() override
621 {
624 }
625};
626
627// 37506 - Scatter Shot
629{
630 bool Load() override
631 {
632 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
633 }
634
635 void HandleDummy(SpellEffIndex /*effIndex*/)
636 {
637 Player* caster = GetCaster()->ToPlayer();
638 // break Auto Shot and autohit
640 caster->AttackStop();
642 }
643
644 void Register() override
645 {
647 }
648};
649
650// 56641 - Steady Shot
652{
653 bool Validate(SpellInfo const* /*spellInfo*/) override
654 {
656 }
657
658 bool Load() override
659 {
660 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
661 }
662
664 {
666 }
667
668 void Register() override
669 {
671 }
672};
673
674// 1515 - Tame Beast
676{
678 {
679 883,
680 83242,
681 83243,
682 83244,
683 83245,
684 };
685
687 {
688 Player* caster = GetCaster()->ToPlayer();
689 if (!caster)
691
692 if (!GetExplTargetUnit())
694
695 if (Creature* target = GetExplTargetUnit()->ToCreature())
696 {
697 if (target->GetLevelForTarget(caster) > caster->GetLevel())
699
700 // use SMSG_PET_TAME_FAILURE?
701 if (!target->GetCreatureTemplate()->IsTameable(caster->CanTameExoticPets(), target->GetCreatureDifficulty()))
703
704 if (PetStable const* petStable = caster->GetPetStable())
705 {
706 if (petStable->CurrentPetIndex)
708
709 auto freeSlotItr = std::find_if(petStable->ActivePets.begin(), petStable->ActivePets.end(), [](Optional<PetStable::PetInfo> const& petInfo)
710 {
711 return !petInfo.has_value();
712 });
713
714 if (freeSlotItr == petStable->ActivePets.end())
715 {
718 }
719
720 // Check for known Call Pet X spells
721 std::size_t freeSlotIndex = std::distance(petStable->ActivePets.begin(), freeSlotItr);
722 if (!caster->HasSpell(CallPetSpellIds[freeSlotIndex]))
723 {
726 }
727 }
728
729 if (!caster->GetCharmedGUID().IsEmpty())
731
732 if (!target->GetOwnerGUID().IsEmpty())
733 {
736 }
737 }
738 else
740
741 return SPELL_CAST_OK;
742 }
743
744 void Register() override
745 {
747 }
748};
749
750// 67151 - Item - Hunter T9 4P Bonus (Steady Shot)
752{
753 bool Validate(SpellInfo const* /*spellInfo*/) override
754 {
756 }
757
758 bool CheckProc(ProcEventInfo& eventInfo)
759 {
760 if (eventInfo.GetActor()->GetTypeId() == TYPEID_PLAYER && eventInfo.GetActor()->ToPlayer()->GetPet())
761 return true;
762 return false;
763 }
764
765 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
766 {
768 Unit* caster = eventInfo.GetActor();
769
770 caster->CastSpell(caster->ToPlayer()->GetPet(), SPELL_HUNTER_T9_4P_GREATNESS, aurEff);
771 }
772
773 void Register() override
774 {
777 }
778};
779
780// 394366 - Find The Mark
782{
783 bool Validate(SpellInfo const* /*spellInfo*/) override
784 {
786 && sSpellMgr->AssertSpellInfo(SPELL_HUNTER_T29_2P_MARKSMANSHIP_DAMAGE, DIFFICULTY_NONE)->GetMaxTicks();
787 }
788
789 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
790 {
792
793 Unit* caster = eventInfo.GetActor();
794 uint32 ticks = sSpellMgr->AssertSpellInfo(SPELL_HUNTER_T29_2P_MARKSMANSHIP_DAMAGE, DIFFICULTY_NONE)->GetMaxTicks();
795 uint32 damage = CalculatePct(eventInfo.GetDamageInfo()->GetOriginalDamage(), aurEff->GetAmount()) / ticks;
796
798 .SetTriggeringSpell(eventInfo.GetProcSpell())
800 }
801
802 void Register() override
803 {
805 }
806};
807
809{
836}
@ DIFFICULTY_NONE
Definition: DBCEnums.h:874
uint32_t uint32
Definition: Define.h:142
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: Duration.h:32
#define ASSERT
Definition: Errors.h:68
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
#define MAX_ACTIVE_PETS
Definition: PetDefines.h:36
bool roll_chance_i(int chance)
Definition: Random.h:59
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SCHOOL_DAMAGE
SpellCastResult
@ SPELL_FAILED_STUNNED
@ SPELL_FAILED_BAD_IMPLICIT_TARGETS
@ SPELL_FAILED_ALREADY_HAVE_SUMMON
@ SPELL_FAILED_ALREADY_HAVE_CHARM
@ SPELL_FAILED_HIGHLEVEL
@ SPELL_FAILED_DONT_REPORT
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_FAILED_CONFUSED
@ SPELL_CAST_OK
@ SPELL_FAILED_CHARMED
@ SPELL_FAILED_LINE_OF_SIGHT
@ SPELL_FAILED_FLEEING
@ SPELL_FAILED_NO_PET
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_DEFAULT
@ AURA_REMOVE_BY_DEATH
@ AURA_REMOVE_BY_EXPIRE
@ AURA_REMOVE_BY_INTERRUPT
@ SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE
@ SPELL_AURA_MOD_INCREASE_SPEED
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_PERIODIC_DUMMY
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
Definition: SpellDefines.h:266
@ SPELLVALUE_BASE_POINT0
Definition: SpellDefines.h:196
#define sSpellMgr
Definition: SpellMgr.h:849
#define SpellCheckCastFn(F)
Definition: SpellScript.h:830
#define AuraEffectProcFn(F, I, N)
Definition: SpellScript.h:2160
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
#define AuraCheckEffectProcFn(F, I, N)
Definition: SpellScript.h:2136
#define SpellCastFn(F)
Definition: SpellScript.h:825
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
#define AuraCheckProcFn(F)
Definition: SpellScript.h:2130
#define SpellHitFn(F)
Definition: SpellScript.h:854
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:2040
@ UNIT_FLAG_STUNNED
Definition: UnitDefines.h:162
@ UNIT_FLAG_CONFUSED
Definition: UnitDefines.h:166
@ UNIT_FLAG_FLEEING
Definition: UnitDefines.h:167
@ CURRENT_AUTOREPEAT_SPELL
Definition: Unit.h:592
T CalculatePct(T base, U pct)
Definition: Util.h:72
int32 GetMiscValue() const
int32 GetAmount() const
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
HookList< CheckEffectProcHandler > DoCheckEffectProc
Definition: SpellScript.h:2135
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
Unit * GetCaster() const
AuraEffect * GetEffect(uint8 effIndex) const
Unit * GetTarget() const
HookList< CheckProcHandler > DoCheckProc
Definition: SpellScript.h:2129
HookList< EffectApplyHandler > OnEffectRemove
Definition: SpellScript.h:2035
HookList< EffectProcHandler > OnEffectProc
Definition: SpellScript.h:2155
uint32 GetId() const
uint32 GetOriginalDamage() const
Definition: Unit.h:447
SpellSchoolMask GetSchoolMask() const
Definition: Unit.h:443
uint32 GetDamage() const
Definition: Unit.h:446
bool IsEmpty() const
Definition: ObjectGuid.h:319
TypeID GetTypeId() const
Definition: Object.h:173
static Player * ToPlayer(Object *o)
Definition: Object.h:213
void SendAttackSwingCancelAttack() const
Definition: Player.cpp:21294
bool CanTameExoticPets() const
Definition: Player.h:2305
PetStable * GetPetStable()
Definition: Player.h:1222
Pet * GetPet() const
Definition: Player.cpp:21513
void SendTameFailure(PetTameResult result)
Definition: Player.cpp:21629
bool HasSpell(uint32 spell) const override
Definition: Player.cpp:3792
Unit * GetActionTarget() const
Definition: Unit.h:494
Spell const * GetProcSpell() const
Definition: Unit.h:508
DamageInfo * GetDamageInfo() const
Definition: Unit.h:505
Unit * GetActor() const
Definition: Unit.h:493
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
Definition: SpellInfo.cpp:495
void ModifyCooldown(uint32 spellId, Duration cooldownMod, bool withoutCategoryCooldown=false)
uint32 const Id
Definition: SpellInfo.h:325
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition: SpellInfo.h:577
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Definition: SpellScript.h:173
HookList< CastHandler > AfterCast
Definition: SpellScript.h:824
HookList< CheckCastHandler > OnCheckCast
Definition: SpellScript.h:829
int32 GetHitDamage() const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
Definition: SpellScript.h:852
HookList< HitHandler > OnHit
Definition: SpellScript.h:850
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
Spell * GetSpell() const
Definition: SpellScript.h:987
void SetHitDamage(int32 damage)
Unit * GetExplTargetUnit() const
void UnregisterRedirectThreat(uint32 spellId)
Definition: Unit.h:627
ThreatManager & GetThreatManager()
Definition: Unit.h:1063
UF::UpdateField< UF::UnitData, 0, TYPEID_UNIT > m_unitData
Definition: Unit.h:1814
bool IsPet() const
Definition: Unit.h:740
ObjectGuid GetCharmedGUID() const
Definition: Unit.h:1190
bool IsAlive() const
Definition: Unit.h:1164
uint64 CountPctFromMaxHealth(int32 pct) const
Definition: Unit.h:785
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
SpellHistory * GetSpellHistory()
Definition: Unit.h:1457
ObjectGuid GetCharmerGUID() const
Definition: Unit.h:1187
void RemoveMovementImpairingAuras(bool withRoot)
Definition: Unit.cpp:4154
Guardian * GetGuardianPet() const
Definition: Unit.cpp:6046
bool AttackStop()
Definition: Unit.cpp:5781
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
uint8 GetLevel() const
Definition: Unit.h:746
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true)
Definition: Unit.cpp:3017
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
Unit * GetOwner() const
Definition: Object.cpp:2229
bool IsWithinLOSInMap(WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
Definition: Object.cpp:1181
void HandleDummyTick(AuraEffect const *)
void RemoveEffect(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void Register() override
void HandleOnRemove(AuraEffect const *, AuraEffectHandleModes)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool RollProc(AuraEffect const *, ProcEventInfo &)
bool Validate(SpellInfo const *spellInfo) override
void Register() override
void Register() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandlePeriodic(AuraEffect const *)
void Register() override
bool Validate(SpellInfo const *) override
void Register() override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &)
void Register() override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
SpellCastResult DoCheckCast()
void HandleDummy(SpellEffIndex)
void HandleScriptEffect(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
void Register() override
bool Load() override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void Register() override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &)
void Register() override
bool Load() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void Register() override
bool Validate(SpellInfo const *) override
void HandleHit(SpellEffIndex)
void Register() override
bool Validate(SpellInfo const *) override
void HandlePeriodic(AuraEffect const *)
bool CheckProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Load() override
void Register() override
bool Validate(SpellInfo const *) override
bool Load() override
void Register() override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void Register() override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool CheckProc(ProcEventInfo &eventInfo)
void Register() override
static constexpr uint32 CallPetSpellIds[MAX_ACTIVE_PETS]
SpellCastResult CheckCast()
@ SPELL_DRAENEI_GIFT_OF_THE_NAARU
@ SPELL_HUNTER_ASPECT_OF_THE_TURTLE_PACIFY_AURA
@ SPELL_HUNTER_A_MURDER_OF_CROWS_DAMAGE
@ SPELL_HUNTER_A_MURDER_OF_CROWS_VISUAL_1
@ SPELL_HUNTER_STEADY_SHOT_FOCUS
@ SPELL_HUNTER_MISDIRECTION_PROC
@ SPELL_HUNTER_POSTHASTE_TALENT
@ SPELL_HUNTER_MISDIRECTION
@ SPELL_HUNTER_A_MURDER_OF_CROWS_VISUAL_2
@ SPELL_HUNTER_RAPID_FIRE_DAMAGE
@ SPELL_HUNTER_MASTERS_CALL_TRIGGERED
@ SPELL_HUNTER_RAPID_FIRE_ENERGIZE
@ SPELL_HUNTER_EXHILARATION_PET
@ SPELL_HUNTER_A_MURDER_OF_CROWS_VISUAL_3
@ SPELL_HUNTER_EXHILARATION
@ SPELL_HUNTER_LATENT_POISON_STACK
@ SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF
@ SPELL_HUNTER_LATENT_POISON_INJECTORS_DAMAGE
@ SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED
@ SPELL_HUNTER_ASPECT_CHEETAH_SLOW
@ SPELL_HUNTER_EXHILARATION_R2
@ SPELL_HUNTER_MULTI_SHOT_FOCUS
@ SPELL_ROAR_OF_SACRIFICE_TRIGGERED
@ SPELL_HUNTER_POSTHASTE_INCREASE_SPEED
@ SPELL_HUNTER_LATENT_POISON_DAMAGE
@ SPELL_HUNTER_PET_LAST_STAND_TRIGGERED
@ SPELL_HUNTER_EXPLOSIVE_SHOT_DAMAGE
@ SPELL_HUNTER_LONE_WOLF
@ SPELL_HUNTER_T29_2P_MARKSMANSHIP_DAMAGE
@ SPELL_HUNTER_T9_4P_GREATNESS
@ SPELL_HUNTER_LATENT_POISON_INJECTORS_STACK
void AddSC_hunter_spell_scripts()
CastSpellExtraArgs & AddSpellBP0(int32 val)
Definition: SpellDefines.h:475
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
Definition: SpellDefines.h:474
MiscSpells