AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
SpellInfo Class Reference

#include "SpellInfo.h"

Public Member Functions

 SpellInfo (SpellEntry const *spellEntry)
 
 ~SpellInfo ()
 
uint32 GetCategory () const
 
bool HasEffect (SpellEffects effect) const
 
bool HasEffectMechanic (Mechanics mechanic) const
 
bool HasAura (AuraType aura) const
 
bool HasAnyAura () const
 
bool HasAreaAuraEffect () const
 
bool HasOnlyDamageEffects () const
 
bool HasAttribute (SpellAttr0 attribute) const
 
bool HasAttribute (SpellAttr1 attribute) const
 
bool HasAttribute (SpellAttr2 attribute) const
 
bool HasAttribute (SpellAttr3 attribute) const
 
bool HasAttribute (SpellAttr4 attribute) const
 
bool HasAttribute (SpellAttr5 attribute) const
 
bool HasAttribute (SpellAttr6 attribute) const
 
bool HasAttribute (SpellAttr7 attribute) const
 
bool HasAttribute (SpellCustomAttributes customAttribute) const
 
bool IsExplicitDiscovery () const
 
bool IsLootCrafting () const
 
bool IsQuestTame () const
 
bool IsProfessionOrRiding () const
 
bool IsProfession () const
 
bool IsPrimaryProfession () const
 
bool IsPrimaryProfessionFirstRank () const
 
bool IsAbilityLearnedWithProfession () const
 
bool IsAbilityOfSkillType (uint32 skillType) const
 
bool IsAffectingArea () const
 
bool CanBeRedirectedBySpellMagnet () const
 
bool IsTargetingArea () const
 
bool NeedsExplicitUnitTarget () const
 
bool NeedsToBeTriggeredByCaster (SpellInfo const *triggeringSpell, uint8 effIndex=MAX_SPELL_EFFECTS) const
 
bool IsChannelCategorySpell () const
 
bool IsSelfCast () const
 
bool IsPassive () const
 
bool IsAutocastable () const
 
bool ComputeIsCritCapable () const
 
bool IsCritCapable () const
 
bool RequireCooldownInfo () const
 
void SetCritCapable (bool val)
 
bool ComputeIsStackableWithRanks () const
 
bool IsStackableWithRanks () const
 
void SetStackableWithRanks (bool val)
 
bool IsSpellValid () const
 
void SetSpellValid (bool val)
 
bool IsPassiveStackableWithRanks () const
 
bool IsMultiSlotAura () const
 
bool IsCooldownStartedOnEvent () const
 
bool IsDeathPersistent () const
 
bool IsRequiringDeadTarget () const
 
bool IsAllowingDeadTarget () const
 
bool CanBeUsedInCombat () const
 
bool IsPositive () const
 
bool IsPositiveEffect (uint8 effIndex) const
 
bool IsChanneled () const
 
bool IsActionAllowedChannel () const
 
bool NeedsComboPoints () const
 
bool IsBreakingStealth () const
 
bool IsRangedWeaponSpell () const
 
bool IsAutoRepeatRangedSpell () const
 
bool HasInitialAggro () const
 
bool IsAffected (uint32 familyName, flag96 const &familyFlags) const
 
bool IsAffectedBySpellMods () const
 
bool IsAffectedBySpellMod (SpellModifier const *mod) const
 
bool CanPierceImmuneAura (SpellInfo const *auraSpellInfo) const
 
bool CanDispelAura (SpellInfo const *auraSpellInfo) const
 
void ApplyAllSpellImmunitiesTo (Unit *target, SpellEffectInfo const *effect, bool apply) const
 
bool CanSpellProvideImmunityAgainstAura (SpellInfo const *auraSpellInfo) const
 
bool CanSpellCastOverrideAuraEffect (AuraEffect const *aurEff) const
 
bool IsSingleTarget () const
 
bool IsAuraExclusiveBySpecificWith (SpellInfo const *spellInfo) const
 
bool IsAuraExclusiveBySpecificPerCasterWith (SpellInfo const *spellInfo) const
 
SpellCastResult CheckShapeshift (uint32 form) const
 
SpellCastResult CheckLocation (uint32 map_id, uint32 zone_id, uint32 area_id, Player *player=nullptr, bool strict=true) const
 
SpellCastResult CheckTarget (WorldObject const *caster, WorldObject const *target, bool implicit=true, Unit const *originalCaster=nullptr) const
 
SpellCastResult CheckExplicitTarget (WorldObject const *caster, WorldObject const *target, Item const *itemTarget=nullptr) const
 
bool CheckTargetCreatureType (Unit const *target) const
 
bool IsAuraEffectEqual (SpellInfo const *otherSpellInfo) const
 
bool ValidateAttribute6SpellDamageMods (Unit const *caster, AuraEffect const *auraEffect, bool isDot) const
 
SpellSchoolMask GetSchoolMask () const
 
uint64 GetAllEffectsMechanicMask () const
 
uint64 GetEffectMechanicMask (uint8 effIndex) const
 
uint64 GetSpellMechanicMaskByEffectMask (uint32 effectMask) const
 
Mechanics GetEffectMechanic (uint8 effIndex) const
 
bool HasAnyEffectMechanic () const
 
ImmunityInfo const * GetImmunityInfo (uint8 effIndex) const
 
uint32 GetDispelMask () const
 
uint32 GetExplicitTargetMask () const
 
AuraStateType GetAuraState () const
 
SpellSpecificType GetSpellSpecific () const
 
float GetMinRange (bool positive=false) const
 
float GetMaxRange (bool positive=false, WorldObject *caster=nullptr, Spell *spell=nullptr) const
 
int32 GetDuration () const
 
int32 GetMaxDuration () const
 
uint32 GetMaxTicks () const
 
uint32 CalcCastTime (WorldObject *caster=nullptr, Spell *spell=nullptr) const
 
uint32 GetRecoveryTime () const
 
int32 CalcPowerCost (WorldObject const *caster, SpellSchoolMask schoolMask, Spell *spell=nullptr) const
 
bool IsRanked () const
 
uint8 GetRank () const
 
SpellInfo const * GetFirstRankSpell () const
 
SpellInfo const * GetLastRankSpell () const
 
SpellInfo const * GetNextRankSpell () const
 
SpellInfo const * GetPrevRankSpell () const
 
SpellInfo const * GetAuraRankForLevel (uint8 level) const
 
bool IsRankOf (SpellInfo const *spellInfo) const
 
bool IsDifferentRankOf (SpellInfo const *spellInfo) const
 
bool IsHighRankOf (SpellInfo const *spellInfo) const
 
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > const & GetEffects () const
 
SpellEffectInfo const & GetEffect (SpellEffIndex index) const
 
void _InitializeExplicitTargetMask ()
 
bool _IsPositiveEffect (uint8 effIndex, bool deep) const
 
bool _IsPositiveSpell () const
 
AuraStateType LoadAuraState () const
 
SpellSpecificType LoadSpellSpecific () const
 
void _UnloadImplicitTargetConditionLists ()
 
void _LoadImmunityInfo ()
 
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > & _GetEffects ()
 
SpellEffectInfo & _GetEffect (SpellEffIndex index)
 

Static Public Member Functions

static uint32 GetDispelMask (DispelType type)
 
static bool _IsPositiveTarget (uint32 targetA, uint32 targetB)
 

Public Attributes

uint32 Id
 
SpellCategoryEntry const * CategoryEntry
 
uint32 Dispel
 
uint32 Mechanic
 
uint32 Attributes
 
uint32 AttributesEx
 
uint32 AttributesEx2
 
uint32 AttributesEx3
 
uint32 AttributesEx4
 
uint32 AttributesEx5
 
uint32 AttributesEx6
 
uint32 AttributesEx7
 
uint32 AttributesCu
 
uint32 Stances
 
uint32 StancesNot
 
uint32 Targets
 
uint32 TargetCreatureType
 
uint32 RequiresSpellFocus
 
uint32 FacingCasterFlags
 
uint32 CasterAuraState
 
uint32 TargetAuraState
 
uint32 CasterAuraStateNot
 
uint32 TargetAuraStateNot
 
uint32 CasterAuraSpell
 
uint32 TargetAuraSpell
 
uint32 ExcludeCasterAuraSpell
 
uint32 ExcludeTargetAuraSpell
 
SpellCastTimesEntry const * CastTimeEntry
 
uint32 RecoveryTime
 
uint32 CategoryRecoveryTime
 
uint32 StartRecoveryCategory
 
uint32 StartRecoveryTime
 
uint32 InterruptFlags
 
uint32 AuraInterruptFlags
 
uint32 ChannelInterruptFlags
 
uint32 ProcFlags
 
uint32 ProcChance
 
uint32 ProcCharges
 
uint32 MaxLevel
 
uint32 BaseLevel
 
uint32 SpellLevel
 
SpellDurationEntry const * DurationEntry
 
uint32 PowerType
 
uint32 ManaCost
 
uint32 ManaCostPerlevel
 
uint32 ManaPerSecond
 
uint32 ManaPerSecondPerLevel
 
uint32 ManaCostPercentage
 
uint32 RuneCostID
 
SpellRangeEntry const * RangeEntry
 
float Speed
 
uint32 StackAmount
 
std::array< uint32, 2 > Totem
 
std::array< int32, MAX_SPELL_REAGENTS > Reagent
 
std::array< uint32, MAX_SPELL_REAGENTS > ReagentCount
 
int32 EquippedItemClass
 
int32 EquippedItemSubClassMask
 
int32 EquippedItemInventoryTypeMask
 
std::array< uint32, 2 > TotemCategory
 
std::array< uint32, 2 > SpellVisual
 
uint32 SpellIconID
 
uint32 ActiveIconID
 
uint32 SpellPriority
 
std::array< char const *, 16 > SpellName
 
std::array< char const *, 16 > Rank
 
uint32 MaxTargetLevel
 
uint32 MaxAffectedTargets
 
uint32 SpellFamilyName
 
flag96 SpellFamilyFlags
 
uint32 DmgClass
 
uint32 PreventionType
 
int32 AreaGroupId
 
uint32 SchoolMask
 
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
 
uint32 ExplicitTargetMask
 
SpellChainNode const * ChainEntry
 
AuraStateType _auraState
 
SpellSpecificType _spellSpecific
 
bool _isStackableWithRanks
 
bool _isSpellValid
 
bool _isCritCapable
 
bool _requireCooldownInfo
 
float JumpDistance
 
SpellDiminishInfo _diminishInfoNonTriggered
 
SpellDiminishInfo _diminishInfoTriggered
 
ImmunityInfo _immunityInfo [MAX_SPELL_EFFECTS]
 

Friends

class SpellMgr
 

Detailed Description

Constructor & Destructor Documentation

◆ SpellInfo()

SpellInfo::SpellInfo ( SpellEntry const *  spellEntry)
791{
792 Id = spellEntry->Id;
793 CategoryEntry = spellEntry->Category ? sSpellCategoryStore.LookupEntry(spellEntry->Category) : nullptr;
794 Dispel = spellEntry->Dispel;
795 Mechanic = spellEntry->Mechanic;
796 Attributes = spellEntry->Attributes;
797 AttributesEx = spellEntry->AttributesEx;
798 AttributesEx2 = spellEntry->AttributesEx2;
799 AttributesEx3 = spellEntry->AttributesEx3;
800 AttributesEx4 = spellEntry->AttributesEx4;
801 AttributesEx5 = spellEntry->AttributesEx5;
802 AttributesEx6 = spellEntry->AttributesEx6;
803 AttributesEx7 = spellEntry->AttributesEx7;
804 AttributesCu = 0;
805 Stances = spellEntry->Stances;
806 StancesNot = spellEntry->StancesNot;
807 Targets = spellEntry->Targets;
808 TargetCreatureType = spellEntry->TargetCreatureType;
809 RequiresSpellFocus = spellEntry->RequiresSpellFocus;
810 FacingCasterFlags = spellEntry->FacingCasterFlags;
811 CasterAuraState = spellEntry->CasterAuraState;
812 TargetAuraState = spellEntry->TargetAuraState;
813 CasterAuraStateNot = spellEntry->CasterAuraStateNot;
814 TargetAuraStateNot = spellEntry->TargetAuraStateNot;
815 CasterAuraSpell = spellEntry->CasterAuraSpell;
816 TargetAuraSpell = spellEntry->TargetAuraSpell;
817 ExcludeCasterAuraSpell = spellEntry->ExcludeCasterAuraSpell;
818 ExcludeTargetAuraSpell = spellEntry->ExcludeTargetAuraSpell;
819 CastTimeEntry = spellEntry->CastingTimeIndex ? sSpellCastTimesStore.LookupEntry(spellEntry->CastingTimeIndex) : nullptr;
820 RecoveryTime = spellEntry->RecoveryTime;
821 CategoryRecoveryTime = spellEntry->CategoryRecoveryTime;
822 StartRecoveryCategory = spellEntry->StartRecoveryCategory;
823 StartRecoveryTime = spellEntry->StartRecoveryTime;
824 InterruptFlags = spellEntry->InterruptFlags;
825 AuraInterruptFlags = spellEntry->AuraInterruptFlags;
826 ChannelInterruptFlags = spellEntry->ChannelInterruptFlags;
827 ProcFlags = spellEntry->ProcFlags;
828 ProcChance = spellEntry->ProcChance;
829 ProcCharges = spellEntry->ProcCharges;
830 MaxLevel = spellEntry->MaxLevel;
831 BaseLevel = spellEntry->BaseLevel;
832 SpellLevel = spellEntry->SpellLevel;
833 DurationEntry = spellEntry->DurationIndex ? sSpellDurationStore.LookupEntry(spellEntry->DurationIndex) : nullptr;
834 PowerType = spellEntry->PowerType;
835 ManaCost = spellEntry->ManaCost;
836 ManaCostPerlevel = spellEntry->ManaCostPerlevel;
837 ManaPerSecond = spellEntry->ManaPerSecond;
838 ManaPerSecondPerLevel = spellEntry->ManaPerSecondPerLevel;
839 ManaCostPercentage = spellEntry->ManaCostPercentage;
840 RuneCostID = spellEntry->RuneCostID;
841 RangeEntry = spellEntry->RangeIndex ? sSpellRangeStore.LookupEntry(spellEntry->RangeIndex) : nullptr;
842 Speed = spellEntry->Speed;
843 StackAmount = spellEntry->StackAmount;
844 Totem = spellEntry->Totem;
845 Reagent = spellEntry->Reagent;
846 ReagentCount = spellEntry->ReagentCount;
847 EquippedItemClass = spellEntry->EquippedItemClass;
848 EquippedItemSubClassMask = spellEntry->EquippedItemSubClassMask;
849 EquippedItemInventoryTypeMask = spellEntry->EquippedItemInventoryTypeMask;
850 TotemCategory = spellEntry->TotemCategory;
851 SpellVisual = spellEntry->SpellVisual;
852 SpellIconID = spellEntry->SpellIconID;
853 ActiveIconID = spellEntry->ActiveIconID;
854 SpellPriority = spellEntry->SpellPriority;
855 SpellName = spellEntry->SpellName;
856 Rank = spellEntry->Rank;
857 MaxTargetLevel = spellEntry->MaxTargetLevel;
858 MaxAffectedTargets = spellEntry->MaxAffectedTargets;
859 SpellFamilyName = spellEntry->SpellFamilyName;
860 SpellFamilyFlags = spellEntry->SpellFamilyFlags;
861 DmgClass = spellEntry->DmgClass;
862 PreventionType = spellEntry->PreventionType;
863 AreaGroupId = spellEntry->AreaGroupId;
864 SchoolMask = spellEntry->SchoolMask;
865 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
866 Effects[i] = SpellEffectInfo(spellEntry, this, i);
867
868 ChainEntry = nullptr;
870
871 // Mine
872 _isStackableWithRanks = false;
873 _isSpellValid = true;
874 _isCritCapable = false;
875 _requireCooldownInfo = false;
876 JumpDistance = 0.0f;
877}
DBCStorage< SpellCategoryEntry > sSpellCategoryStore(SpellCategoryfmt)
DBCStorage< SpellCastTimesEntry > sSpellCastTimesStore(SpellCastTimefmt)
DBCStorage< SpellRangeEntry > sSpellRangeStore(SpellRangefmt)
DBCStorage< SpellDurationEntry > sSpellDurationStore(SpellDurationfmt)
#define MAX_SPELL_EFFECTS
Definition DBCStructure.h:1673
std::uint8_t uint8
Definition Define.h:109
Targets
Definition SharedDefines.h:1413
TotemCategory
Definition SharedDefines.h:3316
ProcFlags
Definition SpellMgr.h:107
PowerType
Definition VehicleDefines.h:29
Definition SpellInfo.h:270
uint32 ChannelInterruptFlags
Definition SpellInfo.h:378
uint32 RequiresSpellFocus
Definition SpellInfo.h:361
uint32 BaseLevel
Definition SpellInfo.h:383
uint32 MaxLevel
Definition SpellInfo.h:382
uint32 SpellLevel
Definition SpellInfo.h:384
uint32 TargetAuraState
Definition SpellInfo.h:364
std::array< int32, MAX_SPELL_REAGENTS > Reagent
Definition SpellInfo.h:397
uint32 ExcludeTargetAuraSpell
Definition SpellInfo.h:370
uint32 TargetAuraStateNot
Definition SpellInfo.h:366
uint32 PreventionType
Definition SpellInfo.h:414
uint32 CasterAuraSpell
Definition SpellInfo.h:367
uint32 RuneCostID
Definition SpellInfo.h:392
uint32 MaxTargetLevel
Definition SpellInfo.h:409
uint32 Stances
Definition SpellInfo.h:357
uint32 ManaCostPerlevel
Definition SpellInfo.h:388
flag96 SpellFamilyFlags
Definition SpellInfo.h:412
uint32 AttributesCu
Definition SpellInfo.h:356
uint32 RecoveryTime
Definition SpellInfo.h:372
uint32 ManaPerSecondPerLevel
Definition SpellInfo.h:390
bool _isSpellValid
Definition SpellInfo.h:425
uint32 StancesNot
Definition SpellInfo.h:358
uint32 StackAmount
Definition SpellInfo.h:395
float JumpDistance
Definition SpellInfo.h:428
uint32 Mechanic
Definition SpellInfo.h:347
uint32 Id
Definition SpellInfo.h:344
SpellRangeEntry const * RangeEntry
Definition SpellInfo.h:393
uint32 ProcCharges
Definition SpellInfo.h:381
bool _requireCooldownInfo
Definition SpellInfo.h:427
bool _isStackableWithRanks
Definition SpellInfo.h:424
uint32 Dispel
Definition SpellInfo.h:346
uint32 ActiveIconID
Definition SpellInfo.h:405
float Speed
Definition SpellInfo.h:394
int32 EquippedItemClass
Definition SpellInfo.h:399
uint32 SchoolMask
Definition SpellInfo.h:416
uint32 CasterAuraState
Definition SpellInfo.h:363
std::array< uint32, 2 > SpellVisual
Definition SpellInfo.h:403
uint32 CategoryRecoveryTime
Definition SpellInfo.h:373
uint32 ExplicitTargetMask
Definition SpellInfo.h:418
uint32 AttributesEx3
Definition SpellInfo.h:351
uint32 CasterAuraStateNot
Definition SpellInfo.h:365
int32 AreaGroupId
Definition SpellInfo.h:415
uint32 ManaPerSecond
Definition SpellInfo.h:389
std::array< uint32, MAX_SPELL_REAGENTS > ReagentCount
Definition SpellInfo.h:398
uint32 InterruptFlags
Definition SpellInfo.h:376
SpellDurationEntry const * DurationEntry
Definition SpellInfo.h:385
uint32 Attributes
Definition SpellInfo.h:348
uint32 AttributesEx
Definition SpellInfo.h:349
uint32 SpellPriority
Definition SpellInfo.h:406
SpellCategoryEntry const * CategoryEntry
Definition SpellInfo.h:345
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
Definition SpellInfo.h:417
uint32 MaxAffectedTargets
Definition SpellInfo.h:410
uint32 ManaCostPercentage
Definition SpellInfo.h:391
uint32 AttributesEx6
Definition SpellInfo.h:354
uint32 AttributesEx7
Definition SpellInfo.h:355
int32 EquippedItemSubClassMask
Definition SpellInfo.h:400
uint32 FacingCasterFlags
Definition SpellInfo.h:362
uint32 StartRecoveryTime
Definition SpellInfo.h:375
uint32 TargetAuraSpell
Definition SpellInfo.h:368
uint32 SpellIconID
Definition SpellInfo.h:404
SpellChainNode const * ChainEntry
Definition SpellInfo.h:419
bool _isCritCapable
Definition SpellInfo.h:426
SpellCastTimesEntry const * CastTimeEntry
Definition SpellInfo.h:371
int32 EquippedItemInventoryTypeMask
Definition SpellInfo.h:401
uint32 TargetCreatureType
Definition SpellInfo.h:360
uint32 ProcChance
Definition SpellInfo.h:380
uint32 AttributesEx2
Definition SpellInfo.h:350
uint32 DmgClass
Definition SpellInfo.h:413
uint32 AttributesEx5
Definition SpellInfo.h:353
uint32 AttributesEx4
Definition SpellInfo.h:352
uint32 ExcludeCasterAuraSpell
Definition SpellInfo.h:369
uint32 StartRecoveryCategory
Definition SpellInfo.h:374
uint32 SpellFamilyName
Definition SpellInfo.h:411
uint32 ManaCost
Definition SpellInfo.h:387
std::array< char const *, 16 > SpellName
Definition SpellInfo.h:407
uint32 AuraInterruptFlags
Definition SpellInfo.h:377
std::array< char const *, 16 > Rank
Definition SpellInfo.h:408
Definition Totem.h:51
Totem(SummonPropertiesEntry const *properties, ObjectGuid owner)
Definition Totem.cpp:27

References _isCritCapable, _isSpellValid, _isStackableWithRanks, _requireCooldownInfo, ActiveIconID, SpellEntry::ActiveIconID, AreaGroupId, SpellEntry::AreaGroupId, Attributes, SpellEntry::Attributes, AttributesCu, AttributesEx, SpellEntry::AttributesEx, AttributesEx2, SpellEntry::AttributesEx2, AttributesEx3, SpellEntry::AttributesEx3, AttributesEx4, SpellEntry::AttributesEx4, AttributesEx5, SpellEntry::AttributesEx5, AttributesEx6, SpellEntry::AttributesEx6, AttributesEx7, SpellEntry::AttributesEx7, AuraInterruptFlags, SpellEntry::AuraInterruptFlags, BaseLevel, SpellEntry::BaseLevel, CasterAuraSpell, SpellEntry::CasterAuraSpell, CasterAuraState, SpellEntry::CasterAuraState, CasterAuraStateNot, SpellEntry::CasterAuraStateNot, SpellEntry::CastingTimeIndex, CastTimeEntry, SpellEntry::Category, CategoryEntry, CategoryRecoveryTime, SpellEntry::CategoryRecoveryTime, ChainEntry, ChannelInterruptFlags, SpellEntry::ChannelInterruptFlags, Dispel, SpellEntry::Dispel, DmgClass, SpellEntry::DmgClass, DurationEntry, SpellEntry::DurationIndex, Effects, EquippedItemClass, SpellEntry::EquippedItemClass, EquippedItemInventoryTypeMask, SpellEntry::EquippedItemInventoryTypeMask, EquippedItemSubClassMask, SpellEntry::EquippedItemSubClassMask, ExcludeCasterAuraSpell, SpellEntry::ExcludeCasterAuraSpell, ExcludeTargetAuraSpell, SpellEntry::ExcludeTargetAuraSpell, ExplicitTargetMask, FacingCasterFlags, SpellEntry::FacingCasterFlags, Id, SpellEntry::Id, InterruptFlags, SpellEntry::InterruptFlags, JumpDistance, ManaCost, SpellEntry::ManaCost, ManaCostPercentage, SpellEntry::ManaCostPercentage, ManaCostPerlevel, SpellEntry::ManaCostPerlevel, ManaPerSecond, SpellEntry::ManaPerSecond, ManaPerSecondPerLevel, SpellEntry::ManaPerSecondPerLevel, MAX_SPELL_EFFECTS, MaxAffectedTargets, SpellEntry::MaxAffectedTargets, MaxLevel, SpellEntry::MaxLevel, MaxTargetLevel, SpellEntry::MaxTargetLevel, Mechanic, SpellEntry::Mechanic, SpellEntry::PowerType, PreventionType, SpellEntry::PreventionType, ProcChance, SpellEntry::ProcChance, ProcCharges, SpellEntry::ProcCharges, SpellEntry::ProcFlags, RangeEntry, SpellEntry::RangeIndex, Rank, SpellEntry::Rank, Reagent, SpellEntry::Reagent, ReagentCount, SpellEntry::ReagentCount, RecoveryTime, SpellEntry::RecoveryTime, RequiresSpellFocus, SpellEntry::RequiresSpellFocus, RuneCostID, SpellEntry::RuneCostID, SchoolMask, SpellEntry::SchoolMask, Speed, SpellEntry::Speed, SpellFamilyFlags, SpellEntry::SpellFamilyFlags, SpellFamilyName, SpellEntry::SpellFamilyName, SpellIconID, SpellEntry::SpellIconID, SpellLevel, SpellEntry::SpellLevel, SpellName, SpellEntry::SpellName, SpellPriority, SpellEntry::SpellPriority, SpellVisual, SpellEntry::SpellVisual, sSpellCastTimesStore, sSpellCategoryStore, sSpellDurationStore, sSpellRangeStore, StackAmount, SpellEntry::StackAmount, Stances, SpellEntry::Stances, StancesNot, SpellEntry::StancesNot, StartRecoveryCategory, SpellEntry::StartRecoveryCategory, StartRecoveryTime, SpellEntry::StartRecoveryTime, TargetAuraSpell, SpellEntry::TargetAuraSpell, TargetAuraState, SpellEntry::TargetAuraState, TargetAuraStateNot, SpellEntry::TargetAuraStateNot, TargetCreatureType, SpellEntry::TargetCreatureType, SpellEntry::Targets, SpellEntry::Totem, and SpellEntry::TotemCategory.

◆ ~SpellInfo()

SpellInfo::~SpellInfo ( )
880{
882}
void _UnloadImplicitTargetConditionLists()
Definition SpellInfo.cpp:3311

References _UnloadImplicitTargetConditionLists().

Member Function Documentation

◆ _GetEffect()

SpellEffectInfo & SpellInfo::_GetEffect ( SpellEffIndex  index)
inline
584{ ASSERT(index < Effects.size()); return Effects[index]; }
#define ASSERT
Definition Errors.h:68

References ASSERT.

◆ _GetEffects()

std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > & SpellInfo::_GetEffects ( )
inline
583{ return Effects; }

◆ _InitializeExplicitTargetMask()

void SpellInfo::_InitializeExplicitTargetMask ( )
3044{
3045 bool srcSet = false;
3046 bool dstSet = false;
3047 uint32 targetMask = Targets;
3048 // prepare target mask using effect target entries
3049 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3050 {
3051 if (!Effects[i].IsEffect())
3052 continue;
3053 targetMask |= Effects[i].TargetA.GetExplicitTargetMask(srcSet, dstSet);
3054 targetMask |= Effects[i].TargetB.GetExplicitTargetMask(srcSet, dstSet);
3055
3056 // add explicit target flags based on spell effects which have EFFECT_IMPLICIT_TARGET_EXPLICIT and no valid target provided
3057 if (Effects[i].GetImplicitTargetType() != EFFECT_IMPLICIT_TARGET_EXPLICIT)
3058 continue;
3059
3060 // extend explicit target mask only if valid targets for effect could not be provided by target types
3061 uint32 effectTargetMask = Effects[i].GetMissingTargetMask(srcSet, dstSet, targetMask);
3062
3063 // don't add explicit object/dest flags when spell has no max range
3064 if (GetMaxRange(true) == 0.0f && GetMaxRange(false) == 0.0f)
3066 targetMask |= effectTargetMask;
3067 }
3068 ExplicitTargetMask = targetMask;
3069}
std::uint32_t uint32
Definition Define.h:107
@ EFFECT_IMPLICIT_TARGET_EXPLICIT
Definition SpellInfo.h:144
@ TARGET_FLAG_GAMEOBJECT
Definition SpellInfo.h:58
@ TARGET_FLAG_DEST_LOCATION
Definition SpellInfo.h:53
@ TARGET_FLAG_UNIT_MASK
Definition SpellInfo.h:69
@ TARGET_FLAG_CORPSE_MASK
Definition SpellInfo.h:72
float GetMaxRange(bool positive=false, WorldObject *caster=nullptr, Spell *spell=nullptr) const
Definition SpellInfo.cpp:2764
uint32 Targets
Definition SpellInfo.h:359

References EFFECT_IMPLICIT_TARGET_EXPLICIT, Effects, ExplicitTargetMask, GetMaxRange(), MAX_SPELL_EFFECTS, TARGET_FLAG_CORPSE_MASK, TARGET_FLAG_DEST_LOCATION, TARGET_FLAG_GAMEOBJECT, TARGET_FLAG_UNIT_MASK, and Targets.

Referenced by SpellMgr::LoadSpellInfoCustomAttributes().

◆ _IsPositiveEffect()

bool SpellInfo::_IsPositiveEffect ( uint8  effIndex,
bool  deep 
) const
3072{
3073 // not found a single positive spell with this attribute
3075 return false;
3076
3077 switch (Mechanic)
3078 {
3080 return true;
3081 default:
3082 break;
3083 }
3084
3085 // Special case: effects which determine positivity of whole spell
3086 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3087 {
3088 if (Effects[i].IsAura() && Effects[i].ApplyAuraName == SPELL_AURA_MOD_STEALTH)
3089 return true;
3090 }
3091
3092 switch (Effects[effIndex].Effect)
3093 {
3094 // always positive effects (check before target checks that provided non-positive result in some case for positive effects)
3095 case SPELL_EFFECT_HEAL:
3100 return true;
3102 return false;
3104 return false;
3106 {
3107 bool only = true;
3108 for (int i = EFFECT_0; i <= EFFECT_2; ++i)
3109 {
3110 if (Effects[effIndex].Effect > 0 && Effects[effIndex].Effect != SPELL_EFFECT_SCHOOL_DAMAGE)
3111 only = false;
3112 if (Effects[effIndex].Effect == SPELL_EFFECT_GAMEOBJECT_DAMAGE)
3113 return false;
3114 }
3115 // effects with school damage only cannot be positive...
3116 if (only)
3117 return false;
3118 break;
3119 }
3122 {
3123 for (int i = EFFECT_0; i <= EFFECT_2; ++i)
3124 if (Effects[effIndex].Effect == SPELL_EFFECT_GAMEOBJECT_DAMAGE)
3125 return false;
3126 break;
3127 }
3128 // non-positive aura use
3131 {
3132 switch (Effects[effIndex].ApplyAuraName)
3133 {
3134 case SPELL_AURA_MOD_DAMAGE_DONE: // dependent from bas point sign (negative -> negative)
3141 if (Effects[effIndex].CalcValue() < 0)
3142 return false;
3143 break;
3144 case SPELL_AURA_MOD_DAMAGE_TAKEN: // dependent from bas point sign (positive -> negative)
3145 if (Effects[effIndex].CalcValue() > 0)
3146 return false;
3147 break;
3150 if (Effects[effIndex].CalcValue() > 0)
3151 return true; // some expected positive spells have SPELL_ATTR1_NEGATIVE
3152 break;
3154 return true;
3158 if (!deep)
3159 {
3160 if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(Effects[effIndex].TriggerSpell))
3161 {
3162 // negative targets of main spell return early
3163 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3164 {
3165 if (!spellTriggeredProto->Effects[i].Effect)
3166 continue;
3167 // if non-positive trigger cast targeted to positive target this main cast is non-positive
3168 // this will place this spell auras as debuffs
3169 if (_IsPositiveTarget(spellTriggeredProto->Effects[i].TargetA.GetTarget(), spellTriggeredProto->Effects[i].TargetB.GetTarget()) && !spellTriggeredProto->_IsPositiveEffect(i, true))
3170 return false;
3171 }
3172 }
3173 }
3175 // many positive auras have negative triggered spells at damage for example and this not make it negative (it can be canceled for example)
3176 break;
3177 case SPELL_AURA_MOD_STUN: //have positive and negative spells, we can't sort its correctly at this moment.
3178 if (effIndex == 0 && Effects[1].Effect == 0 && Effects[2].Effect == 0)
3179 return false; // but all single stun aura spells is negative
3180 break;
3182 if (Id == 24740) // Wisp Costume
3183 return true;
3184 return false;
3188 case SPELL_AURA_GHOST:
3193 return false;
3194 case SPELL_AURA_PERIODIC_DAMAGE: // used in positive spells also.
3195 // part of negative spell if casted at self (prevent cancel)
3196 if (Effects[effIndex].TargetA.GetTarget() == TARGET_UNIT_CASTER)
3197 return false;
3198 break;
3199 case SPELL_AURA_MOD_DECREASE_SPEED: // used in positive spells also
3200 // part of positive spell if casted at self
3201 if (Effects[effIndex].TargetA.GetTarget() != TARGET_UNIT_CASTER)
3202 return false;
3203 // but not this if this first effect (didn't find better check)
3204 if (HasAttribute(SPELL_ATTR0_AURA_IS_DEBUFF) && effIndex == 0)
3205 return false;
3206 break;
3208 {
3209 // non-positive immunities
3210 switch (Effects[effIndex].MiscValue)
3211 {
3212 case MECHANIC_BANDAGE:
3213 case MECHANIC_SHIELD:
3214 case MECHANIC_MOUNT:
3216 return false;
3217 default:
3218 break;
3219 }
3220 break;
3221 }
3222 case SPELL_AURA_ADD_FLAT_MODIFIER: // mods
3224 {
3225 // non-positive mods
3226 switch (Effects[effIndex].MiscValue)
3227 {
3228 case SPELLMOD_COST: // dependent from bas point sign (negative -> positive)
3229 if (Effects[effIndex].CalcValue() > 0)
3230 {
3231 if (!deep)
3232 {
3233 bool negative = true;
3234 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3235 {
3236 if (i != effIndex)
3237 if (_IsPositiveEffect(i, true))
3238 {
3239 negative = false;
3240 break;
3241 }
3242 }
3243 if (negative)
3244 return false;
3245 }
3246 }
3247 break;
3248 default:
3249 break;
3250 }
3251 break;
3252 }
3253 default:
3254 break;
3255 }
3256 break;
3257 }
3258 default:
3259 break;
3260 }
3261
3262 // non-positive targets
3263 if (!_IsPositiveTarget(Effects[effIndex].TargetA.GetTarget(), Effects[effIndex].TargetB.GetTarget()))
3264 return false;
3265
3266 // negative spell if triggered spell is negative
3267 if (!deep && !Effects[effIndex].ApplyAuraName && Effects[effIndex].TriggerSpell)
3268 {
3269 if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(Effects[effIndex].TriggerSpell))
3270 if (!spellTriggeredProto->_IsPositiveSpell())
3271 return false;
3272 }
3273
3274 // ok, positive
3275 return true;
3276}
@ EFFECT_0
Definition SharedDefines.h:31
@ EFFECT_2
Definition SharedDefines.h:33
@ SPELL_EFFECT_ENERGIZE_PCT
Definition SharedDefines.h:903
@ SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
Definition SharedDefines.h:894
@ SPELL_EFFECT_HEAL
Definition SharedDefines.h:776
@ SPELL_EFFECT_KNOCK_BACK_DEST
Definition SharedDefines.h:910
@ SPELL_EFFECT_KNOCK_BACK
Definition SharedDefines.h:864
@ SPELL_EFFECT_SCHOOL_DAMAGE
Definition SharedDefines.h:768
@ SPELL_EFFECT_GAMEOBJECT_DAMAGE
Definition SharedDefines.h:853
@ SPELL_EFFECT_LEARN_SPELL
Definition SharedDefines.h:802
@ SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
Definition SharedDefines.h:895
@ SPELL_EFFECT_HEAL_PCT
Definition SharedDefines.h:902
@ SPELL_EFFECT_SKILL_STEP
Definition SharedDefines.h:810
@ SPELL_EFFECT_APPLY_AURA
Definition SharedDefines.h:772
@ TARGET_UNIT_CASTER
Definition SharedDefines.h:1414
@ MECHANIC_MOUNT
Definition SharedDefines.h:1334
@ MECHANIC_INVULNERABILITY
Definition SharedDefines.h:1338
@ MECHANIC_BANDAGE
Definition SharedDefines.h:1329
@ MECHANIC_IMMUNE_SHIELD
Definition SharedDefines.h:1342
@ MECHANIC_SHIELD
Definition SharedDefines.h:1332
@ SPELL_ATTR0_AURA_IS_DEBUFF
Definition SharedDefines.h:396
@ SPELL_AURA_PREVENT_RESURRECTION
Definition SpellAuraDefines.h:377
@ SPELL_AURA_MOD_SKILL
Definition SpellAuraDefines.h:93
@ SPELL_AURA_PERIODIC_DAMAGE
Definition SpellAuraDefines.h:66
@ SPELL_AURA_ADD_PCT_MODIFIER
Definition SpellAuraDefines.h:171
@ SPELL_AURA_PROC_TRIGGER_SPELL
Definition SpellAuraDefines.h:105
@ SPELL_AURA_MOD_FEAR
Definition SpellAuraDefines.h:70
@ SPELL_AURA_ADD_FLAT_MODIFIER
Definition SpellAuraDefines.h:170
@ SPELL_AURA_MOD_STALKED
Definition SpellAuraDefines.h:131
@ SPELL_AURA_MOD_SPELL_CRIT_CHANCE
Definition SpellAuraDefines.h:120
@ SPELL_AURA_PERIODIC_DAMAGE_PERCENT
Definition SpellAuraDefines.h:152
@ SPELL_AURA_MOD_DODGE_PERCENT
Definition SpellAuraDefines.h:112
@ SPELL_AURA_MOD_SILENCE
Definition SpellAuraDefines.h:90
@ SPELL_AURA_ADD_TARGET_TRIGGER
Definition SpellAuraDefines.h:172
@ SPELL_AURA_MOD_STAT
Definition SpellAuraDefines.h:92
@ SPELL_AURA_MOD_HEALING_DONE
Definition SpellAuraDefines.h:198
@ SPELL_AURA_MOD_HEALING_PCT
Definition SpellAuraDefines.h:181
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
Definition SpellAuraDefines.h:142
@ SPELL_AURA_GHOST
Definition SpellAuraDefines.h:158
@ SPELL_AURA_MOD_ROOT
Definition SpellAuraDefines.h:89
@ SPELL_AURA_MECHANIC_IMMUNITY
Definition SpellAuraDefines.h:140
@ SPELL_AURA_MOD_DAMAGE_TAKEN
Definition SpellAuraDefines.h:77
@ SPELL_AURA_MOD_CRIT_PCT
Definition SpellAuraDefines.h:353
@ SPELL_AURA_MOD_PACIFY_SILENCE
Definition SpellAuraDefines.h:123
@ SPELL_AURA_MOD_DECREASE_SPEED
Definition SpellAuraDefines.h:96
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE
Definition SpellAuraDefines.h:290
@ SPELL_AURA_PERIODIC_LEECH
Definition SpellAuraDefines.h:116
@ SPELL_AURA_MOD_DAMAGE_DONE
Definition SpellAuraDefines.h:76
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT
Definition SpellAuraDefines.h:111
@ SPELL_AURA_MOD_STEALTH
Definition SpellAuraDefines.h:79
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
Definition SpellAuraDefines.h:86
@ SPELL_AURA_MOD_STUN
Definition SpellAuraDefines.h:75
@ SPELLMOD_COST
Definition SpellDefines.h:98
#define sSpellMgr
Definition SpellMgr.h:851
Definition SpellInfo.h:340
static bool _IsPositiveTarget(uint32 targetA, uint32 targetB)
Definition SpellInfo.cpp:3288
bool _IsPositiveEffect(uint8 effIndex, bool deep) const
Definition SpellInfo.cpp:3071
bool HasAttribute(SpellAttr0 attribute) const
Definition SpellInfo.h:441

References _IsPositiveEffect(), _IsPositiveTarget(), EFFECT_0, EFFECT_2, Effects, HasAttribute(), Id, MAX_SPELL_EFFECTS, Mechanic, MECHANIC_BANDAGE, MECHANIC_IMMUNE_SHIELD, MECHANIC_INVULNERABILITY, MECHANIC_MOUNT, MECHANIC_SHIELD, SPELL_ATTR0_AURA_IS_DEBUFF, SPELL_AURA_ADD_FLAT_MODIFIER, SPELL_AURA_ADD_PCT_MODIFIER, SPELL_AURA_ADD_TARGET_TRIGGER, SPELL_AURA_GHOST, SPELL_AURA_MECHANIC_IMMUNITY, SPELL_AURA_MOD_CRIT_PCT, SPELL_AURA_MOD_DAMAGE_DONE, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, SPELL_AURA_MOD_DAMAGE_TAKEN, SPELL_AURA_MOD_DECREASE_SPEED, SPELL_AURA_MOD_DODGE_PERCENT, SPELL_AURA_MOD_FEAR, SPELL_AURA_MOD_HEALING_DONE, SPELL_AURA_MOD_HEALING_PCT, SPELL_AURA_MOD_PACIFY_SILENCE, SPELL_AURA_MOD_ROOT, SPELL_AURA_MOD_SILENCE, SPELL_AURA_MOD_SKILL, SPELL_AURA_MOD_SPELL_CRIT_CHANCE, SPELL_AURA_MOD_STALKED, SPELL_AURA_MOD_STAT, SPELL_AURA_MOD_STEALTH, SPELL_AURA_MOD_STUN, SPELL_AURA_PERIODIC_DAMAGE, SPELL_AURA_PERIODIC_DAMAGE_PERCENT, SPELL_AURA_PERIODIC_LEECH, SPELL_AURA_PERIODIC_TRIGGER_SPELL, SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT, SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE, SPELL_AURA_PREVENT_RESURRECTION, SPELL_AURA_PROC_TRIGGER_SPELL, SPELL_EFFECT_APPLY_AREA_AURA_ENEMY, SPELL_EFFECT_APPLY_AREA_AURA_FRIEND, SPELL_EFFECT_APPLY_AURA, SPELL_EFFECT_ENERGIZE_PCT, SPELL_EFFECT_GAMEOBJECT_DAMAGE, SPELL_EFFECT_HEAL, SPELL_EFFECT_HEAL_PCT, SPELL_EFFECT_KNOCK_BACK, SPELL_EFFECT_KNOCK_BACK_DEST, SPELL_EFFECT_LEARN_SPELL, SPELL_EFFECT_SCHOOL_DAMAGE, SPELL_EFFECT_SKILL_STEP, SPELLMOD_COST, sSpellMgr, and TARGET_UNIT_CASTER.

Referenced by _IsPositiveEffect(), _IsPositiveSpell(), WorldSession::HandlePetActionHelper(), and SpellMgr::LoadSpellInfoCustomAttributes().

◆ _IsPositiveSpell()

bool SpellInfo::_IsPositiveSpell ( ) const
3279{
3280 // spells with at least one negative effect are considered negative
3281 // some self-applied spells have negative effects but in self casting case negative check ignored.
3282 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3283 if (!_IsPositiveEffect(i, true))
3284 return false;
3285 return true;
3286}

References _IsPositiveEffect(), and MAX_SPELL_EFFECTS.

Referenced by Spell::HandleThreatSpells().

◆ _IsPositiveTarget()

bool SpellInfo::_IsPositiveTarget ( uint32  targetA,
uint32  targetB 
)
static
3289{
3290 // non-positive targets
3291 switch (targetA)
3292 {
3302 return false;
3303 default:
3304 break;
3305 }
3306 if (targetB)
3307 return _IsPositiveTarget(targetB, 0);
3308 return true;
3309}
@ TARGET_DEST_DYNOBJ_ENEMY
Definition SharedDefines.h:1436
@ TARGET_UNIT_DEST_AREA_ENEMY
Definition SharedDefines.h:1425
@ TARGET_UNIT_CONE_ENEMY_104
Definition SharedDefines.h:1512
@ TARGET_UNIT_SRC_AREA_ENEMY
Definition SharedDefines.h:1424
@ TARGET_DEST_TARGET_ENEMY
Definition SharedDefines.h:1461
@ TARGET_UNIT_TARGET_ENEMY
Definition SharedDefines.h:1419
@ TARGET_UNIT_CONE_ENEMY_54
Definition SharedDefines.h:1462
@ TARGET_UNIT_CONE_ENEMY_24
Definition SharedDefines.h:1432
@ TARGET_UNIT_NEARBY_ENEMY
Definition SharedDefines.h:1415

References _IsPositiveTarget(), TARGET_DEST_DYNOBJ_ENEMY, TARGET_DEST_TARGET_ENEMY, TARGET_UNIT_CONE_ENEMY_104, TARGET_UNIT_CONE_ENEMY_24, TARGET_UNIT_CONE_ENEMY_54, TARGET_UNIT_DEST_AREA_ENEMY, TARGET_UNIT_NEARBY_ENEMY, TARGET_UNIT_SRC_AREA_ENEMY, and TARGET_UNIT_TARGET_ENEMY.

Referenced by _IsPositiveEffect(), and _IsPositiveTarget().

◆ _LoadImmunityInfo()

void SpellInfo::_LoadImmunityInfo ( )
2271{
2272 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2273 {
2274 SpellEffectInfo& effectInfo = Effects[i];
2275 if (!effectInfo.Effect)
2276 continue;
2277
2278 uint32 schoolImmunityMask = 0;
2279 uint32 applyHarmfulAuraImmunityMask = 0;
2280 uint64 mechanicImmunityMask = 0;
2281 uint32 dispelImmunityMask = 0;
2282 uint32 damageImmunityMask = 0;
2283
2284 int32 miscVal = effectInfo.MiscValue;
2285 int32 amount = effectInfo.CalcValue();
2286
2287 ImmunityInfo& immuneInfo = _immunityInfo[i];
2288
2289 switch (effectInfo.ApplyAuraName)
2290 {
2292 {
2293 switch (miscVal)
2294 {
2295 case 27:
2296 mechanicImmunityMask |= (1ULL << MECHANIC_SILENCE);
2297 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_SILENCE);
2298 break;
2299 case 96:
2300 case 1615:
2301 {
2302 if (amount)
2303 {
2304 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT)
2305 | (1ULL << MECHANIC_FEAR) | (1ULL << MECHANIC_STUN)
2306 | (1ULL << MECHANIC_SLEEP) | (1ULL << MECHANIC_CHARM)
2307 | (1ULL << MECHANIC_SAPPED) | (1ULL << MECHANIC_HORROR)
2308 | (1ULL << MECHANIC_POLYMORPH) | (1ULL << MECHANIC_DISORIENTED)
2309 | (1ULL << MECHANIC_FREEZE) | (1ULL << MECHANIC_TURN);
2310
2311 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2313 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2314 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2315 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2316 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2317 }
2318 break;
2319 }
2320 case 679:
2321 {
2322 if (Id == 57742)
2323 {
2324 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT)
2325 | (1ULL << MECHANIC_FEAR) | (1ULL << MECHANIC_STUN)
2326 | (1ULL << MECHANIC_SLEEP) | (1ULL << MECHANIC_CHARM)
2327 | (1ULL << MECHANIC_SAPPED) | (1ULL << MECHANIC_HORROR)
2328 | (1ULL << MECHANIC_POLYMORPH) | (1ULL << MECHANIC_DISORIENTED)
2329 | (1ULL << MECHANIC_FREEZE) | (1ULL << MECHANIC_TURN);
2330
2331 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2333 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2334 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2335 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2336 }
2337 break;
2338 }
2339 case 1557:
2340 {
2341 if (Id == 64187)
2342 {
2343 mechanicImmunityMask |= (1ULL << MECHANIC_STUN);
2344 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2345 }
2346 else
2347 {
2348 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT)
2349 | (1ULL << MECHANIC_FEAR) | (1ULL << MECHANIC_STUN)
2350 | (1ULL << MECHANIC_SLEEP) | (1ULL << MECHANIC_CHARM)
2351 | (1ULL << MECHANIC_SAPPED) | (1ULL << MECHANIC_HORROR)
2352 | (1ULL << MECHANIC_POLYMORPH) | (1ULL << MECHANIC_DISORIENTED)
2353 | (1ULL << MECHANIC_FREEZE) | (1ULL << MECHANIC_TURN);
2354
2355 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2357 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2358 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2359 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2360 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2361 }
2362 break;
2363 }
2364 case 1614:
2365 case 1694:
2366 {
2367 immuneInfo.SpellEffectImmune.insert(SPELL_EFFECT_ATTACK_ME);
2368 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_TAUNT);
2369 break;
2370 }
2371 case 1630:
2372 {
2373 if (Id == 64112)
2374 {
2375 immuneInfo.SpellEffectImmune.insert(SPELL_EFFECT_ATTACK_ME);
2376 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_TAUNT);
2377 }
2378 else
2379 {
2380 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT)
2381 | (1ULL << MECHANIC_FEAR) | (1ULL << MECHANIC_STUN)
2382 | (1ULL << MECHANIC_SLEEP) | (1ULL << MECHANIC_CHARM)
2383 | (1ULL << MECHANIC_SAPPED) | (1ULL << MECHANIC_HORROR)
2384 | (1ULL << MECHANIC_POLYMORPH) | (1ULL << MECHANIC_DISORIENTED)
2385 | (1ULL << MECHANIC_FREEZE) | (1ULL << MECHANIC_TURN);
2386
2387 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2389 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2390 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2391 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2392 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2393 }
2394 break;
2395 }
2396 case 477:
2397 case 1733:
2398 {
2399 if (!amount)
2400 {
2401 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT)
2402 | (1ULL << MECHANIC_FEAR) | (1ULL << MECHANIC_STUN)
2403 | (1ULL << MECHANIC_SLEEP) | (1ULL << MECHANIC_CHARM)
2404 | (1ULL << MECHANIC_SAPPED) | (1ULL << MECHANIC_HORROR)
2405 | (1ULL << MECHANIC_POLYMORPH) | (1ULL << MECHANIC_DISORIENTED)
2406 | (1ULL << MECHANIC_FREEZE) | (1ULL << MECHANIC_TURN);
2407
2408 immuneInfo.SpellEffectImmune.insert(SPELL_EFFECT_KNOCK_BACK);
2410
2411 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2413 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2414 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2415 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2416 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2417 }
2418 break;
2419 }
2420 case 878:
2421 {
2422 if (Id == 66092)
2423 {
2424 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_STUN)
2425 | (1ULL << MECHANIC_DISORIENTED) | (1ULL << MECHANIC_FREEZE);
2426
2427 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2429 }
2430 break;
2431 }
2432 default:
2433 break;
2434 }
2435
2436 if (immuneInfo.AuraTypeImmune.empty())
2437 {
2438 if (miscVal & (1 << 10))
2439 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2440 if (miscVal & (1 << 1))
2441 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_TRANSFORM);
2442
2443 if (miscVal & (1 << 6))
2445 if (miscVal & (1 << 0))
2446 {
2447 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2448 }
2449 if (miscVal & (1 << 2))
2450 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2451 if (miscVal & (1 << 9))
2452 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2453 if (miscVal & (1 << 7))
2454 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_DISARM);
2455 }
2456 break;
2457 }
2459 {
2460 switch (Id)
2461 {
2462 case 34471: // The Beast Within
2463 case 19574: // Bestial Wrath
2464 case 42292: // PvP trinket
2465 case 46227: // Medallion of Immunity
2466 case 59752: // Every Man for Himself
2467 case 53490: // Bullheaded
2468 case 65547: // PvP Trinket
2469 case 134946: // Supremacy of the Alliance
2470 case 134956: // Supremacy of the Horde
2471 case 195710: // Honorable Medallion
2472 case 208683: // Gladiator's Medallion
2474 break;
2475 case 54508: // Demonic Empowerment
2476 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT) | (1ULL << MECHANIC_STUN);
2477 break;
2478 default:
2479 if (miscVal < 1)
2480 break;
2481
2482 mechanicImmunityMask |= 1ULL << miscVal;
2483 break;
2484 }
2485 break;
2486 }
2488 {
2489 immuneInfo.SpellEffectImmune.insert(static_cast<SpellEffects>(miscVal));
2490 break;
2491 }
2493 {
2494 immuneInfo.AuraTypeImmune.insert(static_cast<AuraType>(miscVal));
2495 break;
2496 }
2498 {
2499 schoolImmunityMask |= uint32(miscVal);
2500 break;
2501 }
2503 {
2504 applyHarmfulAuraImmunityMask |= uint32(miscVal);
2505 break;
2506 }
2508 {
2509 damageImmunityMask |= uint32(miscVal);
2510 break;
2511 }
2513 {
2514 dispelImmunityMask = uint32(miscVal);
2515 break;
2516 }
2517 default:
2518 break;
2519 }
2520
2521 immuneInfo.SchoolImmuneMask = schoolImmunityMask;
2522 immuneInfo.ApplyHarmfulAuraImmuneMask = applyHarmfulAuraImmunityMask;
2523 immuneInfo.MechanicImmuneMask = mechanicImmunityMask;
2524 immuneInfo.DispelImmuneMask = dispelImmunityMask;
2525 immuneInfo.DamageSchoolMask = damageImmunityMask;
2526 }
2527}
std::int32_t int32
Definition Define.h:103
std::uint64_t uint64
Definition Define.h:106
constexpr uint64 IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK
Definition SharedDefines.h:1354
SpellEffects
Definition SharedDefines.h:766
@ SPELL_EFFECT_ATTACK_ME
Definition SharedDefines.h:880
@ MECHANIC_FEAR
Definition SharedDefines.h:1318
@ MECHANIC_DISORIENTED
Definition SharedDefines.h:1315
@ MECHANIC_CHARM
Definition SharedDefines.h:1314
@ MECHANIC_TURN
Definition SharedDefines.h:1336
@ MECHANIC_STUN
Definition SharedDefines.h:1325
@ MECHANIC_FREEZE
Definition SharedDefines.h:1326
@ MECHANIC_ROOT
Definition SharedDefines.h:1320
@ MECHANIC_SLEEP
Definition SharedDefines.h:1323
@ MECHANIC_POLYMORPH
Definition SharedDefines.h:1330
@ MECHANIC_SNARE
Definition SharedDefines.h:1324
@ MECHANIC_SILENCE
Definition SharedDefines.h:1322
@ MECHANIC_SAPPED
Definition SharedDefines.h:1343
@ MECHANIC_HORROR
Definition SharedDefines.h:1337
AuraType
Definition SpellAuraDefines.h:62
@ SPELL_AURA_DISPEL_IMMUNITY
Definition SpellAuraDefines.h:104
@ SPELL_AURA_MOD_DISARM
Definition SpellAuraDefines.h:130
@ SPELL_AURA_SCHOOL_IMMUNITY
Definition SpellAuraDefines.h:102
@ SPELL_AURA_MOD_TAUNT
Definition SpellAuraDefines.h:74
@ SPELL_AURA_EFFECT_IMMUNITY
Definition SpellAuraDefines.h:100
@ SPELL_AURA_TRANSFORM
Definition SpellAuraDefines.h:119
@ SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL
Definition SpellAuraDefines.h:330
@ SPELL_AURA_DAMAGE_IMMUNITY
Definition SpellAuraDefines.h:103
@ SPELL_AURA_MOD_CONFUSE
Definition SpellAuraDefines.h:68
@ SPELL_AURA_STATE_IMMUNITY
Definition SpellAuraDefines.h:101
@ SPELL_AURA_MECHANIC_IMMUNITY_MASK
Definition SpellAuraDefines.h:210
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr) const
Definition SpellInfo.cpp:409
AuraType ApplyAuraName
Definition SpellInfo.h:275
uint32 Effect
Definition SpellInfo.h:274
int32 MiscValue
Definition SpellInfo.h:284
ImmunityInfo _immunityInfo[MAX_SPELL_EFFECTS]
Definition SpellInfo.h:582
Definition SpellInfo.h:226
uint32 DamageSchoolMask
Definition SpellInfo.h:231
uint32 DispelImmuneMask
Definition SpellInfo.h:230
uint32 SchoolImmuneMask
Definition SpellInfo.h:227
uint64 MechanicImmuneMask
Definition SpellInfo.h:229
boost::container::flat_set< AuraType > AuraTypeImmune
Definition SpellInfo.h:233
uint32 ApplyHarmfulAuraImmuneMask
Definition SpellInfo.h:228
boost::container::flat_set< SpellEffects > SpellEffectImmune
Definition SpellInfo.h:234

References _immunityInfo, SpellEffectInfo::ApplyAuraName, ImmunityInfo::ApplyHarmfulAuraImmuneMask, ImmunityInfo::AuraTypeImmune, SpellEffectInfo::CalcValue(), ImmunityInfo::DamageSchoolMask, ImmunityInfo::DispelImmuneMask, SpellEffectInfo::Effect, Effects, Id, IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK, MAX_SPELL_EFFECTS, MECHANIC_CHARM, MECHANIC_DISORIENTED, MECHANIC_FEAR, MECHANIC_FREEZE, MECHANIC_HORROR, MECHANIC_POLYMORPH, MECHANIC_ROOT, MECHANIC_SAPPED, MECHANIC_SILENCE, MECHANIC_SLEEP, MECHANIC_SNARE, MECHANIC_STUN, MECHANIC_TURN, ImmunityInfo::MechanicImmuneMask, SpellEffectInfo::MiscValue, ImmunityInfo::SchoolImmuneMask, SPELL_AURA_DAMAGE_IMMUNITY, SPELL_AURA_DISPEL_IMMUNITY, SPELL_AURA_EFFECT_IMMUNITY, SPELL_AURA_MECHANIC_IMMUNITY, SPELL_AURA_MECHANIC_IMMUNITY_MASK, SPELL_AURA_MOD_CONFUSE, SPELL_AURA_MOD_DECREASE_SPEED, SPELL_AURA_MOD_DISARM, SPELL_AURA_MOD_FEAR, SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL, SPELL_AURA_MOD_ROOT, SPELL_AURA_MOD_SILENCE, SPELL_AURA_MOD_STUN, SPELL_AURA_MOD_TAUNT, SPELL_AURA_SCHOOL_IMMUNITY, SPELL_AURA_STATE_IMMUNITY, SPELL_AURA_TRANSFORM, SPELL_EFFECT_ATTACK_ME, SPELL_EFFECT_KNOCK_BACK, SPELL_EFFECT_KNOCK_BACK_DEST, and ImmunityInfo::SpellEffectImmune.

◆ _UnloadImplicitTargetConditionLists()

void SpellInfo::_UnloadImplicitTargetConditionLists ( )
3312{
3313 // find the same instances of ConditionList and delete them.
3314 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3315 {
3316 ConditionList* cur = Effects[i].ImplicitTargetConditions;
3317 if (!cur)
3318 continue;
3319 for (uint8 j = i; j < MAX_SPELL_EFFECTS; ++j)
3320 {
3321 if (Effects[j].ImplicitTargetConditions == cur)
3322 Effects[j].ImplicitTargetConditions = nullptr;
3323 }
3324 delete cur;
3325 }
3326}
std::list< Condition * > ConditionList
Definition ConditionMgr.h:240

References Effects, and MAX_SPELL_EFFECTS.

Referenced by ~SpellInfo().

◆ ApplyAllSpellImmunitiesTo()

void SpellInfo::ApplyAllSpellImmunitiesTo ( Unit *  target,
SpellEffectInfo const *  effect,
bool  apply 
) const
2530{
2531 ImmunityInfo const* immuneInfo = nullptr;
2532 if (effect)
2533 {
2534 uint8 effIndex = effect->EffectIndex;
2535 if (effIndex < MAX_SPELL_EFFECTS)
2536 immuneInfo = &_immunityInfo[effIndex];
2537 }
2538
2539 if (!immuneInfo)
2540 return;
2541
2542 if (uint32 schoolImmunity = immuneInfo->SchoolImmuneMask)
2543 {
2544 target->ApplySpellImmune(Id, IMMUNITY_SCHOOL, schoolImmunity, apply);
2545
2547{
2548 target->RemoveAppliedAuras([this, target, schoolImmunity](AuraApplication const* aurApp) -> bool
2549 {
2550 SpellInfo const* auraSpellInfo = aurApp->GetBase()->GetSpellInfo();
2551 if (auraSpellInfo->Id == Id) // Don't remove self
2552 return false;
2553 if (auraSpellInfo->IsPassive()) // Don't remove passive auras
2554 return false;
2555 if (!(auraSpellInfo->GetSchoolMask() & schoolImmunity)) // Check for school mask
2556 return false;
2557 if (!CanDispelAura(auraSpellInfo))
2558 return false;
2560 {
2561 Unit* existingAuraCaster = aurApp->GetBase()->GetCaster();
2562 if (existingAuraCaster && existingAuraCaster->IsFriendlyTo(target)) // Don't remove friendly auras
2563 return false;
2564 }
2565 return true;
2566 });
2567 }
2568 }
2569
2570 if (uint64 mechanicImmunity = immuneInfo->MechanicImmuneMask)
2571 {
2572 for (uint32 i = 0; i < MAX_MECHANIC; ++i)
2573 if (mechanicImmunity & (1ULL << i))
2574 target->ApplySpellImmune(Id, IMMUNITY_MECHANIC, i, apply);
2575
2577 target->RemoveAurasWithMechanic(mechanicImmunity, AURA_REMOVE_BY_DEFAULT, Id);
2578 }
2579
2580 if (uint32 dispelImmunity = immuneInfo->DispelImmuneMask)
2581 {
2582 target->ApplySpellImmune(Id, IMMUNITY_DISPEL, dispelImmunity, apply);
2583
2585 {
2586 target->RemoveAppliedAuras([dispelImmunity](AuraApplication const* aurApp) -> bool
2587 {
2588 SpellInfo const* spellInfo = aurApp->GetBase()->GetSpellInfo();
2589 if (spellInfo->Dispel == dispelImmunity)
2590 return true;
2591
2592 return false;
2593 });
2594 }
2595 }
2596
2597 if (uint32 damageImmunity = immuneInfo->DamageSchoolMask)
2598 target->ApplySpellImmune(Id, IMMUNITY_DAMAGE, damageImmunity, apply);
2599
2600 for (AuraType auraType : immuneInfo->AuraTypeImmune)
2601 {
2602 target->ApplySpellImmune(Id, IMMUNITY_STATE, auraType, apply);
2604 {
2605 target->RemoveAppliedAuras([this, auraType](AuraApplication const* aurApp) -> bool
2606 {
2607 Aura const* aura = aurApp->GetBase();
2608 if (!aura->GetSpellInfo()->HasAura(auraType))
2609 return false;
2610 return CanDispelAura(aura->GetSpellInfo());
2611 });
2612 }
2613 }
2614
2615 for (SpellEffects effectType : immuneInfo->SpellEffectImmune)
2616 target->ApplySpellImmune(Id, IMMUNITY_EFFECT, effectType, apply);
2617}
@ SPELL_ATTR1_IMMUNITY_PURGES_EFFECT
Definition SharedDefines.h:422
@ SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS
Definition SharedDefines.h:423
@ MAX_MECHANIC
Definition SharedDefines.h:1350
@ IMMUNITY_STATE
Definition SharedDefines.h:1399
@ IMMUNITY_EFFECT
Definition SharedDefines.h:1398
@ IMMUNITY_DAMAGE
Definition SharedDefines.h:1401
@ IMMUNITY_MECHANIC
Definition SharedDefines.h:1403
@ IMMUNITY_SCHOOL
Definition SharedDefines.h:1400
@ IMMUNITY_DISPEL
Definition SharedDefines.h:1402
@ AURA_REMOVE_BY_DEFAULT
Definition SpellAuraDefines.h:392
Definition SpellAuras.h:37
Aura * GetBase() const
Definition SpellAuras.h:63
Definition SpellAuras.h:88
Unit * GetCaster() const
Definition SpellAuras.cpp:422
SpellInfo const * GetSpellInfo() const
Definition SpellAuras.h:101
bool CanDispelAura(SpellInfo const *auraSpellInfo) const
Definition SpellInfo.cpp:1384
bool IsPassive() const
Definition SpellInfo.cpp:1143
SpellSchoolMask GetSchoolMask() const
Definition SpellInfo.cpp:1935
bool HasAura(AuraType aura) const
Definition SpellInfo.cpp:906
Definition Unit.h:670
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition Unit.cpp:10247
void RemoveAppliedAuras(std::function< bool(AuraApplication const *)> const &check)
Definition Unit.cpp:4927
void RemoveAurasWithMechanic(uint64 mechanic_mask, AuraRemoveMode removemode=AURA_REMOVE_BY_DEFAULT, uint32 except=0)
Definition Unit.cpp:5321
bool IsFriendlyTo(Unit const *unit) const
Definition Unit.cpp:7079
void apply(T *val)
Definition ByteConverter.h:40

References _immunityInfo, Unit::ApplySpellImmune(), AURA_REMOVE_BY_DEFAULT, ImmunityInfo::AuraTypeImmune, CanDispelAura(), ImmunityInfo::DamageSchoolMask, Dispel, ImmunityInfo::DispelImmuneMask, SpellEffectInfo::EffectIndex, AuraApplication::GetBase(), Aura::GetCaster(), GetSchoolMask(), Aura::GetSpellInfo(), HasAttribute(), HasAura(), Id, IMMUNITY_DAMAGE, IMMUNITY_DISPEL, IMMUNITY_EFFECT, IMMUNITY_MECHANIC, IMMUNITY_SCHOOL, IMMUNITY_STATE, Unit::IsFriendlyTo(), IsPassive(), MAX_MECHANIC, MAX_SPELL_EFFECTS, ImmunityInfo::MechanicImmuneMask, Unit::RemoveAppliedAuras(), Unit::RemoveAurasWithMechanic(), ImmunityInfo::SchoolImmuneMask, SPELL_ATTR1_IMMUNITY_PURGES_EFFECT, SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS, and ImmunityInfo::SpellEffectImmune.

Referenced by AuraEffect::HandleAuraModDispelImmunity(), AuraEffect::HandleAuraModDmgImmunity(), AuraEffect::HandleModMechanicImmunity(), and AuraEffect::HandleModStateImmunityMask().

◆ CalcCastTime()

uint32 SpellInfo::CalcCastTime ( WorldObject *  caster = nullptr,
Spell *  spell = nullptr 
) const
2793{
2794 // not all spells have cast time index and this is all is pasiive abilities
2795 if (!CastTimeEntry)
2796 return 0;
2797
2798 int32 castTime = CastTimeEntry->CastTime;
2800 castTime += 500;
2801
2802 if (caster)
2803 caster->ModSpellCastTime(this, castTime, spell);
2804
2805 return (castTime > 0) ? uint32(castTime) : 0;
2806}
@ SPELL_ATTR0_USES_RANGED_SLOT
Definition SharedDefines.h:371
bool IsAutoRepeatRangedSpell() const
Definition SpellInfo.cpp:1328
void ModSpellCastTime(SpellInfo const *spellProto, int32 &castTime, Spell *spell=nullptr) const
Definition Object.cpp:3502
int32 CastTime
Definition DBCStructure.h:1796

References SpellCastTimesEntry::CastTime, CastTimeEntry, HasAttribute(), IsAutoRepeatRangedSpell(), WorldObject::ModSpellCastTime(), and SPELL_ATTR0_USES_RANGED_SLOT.

Referenced by Spell::_cast(), Unit::CalculateDefaultCoefficient(), Unit::GetCastingTimeForBonus(), Spell::prepare(), and Player::PrepareCharmAISpells().

◆ CalcPowerCost()

int32 SpellInfo::CalcPowerCost ( WorldObject const *  caster,
SpellSchoolMask  schoolMask,
Spell *  spell = nullptr 
) const
2844{
2845 // non-Unit casters have no resource pool, so every cost below collapses to zero
2846 Unit const* unitCaster = caster ? caster->ToUnit() : nullptr;
2847 if (!unitCaster)
2848 return 0;
2849
2850 // Spell drain all exist power on cast (Only paladin lay of Hands)
2852 {
2853 // If power type - health drain all
2854 if (PowerType == POWER_HEALTH)
2855 return unitCaster->GetHealth();
2856 // Else drain all power
2857 if (PowerType < MAX_POWERS)
2858 return unitCaster->GetPower(Powers(PowerType));
2859 LOG_ERROR("spells", "SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {}", PowerType, Id);
2860 return 0;
2861 }
2862
2863 // Base powerCost
2864 int32 powerCost = ManaCost;
2865 // PCT cost from total amount
2867 {
2868 switch (PowerType)
2869 {
2870 // health as power used
2871 case POWER_HEALTH:
2872 powerCost += int32(CalculatePct(unitCaster->GetCreateHealth(), ManaCostPercentage));
2873 break;
2874 case POWER_MANA:
2875 powerCost += int32(CalculatePct(unitCaster->GetCreateMana(), ManaCostPercentage));
2876 break;
2877 case POWER_RAGE:
2878 case POWER_FOCUS:
2879 case POWER_ENERGY:
2880 case POWER_HAPPINESS:
2881 powerCost += int32(CalculatePct(unitCaster->GetMaxPower(Powers(PowerType)), ManaCostPercentage));
2882 break;
2883 case POWER_RUNE:
2884 case POWER_RUNIC_POWER:
2885 LOG_DEBUG("spells.aura", "CalculateManaCost: Not implemented yet!");
2886 break;
2887 default:
2888 LOG_ERROR("spells", "CalculateManaCost: Unknown power type '{}' in spell {}", PowerType, Id);
2889 return 0;
2890 }
2891 }
2892 SpellSchools school = GetFirstSchoolInMask(schoolMask);
2893 // Flat mod from caster auras by spell school
2894 powerCost += unitCaster->GetInt32Value(static_cast<uint16>(UNIT_FIELD_POWER_COST_MODIFIER) + school);
2895
2896 // Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost)
2898 {
2899 uint32 speed = 0;
2900 if (SpellShapeshiftFormEntry const* ss = sSpellShapeshiftFormStore.LookupEntry(unitCaster->GetShapeshiftForm()))
2901 speed = ss->attackSpeed;
2902 else
2903 {
2906 slot = OFF_ATTACK;
2907
2908 speed = unitCaster->GetAttackTime(slot);
2909 }
2910
2911 powerCost += speed / 100;
2912 }
2913
2914 // Apply cost mod by spell
2915 if (Player* modOwner = unitCaster->GetSpellModOwner())
2916 modOwner->ApplySpellMod(Id, SPELLMOD_COST, powerCost, spell);
2917
2918 if (!unitCaster->IsControlledByPlayer())
2919 {
2921 {
2922 GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(SpellLevel - 1);
2923 GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(unitCaster->GetLevel() - 1);
2924 if (spellScaler && casterScaler)
2925 powerCost *= casterScaler->ratio / spellScaler->ratio;
2926 }
2927 }
2928
2929 // PCT mod from user auras by school
2930 powerCost = int32(powerCost * (1.0f + unitCaster->GetFloatValue(static_cast<uint16>(UNIT_FIELD_POWER_COST_MULTIPLIER) + school)));
2931 if (powerCost < 0)
2932 powerCost = 0;
2933 return powerCost;
2934}
DBCStorage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore(SpellShapeshiftFormEntryfmt)
DBCStorage< GtNPCManaCostScalerEntry > sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt)
std::uint16_t uint16
Definition Define.h:108
#define LOG_ERROR(filterType__,...)
Definition Log.h:145
#define LOG_DEBUG(filterType__,...)
Definition Log.h:157
Powers
Definition SharedDefines.h:256
@ MAX_POWERS
Definition SharedDefines.h:264
@ POWER_RAGE
Definition SharedDefines.h:258
@ POWER_HEALTH
Definition SharedDefines.h:266
@ POWER_RUNIC_POWER
Definition SharedDefines.h:263
@ POWER_HAPPINESS
Definition SharedDefines.h:261
@ POWER_ENERGY
Definition SharedDefines.h:260
@ POWER_MANA
Definition SharedDefines.h:257
@ POWER_RUNE
Definition SharedDefines.h:262
@ POWER_FOCUS
Definition SharedDefines.h:259
SpellSchools
Definition SharedDefines.h:270
@ SPELL_ATTR1_USE_ALL_MANA
Definition SharedDefines.h:408
SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
Definition SharedDefines.h:306
@ SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON
Definition SharedDefines.h:505
@ SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL
Definition SharedDefines.h:389
@ SPELL_ATTR4_WEAPON_SPEED_COST_SCALING
Definition SharedDefines.h:528
WeaponAttackType
Definition Unit.h:222
@ OFF_ATTACK
Definition Unit.h:224
@ BASE_ATTACK
Definition Unit.h:223
@ UNIT_FIELD_POWER_COST_MODIFIER
Definition UpdateFields.h:170
@ UNIT_FIELD_POWER_COST_MULTIPLIER
Definition UpdateFields.h:171
T CalculatePct(T base, U pct)
Definition Util.h:52
int32 GetInt32Value(uint16 index) const
Definition Object.cpp:297
float GetFloatValue(uint16 index) const
Definition Object.cpp:315
Unit * ToUnit()
Definition Object.h:216
Definition Player.h:1086
ShapeshiftForm GetShapeshiftForm() const
Definition Unit.h:1979
uint32 GetMaxPower(Powers power) const
Definition Unit.h:1150
uint32 GetHealth() const
Definition Unit.h:1122
uint32 GetCreateHealth() const
Definition Unit.h:1126
uint32 GetAttackTime(WeaponAttackType att) const
Definition Unit.h:923
Player * GetSpellModOwner() const override
Definition Unit.cpp:12637
bool IsControlledByPlayer() const
Definition Unit.h:1324
uint32 GetPower(Powers power) const
Definition Unit.h:1149
uint32 GetCreateMana() const
Definition Unit.h:1162
uint8 GetLevel() const
Definition Unit.h:1117
Definition DBCStructure.h:1106
float ratio
Definition DBCStructure.h:1107
Definition DBCStructure.h:1853

References AttributesEx, AttributesEx3, AttributesEx4, BASE_ATTACK, CalculatePct(), Unit::GetAttackTime(), Unit::GetCreateHealth(), Unit::GetCreateMana(), GetFirstSchoolInMask(), Object::GetFloatValue(), Unit::GetHealth(), Object::GetInt32Value(), Unit::GetLevel(), Unit::GetMaxPower(), Unit::GetPower(), Unit::GetShapeshiftForm(), Unit::GetSpellModOwner(), HasAttribute(), Id, Unit::IsControlledByPlayer(), LOG_DEBUG, LOG_ERROR, ManaCost, ManaCostPercentage, MAX_POWERS, OFF_ATTACK, POWER_ENERGY, POWER_FOCUS, POWER_HAPPINESS, POWER_HEALTH, POWER_MANA, POWER_RAGE, POWER_RUNE, POWER_RUNIC_POWER, GtNPCManaCostScalerEntry::ratio, sGtNPCManaCostScalerStore, SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL, SPELL_ATTR1_USE_ALL_MANA, SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON, SPELL_ATTR4_WEAPON_SPEED_COST_SCALING, SpellLevel, SPELLMOD_COST, sSpellShapeshiftFormStore, Object::ToUnit(), UNIT_FIELD_POWER_COST_MODIFIER, and UNIT_FIELD_POWER_COST_MULTIPLIER.

Referenced by PetAI::_canMeleeAttack(), Spell::CheckPetCast(), Spell::EffectCastButtons(), spell_warr_execute::HandleEffect(), spell_dru_t3_8p_bonus::HandleProc(), spell_hun_glyph_of_arcane_shot::HandleProc(), spell_mage_burnout::HandleProc(), spell_sha_item_mana_surge::HandleProc(), SmartAI::IsMainSpellPrevented(), Spell::prepare(), and SmartScript::ProcessAction().

◆ CanBeRedirectedBySpellMagnet()

bool SpellInfo::CanBeRedirectedBySpellMagnet ( ) const
1061{
1062 // Patch 1.2 notes: Spell Reflection no longer reflects abilities.
1066 && !IsAffectingArea();
1067}
@ SPELL_ATTR1_NO_REDIRECTION
Definition SharedDefines.h:410
@ SPELL_ATTR0_IS_ABILITY
Definition SharedDefines.h:374
@ SPELL_ATTR0_NO_IMMUNITIES
Definition SharedDefines.h:399
bool IsAffectingArea() const
Definition SpellInfo.cpp:1052

References HasAttribute(), IsAffectingArea(), SPELL_ATTR0_IS_ABILITY, SPELL_ATTR0_NO_IMMUNITIES, and SPELL_ATTR1_NO_REDIRECTION.

Referenced by AuraEffect::CheckEffectProc(), and Unit::GetMagicHitRedirectTarget().

◆ CanBeUsedInCombat()

bool SpellInfo::CanBeUsedInCombat ( ) const
1278{
1280}
@ SPELL_ATTR0_NOT_IN_COMBAT_ONLY_PEACEFUL
Definition SharedDefines.h:398

References HasAttribute(), and SPELL_ATTR0_NOT_IN_COMBAT_ONLY_PEACEFUL.

Referenced by Spell::CheckCast(), WorldSession::HandleUseItemOpcode(), and PetAI::UpdateAI().

◆ CanDispelAura()

bool SpellInfo::CanDispelAura ( SpellInfo const *  auraSpellInfo) const
1385{
1386 // Xinef: Passive auras cannot be dispelled
1387 if (auraSpellInfo->IsPassive())
1388 return false;
1389
1390 // These auras (like Divine Shield) can't be dispelled
1391 if (auraSpellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
1392 return false;
1393
1394 return true;
1395}

References HasAttribute(), IsPassive(), and SPELL_ATTR0_NO_IMMUNITIES.

Referenced by ApplyAllSpellImmunitiesTo(), and AuraEffect::HandleAuraModSchoolImmunity().

◆ CanPierceImmuneAura()

bool SpellInfo::CanPierceImmuneAura ( SpellInfo const *  auraSpellInfo) const
1376{
1377 // Dispels other auras on immunity, check if this spell makes the unit immune to aura
1379 return true;
1380
1381 return false;
1382}
bool CanSpellProvideImmunityAgainstAura(SpellInfo const *auraSpellInfo) const
Definition SpellInfo.cpp:2619

References CanSpellProvideImmunityAgainstAura(), HasAttribute(), and SPELL_ATTR1_IMMUNITY_PURGES_EFFECT.

Referenced by Unit::HasSchoolImmunityForMask(), and Unit::IsImmunedToDamage().

◆ CanSpellCastOverrideAuraEffect()

bool SpellInfo::CanSpellCastOverrideAuraEffect ( AuraEffect const *  aurEff) const
2704{
2706 return false;
2707
2708 if (aurEff->GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
2709 return false;
2710
2711 SpellEffectInfo const* aurEffInfo = &aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()];
2712
2713 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2714 {
2715 SpellEffectInfo const& effectInfo = Effects[i];
2716 if (!effectInfo.Effect)
2717 continue;
2718
2719 if (effectInfo.Effect != SPELL_EFFECT_APPLY_AURA)
2720 continue;
2721
2722 uint32 const miscValue = static_cast<uint32>(effectInfo.MiscValue);
2723 switch (effectInfo.ApplyAuraName)
2724 {
2726 if (miscValue != aurEffInfo->ApplyAuraName)
2727 continue;
2728 break;
2731 if (aurEff->GetSpellInfo()->HasAttribute(SPELL_ATTR2_NO_SCHOOL_IMMUNITIES) || !(aurEff->GetSpellInfo()->SchoolMask & miscValue))
2732 continue;
2733 break;
2735 if (miscValue != aurEff->GetSpellInfo()->Dispel)
2736 continue;
2737 break;
2739 if (miscValue != aurEff->GetSpellInfo()->Mechanic)
2740 {
2741 if (miscValue != aurEffInfo->Mechanic)
2742 continue;
2743 }
2744 break;
2745 default:
2746 continue;
2747 }
2748
2749 return true;
2750 }
2751
2752 return false;
2753}
@ SPELL_ATTR2_NO_SCHOOL_IMMUNITIES
Definition SharedDefines.h:470
Mechanics Mechanic
Definition SpellInfo.h:286

References SpellEffectInfo::ApplyAuraName, Dispel, SpellEffectInfo::Effect, Effects, AuraEffect::GetEffIndex(), AuraEffect::GetSpellInfo(), HasAttribute(), MAX_SPELL_EFFECTS, SpellEffectInfo::Mechanic, Mechanic, SpellEffectInfo::MiscValue, SchoolMask, SPELL_ATTR0_NO_IMMUNITIES, SPELL_ATTR1_IMMUNITY_PURGES_EFFECT, SPELL_ATTR2_NO_SCHOOL_IMMUNITIES, SPELL_AURA_DISPEL_IMMUNITY, SPELL_AURA_MECHANIC_IMMUNITY, SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL, SPELL_AURA_SCHOOL_IMMUNITY, SPELL_AURA_STATE_IMMUNITY, and SPELL_EFFECT_APPLY_AURA.

◆ CanSpellProvideImmunityAgainstAura()

bool SpellInfo::CanSpellProvideImmunityAgainstAura ( SpellInfo const *  auraSpellInfo) const
2620{
2621 if (!auraSpellInfo)
2622 return false;
2623
2624 for (SpellEffectInfo const& effectInfo : Effects)
2625 {
2626 if (!effectInfo.Effect)
2627 continue;
2628
2629 ImmunityInfo const* immuneInfo = effectInfo.GetImmunityInfo();
2630 if (!immuneInfo)
2631 continue;
2632
2633 if (!auraSpellInfo->HasAttribute(SPELL_ATTR2_NO_SCHOOL_IMMUNITIES))
2634 {
2635 if (uint32 schoolImmunity = immuneInfo->SchoolImmuneMask)
2636 if ((auraSpellInfo->SchoolMask & schoolImmunity) != 0)
2637 return true;
2638 }
2639
2640 if (uint64 mechanicImmunity = immuneInfo->MechanicImmuneMask)
2641 if ((mechanicImmunity & (1ULL << auraSpellInfo->Mechanic)) != 0)
2642 return true;
2643
2644 if (uint32 dispelImmunity = immuneInfo->DispelImmuneMask)
2645 if (auraSpellInfo->Dispel == dispelImmunity)
2646 return true;
2647
2648 bool immuneToAllEffects = true;
2649 for (SpellEffectInfo const& auraSpellEffectInfo : auraSpellInfo->Effects)
2650 {
2651 if (!auraSpellEffectInfo.Effect)
2652 continue;
2653
2654 uint32 effectName = auraSpellEffectInfo.Effect;
2655 if (!effectName)
2656 continue;
2657
2658 if (immuneInfo->SpellEffectImmune.find(static_cast<SpellEffects>(effectName)) == immuneInfo->SpellEffectImmune.cend())
2659 {
2660 immuneToAllEffects = false;
2661 break;
2662 }
2663
2664 if (uint32 mechanic = auraSpellEffectInfo.Mechanic)
2665 {
2666 if (!(immuneInfo->MechanicImmuneMask & (1ULL << mechanic)))
2667 {
2668 immuneToAllEffects = false;
2669 break;
2670 }
2671 }
2672
2673 if (uint32 auraName = auraSpellEffectInfo.ApplyAuraName)
2674 {
2675 bool isImmuneToAuraEffectApply = false;
2676 if (immuneInfo->AuraTypeImmune.find(static_cast<AuraType>(auraName)) != immuneInfo->AuraTypeImmune.cend())
2677 isImmuneToAuraEffectApply = true;
2678
2679 if (!isImmuneToAuraEffectApply && !auraSpellInfo->IsPositiveEffect(auraSpellEffectInfo.EffectIndex) &&
2680 !auraSpellInfo->HasAttribute(SPELL_ATTR2_NO_SCHOOL_IMMUNITIES))
2681 {
2682 if (uint32 applyHarmfulAuraImmuneMask = immuneInfo->ApplyHarmfulAuraImmuneMask)
2683 if ((auraSpellInfo->SchoolMask & applyHarmfulAuraImmuneMask) != 0)
2684 isImmuneToAuraEffectApply = true;
2685 }
2686
2687 if (!isImmuneToAuraEffectApply)
2688 {
2689 immuneToAllEffects = false;
2690 break;
2691 }
2692 }
2693 }
2694
2695 if (immuneToAllEffects)
2696 return true;
2697 }
2698
2699 return false;
2700}

References ImmunityInfo::ApplyHarmfulAuraImmuneMask, ImmunityInfo::AuraTypeImmune, Dispel, ImmunityInfo::DispelImmuneMask, Effects, HasAttribute(), IsPositiveEffect(), Mechanic, ImmunityInfo::MechanicImmuneMask, ImmunityInfo::SchoolImmuneMask, SchoolMask, SPELL_ATTR2_NO_SCHOOL_IMMUNITIES, and ImmunityInfo::SpellEffectImmune.

Referenced by CanPierceImmuneAura().

◆ CheckExplicitTarget()

SpellCastResult SpellInfo::CheckExplicitTarget ( WorldObject const *  caster,
WorldObject const *  target,
Item const *  itemTarget = nullptr 
) const
1885{
1886 uint32 neededTargets = GetExplicitTargetMask();
1887 if (!target)
1888 {
1890 if (!(neededTargets & TARGET_FLAG_GAMEOBJECT_ITEM) || !itemTarget)
1892 return SPELL_CAST_OK;
1893 }
1894
1895 Unit const* unitCaster = caster->ToUnit();
1896 if (Unit const* unitTarget = target->ToUnit())
1897 {
1899 {
1900 if (neededTargets & TARGET_FLAG_UNIT_ENEMY)
1901 if (caster->IsValidAttackTarget(unitTarget, this))
1902 return SPELL_CAST_OK;
1903 if (neededTargets & TARGET_FLAG_UNIT_ALLY
1904 || (neededTargets & TARGET_FLAG_UNIT_PARTY && unitCaster && unitCaster->IsInPartyWith(unitTarget))
1905 || (neededTargets & TARGET_FLAG_UNIT_RAID && unitCaster && unitCaster->IsInRaidWith(unitTarget)))
1906 if (caster->IsValidAssistTarget(unitTarget, this))
1907 return SPELL_CAST_OK;
1908 if (neededTargets & TARGET_FLAG_UNIT_MINIPET)
1909 if (unitCaster && unitTarget->GetGUID() == unitCaster->GetCritterGUID())
1910 return SPELL_CAST_OK;
1911 if (neededTargets & TARGET_FLAG_UNIT_PASSENGER)
1912 if (unitCaster && unitTarget->IsOnVehicle(unitCaster))
1913 return SPELL_CAST_OK;
1915 }
1916 }
1917 return SPELL_CAST_OK;
1918}
@ SPELL_FAILED_BAD_TARGETS
Definition SharedDefines.h:949
@ SPELL_CAST_OK
Definition SharedDefines.h:1126
@ TARGET_FLAG_UNIT_RAID
Definition SpellInfo.h:49
@ TARGET_FLAG_UNIT_ENEMY
Definition SpellInfo.h:54
@ TARGET_FLAG_UNIT_MINIPET
Definition SpellInfo.h:63
@ TARGET_FLAG_UNIT_PASSENGER
Definition SpellInfo.h:67
@ TARGET_FLAG_GAMEOBJECT_ITEM
Definition SpellInfo.h:61
@ TARGET_FLAG_UNIT_ALLY
Definition SpellInfo.h:55
@ TARGET_FLAG_GAMEOBJECT_MASK
Definition SpellInfo.h:71
@ TARGET_FLAG_UNIT_PARTY
Definition SpellInfo.h:50
uint32 GetExplicitTargetMask() const
Definition SpellInfo.cpp:2003
ObjectGuid GetCritterGUID() const
Definition Unit.h:731
bool IsInRaidWith(Unit const *unit) const
Definition Unit.cpp:14759
bool IsInPartyWith(Unit const *unit) const
Definition Unit.cpp:14736

References Unit::GetCritterGUID(), GetExplicitTargetMask(), Object::GetGUID(), Unit::IsInPartyWith(), Unit::IsInRaidWith(), Unit::IsOnVehicle(), WorldObject::IsValidAssistTarget(), WorldObject::IsValidAttackTarget(), SPELL_CAST_OK, SPELL_FAILED_BAD_TARGETS, TARGET_FLAG_CORPSE_MASK, TARGET_FLAG_GAMEOBJECT_ITEM, TARGET_FLAG_GAMEOBJECT_MASK, TARGET_FLAG_UNIT_ALLY, TARGET_FLAG_UNIT_ENEMY, TARGET_FLAG_UNIT_MASK, TARGET_FLAG_UNIT_MINIPET, TARGET_FLAG_UNIT_PARTY, TARGET_FLAG_UNIT_PASSENGER, TARGET_FLAG_UNIT_RAID, and Object::ToUnit().

Referenced by Spell::CheckCast(), Unit::GetMagicHitRedirectTarget(), Unit::GetMeleeHitRedirectTarget(), and Spell::InitExplicitTargets().

◆ CheckLocation()

SpellCastResult SpellInfo::CheckLocation ( uint32  map_id,
uint32  zone_id,
uint32  area_id,
Player *  player = nullptr,
bool  strict = true 
) const
1524{
1525 // normal case
1526 if (AreaGroupId > 0)
1527 {
1528 bool found = false;
1529 AreaGroupEntry const* groupEntry = sAreaGroupStore.LookupEntry(AreaGroupId);
1530 while (groupEntry)
1531 {
1532 for (uint8 i = 0; i < MAX_GROUP_AREA_IDS; ++i)
1533 if (groupEntry->AreaId[i] == zone_id || groupEntry->AreaId[i] == area_id)
1534 found = true;
1535 if (found || !groupEntry->nextGroup)
1536 break;
1537 // Try search in next group
1538 groupEntry = sAreaGroupStore.LookupEntry(groupEntry->nextGroup);
1539 }
1540
1541 if (!found)
1543 }
1544
1545 // continent limitation (virtual continent)
1546 if (HasAttribute(SPELL_ATTR4_ONLY_FLYING_AREAS) && (area_id || zone_id))
1547 {
1548 AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(area_id);
1549 if (!areaEntry)
1550 {
1551 areaEntry = sAreaTableStore.LookupEntry(zone_id);
1552 }
1553
1554 if (!areaEntry || !areaEntry->IsFlyable() || (strict && (areaEntry->flags & AREA_FLAG_NO_FLY_ZONE) != 0) || !player->canFlyInZone(map_id, zone_id, this))
1555 {
1557 }
1558 }
1559
1560 // raid instance limitation
1562 {
1563 MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
1564 if (!mapEntry || mapEntry->IsRaid())
1566 }
1567
1568 // DB base check (if non empty then must fit at least single for allow)
1569 SpellAreaMapBounds saBounds = sSpellMgr->GetSpellAreaMapBounds(Id);
1570 if (saBounds.first != saBounds.second)
1571 {
1572 for (SpellAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
1573 {
1574 if (itr->second.IsFitToRequirements(player, zone_id, area_id))
1575 return SPELL_CAST_OK;
1576 }
1578 }
1579
1580 // bg spell checks
1581 switch (Id)
1582 {
1583 case 23333: // Warsong Flag
1584 case 23335: // Silverwing Flag
1586 case 34976: // Netherstorm Flag
1588 case 2584: // Waiting to Resurrect
1589 case 22011: // Spirit Heal Channel
1590 case 22012: // Spirit Heal
1591 case 42792: // Recently Dropped Flag
1592 case 43681: // Inactive
1593 case 44535: // Spirit Heal (mana)
1594 {
1595 MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
1596 if (!mapEntry)
1598
1599 return zone_id == AREA_WINTERGRASP || (mapEntry->IsBattleground() && player && player->InBattleground()) ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
1600 }
1601 case 32724: // Gold Team (Alliance)
1602 case 32725: // Green Team (Alliance)
1603 case 35774: // Gold Team (Horde)
1604 case 35775: // Green Team (Horde)
1605 {
1606 MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
1607 if (!mapEntry)
1609
1610 return mapEntry->IsBattleArena() && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
1611 }
1612 }
1613
1614 return SPELL_CAST_OK;
1615}
@ MAP_EYE_OF_THE_STORM
Definition AreaDefines.h:244
@ MAP_WARSONG_GULCH
Definition AreaDefines.h:216
@ AREA_WINTERGRASP
Definition AreaDefines.h:145
@ AREA_FLAG_NO_FLY_ZONE
Definition DBCEnums.h:262
DBCStorage< AreaGroupEntry > sAreaGroupStore(AreaGroupEntryfmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
#define MAX_GROUP_AREA_IDS
Definition DBCStructure.h:546
@ SPELL_FAILED_INCORRECT_AREA
Definition SharedDefines.h:976
@ SPELL_FAILED_NOT_IN_RAID_INSTANCE
Definition SharedDefines.h:1104
@ SPELL_FAILED_REQUIRES_AREA
Definition SharedDefines.h:1038
@ SPELL_ATTR4_ONLY_FLYING_AREAS
Definition SharedDefines.h:544
@ SPELL_ATTR6_NOT_IN_RAID_INSTANCES
Definition SharedDefines.h:603
std::pair< SpellAreaMap::const_iterator, SpellAreaMap::const_iterator > SpellAreaMapBounds
Definition SpellMgr.h:546
bool InBattleground() const
Definition Player.h:2300
bool canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const *bySpell)
Definition Player.cpp:14039
Definition DBCStructure.h:549
uint32 nextGroup
Definition DBCStructure.h:552
uint32 AreaId[MAX_GROUP_AREA_IDS]
Definition DBCStructure.h:551
Definition DBCStructure.h:519
bool IsFlyable() const
Definition DBCStructure.h:540
uint32 flags
Definition DBCStructure.h:524
Definition DBCStructure.h:1361
bool IsBattleground() const
Definition DBCStructure.h:1391
bool IsRaid() const
Definition DBCStructure.h:1390
bool IsBattleArena() const
Definition DBCStructure.h:1392
Definition System.cpp:63

References AREA_FLAG_NO_FLY_ZONE, AREA_WINTERGRASP, AreaGroupId, AreaGroupEntry::AreaId, Player::canFlyInZone(), AreaTableEntry::flags, HasAttribute(), Id, Player::InBattleground(), MapEntry::IsBattleArena(), MapEntry::IsBattleground(), AreaTableEntry::IsFlyable(), MapEntry::IsRaid(), MAP_EYE_OF_THE_STORM, MAP_WARSONG_GULCH, MAX_GROUP_AREA_IDS, AreaGroupEntry::nextGroup, sAreaGroupStore, sAreaTableStore, sMapStore, SPELL_ATTR4_ONLY_FLYING_AREAS, SPELL_ATTR6_NOT_IN_RAID_INSTANCES, SPELL_CAST_OK, SPELL_FAILED_INCORRECT_AREA, SPELL_FAILED_NOT_IN_RAID_INSTANCE, SPELL_FAILED_REQUIRES_AREA, and sSpellMgr.

Referenced by Spell::CheckCast().

◆ CheckShapeshift()

SpellCastResult SpellInfo::CheckShapeshift ( uint32  form) const
Todo:
: Find a way to disable use of these spells clientside
1469{
1470 // talents that learn spells can have stance requirements that need ignore
1471 // (this requirement only for client-side stance show in talent description)
1472 if (GetTalentSpellCost(Id) > 0 &&
1474 return SPELL_CAST_OK;
1475
1476 uint32 stanceMask = (form ? 1 << (form - 1) : 0);
1477
1478 if (stanceMask & StancesNot) // can explicitly not be casted in this stance
1480
1481 if (stanceMask & Stances) // can explicitly be casted in this stance
1482 return SPELL_CAST_OK;
1483
1484 bool actAsShifted = false;
1485 SpellShapeshiftFormEntry const* shapeInfo = nullptr;
1486 if (form > 0)
1487 {
1488 shapeInfo = sSpellShapeshiftFormStore.LookupEntry(form);
1489 if (!shapeInfo)
1490 {
1491 LOG_ERROR("spells", "GetErrorAtShapeshiftedCast: unknown shapeshift {}", form);
1492 return SPELL_CAST_OK;
1493 }
1494 actAsShifted = !(shapeInfo->flags1 & SHAPESHIFT_FLAG_STANCE); // shapeshift acts as normal form for spells
1495 }
1496
1497 if (actAsShifted)
1498 {
1499 if (HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFTED)) // not while shapeshifted
1501 else if (Stances != 0) // needs other shapeshift
1503 }
1504 else
1505 {
1506 // needs shapeshift
1509 }
1510
1511 // Check if stance disables cast of not-stance spells
1512 // Example: cannot cast any other spells in zombie or ghoul form
1514 if (shapeInfo && (shapeInfo->flags1 & SHAPESHIFT_FLAG_CAN_ONLY_CAST_SHAPESHIFT_SPELLS))
1515 {
1516 if (!(stanceMask & Stances))
1518 }
1519
1520 return SPELL_CAST_OK;
1521}
uint32 GetTalentSpellCost(uint32 spellId)
Definition DBCStores.cpp:703
@ SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED
Definition SharedDefines.h:463
@ SPELL_ATTR0_NOT_SHAPESHIFTED
Definition SharedDefines.h:386
@ SPELL_FAILED_ONLY_SHAPESHIFT
Definition SharedDefines.h:1031
@ SPELL_FAILED_NOT_SHAPESHIFT
Definition SharedDefines.h:1005
@ SHAPESHIFT_FLAG_CAN_ONLY_CAST_SHAPESHIFT_SPELLS
Definition UnitDefines.h:117
@ SHAPESHIFT_FLAG_STANCE
Definition UnitDefines.h:107
uint32 flags1
Definition DBCStructure.h:1858

References AttributesEx2, Effects, SpellShapeshiftFormEntry::flags1, GetTalentSpellCost(), HasAttribute(), Id, LOG_ERROR, SHAPESHIFT_FLAG_CAN_ONLY_CAST_SHAPESHIFT_SPELLS, SHAPESHIFT_FLAG_STANCE, SPELL_ATTR0_NOT_SHAPESHIFTED, SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED, SPELL_CAST_OK, SPELL_EFFECT_LEARN_SPELL, SPELL_FAILED_NOT_SHAPESHIFT, SPELL_FAILED_ONLY_SHAPESHIFT, sSpellShapeshiftFormStore, Stances, and StancesNot.

Referenced by Player::ApplyEquipSpell(), AuraEffect::ApplySpellMod(), and Spell::CheckCast().

◆ CheckTarget()

SpellCastResult SpellInfo::CheckTarget ( WorldObject const *  caster,
WorldObject const *  target,
bool  implicit = true,
Unit const *  originalCaster = nullptr 
) const
1679{
1680 if (AttributesEx & SPELL_ATTR1_EXCLUDE_CASTER && caster == target)
1682
1683 // check visibility - ignore stealth for implicit (area) targets
1684 if (!(AttributesEx6 & SPELL_ATTR6_IGNORE_PHASE_SHIFT) && !caster->CanSeeOrDetect(target, implicit))
1686
1687 Unit const* unitCaster = caster->ToUnit();
1688
1689 Unit const* unitTarget = target->ToUnit();
1690
1691 // creature/player specific target checks
1692 if (unitTarget)
1693 {
1694 // can't assist player which is dueling someone, also for spells with generic unit targets (e.g. Devour Magic)
1695 // boarding a dueling player's passenger mount is not an assist
1696 // owner is taken from the original caster of aura-triggered casts, so a duelist's Prayer of Mending can still
1697 // jump back to them (spellclicks set the clicker as original caster, so they keep using the caster)
1698 Unit const* assistingUnit = originalCaster ? originalCaster : unitCaster;
1699 if (unitCaster && unitCaster != unitTarget && !HasAura(SPELL_AURA_CONTROL_VEHICLE))
1700 if (Player const* targetPlayerOwner = unitTarget->GetAffectingPlayer())
1701 if (targetPlayerOwner->duel)
1702 if (Player const* casterPlayerOwner = assistingUnit->GetAffectingPlayer())
1703 if (casterPlayerOwner != targetPlayerOwner
1704 && !unitCaster->IsValidAttackTarget(unitTarget, this))
1706
1707 // xinef: spells cannot be cast if player is in fake combat also
1708 if (AttributesEx & SPELL_ATTR1_ONLY_PEACEFUL_TARGETS && (unitTarget->IsInCombat() || unitTarget->IsPetInCombat()))
1710
1712 if (auto creature = unitTarget->ToCreature())
1713 if (CreatureImmunities const* immunities = sSpellMgr->GetCreatureImmunities(creature->GetCreatureTemplate()->CreatureImmunitiesId))
1714 if (immunities->ImmuneAoE)
1716
1717 // only spells with SPELL_ATTR3_ONLY_ON_GHOSTS can target ghosts
1719 {
1720 if (!unitTarget->HasGhostAura())
1724 }
1725
1726 if (caster != unitTarget)
1727 {
1728 if (caster->IsPlayer())
1729 {
1730 // Do not allow these spells to target creatures not tapped by us (Banish, Polymorph, many quest spells)
1732 if (Creature const* targetCreature = unitTarget->ToCreature())
1733 if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->ToPlayer()))
1735
1737 {
1738 Creature const* targetCreature = unitTarget->ToCreature();
1739 if (!targetCreature)
1741
1744 }
1745
1746 // Not allow disarm unarmed player
1748 {
1749 bool valid = false;
1750 for (uint8 i = BASE_ATTACK; i < MAX_ATTACK; ++i)
1751 {
1752 AuraType disarmAuraType = SPELL_AURA_MOD_DISARM;
1753 switch (i)
1754 {
1755 case OFF_ATTACK:
1756 disarmAuraType = SPELL_AURA_MOD_DISARM_OFFHAND;
1757 break;
1758 case RANGED_ATTACK:
1759 disarmAuraType = SPELL_AURA_MOD_DISARM_RANGED;
1760 break;
1761 }
1762
1763 if (HasAura(disarmAuraType))
1764 {
1765 if (Player const* player = unitTarget->ToPlayer())
1766 {
1767 if (player->GetWeaponForAttack(WeaponAttackType(i), true))
1768 {
1769 valid = true;
1770 break;
1771 }
1772 }
1773 else if (unitTarget->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + i))
1774 {
1775 valid = true;
1776 break;
1777 }
1778 }
1779 }
1780
1781 if (!valid)
1782 {
1784 }
1785 }
1786 }
1787 }
1788 }
1789 // corpse specific target checks
1790 else if (Corpse const* corpseTarget = target->ToCorpse())
1791 {
1792 // cannot target bare bones
1793 if (corpseTarget->GetType() == CORPSE_BONES)
1795 // we have to use owner for some checks (aura preventing resurrection for example)
1796 if (Player* owner = ObjectAccessor::FindPlayer(corpseTarget->GetOwnerGUID()))
1797 unitTarget = owner;
1798 // we're not interested in corpses without owner
1799 else
1801 }
1802 // other types of objects - always valid
1803 else return SPELL_CAST_OK;
1804
1805 // corpseOwner and unit specific target checks
1806 if (unitTarget->IsPlayer())
1807 {
1810 }
1811 else
1812 {
1815
1818 }
1819
1820 if (!IsAllowingDeadTarget() && !unitTarget->IsAlive())
1822
1823 // check this flag only for implicit targets (chain and area), allow to explicitly target units for spells like Shield of Righteousness
1826
1827 // checked in Unit::IsValidAttack/AssistTarget, shouldn't be checked for ENTRY targets
1828 //if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_UNTARGETABLE) && target->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
1829 // return SPELL_FAILED_BAD_TARGETS;
1830
1831 //if (!(AttributesEx6 & SPELL_ATTR6_NO_AURA_LOG)
1832
1833 if (!CheckTargetCreatureType(unitTarget))
1834 {
1835 if (target->IsPlayer())
1837 else
1839 }
1840
1841 // check GM mode and GM invisibility - only for player casts (npc casts are controlled by AI) and negative spells
1842 if (unitTarget != caster && (caster->GetAffectingPlayer() || !IsPositive()) && unitTarget->IsPlayer())
1843 {
1844 if (!unitTarget->ToPlayer()->IsVisible())
1846
1847 if (unitTarget->ToPlayer()->IsGameMaster())
1849 }
1850
1851 // not allow casting on flying player
1854
1855 /* TARGET_UNIT_MASTER gets blocked here for passengers, because the whole idea of this check is to
1856 not allow passengers to be implicitly hit by spells, however this target type should be an exception,
1857 if this is left it kills spells that award kill credit from vehicle to master (few spells),
1858 the use of these 2 covers passenger target check, logically, if vehicle cast this to master it should always hit
1859 him, because it would be it's passenger, there's no such case where this gets to fail legitimacy, this problem
1860 cannot be solved from within the check in other way since target type cannot be called for the spell currently
1861 Spell examples: [ID - 52864 Devour Water, ID - 52862 Devour Wind, ID - 49370 Wyrmrest Defender: Destabilize Azure Dragonshrine Effect] */
1862 if ((!unitCaster || !(unitCaster->IsCreature() && unitCaster->IsVehicle())) && (!unitCaster || unitCaster->GetCharmerOrOwner() != target))
1863 {
1864 if (TargetAuraState && !unitTarget->HasAuraState(AuraStateType(TargetAuraState), this, unitCaster))
1866
1867 if (TargetAuraStateNot && unitTarget->HasAuraState(AuraStateType(TargetAuraStateNot), this, unitCaster))
1869 }
1870
1871 if (TargetAuraSpell && !unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(TargetAuraSpell, caster)))
1873
1874 if (ExcludeTargetAuraSpell && unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(ExcludeTargetAuraSpell, caster)))
1876
1880
1881 return SPELL_CAST_OK;
1882}
@ CORPSE_BONES
Definition Corpse.h:28
LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template", "creature pickpocket lootid", true)
@ SPELL_ATTR7_BYPASS_NO_RESURRECTION_AURA
Definition SharedDefines.h:656
@ SPELL_EFFECT_SELF_RESURRECT
Definition SharedDefines.h:860
@ SPELL_EFFECT_RESURRECT
Definition SharedDefines.h:784
@ SPELL_EFFECT_RESURRECT_NEW
Definition SharedDefines.h:879
@ SPELL_ATTR5_NOT_ON_PLAYER_CONTROLLED_NPC
Definition SharedDefines.h:563
@ SPELL_ATTR5_NOT_ON_PLAYER
Definition SharedDefines.h:562
@ SPELL_ATTR2_CANNOT_CAST_ON_TAPPED
Definition SharedDefines.h:450
@ SPELL_ATTR1_EXCLUDE_CASTER
Definition SharedDefines.h:426
@ SPELL_ATTR1_ONLY_PEACEFUL_TARGETS
Definition SharedDefines.h:415
@ SPELL_ATTR3_NOT_ON_AOE_IMMUNE
Definition SharedDefines.h:512
@ SPELL_ATTR3_ONLY_ON_PLAYER
Definition SharedDefines.h:489
@ MECHANIC_DISARM
Definition SharedDefines.h:1316
AuraStateType
Definition SharedDefines.h:1276
@ SPELL_FAILED_TARGET_NOT_PLAYER
Definition SharedDefines.h:1059
@ SPELL_FAILED_TARGET_NO_POCKETS
Definition SharedDefines.h:1060
@ SPELL_FAILED_TARGET_IS_PLAYER
Definition SharedDefines.h:1054
@ SPELL_FAILED_TARGET_DUELING
Definition SharedDefines.h:1049
@ SPELL_FAILED_CANT_CAST_ON_TAPPED
Definition SharedDefines.h:955
@ SPELL_FAILED_TARGET_AURASTATE
Definition SharedDefines.h:1048
@ SPELL_FAILED_BM_OR_INVISGOD
Definition SharedDefines.h:1096
@ SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED
Definition SharedDefines.h:1055
@ SPELL_FAILED_TARGETS_DEAD
Definition SharedDefines.h:1046
@ SPELL_FAILED_TARGET_NOT_GHOST
Definition SharedDefines.h:1080
@ SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED
Definition SharedDefines.h:1123
@ SPELL_FAILED_TARGET_NO_WEAPONS
Definition SharedDefines.h:1061
@ SPELL_FAILED_TARGET_AFFECTING_COMBAT
Definition SharedDefines.h:1047
@ SPELL_ATTR6_DO_NOT_CHAIN_TO_CROWD_CONTROLLED_TARGETS
Definition SharedDefines.h:600
@ SPELL_ATTR6_IGNORE_PHASE_SHIFT
Definition SharedDefines.h:605
@ SPELL_AURA_MOD_DISARM_RANGED
Definition SpellAuraDefines.h:341
@ SPELL_AURA_CONTROL_VEHICLE
Definition SpellAuraDefines.h:299
@ SPELL_AURA_MOD_DISARM_OFFHAND
Definition SpellAuraDefines.h:317
@ SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET
Definition SpellInfo.h:195
@ SPELL_ATTR0_CU_PICKPOCKET
Definition SpellInfo.h:187
@ UNIT_STATE_CONTROLLED
Definition UnitDefines.h:218
@ MAX_ATTACK
Definition Unit.h:226
@ RANGED_ATTACK
Definition Unit.h:225
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition UpdateFields.h:116
Definition Corpse.h:49
Definition Creature.h:47
CreatureTemplate const * GetCreatureTemplate() const
Definition Creature.h:207
bool HaveLootFor(uint32 loot_id) const
Definition LootMgr.h:224
Corpse * ToCorpse()
Definition Object.h:224
bool IsPlayer() const
Definition Object.h:207
uint32 GetUInt32Value(uint16 index) const
Definition Object.cpp:303
Player * ToPlayer()
Definition Object.h:208
bool IsCreature() const
Definition Object.h:211
Creature * ToCreature()
Definition Object.h:212
bool IsGameMaster() const
Definition Player.h:1178
bool IsRequiringDeadTarget() const
Definition SpellInfo.cpp:1267
bool IsDeathPersistent() const
Definition SpellInfo.cpp:1262
bool CheckTargetCreatureType(Unit const *target) const
Definition SpellInfo.cpp:1920
bool IsAllowingDeadTarget() const
Definition SpellInfo.cpp:1272
bool HasEffect(SpellEffects effect) const
Definition SpellInfo.cpp:889
bool IsPositive() const
Definition SpellInfo.cpp:1282
bool IsVehicle() const
Definition Unit.h:806
bool IsAlive() const
Definition Unit.h:1812
bool HasGhostAura() const
Definition Unit.h:1817
bool IsPetInCombat() const
Definition Unit.h:952
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5798
bool HasPreventResurectionAura() const
Definition Unit.h:1826
Unit * GetCharmerOrOwner() const
Definition Unit.h:1303
bool IsInFlight() const
Definition Unit.h:1725
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
Definition Unit.cpp:7464
bool IsVisible() const
Definition Unit.h:2035
bool HasUnitState(const uint32 f) const
Definition Unit.h:742
Player * GetAffectingPlayer() const
Definition Unit.cpp:7542
bool IsValidAttackTarget(Unit const *target, SpellInfo const *bySpell=nullptr) const
Definition Unit.cpp:10537
bool IsInCombat() const
Definition Unit.h:949
Player * FindPlayer(ObjectGuid const guid)
Definition ObjectAccessor.cpp:269
Definition SpellMgr.h:573
uint32 pickpocketLootId
Definition CreatureData.h:221

References AttributesEx, AttributesEx2, AttributesEx6, BASE_ATTACK, WorldObject::CanSeeOrDetect(), CheckTargetCreatureType(), CORPSE_BONES, ExcludeTargetAuraSpell, ObjectAccessor::FindPlayer(), WorldObject::GetAffectingPlayer(), Unit::GetAffectingPlayer(), Unit::GetCharmerOrOwner(), Creature::GetCreatureTemplate(), Object::GetUInt32Value(), HasAttribute(), HasAura(), Unit::HasAura(), Unit::HasAuraState(), HasEffect(), Unit::HasGhostAura(), Unit::HasPreventResurectionAura(), Unit::HasUnitState(), LootStore::HaveLootFor(), Unit::IsAlive(), IsAllowingDeadTarget(), Unit::IsControlledByPlayer(), Object::IsCreature(), IsDeathPersistent(), Player::IsGameMaster(), Unit::IsInCombat(), Unit::IsInFlight(), Unit::IsPetInCombat(), Object::IsPlayer(), IsPositive(), IsRequiringDeadTarget(), Unit::IsValidAttackTarget(), Unit::IsVehicle(), Unit::IsVisible(), LootTemplates_Pickpocketing, MAX_ATTACK, Mechanic, MECHANIC_DISARM, OFF_ATTACK, CreatureTemplate::pickpocketLootId, RANGED_ATTACK, SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET, SPELL_ATTR0_CU_PICKPOCKET, SPELL_ATTR1_EXCLUDE_CASTER, SPELL_ATTR1_ONLY_PEACEFUL_TARGETS, SPELL_ATTR2_CANNOT_CAST_ON_TAPPED, SPELL_ATTR3_NOT_ON_AOE_IMMUNE, SPELL_ATTR3_ONLY_ON_PLAYER, SPELL_ATTR5_NOT_ON_PLAYER, SPELL_ATTR5_NOT_ON_PLAYER_CONTROLLED_NPC, SPELL_ATTR6_DO_NOT_CHAIN_TO_CROWD_CONTROLLED_TARGETS, SPELL_ATTR6_IGNORE_PHASE_SHIFT, SPELL_ATTR7_BYPASS_NO_RESURRECTION_AURA, SPELL_AURA_CONTROL_VEHICLE, SPELL_AURA_MOD_DISARM, SPELL_AURA_MOD_DISARM_OFFHAND, SPELL_AURA_MOD_DISARM_RANGED, SPELL_CAST_OK, SPELL_EFFECT_RESURRECT, SPELL_EFFECT_RESURRECT_NEW, SPELL_EFFECT_SELF_RESURRECT, SPELL_FAILED_BAD_TARGETS, SPELL_FAILED_BM_OR_INVISGOD, SPELL_FAILED_CANT_CAST_ON_TAPPED, SPELL_FAILED_TARGET_AFFECTING_COMBAT, SPELL_FAILED_TARGET_AURASTATE, SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED, SPELL_FAILED_TARGET_DUELING, SPELL_FAILED_TARGET_IS_PLAYER, SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED, SPELL_FAILED_TARGET_NO_POCKETS, SPELL_FAILED_TARGET_NO_WEAPONS, SPELL_FAILED_TARGET_NOT_GHOST, SPELL_FAILED_TARGET_NOT_PLAYER, SPELL_FAILED_TARGETS_DEAD, sSpellMgr, TargetAuraSpell, TargetAuraState, TargetAuraStateNot, Object::ToCorpse(), Object::ToCreature(), Object::ToPlayer(), Object::ToUnit(), UNIT_STATE_CONTROLLED, and UNIT_VIRTUAL_ITEM_SLOT_ID.

Referenced by Spell::AddUnitTarget(), Spell::CheckCast(), Unit::GetMeleeHitRedirectTarget(), SpellTargetSelector::operator()(), Acore::WorldObjectSpellTargetCheck::operator()(), and Spell::SelectImplicitTrajTargets().

◆ CheckTargetCreatureType()

bool SpellInfo::CheckTargetCreatureType ( Unit const *  target) const
1921{
1922 // Curse of Doom & Exorcism: not find another way to fix spell target check :/
1924 {
1925 // not allow cast at player
1926 if (target->IsPlayer())
1927 return false;
1928 else
1929 return true;
1930 }
1931 uint32 creatureType = target->GetCreatureTypeMask();
1932 return !TargetCreatureType || !creatureType || (creatureType & TargetCreatureType);
1933}
@ SPELLFAMILY_WARLOCK
Definition SharedDefines.h:3789
uint32 GetCategory() const
Definition SpellInfo.cpp:884

References GetCategory(), Unit::GetCreatureTypeMask(), Object::IsPlayer(), SPELLFAMILY_WARLOCK, SpellFamilyName, and TargetCreatureType.

Referenced by CheckTarget().

◆ ComputeIsCritCapable()

bool SpellInfo::ComputeIsCritCapable ( ) const
1201{
1202 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1203 {
1204 switch (Effects[i].Effect)
1205 {
1208 case SPELL_EFFECT_HEAL:
1216 return true;
1217 }
1218 }
1219 return false;
1220}
@ SPELL_EFFECT_POWER_BURN
Definition SharedDefines.h:828
@ SPELL_EFFECT_HEALTH_LEECH
Definition SharedDefines.h:775
@ SPELL_EFFECT_WEAPON_DAMAGE
Definition SharedDefines.h:824
@ SPELL_EFFECT_NORMALIZED_WEAPON_DMG
Definition SharedDefines.h:887
@ SPELL_EFFECT_HEAL_MECHANICAL
Definition SharedDefines.h:841
@ SPELL_EFFECT_WEAPON_PERCENT_DAMAGE
Definition SharedDefines.h:797
@ SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL
Definition SharedDefines.h:783

References Effects, MAX_SPELL_EFFECTS, SPELL_EFFECT_HEAL, SPELL_EFFECT_HEAL_MECHANICAL, SPELL_EFFECT_HEAL_PCT, SPELL_EFFECT_HEALTH_LEECH, SPELL_EFFECT_NORMALIZED_WEAPON_DMG, SPELL_EFFECT_POWER_BURN, SPELL_EFFECT_SCHOOL_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, and SPELL_EFFECT_WEAPON_PERCENT_DAMAGE.

◆ ComputeIsStackableWithRanks()

bool SpellInfo::ComputeIsStackableWithRanks ( ) const
1158{
1159 if (IsPassive())
1160 return false;
1162 return false;
1164 return false;
1165
1167 return false;
1168
1169 // All stance spells. if any better way, change it.
1170 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1171 {
1172 switch (SpellFamilyName)
1173 {
1175 // Paladin aura Spell
1177 return false;
1178 break;
1179 case SPELLFAMILY_DRUID:
1180 // Druid form Spell
1181 if (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA &&
1182 Effects[i].ApplyAuraName == SPELL_AURA_MOD_SHAPESHIFT)
1183 return false;
1184 break;
1185 }
1186 }
1187 return true;
1188}
@ SPELL_EFFECT_APPLY_AREA_AURA_RAID
Definition SharedDefines.h:831
@ SPELLFAMILY_PALADIN
Definition SharedDefines.h:3794
@ SPELLFAMILY_DRUID
Definition SharedDefines.h:3791
@ SPELL_AURA_MOD_SHAPESHIFT
Definition SpellAuraDefines.h:99
bool IsProfessionOrRiding() const
Definition SpellInfo.cpp:974
bool IsAbilityLearnedWithProfession() const
Definition SpellInfo.cpp:1024

References Effects, IsAbilityLearnedWithProfession(), IsPassive(), IsProfessionOrRiding(), MAX_SPELL_EFFECTS, POWER_HEALTH, POWER_MANA, SPELL_AURA_MOD_SHAPESHIFT, SPELL_EFFECT_APPLY_AREA_AURA_RAID, SPELL_EFFECT_APPLY_AURA, SPELLFAMILY_DRUID, SPELLFAMILY_PALADIN, and SpellFamilyName.

◆ GetAllEffectsMechanicMask()

◆ GetAuraRankForLevel()

SpellInfo const * SpellInfo::GetAuraRankForLevel ( uint8  level) const
2974{
2975 // ignore passive spells
2976 //if (IsPassive())
2977 // return this;
2978
2979 // Client ignores spell with these attributes (sub_53D9D0)
2981 return this;
2982
2983 bool needRankSelection = false;
2984 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2985 {
2986 if (IsPositiveEffect(i) &&
2987 (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA ||
2990 {
2991 needRankSelection = true;
2992 break;
2993 }
2994 }
2995
2996 // not required
2997 if (!needRankSelection)
2998 return this;
2999
3000 SpellInfo const* nextSpellInfo = nullptr;
3001
3002 sScriptMgr->OnBeforeAuraRankForLevel(this, nextSpellInfo, level);
3003
3004 if (nextSpellInfo != nullptr)
3005 return nextSpellInfo;
3006
3007 for (nextSpellInfo = this; nextSpellInfo != nullptr; nextSpellInfo = nextSpellInfo->GetPrevRankSpell())
3008 {
3009 // if found appropriate level
3010 if (uint32(level + 10) >= nextSpellInfo->SpellLevel)
3011 return nextSpellInfo;
3012
3013 // one rank less then
3014 }
3015
3016 // not found
3017 return nullptr;
3018}
#define sScriptMgr
Definition ScriptMgr.h:769
@ SPELL_EFFECT_APPLY_AREA_AURA_PARTY
Definition SharedDefines.h:801
@ SPELL_ATTR2_ALLOW_LOW_LEVEL_BUFF
Definition SharedDefines.h:447
@ SPELL_ATTR3_ONLY_PROC_ON_CASTER
Definition SharedDefines.h:508
@ SPELL_ATTR0_COOLDOWN_ON_EVENT
Definition SharedDefines.h:395
SpellInfo const * GetPrevRankSpell() const
Definition SpellInfo.cpp:2966
bool IsPositiveEffect(uint8 effIndex) const
Definition SpellInfo.cpp:1287

References Effects, GetPrevRankSpell(), HasAttribute(), IsPositiveEffect(), MAX_SPELL_EFFECTS, SPELL_ATTR0_COOLDOWN_ON_EVENT, SPELL_ATTR2_ALLOW_LOW_LEVEL_BUFF, SPELL_ATTR3_ONLY_PROC_ON_CASTER, SPELL_EFFECT_APPLY_AREA_AURA_PARTY, SPELL_EFFECT_APPLY_AREA_AURA_RAID, SPELL_EFFECT_APPLY_AURA, SpellLevel, and sScriptMgr.

Referenced by Pet::_LoadAuras(), Spell::DoSpellHitOnUnit(), and WorldSession::HandleCastSpellOpcode().

◆ GetAuraState()

AuraStateType SpellInfo::GetAuraState ( ) const
2009{
2010 return _auraState;
2011}
AuraStateType _auraState
Definition SpellInfo.h:422

References _auraState.

Referenced by Unit::_ApplyAura(), Unit::_CreateAuraApplication(), and Unit::_UnapplyAura().

◆ GetCategory()

◆ GetDispelMask() [1/2]

uint32 SpellInfo::GetDispelMask ( ) const
1990{
1992}
DispelType
Definition SharedDefines.h:1374
uint32 GetDispelMask() const
Definition SpellInfo.cpp:1989

References Dispel, and GetDispelMask().

Referenced by Spell::CheckCast(), Spell::CheckCasterAuras(), Spell::EffectDispel(), Spell::EffectStealBeneficialBuff(), Spell::EffectTriggerSpell(), Unit::GetDispellableAuraList(), and GetDispelMask().

◆ GetDispelMask() [2/2]

uint32 SpellInfo::GetDispelMask ( DispelType  type)
static
1995{
1996 // If dispel all
1997 if (type == DISPEL_ALL)
1998 return DISPEL_ALL_MASK;
1999 else
2000 return uint32(1 << type);
2001}
#define DISPEL_ALL_MASK
Definition SharedDefines.h:1390
@ DISPEL_ALL
Definition SharedDefines.h:1382

References DISPEL_ALL, and DISPEL_ALL_MASK.

◆ GetDuration()

◆ GetEffect()

◆ GetEffectMechanic()

Mechanics SpellInfo::GetEffectMechanic ( uint8  effIndex) const
1973{
1974 if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
1975 return Mechanics(Effects[effIndex].Mechanic);
1976 if (Mechanic)
1977 return Mechanics(Mechanic);
1978 return MECHANIC_NONE;
1979}
Mechanics
Definition SharedDefines.h:1312
@ MECHANIC_NONE
Definition SharedDefines.h:1313

References Effects, Mechanic, and MECHANIC_NONE.

Referenced by Unit::GetMechanicResistChance().

◆ GetEffectMechanicMask()

uint64 SpellInfo::GetEffectMechanicMask ( uint8  effIndex) const
1952{
1953 uint64 mask = 0;
1954 if (Mechanic)
1955 mask |= 1ULL << Mechanic;
1956 if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
1957 mask |= 1ULL << Effects[effIndex].Mechanic;
1958 return mask;
1959}

References Effects, and Mechanic.

Referenced by Unit::IsDamageReducedByArmor().

◆ GetEffects()

◆ GetExplicitTargetMask()

◆ GetFirstRankSpell()

◆ GetImmunityInfo()

ImmunityInfo const * SpellInfo::GetImmunityInfo ( uint8  effIndex) const
inline
529{ return effIndex < MAX_SPELL_EFFECTS ? &_immunityInfo[effIndex] : nullptr; }

References MAX_SPELL_EFFECTS.

Referenced by SpellEffectInfo::GetImmunityInfo().

◆ GetLastRankSpell()

SpellInfo const * SpellInfo::GetLastRankSpell ( ) const
2955{
2956 if (!ChainEntry)
2957 return nullptr;
2958 return ChainEntry->last;
2959}
SpellInfo const * last
Definition SpellMgr.h:557

References ChainEntry, and SpellChainNode::last.

◆ GetMaxDuration()

◆ GetMaxRange()

float SpellInfo::GetMaxRange ( bool  positive = false,
WorldObject *  caster = nullptr,
Spell *  spell = nullptr 
) const

◆ GetMaxTicks()

uint32 SpellInfo::GetMaxTicks ( ) const
2809{
2810 int32 DotDuration = GetDuration();
2811 if (DotDuration == 0)
2812 return 1;
2813
2814 // 200% limit
2815 if (DotDuration > 30000)
2816 DotDuration = 30000;
2817
2818 for (uint8 x = 0; x < MAX_SPELL_EFFECTS; x++)
2819 {
2820 if (Effects[x].Effect == SPELL_EFFECT_APPLY_AURA)
2821 switch (Effects[x].ApplyAuraName)
2822 {
2827 if (Effects[x].Amplitude != 0)
2828 return DotDuration / Effects[x].Amplitude;
2829 break;
2830 default:
2831 break;
2832 }
2833 }
2834
2835 return 6;
2836}
@ SPELL_AURA_PERIODIC_HEAL
Definition SpellAuraDefines.h:71
int32 GetDuration() const
Definition SpellInfo.cpp:2778

References Effects, GetDuration(), MAX_SPELL_EFFECTS, SPELL_AURA_PERIODIC_DAMAGE, SPELL_AURA_PERIODIC_HEAL, SPELL_AURA_PERIODIC_LEECH, SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT, and SPELL_EFFECT_APPLY_AURA.

Referenced by Unit::CalculateDefaultCoefficient(), spell_mage_ignite::HandleProc(), spell_dru_t10_balance_4p_bonus::HandleProc(), spell_hun_piercing_shots::HandleProc(), spell_pal_sheath_of_light::HandleProc(), spell_pal_t8_2p_bonus::HandleProc(), spell_pri_glyph_of_prayer_of_healing::HandleProc(), spell_pri_t10_heal_2p_bonus::HandleProc(), spell_pri_blessed_recovery::HandleProc(), spell_sha_t10_restoration_4p_bonus::HandleProc(), spell_sha_t8_elemental_4p_bonus::HandleProc(), and spell_sha_t9_elemental_4p_bonus::HandleProc().

◆ GetMinRange()

float SpellInfo::GetMinRange ( bool  positive = false) const

◆ GetNextRankSpell()

SpellInfo const * SpellInfo::GetNextRankSpell ( ) const

◆ GetPrevRankSpell()

SpellInfo const * SpellInfo::GetPrevRankSpell ( ) const
2967{
2968 if (!ChainEntry)
2969 return nullptr;
2970 return ChainEntry->prev;
2971}
SpellInfo const * prev
Definition SpellMgr.h:554

References ChainEntry, and SpellChainNode::prev.

Referenced by GetAuraRankForLevel().

◆ GetRank()

◆ GetRecoveryTime()

uint32 SpellInfo::GetRecoveryTime ( ) const

◆ GetSchoolMask()

SpellSchoolMask SpellInfo::GetSchoolMask ( ) const
1936{
1938}
SpellSchoolMask
Definition SharedDefines.h:283

References SchoolMask.

Referenced by PetAI::_canMeleeAttack(), ApplyAllSpellImmunitiesTo(), Unit::CalcArmorReducedDamage(), AuraEffect::CalcPeriodicCritChance(), ThreatManager::CalculateModifiedThreat(), spell_mage_ice_barrier_aura::CalculateSpellAmount(), spell_mage_ice_barrier::CalculateSpellAmount(), CalculateSpellAmount(), Unit::CalculateSpellDamageTaken(), Creature::CanCastSpell(), Spell::CheckCast(), Spell::CheckCasterAuras(), AuraEffect::CheckEffectProc(), spell_karazhan_wrath_titans_aura::CheckProc(), spell_gen_adaptive_warding::CheckProc(), spell_gen_obsidian_armor::CheckProc(), spell_hun_lock_and_load::CheckTrapProc(), Unit::DealDamage(), Unit::DealDamageShieldDamage(), Spell::DoAllEffectOnTarget(), Spell::EffectCastButtons(), Spell::EffectEnvironmentalDMG(), Spell::EffectHeal(), Spell::EffectInterruptCast(), Spell::EffectWeaponDmg(), ProcEventInfo::GetSchoolMask(), AuraEffect::HandleAuraModSchoolImmunity(), spell_mage_cold_snap::HandleDummy(), AuraEffect::HandlePeriodicTriggerSpellAuraTick(), spell_karazhan_wrath_titans_aura::HandleProc(), spell_dru_t3_8p_bonus::HandleProc(), spell_gen_adaptive_warding::HandleProc(), spell_gen_obsidian_armor::HandleProc(), spell_hun_glyph_of_arcane_shot::HandleProc(), Unit::IsImmunedToAuraPeriodicTick(), Unit::IsImmunedToDamage(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpellEffect(), SmartAI::IsMainSpellPrevented(), LoadAuraState(), WorldObject::MagicSpellHitResult(), SmartScript::ProcessAction(), Player::ProhibitSpellSchool(), Unit::SendPeriodicAuraLog(), Spell::Spell(), Unit::SpellCriticalDamageBonus(), Unit::SpellDamageBonusDone(), Unit::SpellDamageBonusTaken(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), boss_viscidus::SpellHit(), WorldObject::SpellHitResult(), WorldObject::SpellHitResult(), and Unit::SpellPctDamageModsDone().

◆ GetSpellMechanicMaskByEffectMask()

uint64 SpellInfo::GetSpellMechanicMaskByEffectMask ( uint32  effectMask) const
1962{
1963 uint64 mask = 0;
1964 if (Mechanic)
1965 mask |= 1ULL << Mechanic;
1966 for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
1967 if ((effectMask & (1 << i)) && Effects[i].Mechanic)
1968 mask |= 1ULL << Effects[i].Mechanic;
1969 return mask;
1970}

References Effects, MAX_SPELL_EFFECTS, and Mechanic.

Referenced by WorldObject::ModSpellDuration().

◆ GetSpellSpecific()

◆ HasAnyAura()

bool SpellInfo::HasAnyAura ( ) const
915{
916 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
917 if (Effects[i].IsAura())
918 return true;
919 return false;
920}

References Effects, and MAX_SPELL_EFFECTS.

Referenced by Player::_addSpell(), and Player::removeSpell().

◆ HasAnyEffectMechanic()

bool SpellInfo::HasAnyEffectMechanic ( ) const
1982{
1983 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1984 if (Effects[i].Mechanic)
1985 return true;
1986 return false;
1987}

References Effects, MAX_SPELL_EFFECTS, and Mechanic.

◆ HasAreaAuraEffect()

bool SpellInfo::HasAreaAuraEffect ( ) const
923{
924 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
925 if (Effects[i].IsAreaAuraEffect())
926 return true;
927 return false;
928}

References Effects, and MAX_SPELL_EFFECTS.

Referenced by AuraScript::_Validate(), and Aura::CanBeSentToClient().

◆ HasAttribute() [1/9]

bool SpellInfo::HasAttribute ( SpellAttr0  attribute) const
inline
441{ return (Attributes & attribute) != 0; }

Referenced by Player::_addSpell(), Player::_addTalentAurasAndSpells(), Spell::_cast(), _IsPositiveEffect(), Unit::_IsValidAssistTarget(), Unit::_IsValidAttackTarget(), Pet::_SaveAuras(), Unit::_TryStackingOrRefreshingExistingAura(), Unit::AddAura(), Player::AddSpellAndCategoryCooldowns(), Player::addTalent(), ThreatManager::AddThreat(), ApplyAllSpellImmunitiesTo(), Player::ApplyEquipCooldown(), Aura::Aura(), AuraApplication::BuildUpdatePacket(), Unit::CalcAbsorbResist(), CalcCastTime(), CalcPowerCost(), AuraEffect::CalculatePeriodic(), Unit::CalculateSpellDamageTaken(), boss_mandokir::boss_mandokirAI::CalculateThreat(), SpellEffectInfo::CalcValue(), PetAI::CanAttack(), CanBeRedirectedBySpellMagnet(), Aura::CanBeSaved(), CanBeUsedInCombat(), CanDispelAura(), Spell::CanExecuteTriggersOnHit(), Player::canFlyInZone(), Player::CanNoReagentCast(), CanPierceImmuneAura(), CanSpellCastOverrideAuraEffect(), CanSpellProvideImmunityAgainstAura(), Aura::CanStackWith(), Spell::CheckCast(), Spell::CheckCasterAuras(), Spell::CheckEffectTarget(), Spell::CheckItems(), CheckLocation(), spell_dru_omen_of_clarity::CheckProc(), spell_item_meteoric_inspiration::CheckProc(), spell_warr_weapon_required_proc::CheckProc(), CheckShapeshift(), CheckTarget(), createProcFlags(), Unit::DealDamage(), Spell::Delayed(), Spell::DelayedChannel(), Spell::DoAllEffectOnLaunchTarget(), Spell::DoAllEffectOnTarget(), Spell::DoSpellHitOnUnit(), Spell::EffectCastButtons(), Spell::EffectCharge(), Spell::EffectEnergize(), Spell::EffectEnergizePct(), Spell::EffectForceDeselect(), Spell::EffectSanctuary(), Spell::EffectSchoolDMG(), Spell::EffectStealBeneficialBuff(), Spell::EffectTriggerSpell(), Spell::EffectWeaponDmg(), UnitAI::FillAISpellInfo(), DynObjAura::FillTargetMap(), spell_yogg_saron_lunatic_gaze::FilterTargets(), Spell::finish(), Creature::FocusTarget(), ThreatManager::ForwardThreatForAssistingMe(), GetAuraRankForLevel(), Unit::GetDispellableAuraList(), Unit::GetEffectiveResistChance(), Aura::GetProcEffectMask(), Spell::GetSearcherTypeMask(), AuraEffect::GetTotalTicks(), Spell::handle_immediate(), AuraEffect::HandleAuraModSchoolImmunity(), WorldSession::HandleCancelAuraOpcode(), WorldSession::HandleCancelChanneling(), AuraEffect::HandleFeignDeath(), Spell::HandleLaunchPhase(), AuraEffect::HandleModTotalPercentStat(), AuraEffect::HandlePeriodicDamageAurasTick(), AuraEffect::HandlePeriodicEnergizeAuraTick(), WorldSession::HandlePetAction(), AuraEffect::HandleShapeshiftBoosts(), Spell::HandleThreatSpells(), HasInitialAggro(), Unit::IgnoresSchoolImmunityFromFriendlyCaster(), IsActionAllowedChannel(), Unit::IsAreaEffectPvPBlocked(), Spell::IsAutoActionResetSpell(), IsAutocastable(), IsCooldownStartedOnEvent(), Unit::IsDamageReducedByArmor(), Unit::IsImmunedToAuraPeriodicTick(), Unit::IsImmunedToDamage(), Creature::IsImmunedToSpell(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpellEffect(), Creature::IsImmunedToSpellEffect(), Player::IsNeedCastPassiveSpellAtLearn(), Spell::IsNextMeleeSwingSpell(), IsPassive(), IsRangedWeaponSpell(), Aura::IsRemovedOnShapeLost(), Unit::isSpellBlocked(), Player::LearnTalent(), SpellMgr::LoadEnchantCustomAttr(), LoadLootTemplates_Spell(), SpellMgr::LoadSpellInfoCustomAttributes(), LoadSpellSpecific(), WorldObject::MagicSpellHitResult(), Unit::MeleeDamageBonusTaken(), Unit::MeleeSpellHitResult(), Unit::MeleeSpellMissChance(), WorldObject::ModSpellDuration(), Aura::ModStackAmount(), Acore::WorldObjectSpellConeTargetCheck::operator()(), AuraEffect::PeriodicTick(), Player::PrepareCharmAISpells(), Spell::prepareDataForTriggerSystem(), Aura::PrepareProcToTrigger(), SmartScript::ProcessAction(), Aura::RefreshDuration(), Aura::RefreshTimersWithMods(), Creature::ReleaseFocus(), Unit::RemoveAllAurasOnDeath(), Unit::RemoveArenaAuras(), Player::RemoveArenaSpellCooldowns(), Unit::RemoveAurasByShapeShift(), Unit::RemoveAurasDueToSpellByDispel(), Unit::RemoveAurasDueToSpellBySteal(), Unit::RemoveEvadeAuras(), Player::removeSpell(), Player::resetTalents(), Player::RestoreBaseRune(), Spell::SearchChainTargets(), Spell::SendResurrectRequest(), Spell::SendSpellGo(), Spell::SendSpellStart(), ArenaSpectator::ShouldSendAura(), Spell::Spell(), Unit::SpellDamageBonusDone(), Unit::SpellDamageBonusTaken(), Unit::SpellDoneCritChance(), Unit::SpellHealingBonusTaken(), WorldObject::SpellHitResult(), WorldObject::SpellHitResult(), Unit::SpellPctDamageModsDone(), Unit::SpellPctHealingModsDone(), Unit::SpellTakenCritChance(), Acore::Hyperlinks::LinkTags::enchant::StoreTo(), Spell::TakeAmmo(), Unit::TriggerAurasProcOnEvent(), Spell::TriggerGlobalCooldown(), Spell::UpdateChanneledTargetList(), and Aura::UpdateTargetMap().

◆ HasAttribute() [2/9]

bool SpellInfo::HasAttribute ( SpellAttr1  attribute) const
inline
442{ return (AttributesEx & attribute) != 0; }

◆ HasAttribute() [3/9]

bool SpellInfo::HasAttribute ( SpellAttr2  attribute) const
inline
443{ return (AttributesEx2 & attribute) != 0; }

◆ HasAttribute() [4/9]

bool SpellInfo::HasAttribute ( SpellAttr3  attribute) const
inline
444{ return (AttributesEx3 & attribute) != 0; }

◆ HasAttribute() [5/9]

bool SpellInfo::HasAttribute ( SpellAttr4  attribute) const
inline
445{ return (AttributesEx4 & attribute) != 0; }

◆ HasAttribute() [6/9]

bool SpellInfo::HasAttribute ( SpellAttr5  attribute) const
inline
446{ return (AttributesEx5 & attribute) != 0; }

◆ HasAttribute() [7/9]

bool SpellInfo::HasAttribute ( SpellAttr6  attribute) const
inline
447{ return (AttributesEx6 & attribute) != 0; }

◆ HasAttribute() [8/9]

bool SpellInfo::HasAttribute ( SpellAttr7  attribute) const
inline
448{ return (AttributesEx7 & attribute) != 0; }

◆ HasAttribute() [9/9]

bool SpellInfo::HasAttribute ( SpellCustomAttributes  customAttribute) const
inline
449{ return (AttributesCu & customAttribute) != 0; }

◆ HasAura()

◆ HasEffect()

◆ HasEffectMechanic()

bool SpellInfo::HasEffectMechanic ( Mechanics  mechanic) const
898{
899 for (auto const& effect : Effects)
900 if (effect.Mechanic == mechanic)
901 return true;
902
903 return false;
904}

References Effects.

Referenced by spell_warr_heroic_strike::HandleOnHit(), and Unit::RemoveMovementImpairingAuras().

◆ HasInitialAggro()

bool SpellInfo::HasInitialAggro ( ) const
1334{
1336}
@ SPELL_ATTR1_NO_THREAT
Definition SharedDefines.h:417
@ SPELL_ATTR3_SUPPRESS_TARGET_PROCS
Definition SharedDefines.h:498

References HasAttribute(), SPELL_ATTR1_NO_THREAT, and SPELL_ATTR3_SUPPRESS_TARGET_PROCS.

Referenced by Unit::CalcAbsorbResist(), Unit::DealDamage(), Spell::DoAllEffectOnTarget(), and Spell::HandleLaunchPhase().

◆ HasOnlyDamageEffects()

bool SpellInfo::HasOnlyDamageEffects ( ) const
931{
932 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
933 {
934 if (Effects[i].IsEffect())
935 {
936 switch (Effects[i].Effect)
937 {
944 continue;
945 default:
946 return false;
947 }
948 }
949 }
950 return true;
951}
@ SPELL_EFFECT_POWER_DRAIN
Definition SharedDefines.h:774

References Effects, MAX_SPELL_EFFECTS, SPELL_EFFECT_HEALTH_LEECH, SPELL_EFFECT_NORMALIZED_WEAPON_DMG, SPELL_EFFECT_POWER_BURN, SPELL_EFFECT_POWER_DRAIN, SPELL_EFFECT_SCHOOL_DAMAGE, and SPELL_EFFECT_WEAPON_PERCENT_DAMAGE.

Referenced by WorldObject::SpellHitResult().

◆ IsAbilityLearnedWithProfession()

bool SpellInfo::IsAbilityLearnedWithProfession ( ) const
1025{
1026 SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
1027
1028 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
1029 {
1030 SkillLineAbilityEntry const* pAbility = _spell_idx->second;
1031 if (!pAbility || pAbility->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE)
1032 continue;
1033
1034 if (pAbility->MinSkillLineRank > 0)
1035 return true;
1036 }
1037
1038 return false;
1039}
@ SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE
Definition DBCEnums.h:360
std::pair< SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator > SkillLineAbilityMapBounds
Definition SpellMgr.h:595
Definition DBCStructure.h:1634
uint32 MinSkillLineRank
Definition DBCStructure.h:1642
uint32 AcquireMethod
Definition DBCStructure.h:1644

References SkillLineAbilityEntry::AcquireMethod, Id, SkillLineAbilityEntry::MinSkillLineRank, SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE, and sSpellMgr.

Referenced by ComputeIsStackableWithRanks().

◆ IsAbilityOfSkillType()

bool SpellInfo::IsAbilityOfSkillType ( uint32  skillType) const
1042{
1043 SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
1044
1045 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
1046 if (_spell_idx->second->SkillLine == uint32(skillType))
1047 return true;
1048
1049 return false;
1050}

References Id, and sSpellMgr.

Referenced by Spell::CanOpenLock(), learn_commandscript::HandleLearnAllGMCommand(), and Item::IsFitToSpellRequirements().

◆ IsActionAllowedChannel()

bool SpellInfo::IsActionAllowedChannel ( ) const

◆ IsAffected()

bool SpellInfo::IsAffected ( uint32  familyName,
flag96 const &  familyFlags 
) const
1339{
1340 if (!familyName)
1341 return true;
1342
1343 if (familyName != SpellFamilyName)
1344 return false;
1345
1346 if (familyFlags && !(familyFlags & SpellFamilyFlags))
1347 return false;
1348
1349 return true;
1350}

References SpellFamilyFlags, and SpellFamilyName.

Referenced by IsAffectedBySpellMod(), and AuraEffect::IsAffectedOnSpell().

◆ IsAffectedBySpellMod()

bool SpellInfo::IsAffectedBySpellMod ( SpellModifier const *  mod) const
1358{
1359 // xinef: dont check duration mod
1360 if (mod->op != SPELLMOD_DURATION)
1361 if (!IsAffectedBySpellMods())
1362 return false;
1363
1364 SpellInfo const* affectSpell = sSpellMgr->GetSpellInfo(mod->spellId);
1365
1366 if (!affectSpell)
1367 return false;
1368
1369 if (!sScriptMgr->OnIsAffectedBySpellModCheck(affectSpell, this, mod))
1370 return true;
1371
1372 return IsAffected(affectSpell->SpellFamilyName, mod->mask);
1373}
@ SPELLMOD_DURATION
Definition SpellDefines.h:85
bool IsAffected(uint32 familyName, flag96 const &familyFlags) const
Definition SpellInfo.cpp:1338
bool IsAffectedBySpellMods() const
Definition SpellInfo.cpp:1352

References IsAffected(), IsAffectedBySpellMods(), SpellModifier::mask, SpellModifier::op, SpellFamilyName, SpellModifier::spellId, SPELLMOD_DURATION, sScriptMgr, and sSpellMgr.

Referenced by AuraEffect::ApplySpellMod(), and Player::IsAffectedBySpellmod().

◆ IsAffectedBySpellMods()

bool SpellInfo::IsAffectedBySpellMods ( ) const
1353{
1355}
@ SPELL_ATTR3_IGNORE_CASTER_MODIFIERS
Definition SharedDefines.h:510

References AttributesEx3, and SPELL_ATTR3_IGNORE_CASTER_MODIFIERS.

Referenced by IsAffectedBySpellMod().

◆ IsAffectingArea()

bool SpellInfo::IsAffectingArea ( ) const
1053{
1054 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1055 if (Effects[i].IsEffect() && (Effects[i].IsTargetingArea() || Effects[i].IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA) || Effects[i].IsAreaAuraEffect()))
1056 return true;
1057 return false;
1058}
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
Definition SharedDefines.h:793
bool IsTargetingArea() const
Definition SpellInfo.cpp:1070

References Effects, IsTargetingArea(), MAX_SPELL_EFFECTS, and SPELL_EFFECT_PERSISTENT_AREA_AURA.

Referenced by Unit::_IsValidAssistTarget(), Unit::_IsValidAttackTarget(), CanBeRedirectedBySpellMagnet(), Unit::IsAreaEffectPvPBlocked(), and WorldObject::MagicSpellHitResult().

◆ IsAllowingDeadTarget()

bool SpellInfo::IsAllowingDeadTarget ( ) const
1273{
1275}
@ SPELL_ATTR2_ALLOW_DEAD_TARGET
Definition SharedDefines.h:444
@ TARGET_FLAG_CORPSE_ALLY
Definition SpellInfo.h:62
@ TARGET_FLAG_UNIT_DEAD
Definition SpellInfo.h:57
@ TARGET_FLAG_CORPSE_ENEMY
Definition SpellInfo.h:56

References AttributesEx2, SPELL_ATTR2_ALLOW_DEAD_TARGET, TARGET_FLAG_CORPSE_ALLY, TARGET_FLAG_CORPSE_ENEMY, and TARGET_FLAG_UNIT_DEAD.

Referenced by Unit::_CreateAuraApplication(), Unit::_IsValidAssistTarget(), Unit::_IsValidAttackTarget(), CheckTarget(), and Spell::IsValidDeadOrAliveTarget().

◆ IsAuraEffectEqual()

bool SpellInfo::IsAuraEffectEqual ( SpellInfo const *  otherSpellInfo) const
1617{
1618 uint8 matchCount = 0;
1619 uint8 auraCount = 0;
1620 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
1621 {
1622 // xinef: skip non-aura efects
1623 if (!Effects[i].IsAura())
1624 continue;
1625
1626 bool effectFound = false;
1627 for (uint8 j = EFFECT_0; j < MAX_SPELL_EFFECTS; ++j)
1628 {
1629 if (!otherSpellInfo->Effects[j].IsAura())
1630 continue;
1631
1632 if (Effects[i].ApplyAuraName != otherSpellInfo->Effects[j].ApplyAuraName || Effects[i].MiscValue != otherSpellInfo->Effects[j].MiscValue)
1633 continue;
1634
1635 effectFound = true;
1636 break;
1637 }
1638
1639 if (!effectFound)
1640 return false;
1641 ++matchCount;
1642 }
1643
1644 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
1645 {
1646 if (Effects[i].IsAura())
1647 ++auraCount;
1648 if (otherSpellInfo->Effects[i].IsAura())
1649 ++auraCount;
1650 }
1651
1652 return matchCount * 2 == auraCount;
1653}

References EFFECT_0, Effects, and MAX_SPELL_EFFECTS.

Referenced by Spell::DoAllEffectOnTarget().

◆ IsAuraExclusiveBySpecificPerCasterWith()

bool SpellInfo::IsAuraExclusiveBySpecificPerCasterWith ( SpellInfo const *  spellInfo) const
1450{
1451 SpellSpecificType spellSpec = GetSpellSpecific();
1452 switch (spellSpec)
1453 {
1462 return spellSpec == spellInfo->GetSpellSpecific();
1463 default:
1464 return false;
1465 }
1466}
SpellSpecificType
Definition SpellInfo.h:150
@ SPELL_SPECIFIC_STING
Definition SpellInfo.h:154
@ SPELL_SPECIFIC_ASPECT
Definition SpellInfo.h:156
@ SPELL_SPECIFIC_WARLOCK_CORRUPTION
Definition SpellInfo.h:163
@ SPELL_SPECIFIC_CURSE
Definition SpellInfo.h:155
@ SPELL_SPECIFIC_JUDGEMENT
Definition SpellInfo.h:162
@ SPELL_SPECIFIC_HAND
Definition SpellInfo.h:172
@ SPELL_SPECIFIC_AURA
Definition SpellInfo.h:153
@ SPELL_SPECIFIC_SEAL
Definition SpellInfo.h:152
SpellSpecificType GetSpellSpecific() const
Definition SpellInfo.cpp:2090

References GetSpellSpecific(), SPELL_SPECIFIC_ASPECT, SPELL_SPECIFIC_AURA, SPELL_SPECIFIC_CURSE, SPELL_SPECIFIC_HAND, SPELL_SPECIFIC_JUDGEMENT, SPELL_SPECIFIC_SEAL, SPELL_SPECIFIC_STING, and SPELL_SPECIFIC_WARLOCK_CORRUPTION.

Referenced by Aura::CanStackWith().

◆ IsAuraExclusiveBySpecificWith()

bool SpellInfo::IsAuraExclusiveBySpecificWith ( SpellInfo const *  spellInfo) const
1407{
1408 SpellSpecificType spellSpec1 = GetSpellSpecific();
1409 SpellSpecificType spellSpec2 = spellInfo->GetSpellSpecific();
1410
1411 bool isExclusive = false;
1412
1413 switch (spellSpec1)
1414 {
1425 isExclusive = spellSpec1 == spellSpec2;
1426 break;
1428 isExclusive = spellSpec2 == SPELL_SPECIFIC_FOOD
1429 || spellSpec2 == SPELL_SPECIFIC_FOOD_AND_DRINK;
1430 break;
1432 isExclusive = spellSpec2 == SPELL_SPECIFIC_DRINK
1433 || spellSpec2 == SPELL_SPECIFIC_FOOD_AND_DRINK;
1434 break;
1436 isExclusive = spellSpec2 == SPELL_SPECIFIC_FOOD
1437 || spellSpec2 == SPELL_SPECIFIC_DRINK
1438 || spellSpec2 == SPELL_SPECIFIC_FOOD_AND_DRINK;
1439 break;
1440 default:
1441 break;
1442 }
1443
1444 sScriptMgr->OnIsAuraExclusiveBySpecificWith(this, spellInfo, isExclusive);
1445
1446 return isExclusive;
1447}
@ SPELL_SPECIFIC_FOOD
Definition SpellInfo.h:164
@ SPELL_SPECIFIC_MAGE_ARMOR
Definition SpellInfo.h:159
@ SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE
Definition SpellInfo.h:170
@ SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT
Definition SpellInfo.h:171
@ SPELL_SPECIFIC_ELEMENTAL_SHIELD
Definition SpellInfo.h:160
@ SPELL_SPECIFIC_PRESENCE
Definition SpellInfo.h:167
@ SPELL_SPECIFIC_DRINK
Definition SpellInfo.h:165
@ SPELL_SPECIFIC_WARLOCK_ARMOR
Definition SpellInfo.h:158
@ SPELL_SPECIFIC_SCROLL
Definition SpellInfo.h:169
@ SPELL_SPECIFIC_MAGE_POLYMORPH
Definition SpellInfo.h:161
@ SPELL_SPECIFIC_TRACKER
Definition SpellInfo.h:157
@ SPELL_SPECIFIC_FOOD_AND_DRINK
Definition SpellInfo.h:166
@ SPELL_SPECIFIC_CHARM
Definition SpellInfo.h:168

References GetSpellSpecific(), SPELL_SPECIFIC_CHARM, SPELL_SPECIFIC_DRINK, SPELL_SPECIFIC_ELEMENTAL_SHIELD, SPELL_SPECIFIC_FOOD, SPELL_SPECIFIC_FOOD_AND_DRINK, SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE, SPELL_SPECIFIC_MAGE_ARMOR, SPELL_SPECIFIC_MAGE_POLYMORPH, SPELL_SPECIFIC_PRESENCE, SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT, SPELL_SPECIFIC_SCROLL, SPELL_SPECIFIC_TRACKER, SPELL_SPECIFIC_WARLOCK_ARMOR, and sScriptMgr.

Referenced by Aura::CanStackWith().

◆ IsAutocastable()

bool SpellInfo::IsAutocastable ( ) const
1149{
1151 return false;
1153 return false;
1154 return true;
1155}
@ SPELL_ATTR1_NO_AUTOCAST_AI
Definition SharedDefines.h:424
@ SPELL_ATTR0_PASSIVE
Definition SharedDefines.h:376

References HasAttribute(), SPELL_ATTR0_PASSIVE, and SPELL_ATTR1_NO_AUTOCAST_AI.

Referenced by Pet::addSpell(), CharmInfo::AddSpellToActionBar(), WorldSession::HandlePetSpellAutocastOpcode(), CharmInfo::InitCharmCreateSpells(), CharmInfo::LoadPetActionBar(), and Pet::ToggleAutocast().

◆ IsAutoRepeatRangedSpell()

bool SpellInfo::IsAutoRepeatRangedSpell ( ) const

◆ IsBreakingStealth()

bool SpellInfo::IsBreakingStealth ( ) const
1317{
1319}
@ SPELL_ATTR1_ALLOW_WHILE_STEALTHED
Definition SharedDefines.h:412

References AttributesEx, and SPELL_ATTR1_ALLOW_WHILE_STEALTHED.

Referenced by Spell::prepare().

◆ IsChannelCategorySpell()

bool SpellInfo::IsChannelCategorySpell ( ) const
1129{
1130 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1131 if (Effects[i].TargetA.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL || Effects[i].TargetB.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL)
1132 return true;
1133 return false;
1134}
@ TARGET_SELECT_CATEGORY_CHANNEL
Definition SpellInfo.h:80

References Effects, MAX_SPELL_EFFECTS, and TARGET_SELECT_CATEGORY_CHANNEL.

Referenced by AuraEffect::HandlePeriodicTriggerSpellAuraTick().

◆ IsChanneled()

◆ IsCooldownStartedOnEvent()

◆ IsCritCapable()

bool SpellInfo::IsCritCapable ( ) const
1223{
1224 return _isCritCapable;
1225}

References _isCritCapable.

Referenced by Unit::SpellDoneCritChance(), and Unit::SpellTakenCritChance().

◆ IsDeathPersistent()

bool SpellInfo::IsDeathPersistent ( ) const
1263{
1265}
@ SPELL_ATTR3_ALLOW_AURA_WHILE_DEAD
Definition SharedDefines.h:501

References AttributesEx3, and SPELL_ATTR3_ALLOW_AURA_WHILE_DEAD.

Referenced by Unit::_CreateAuraApplication(), CheckTarget(), and Aura::IsDeathPersistent().

◆ IsDifferentRankOf()

bool SpellInfo::IsDifferentRankOf ( SpellInfo const *  spellInfo) const
3026{
3027 if (Id == spellInfo->Id)
3028 return false;
3029 return IsRankOf(spellInfo);
3030}
bool IsRankOf(SpellInfo const *spellInfo) const
Definition SpellInfo.cpp:3020

References Id, and IsRankOf().

Referenced by Pet::addSpell(), and Aura::CanStackWith().

◆ IsExplicitDiscovery()

bool SpellInfo::IsExplicitDiscovery ( ) const
954{
955 return ((Effects[0].Effect == SPELL_EFFECT_CREATE_RANDOM_ITEM
956 || Effects[0].Effect == SPELL_EFFECT_CREATE_ITEM_2)
957 && Effects[1].Effect == SPELL_EFFECT_SCRIPT_EFFECT)
958 || Id == 64323;
959}
@ SPELL_EFFECT_SCRIPT_EFFECT
Definition SharedDefines.h:843
@ SPELL_EFFECT_CREATE_ITEM_2
Definition SharedDefines.h:923
@ SPELL_EFFECT_CREATE_RANDOM_ITEM
Definition SharedDefines.h:825

References Effects, Id, SPELL_EFFECT_CREATE_ITEM_2, SPELL_EFFECT_CREATE_RANDOM_ITEM, and SPELL_EFFECT_SCRIPT_EFFECT.

Referenced by LoadSkillDiscoveryTable().

◆ IsHighRankOf()

bool SpellInfo::IsHighRankOf ( SpellInfo const *  spellInfo) const
3033{
3034 if (ChainEntry && spellInfo->ChainEntry)
3035 {
3036 if (ChainEntry->first == spellInfo->ChainEntry->first)
3037 if (ChainEntry->rank > spellInfo->ChainEntry->rank)
3038 return true;
3039 }
3040 return false;
3041}

References ChainEntry, SpellChainNode::first, and SpellChainNode::rank.

Referenced by Pet::addSpell(), and Player::PrepareCharmAISpells().

◆ IsLootCrafting()

bool SpellInfo::IsLootCrafting ( ) const
962{
963 return (Effects[0].Effect == SPELL_EFFECT_CREATE_RANDOM_ITEM ||
964 // different random cards from Inscription (121==Virtuoso Inking Set category) r without explicit item
965 (Effects[0].Effect == SPELL_EFFECT_CREATE_ITEM_2 &&
966 ((TotemCategory[0] != 0 || (Totem[0] != 0 && SpellIconID == 1)) || Effects[0].ItemType == 0)));
967}

References Effects, SPELL_EFFECT_CREATE_ITEM_2, SPELL_EFFECT_CREATE_RANDOM_ITEM, and SpellIconID.

Referenced by SpellMgr::ComputeIsSpellValid(), Spell::EffectCreateItem2(), and LoadLootTemplates_Spell().

◆ IsMultiSlotAura()

bool SpellInfo::IsMultiSlotAura ( ) const
1253{
1254 return IsPassive() || Id == 40075; // No other way to make 40075 have more than 1 copy of aura
1255}

References Id, and IsPassive().

Referenced by Unit::_TryStackingOrRefreshingExistingAura(), and Aura::CanStackWith().

◆ IsPassive()

◆ IsPassiveStackableWithRanks()

bool SpellInfo::IsPassiveStackableWithRanks ( ) const

◆ IsPositive()

bool SpellInfo::IsPositive ( ) const
1283{
1285}
@ SPELL_ATTR0_CU_POSITIVE
Definition SpellInfo.h:212
@ SPELL_ATTR0_CU_NEGATIVE
Definition SpellInfo.h:211

References AttributesCu, SPELL_ATTR0_CU_NEGATIVE, and SPELL_ATTR0_CU_POSITIVE.

Referenced by Spell::_cast(), Spell::_handle_finish_phase(), Pet::_SaveAuras(), Player::CastItemCombatSpell(), spell_item_luffa::CheckCast(), Spell::CheckCast(), spell_dk_dancing_rune_weapon::CheckProc(), spell_pal_spiritual_attunement::CheckProc(), CheckTarget(), Spell::DoAllEffectOnTarget(), Spell::DoSpellHitOnUnit(), Spell::EffectCharge(), UnitAI::FillAISpellInfo(), GetDiminishingReturnsGroupForSpell(), spell_rog_deadly_poison::HandleAfterHit(), AuraEffect::HandleAuraModSchoolImmunity(), AuraEffect::HandleAuraTransform(), WorldSession::HandleCancelAuraOpcode(), WorldSession::HandleCastSpellOpcode(), spell_item_luffa::HandleEffect(), Spell::HandleLaunchPhase(), WorldSession::HandlePetActionHelper(), ArenaSpectator::HandleResetCommand(), spell_gen_clear_debuffs::HandleScript(), Unit::HasSchoolImmunityForMask(), SmartAI::InitializeAI(), GameObject::IsAtInteractDistance(), Totem::IsImmunedToSpellEffect(), WorldObject::MagicSpellHitResult(), Unit::PetSpellFail(), Spell::prepare(), Spell::PrepareTriggersExecutedOnHit(), Spell::SelectExplicitTargets(), Spell::SelectImplicitNearbyTargets(), ArenaSpectator::ShouldSendAura(), Spell::Spell(), WorldObject::SpellHitResult(), WorldObject::SpellHitResult(), Unit::SpellTakenCritChance(), PetAI::UpdateAI(), and Spell::UpdateChanneledTargetList().

◆ IsPositiveEffect()

bool SpellInfo::IsPositiveEffect ( uint8  effIndex) const
1288{
1289 switch (effIndex)
1290 {
1291 default:
1292 case 0:
1294 case 1:
1296 case 2:
1298 }
1299}
@ SPELL_ATTR0_CU_POSITIVE_EFF2
Definition SpellInfo.h:204
@ SPELL_ATTR0_CU_NEGATIVE_EFF2
Definition SpellInfo.h:191
@ SPELL_ATTR0_CU_NEGATIVE_EFF1
Definition SpellInfo.h:190
@ SPELL_ATTR0_CU_POSITIVE_EFF0
Definition SpellInfo.h:202
@ SPELL_ATTR0_CU_NEGATIVE_EFF0
Definition SpellInfo.h:189
@ SPELL_ATTR0_CU_POSITIVE_EFF1
Definition SpellInfo.h:203

References AttributesCu, SPELL_ATTR0_CU_NEGATIVE_EFF0, SPELL_ATTR0_CU_NEGATIVE_EFF1, SPELL_ATTR0_CU_NEGATIVE_EFF2, SPELL_ATTR0_CU_POSITIVE_EFF0, SPELL_ATTR0_CU_POSITIVE_EFF1, and SPELL_ATTR0_CU_POSITIVE_EFF2.

Referenced by CanSpellProvideImmunityAgainstAura(), Spell::DoAllEffectOnTarget(), GetAuraRankForLevel(), and Spell::prepare().

◆ IsPrimaryProfession()

bool SpellInfo::IsPrimaryProfession ( ) const
1005{
1006 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1007 {
1008 if (Effects[i].Effect == SPELL_EFFECT_SKILL)
1009 {
1010 uint32 skill = Effects[i].MiscValue;
1011
1012 if (IsPrimaryProfessionSkill(skill))
1013 return true;
1014 }
1015 }
1016 return false;
1017}
@ SPELL_EFFECT_SKILL
Definition SharedDefines.h:884
bool IsPrimaryProfessionSkill(uint32 skill)
Definition SpellMgr.cpp:38

References Effects, IsPrimaryProfessionSkill(), MAX_SPELL_EFFECTS, and SPELL_EFFECT_SKILL.

Referenced by IsPrimaryProfessionFirstRank().

◆ IsPrimaryProfessionFirstRank()

bool SpellInfo::IsPrimaryProfessionFirstRank ( ) const
1020{
1021 return IsPrimaryProfession() && GetRank() == 1;
1022}
uint8 GetRank() const
Definition SpellInfo.cpp:2941
bool IsPrimaryProfession() const
Definition SpellInfo.cpp:1004

References GetRank(), and IsPrimaryProfession().

Referenced by Player::_addSpell(), Trainer::Trainer::CanTeachSpell(), Player::removeSpell(), and Trainer::Trainer::SendSpells().

◆ IsProfession()

bool SpellInfo::IsProfession ( ) const
990{
991 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
992 {
993 if (Effects[i].Effect == SPELL_EFFECT_SKILL)
994 {
995 uint32 skill = Effects[i].MiscValue;
996
997 if (IsProfessionSkill(skill))
998 return true;
999 }
1000 }
1001 return false;
1002}
bool IsProfessionSkill(uint32 skill)
Definition SpellMgr.h:629

References Effects, IsProfessionSkill(), MAX_SPELL_EFFECTS, and SPELL_EFFECT_SKILL.

◆ IsProfessionOrRiding()

bool SpellInfo::IsProfessionOrRiding ( ) const
975{
976 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
977 {
978 if (Effects[i].Effect == SPELL_EFFECT_SKILL)
979 {
980 uint32 skill = Effects[i].MiscValue;
981
982 if (IsProfessionOrRidingSkill(skill))
983 return true;
984 }
985 }
986 return false;
987}
bool IsProfessionOrRidingSkill(uint32 skill)
Definition SpellMgr.h:634

References Effects, IsProfessionOrRidingSkill(), MAX_SPELL_EFFECTS, and SPELL_EFFECT_SKILL.

Referenced by ComputeIsStackableWithRanks().

◆ IsQuestTame()

bool SpellInfo::IsQuestTame ( ) const
970{
971 return Effects[0].Effect == SPELL_EFFECT_THREAT && Effects[1].Effect == SPELL_EFFECT_APPLY_AURA && Effects[1].ApplyAuraName == SPELL_AURA_DUMMY;
972}
@ SPELL_EFFECT_THREAT
Definition SharedDefines.h:829
@ SPELL_AURA_DUMMY
Definition SpellAuraDefines.h:67

References Effects, SPELL_AURA_DUMMY, SPELL_EFFECT_APPLY_AURA, and SPELL_EFFECT_THREAT.

◆ IsRangedWeaponSpell()

bool SpellInfo::IsRangedWeaponSpell ( ) const

◆ IsRanked()

bool SpellInfo::IsRanked ( ) const
2937{
2938 return ChainEntry != nullptr;
2939}

References ChainEntry.

Referenced by Pet::addSpell(), Player::addSpell(), and Player::IsUnlearnNeededForSpell().

◆ IsRankOf()

◆ IsRequiringDeadTarget()

bool SpellInfo::IsRequiringDeadTarget ( ) const
1268{
1270}
@ SPELL_ATTR3_ONLY_ON_GHOSTS
Definition SharedDefines.h:493

References AttributesEx3, and SPELL_ATTR3_ONLY_ON_GHOSTS.

Referenced by CheckTarget(), Spell::IsValidDeadOrAliveTarget(), and Unit::RemoveAllAurasRequiringDeadTarget().

◆ IsSelfCast()

bool SpellInfo::IsSelfCast ( ) const
1136{
1137 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1138 if (Effects[i].Effect && Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER)
1139 return false;
1140 return true;
1141}

References Effects, MAX_SPELL_EFFECTS, and TARGET_UNIT_CASTER.

Referenced by Spell::CheckCast(), and Player::RewardQuest().

◆ IsSingleTarget()

bool SpellInfo::IsSingleTarget ( ) const
1398{
1399 // all other single target spells have if it has AttributesEx5
1401 return true;
1402
1403 return false;
1404}
@ SPELL_ATTR5_LIMIT_N
Definition SharedDefines.h:560

References AttributesEx5, and SPELL_ATTR5_LIMIT_N.

Referenced by Unit::_AddAura(), and Aura::Create().

◆ IsSpellValid()

bool SpellInfo::IsSpellValid ( ) const
1238{
1239 return _isSpellValid;
1240}

References _isSpellValid.

Referenced by SpellMgr::IsSpellValid().

◆ IsStackableWithRanks()

bool SpellInfo::IsStackableWithRanks ( ) const
1191{
1192 return _isStackableWithRanks;
1193}

References _isStackableWithRanks.

Referenced by Player::addSpell(), and Player::IsUnlearnNeededForSpell().

◆ IsTargetingArea()

bool SpellInfo::IsTargetingArea ( ) const

◆ LoadAuraState()

AuraStateType SpellInfo::LoadAuraState ( ) const
2014{
2015 // Seals
2017 return AURA_STATE_JUDGEMENT;
2018
2019 // Conflagrate aura state on Immolate and Shadowflame
2021 // Immolate
2022 ((SpellFamilyFlags[0] & 4) ||
2023 // Shadowflame
2024 (SpellFamilyFlags[2] & 2)))
2026
2027 // Faerie Fire (druid versions)
2030
2031 // Sting (hunter's pet ability)
2032 if (GetCategory() == 1133)
2034
2035 // Victorious
2036 if (SpellFamilyName == SPELLFAMILY_WARRIOR && SpellFamilyFlags[1] & 0x00040000)
2038
2039 // Swiftmend state on Regrowth & Rejuvenation
2041 return AURA_STATE_SWIFTMEND;
2042
2043 // Deadly poison aura state
2044 if (SpellFamilyName == SPELLFAMILY_ROGUE && SpellFamilyFlags[0] & 0x10000)
2046
2047 // Enrage aura state
2048 if (Dispel == DISPEL_ENRAGE)
2049 return AURA_STATE_ENRAGE;
2050
2051 // Bleeding aura state
2052 if (GetAllEffectsMechanicMask() & (1ULL << MECHANIC_BLEED))
2053 return AURA_STATE_BLEEDING;
2054
2055 // Banished aura state
2057 return AURA_STATE_BANISHED;
2058
2060 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2061 if (Effects[i].IsAura() && (Effects[i].ApplyAuraName == SPELL_AURA_MOD_STUN
2062 || Effects[i].ApplyAuraName == SPELL_AURA_MOD_ROOT))
2063 return AURA_STATE_FROZEN;
2064
2065 switch (Id)
2066 {
2067 case 71465: // Divine Surge
2068 case 50241: // Oculus, Drake spell Evasive Maneuvers
2069 return AURA_STATE_UNKNOWN22;
2070 case 9991: // Touch of Zanzil
2071 case 35331: // Black Blood
2072 case 9806: // Phantom Strike
2073 case 35325: // Glowing Blood
2074 case 35328: // Lambent Blood
2075 case 35329: // Vibrant Blood
2076 case 16498: // Faerie Fire
2077 case 6950:
2078 case 20656:
2079 case 25602:
2080 case 32129:
2081 case 49163: // Perpetual Instability (Element 115)
2083 default:
2084 break;
2085 }
2086
2087 return AURA_STATE_NONE;
2088}
@ MECHANIC_BLEED
Definition SharedDefines.h:1328
@ MECHANIC_BANISH
Definition SharedDefines.h:1331
@ SPELLFAMILY_WARRIOR
Definition SharedDefines.h:3788
@ SPELLFAMILY_ROGUE
Definition SharedDefines.h:3792
@ AURA_STATE_NONE
Definition SharedDefines.h:1279
@ AURA_STATE_FROZEN
Definition SharedDefines.h:1283
@ AURA_STATE_DEADLY_POISON
Definition SharedDefines.h:1296
@ AURA_STATE_BLEEDING
Definition SharedDefines.h:1298
@ AURA_STATE_FAERIE_FIRE
Definition SharedDefines.h:1292
@ AURA_STATE_ENRAGE
Definition SharedDefines.h:1297
@ AURA_STATE_WARRIOR_VICTORY_RUSH
Definition SharedDefines.h:1290
@ AURA_STATE_UNKNOWN22
Definition SharedDefines.h:1302
@ AURA_STATE_JUDGEMENT
Definition SharedDefines.h:1284
@ AURA_STATE_SWIFTMEND
Definition SharedDefines.h:1295
@ AURA_STATE_BANISHED
Definition SharedDefines.h:1288
@ AURA_STATE_CONFLAGRATE
Definition SharedDefines.h:1294
@ DISPEL_ENRAGE
Definition SharedDefines.h:1384
@ SPELL_SCHOOL_MASK_FROST
Definition SharedDefines.h:289
uint64 GetAllEffectsMechanicMask() const
Definition SpellInfo.cpp:1940

References AURA_STATE_BANISHED, AURA_STATE_BLEEDING, AURA_STATE_CONFLAGRATE, AURA_STATE_DEADLY_POISON, AURA_STATE_ENRAGE, AURA_STATE_FAERIE_FIRE, AURA_STATE_FROZEN, AURA_STATE_JUDGEMENT, AURA_STATE_NONE, AURA_STATE_SWIFTMEND, AURA_STATE_UNKNOWN22, AURA_STATE_WARRIOR_VICTORY_RUSH, Dispel, DISPEL_ENRAGE, Effects, GetAllEffectsMechanicMask(), GetCategory(), GetSchoolMask(), GetSpellSpecific(), Id, MAX_SPELL_EFFECTS, Mechanic, MECHANIC_BANISH, MECHANIC_BLEED, SPELL_AURA_MOD_ROOT, SPELL_AURA_MOD_STUN, SPELL_SCHOOL_MASK_FROST, SPELL_SPECIFIC_SEAL, SPELLFAMILY_DRUID, SPELLFAMILY_ROGUE, SPELLFAMILY_WARLOCK, SPELLFAMILY_WARRIOR, SpellFamilyFlags, and SpellFamilyName.

Referenced by SpellMgr::LoadSpellSpecificAndAuraState().

◆ LoadSpellSpecific()

SpellSpecificType SpellInfo::LoadSpellSpecific ( ) const

@workaround For non-stacking tracking spells (We need generic solution)

Todo:
: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
2096{
2097 switch (SpellFamilyName)
2098 {
2100 {
2101 // Food / Drinks (mostly)
2103 {
2104 bool food = false;
2105 bool drink = false;
2106 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2107 {
2108 if (!Effects[i].IsAura())
2109 continue;
2110 switch (Effects[i].ApplyAuraName)
2111 {
2112 // Food
2115 food = true;
2116 break;
2117 // Drink
2120 drink = true;
2121 break;
2122 default:
2123 break;
2124 }
2125 }
2126
2127 if (food && drink)
2129 else if (food)
2130 return SPELL_SPECIFIC_FOOD;
2131 else if (drink)
2132 return SPELL_SPECIFIC_DRINK;
2133 }
2134 // scrolls effects
2135 else
2136 {
2137 SpellInfo const* firstRankSpellInfo = GetFirstRankSpell();
2138 switch (firstRankSpellInfo->Id)
2139 {
2140 case 8118: // Strength
2141 case 8099: // Stamina
2142 case 8112: // Spirit
2143 case 8096: // Intellect
2144 case 8115: // Agility
2145 case 8091: // Armor
2146 return SPELL_SPECIFIC_SCROLL;
2147 }
2148 }
2149 break;
2150 }
2151 case SPELLFAMILY_MAGE:
2152 {
2153 // family flags 18(Molten), 25(Frost/Ice), 28(Mage)
2154 if (SpellFamilyFlags[0] & 0x12040000)
2156
2157 // Arcane brillance and Arcane intelect (normal check fails because of flags difference)
2158 if (SpellFamilyFlags[0] & 0x400)
2160
2161 if ((SpellFamilyFlags[0] & 0x1000000) && Effects[0].ApplyAuraName == SPELL_AURA_MOD_CONFUSE)
2163
2164 break;
2165 }
2167 {
2168 // only warlock curses have this
2169 if (Dispel == DISPEL_CURSE)
2170 return SPELL_SPECIFIC_CURSE;
2171
2172 // Warlock (Demon Armor | Demon Skin | Fel Armor)
2173 if (SpellFamilyFlags[1] & 0x20000020 || SpellFamilyFlags[2] & 0x00000010)
2175
2176 //seed of corruption and corruption
2177 if (SpellFamilyFlags[1] & 0x10 || SpellFamilyFlags[0] & 0x2)
2179 break;
2180 }
2181 case SPELLFAMILY_PRIEST:
2182 {
2183 // Divine Spirit and Prayer of Spirit
2184 if (SpellFamilyFlags[0] & 0x20)
2186
2187 break;
2188 }
2189 case SPELLFAMILY_HUNTER:
2190 {
2191 // only hunter stings have this
2192 if (Dispel == DISPEL_POISON)
2193 return SPELL_SPECIFIC_STING;
2194
2195 // only hunter aspects have this (but not all aspects in hunter family)
2196 if (SpellFamilyFlags.HasFlag(0x00380000, 0x00440000, 0x00001010))
2197 return SPELL_SPECIFIC_ASPECT;
2198
2199 break;
2200 }
2202 {
2203 // Collection of all the seal family flags. No other paladin spell has any of those.
2204 if (SpellFamilyFlags[1] & 0x26000C00
2205 || SpellFamilyFlags[0] & 0x0A000000)
2206 return SPELL_SPECIFIC_SEAL;
2207
2208 if (SpellFamilyFlags[0] & 0x00002190)
2209 return SPELL_SPECIFIC_HAND;
2210
2211 // Judgement of Wisdom, Judgement of Light, Judgement of Justice
2212 if (Id == 20184 || Id == 20185 || Id == 20186)
2214
2215 // only paladin auras have this (for palaldin class family)
2216 if (SpellFamilyFlags[2] & 0x00000020)
2217 return SPELL_SPECIFIC_AURA;
2218
2219 // Illidari Council Paladin (Gathios the Shatterer)
2220 if (Id == 41459 || Id == 41469)
2221 return SPELL_SPECIFIC_SEAL;
2222
2223 break;
2224 }
2225 case SPELLFAMILY_SHAMAN:
2226 {
2227 // family flags 10 (Lightning), 42 (Earth), 37 (Water), proc shield from T2 8 pieces bonus
2228 if (SpellFamilyFlags[1] & 0x420
2229 || (SpellFamilyFlags[0] & 0x00000400 && HasAttribute(SPELL_ATTR1_NO_THREAT))
2230 || Id == 23552)
2232
2233 break;
2234 }
2236 if (Id == 48266 || Id == 48263 || Id == 48265)
2238 break;
2239 }
2240
2241 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2242 {
2243 if (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA)
2244 {
2245 switch (Effects[i].ApplyAuraName)
2246 {
2251 return SPELL_SPECIFIC_CHARM;
2254 if (Id == 30645) // Gas Cloud Tracking
2255 return SPELL_SPECIFIC_NORMAL;
2256 [[fallthrough]];
2260 default:
2261 break;
2262 }
2263 }
2264 }
2265
2266 return SPELL_SPECIFIC_NORMAL;
2267}
@ SPELLFAMILY_PRIEST
Definition SharedDefines.h:3790
@ SPELLFAMILY_MAGE
Definition SharedDefines.h:3787
@ SPELLFAMILY_GENERIC
Definition SharedDefines.h:3784
@ SPELLFAMILY_SHAMAN
Definition SharedDefines.h:3795
@ SPELLFAMILY_DEATHKNIGHT
Definition SharedDefines.h:3799
@ DISPEL_POISON
Definition SharedDefines.h:1379
@ DISPEL_CURSE
Definition SharedDefines.h:1377
@ SPELL_AURA_TRACK_RESOURCES
Definition SpellAuraDefines.h:108
@ SPELL_AURA_OBS_MOD_HEALTH
Definition SpellAuraDefines.h:83
@ SPELL_AURA_MOD_POSSESS_PET
Definition SpellAuraDefines.h:191
@ SPELL_AURA_MOD_POWER_REGEN
Definition SpellAuraDefines.h:148
@ SPELL_AURA_OBS_MOD_POWER
Definition SpellAuraDefines.h:84
@ SPELL_AURA_TRACK_STEALTHED
Definition SpellAuraDefines.h:214
@ SPELL_AURA_MOD_CHARM
Definition SpellAuraDefines.h:69
@ SPELL_AURA_AOE_CHARM
Definition SpellAuraDefines.h:240
@ SPELL_AURA_TRACK_CREATURES
Definition SpellAuraDefines.h:107
@ SPELL_AURA_MOD_POSSESS
Definition SpellAuraDefines.h:65
@ SPELL_AURA_MOD_REGEN
Definition SpellAuraDefines.h:147
@ AURA_INTERRUPT_FLAG_NOT_SEATED
Definition SpellDefines.h:69
@ SPELL_SPECIFIC_NORMAL
Definition SpellInfo.h:151
bool HasFlag(uint32 p1=0, uint32 p2=0, uint32 p3=0) const
Definition Util.h:459

References AURA_INTERRUPT_FLAG_NOT_SEATED, AuraInterruptFlags, Dispel, DISPEL_CURSE, DISPEL_POISON, Effects, GetFirstRankSpell(), HasAttribute(), flag96::HasFlag(), Id, MAX_SPELL_EFFECTS, SPELL_ATTR1_NO_THREAT, SPELL_AURA_AOE_CHARM, SPELL_AURA_MOD_CHARM, SPELL_AURA_MOD_CONFUSE, SPELL_AURA_MOD_POSSESS, SPELL_AURA_MOD_POSSESS_PET, SPELL_AURA_MOD_POWER_REGEN, SPELL_AURA_MOD_REGEN, SPELL_AURA_OBS_MOD_HEALTH, SPELL_AURA_OBS_MOD_POWER, SPELL_AURA_TRACK_CREATURES, SPELL_AURA_TRACK_RESOURCES, SPELL_AURA_TRACK_STEALTHED, SPELL_EFFECT_APPLY_AURA, SPELL_SPECIFIC_ASPECT, SPELL_SPECIFIC_AURA, SPELL_SPECIFIC_CHARM, SPELL_SPECIFIC_CURSE, SPELL_SPECIFIC_DRINK, SPELL_SPECIFIC_ELEMENTAL_SHIELD, SPELL_SPECIFIC_FOOD, SPELL_SPECIFIC_FOOD_AND_DRINK, SPELL_SPECIFIC_HAND, SPELL_SPECIFIC_JUDGEMENT, SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE, SPELL_SPECIFIC_MAGE_ARMOR, SPELL_SPECIFIC_MAGE_POLYMORPH, SPELL_SPECIFIC_NORMAL, SPELL_SPECIFIC_PRESENCE, SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT, SPELL_SPECIFIC_SCROLL, SPELL_SPECIFIC_SEAL, SPELL_SPECIFIC_STING, SPELL_SPECIFIC_TRACKER, SPELL_SPECIFIC_WARLOCK_ARMOR, SPELL_SPECIFIC_WARLOCK_CORRUPTION, SPELLFAMILY_DEATHKNIGHT, SPELLFAMILY_GENERIC, SPELLFAMILY_HUNTER, SPELLFAMILY_MAGE, SPELLFAMILY_PALADIN, SPELLFAMILY_PRIEST, SPELLFAMILY_SHAMAN, SPELLFAMILY_WARLOCK, SpellFamilyFlags, and SpellFamilyName.

Referenced by SpellMgr::LoadSpellSpecificAndAuraState().

◆ NeedsComboPoints()

bool SpellInfo::NeedsComboPoints ( ) const
1312{
1314}
@ SPELL_ATTR1_FINISHING_MOVE_DURATION
Definition SharedDefines.h:429
@ SPELL_ATTR1_FINISHING_MOVE_DAMAGE
Definition SharedDefines.h:427

References AttributesEx, SPELL_ATTR1_FINISHING_MOVE_DAMAGE, and SPELL_ATTR1_FINISHING_MOVE_DURATION.

Referenced by Player::PrepareCharmAISpells(), and Spell::Spell().

◆ NeedsExplicitUnitTarget()

◆ NeedsToBeTriggeredByCaster()

bool SpellInfo::NeedsToBeTriggeredByCaster ( SpellInfo const *  triggeringSpell,
uint8  effIndex = MAX_SPELL_EFFECTS 
) const
1084{
1086 return true;
1087
1088 // pussywizard:
1089 if (effIndex < MAX_SPELL_EFFECTS && (triggeringSpell->Effects[effIndex].TargetA.GetCheckType() == TARGET_CHECK_ENTRY || triggeringSpell->Effects[effIndex].TargetB.GetCheckType() == TARGET_CHECK_ENTRY))
1090 {
1091 // xinef:
1092 if (Id == 60563)
1093 return true;
1094
1095 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1096 if (Effects[i].IsEffect() && (Effects[i].TargetA.GetCheckType() == TARGET_CHECK_ENTRY || Effects[i].TargetB.GetCheckType() == TARGET_CHECK_ENTRY))
1097 return true;
1098 }
1099
1100 /*
1101 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1102 {
1103 if (Effects[i].IsEffect())
1104 {
1105 if (Effects[i].TargetA.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL
1106 || Effects[i].TargetB.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL)
1107 return true;
1108 }
1109 }
1110 */
1111
1112 if (triggeringSpell->IsChanneled())
1113 {
1114 uint32 mask = 0;
1115 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1116 {
1117 if (Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER && Effects[i].TargetA.GetTarget() != TARGET_DEST_CASTER)
1118 mask |= Effects[i].GetProvidedTargetMask();
1119 }
1120
1121 if (mask & TARGET_FLAG_UNIT_MASK)
1122 return true;
1123 }
1124
1125 return false;
1126}
@ TARGET_DEST_CASTER
Definition SharedDefines.h:1427
@ TARGET_CHECK_ENTRY
Definition SpellInfo.h:116
bool NeedsExplicitUnitTarget() const
Definition SpellInfo.cpp:1078

References Effects, Id, IsChanneled(), MAX_SPELL_EFFECTS, NeedsExplicitUnitTarget(), TARGET_CHECK_ENTRY, TARGET_DEST_CASTER, TARGET_FLAG_UNIT_MASK, and TARGET_UNIT_CASTER.

Referenced by Spell::EffectTriggerMissileSpell(), Spell::EffectTriggerSpell(), AuraEffect::HandleAuraLinked(), and AuraEffect::HandlePeriodicTriggerSpellAuraTick().

◆ RequireCooldownInfo()

bool SpellInfo::RequireCooldownInfo ( ) const
1228{
1229 return _requireCooldownInfo;
1230}

References _requireCooldownInfo.

Referenced by Spell::SendSpellCooldown().

◆ SetCritCapable()

void SpellInfo::SetCritCapable ( bool  val)
1233{
1234 _isCritCapable = val;
1235}

References _isCritCapable.

◆ SetSpellValid()

void SpellInfo::SetSpellValid ( bool  val)
1243{
1244 _isSpellValid = val;
1245}

References _isSpellValid.

◆ SetStackableWithRanks()

void SpellInfo::SetStackableWithRanks ( bool  val)
1196{
1198}

References _isStackableWithRanks.

◆ ValidateAttribute6SpellDamageMods()

bool SpellInfo::ValidateAttribute6SpellDamageMods ( Unit const *  caster,
AuraEffect const *  auraEffect,
bool  isDot 
) const
1656{
1657 // Xinef: no attribute
1659 return true;
1660
1661 // Xinef we have a hook to decide which auras should profit to the spell, by default no profits
1662 // Xinef: Scourge Strike - Trigger
1663 if (Id == 70890 && auraEffect)
1664 {
1665 SpellInfo const* auraInfo = auraEffect->GetSpellInfo();
1666 return auraInfo->SpellIconID == 3086 ||
1667 (auraInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && (auraInfo->SpellFamilyFlags & flag96(8388608, 64, 16) || auraInfo->SpellIconID == 235 || auraInfo->SpellIconID == 154));
1668 }
1669 // Xinef: Necrosis, no profits for done and taken
1670 else if (Id == 51460)
1671 return false;
1672
1673 // Xinef: Do not affect dots and auras obtained from items, only affected by self casted auras
1674 return !isDot && auraEffect && (auraEffect->GetAmount() < 0 || (auraEffect->GetCasterGUID() == caster->GetGUID() && auraEffect->GetSpellInfo()->SpellFamilyName == SpellFamilyName)) && !auraEffect->GetBase()->GetCastItemGUID();
1675}
@ SPELL_ATTR6_IGNORE_CASTER_DAMAGE_MODIFIERS
Definition SharedDefines.h:621
Definition Util.h:442

References AttributesEx6, AuraEffect::GetAmount(), AuraEffect::GetBase(), AuraEffect::GetCasterGUID(), Aura::GetCastItemGUID(), Object::GetGUID(), AuraEffect::GetSpellInfo(), Id, SPELL_ATTR6_IGNORE_CASTER_DAMAGE_MODIFIERS, SPELLFAMILY_DEATHKNIGHT, SpellFamilyFlags, SpellFamilyName, and SpellIconID.

Referenced by Unit::MeleeDamageBonusDone(), Unit::SpellDamageBonusTaken(), and Unit::SpellPctDamageModsDone().

Friends And Related Symbol Documentation

◆ SpellMgr

friend class SpellMgr
friend

Member Data Documentation

◆ _auraState

AuraStateType SpellInfo::_auraState

◆ _diminishInfoNonTriggered

SpellDiminishInfo SpellInfo::_diminishInfoNonTriggered

◆ _diminishInfoTriggered

SpellDiminishInfo SpellInfo::_diminishInfoTriggered

◆ _immunityInfo

ImmunityInfo SpellInfo::_immunityInfo[MAX_SPELL_EFFECTS]

◆ _isCritCapable

bool SpellInfo::_isCritCapable

◆ _isSpellValid

bool SpellInfo::_isSpellValid

◆ _isStackableWithRanks

bool SpellInfo::_isStackableWithRanks

◆ _requireCooldownInfo

bool SpellInfo::_requireCooldownInfo

◆ _spellSpecific

◆ ActiveIconID

uint32 SpellInfo::ActiveIconID

◆ AreaGroupId

int32 SpellInfo::AreaGroupId

◆ Attributes

◆ AttributesCu

◆ AttributesEx

◆ AttributesEx2

◆ AttributesEx3

◆ AttributesEx4

uint32 SpellInfo::AttributesEx4

◆ AttributesEx5

◆ AttributesEx6

◆ AttributesEx7

uint32 SpellInfo::AttributesEx7

◆ AuraInterruptFlags

◆ BaseLevel

◆ CasterAuraSpell

uint32 SpellInfo::CasterAuraSpell

Referenced by Spell::CheckCast(), and SpellInfo().

◆ CasterAuraState

uint32 SpellInfo::CasterAuraState

◆ CasterAuraStateNot

uint32 SpellInfo::CasterAuraStateNot

Referenced by Spell::CheckCast(), and SpellInfo().

◆ CastTimeEntry

◆ CategoryEntry

◆ CategoryRecoveryTime

◆ ChainEntry

◆ ChannelInterruptFlags

◆ Dispel

◆ DmgClass

◆ DurationEntry

◆ Effects

std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> SpellInfo::Effects

Referenced by Player::_addSpell(), Player::_addTalentAurasAndSpells(), Spell::_handle_immediate_phase(), _InitializeExplicitTargetMask(), _IsPositiveEffect(), _LoadImmunityInfo(), Player::_removeTalentAurasAndSpells(), _UnloadImplicitTargetConditionLists(), spell_dk_will_of_the_necropolis::Absorb(), Spell::AddGOTarget(), Spell::AddItemTarget(), ConditionMgr::addToSpellImplicitTargetConditions(), Spell::AddUnitTarget(), Aura::BuildEffectMaskForOwner(), Unit::CalcAbsorbResist(), spell_dk_anti_magic_zone::CalculateAmount(), AuraEffect::CalculateAmount(), spell_krystallus_shatter_effect::CalculateDamage(), spell_gruul_shatter_effect::CalculateDamage(), spell_igb_incinerating_blast::CalculateDamage(), Spell::CalculateJumpSpeeds(), AuraEffect::CalculatePeriodic(), spell_igb_cannon_blast::CalculatePower(), spell_dru_treant_scaling::CalculateResistanceAmount(), spell_hun_generic_scaling::CalculateResistanceAmount(), spell_mage_pet_scaling::CalculateResistanceAmount(), spell_pri_shadowfiend_scaling::CalculateResistanceAmount(), spell_sha_feral_spirit_scaling::CalculateResistanceAmount(), spell_sha_fire_elemental_scaling::CalculateResistanceAmount(), spell_warl_generic_scaling::CalculateResistanceAmount(), spell_warl_infernal_scaling::CalculateResistanceAmount(), WorldObject::CalculateSpellDamage(), AuraEffect::CalculateSpellMod(), spell_dk_pet_scaling::CalculateStatAmount(), spell_dru_treant_scaling::CalculateStatAmount(), spell_hun_generic_scaling::CalculateStatAmount(), spell_mage_pet_scaling::CalculateStatAmount(), spell_pri_shadowfiend_scaling::CalculateStatAmount(), spell_sha_feral_spirit_scaling::CalculateStatAmount(), spell_sha_fire_elemental_scaling::CalculateStatAmount(), spell_warl_generic_scaling::CalculateStatAmount(), spell_warl_infernal_scaling::CalculateStatAmount(), SpellEffectInfo::CalcValue(), Spell::CanExecuteTriggersOnHit(), Spell::CanOpenLock(), CanSpellCastOverrideAuraEffect(), CanSpellProvideImmunityAgainstAura(), Aura::CanStackWith(), _SpellScript::EffectNameCheck::Check(), _SpellScript::EffectAuraNameCheck::Check(), spell_mage_ice_barrier::CheckCast(), spell_pri_power_word_shield::CheckCast(), Spell::CheckCast(), Spell::CheckCasterAuras(), SpellScript::TargetHook::CheckEffect(), AuraEffect::CheckEffectProc(), Spell::CheckEffectTarget(), Spell::CheckItems(), spell_dru_glyph_of_rake::CheckProc(), spell_item_proc_below_pct_damaged::CheckProc(), spell_sha_nature_guardian::CheckProc(), spell_hun_ascpect_of_the_viper::CheckProc(), CheckShapeshift(), spell_rotface_unstable_ooze_explosion::CheckTarget(), AuraEffect::CleanupTriggeredSpells(), ComputeIsCritCapable(), SpellMgr::ComputeIsSpellValid(), ComputeIsStackableWithRanks(), Spell::DoAllEffectOnLaunchTarget(), Spell::DoAllEffectOnTarget(), Spell::DoSpellHitOnUnit(), Spell::EffectActivateObject(), Spell::EffectActivateRune(), Spell::EffectAddFarsight(), Spell::EffectApplyGlyph(), Spell::EffectBind(), Spell::EffectCastButtons(), Spell::EffectCreateItem(), Spell::EffectCreateItem2(), Spell::EffectCreateTamedPet(), Spell::EffectDiscoverTaxi(), Spell::EffectDispel(), Spell::EffectDispelMechanic(), Spell::EffectDuel(), Spell::EffectDurabilityDamage(), Spell::EffectDurabilityDamagePCT(), Spell::EffectEnchantHeldItem(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Spell::EffectEnchantItemTmp(), Spell::EffectEnergize(), Spell::EffectEnergizePct(), Spell::EffectFeedPet(), Spell::EffectForceCast(), Spell::EffectForceDeselect(), Spell::EffectGameObjectSetDestructionState(), Spell::EffectKillCredit(), Spell::EffectKillCreditPersonal(), Spell::EffectKnockBack(), Spell::EffectLeapBack(), Spell::EffectLearnPetSpell(), Spell::EffectLearnSkill(), Spell::EffectLearnSpell(), Spell::EffectPersistentAA(), Spell::EffectPlayMusic(), Spell::EffectPlaySound(), Spell::EffectPowerBurn(), Spell::EffectPowerDrain(), Spell::EffectPullTowards(), Spell::EffectQuestClear(), Spell::EffectQuestComplete(), Spell::EffectQuestFail(), Spell::EffectQuestStart(), Spell::EffectRechargeManaGem(), Spell::EffectRemoveAura(), Spell::EffectReputation(), Spell::EffectResurrectNew(), Spell::EffectSanctuary(), Spell::EffectSchoolDMG(), Spell::EffectScriptEffect(), Spell::EffectSelfResurrect(), Spell::EffectSendEvent(), Spell::EffectSendTaxi(), Spell::EffectStealBeneficialBuff(), Spell::EffectSummonChangeItem(), Spell::EffectSummonObject(), Spell::EffectSummonObjectWild(), Spell::EffectSummonPet(), Spell::EffectSummonType(), Spell::EffectTransmitted(), Spell::EffectTriggerMissileSpell(), Spell::EffectTriggerRitualOfSummoning(), Spell::EffectTriggerSpell(), Spell::EffectUnlearnSpecialization(), Spell::EffectWeaponDmg(), EquippedOk(), UnitAI::FillAISpellInfo(), ScriptMgr::FillSpellSummary(), UnitAura::FillTargetMap(), DynObjAura::FillTargetMap(), spell_onyxia_disturb_lava_fissure::FilterFissures(), GetAllEffectsMechanicMask(), GetAuraRankForLevel(), AuraEffect::GetAuraType(), Unit::GetCastingTimeForBonus(), GetDiminishingReturnsGroupForSpell(), GetEffectMechanic(), GetEffectMechanicMask(), npc_firework::npc_fireworkAI::GetFireworkGameObjectId(), spell_dk_raise_dead::GetGhoulSpellId(), GetMaxTicks(), Unit::GetMechanicResistChance(), AuraEffect::GetMiscValue(), AuraEffect::GetMiscValueB(), GetSpellMechanicMaskByEffectMask(), go_soulwell::go_soulwellAI::GossipHello(), spell_dk_dancing_rune_weapon::HandleApply(), AuraEffect::HandleAuraLinked(), AuraEffect::HandleAuraModDispelImmunity(), AuraEffect::HandleAuraModDmgImmunity(), Unit::HandleAuraRaidProcFromCharge(), Unit::HandleAuraRaidProcFromChargeWithValue(), WorldSession::HandleCastSpellOpcode(), spell_dru_lifebloom::HandleDispel(), spell_gen_oracle_wolvar_reputation::HandleDummy(), spell_q13086_last_line_of_defence::HandleDummy(), spell_dk_raise_ally::HandleDummy(), spell_q12683_take_sputum_sample::HandleDummy(), spell_warr_execute::HandleEffect(), spell_dk_improved_unholy_presence::HandleEffectApply(), spell_dru_idol_lifebloom::HandleEffectCalcSpellMod(), spell_warr_glyph_of_sunder_armor::HandleEffectCalcSpellMod(), spell_rog_prey_on_the_weak::HandleEffectPeriodic(), spell_optic_link_aura::HandleEffectPeriodic(), Spell::HandleEffects(), AuraEffect::HandleFeignDeath(), Spell::HandleLaunchPhase(), spell_icehowl_jump_back::HandleLeapBack(), lookup_commandscript::HandleLookupSpellCommand(), lookup_commandscript::HandleLookupSpellIdCommand(), AuraEffect::HandleModMechanicImmunity(), AuraEffect::HandleModStateImmunityMask(), spell_putricide_unbound_plague_dmg_aura::HandlePeriodic(), spell_dru_frenzied_regeneration::HandlePeriodic(), spell_hun_rapid_recuperation::HandlePeriodic(), AuraEffect::HandlePeriodicDamageAurasTick(), AuraEffect::HandlePeriodicHealthFunnelAuraTick(), AuraEffect::HandlePeriodicHealthLeechAuraTick(), AuraEffect::HandlePeriodicManaLeechAuraTick(), AuraEffect::HandlePeriodicPowerBurnAuraTick(), AuraEffect::HandlePeriodicTriggerSpellAuraTick(), AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(), WorldSession::HandlePetActionHelper(), spell_item_blood_draining_enchant::HandleProc(), spell_hun_cobra_strikes::HandleProc(), spell_warr_extra_proc::HandleProc(), spell_pet_guard_dog::HandleProc(), spell_dk_blood_caked_blade::HandleProc(), spell_dk_dancing_rune_weapon::HandleProc(), spell_dk_unholy_blight::HandleProc(), spell_gen_proc_not_self::HandleProc(), spell_gen_blade_warding::HandleProc(), spell_item_alchemists_stone::HandleProc(), spell_pal_seal_of_command_aura::HandleProc(), spell_pal_judgement_of_wisdom_mana::HandleProc(), spell_pal_infusion_of_light::HandleProc(), spell_pal_glyph_of_holy_light_dummy::HandleProc(), spell_pal_improved_lay_of_hands::HandleProc(), spell_pal_illumination::HandleProc(), spell_sha_flametongue_weapon::HandleProc(), spell_sha_glyph_of_totem_of_wrath::HandleProc(), spell_sha_imp_water_shield::HandleProc(), spell_sha_windfury_weapon::HandleProc(), spell_warr_deep_wounds_aura::HandleProc(), AuraEffect::HandleProcTriggerSpellAuraProc(), AuraEffect::HandleProcTriggerSpellWithValueAuraProc(), AuraEffect::HandleRaidProcFromChargeAuraProc(), AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(), spell_igb_rocket_pack_aura::HandleRemove(), spell_gen_set_health::HandleScript(), spell_pal_seal_of_vengeance_aura::HandleSeal(), Unit::HandleSpellClick(), spell_q13010_jokkum_summon::HandleSummon(), spell_wintergrasp_create_vehicle::HandleSummon(), spell_item_summon_or_dismiss::HandleSummon(), spell_item_draenic_pale_ale::HandleSummon(), spell_putricide_mutated_plague_aura::HandleTriggerSpell(), spell_mage_arcane_blast::HandleTriggerSpell(), Player::Has310Flyer(), HasAnyAura(), HasAnyEffectMechanic(), HasAreaAuraEffect(), HasAura(), Unit::HasAuraWithMechanic(), HasEffect(), HasEffectMechanic(), Player::HasItemFitToSpellRequirements(), HasOnlyDamageEffects(), AuraEffect::HasSpellClassMask(), ItemTemplate::HasSpellPowerStat(), AuraEffect::IsAffectedOnSpell(), IsAffectingArea(), IsAuraEffectEqual(), IsChannelCategorySpell(), Unit::IsDamageReducedByArmor(), IsExplicitDiscovery(), Creature::IsImmunedToSpell(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpellEffect(), Creature::IsImmunedToSpellEffect(), Totem::IsImmunedToSpellEffect(), IsLootCrafting(), IsPrimaryProfession(), IsProfession(), IsProfessionOrRiding(), IsQuestTame(), IsSelfCast(), ConditionMgr::isSourceTypeValid(), IsTargetingArea(), AchievementCriteriaData::IsValid(), Player::learnQuestRewardedSpells(), Player::LearnTalent(), spell_shield_generator_aura::Load(), spell_dk_anti_magic_shell_raid::Load(), spell_dk_anti_magic_shell_self::Load(), spell_dk_anti_magic_zone::Load(), spell_dk_spell_deflection::Load(), spell_dk_will_of_the_necropolis::Load(), spell_dru_moonkin_form_passive::Load(), spell_dru_primal_tenacity::Load(), spell_dru_savage_defense::Load(), spell_gen_absorb0_hitlimit1::Load(), spell_pal_ardent_defender::Load(), spell_pal_divine_sacrifice::Load(), spell_pal_divine_storm::Load(), spell_pri_guardian_spirit::Load(), spell_rog_cheat_death::Load(), spell_rog_nerves_of_steel::Load(), spell_sha_astral_shift::Load(), LoadAuraState(), SpellMgr::LoadEnchantCustomAttr(), SpellMgr::LoadPetDefaultSpells(), ObjectMgr::LoadQuests(), SpellMgr::LoadSpellCones(), SpellMgr::LoadSpellInfoCorrections(), SpellMgr::LoadSpellInfoCustomAttributes(), SpellMgr::LoadSpellLearnSkills(), SpellMgr::LoadSpellPetAuras(), SpellMgr::LoadSpellProcs(), ObjectMgr::LoadSpellScripts(), LoadSpellSpecific(), SpellMgr::LoadSpellTargetPositions(), WorldObject::MagicSpellHitResult(), Unit::MeleeDamageBonusDone(), spell_gen_random_target32::ModDest(), spell_q12308_escape_from_silverbrook_summon_worgen::ModDest(), NeedsToBeTriggeredByCaster(), spell_dru_rejuvenation_moonglade_2_set::OnApply(), spell_valithria_suppression_aura::OnApply(), spell_kologarn_stone_shout_aura::OnPeriodic(), spell_item_fel_mana_potion::OnPeriodic(), spell_deathwhisper_dark_reckoning::OnPeriodic(), spell_pal_glyph_of_divinity::OnProc(), spell_putricide_mutated_plague_aura::OnRemove(), spell_valithria_suppression_aura::OnRemove(), spell_dru_rejuvenation_moonglade_2_set::OnRemove(), spell_hor_shared_suffering_aura::OnRemove(), spell_gen_sober_up::OnRemove(), spell_entropius_negative_energy_periodic::PeriodicTick(), spell_doomfire::PeriodicTick(), spell_blood_queen_pact_of_the_darkfallen_dmg_aura::PeriodicTick(), spell_broggok_poison_cloud::PeriodicTick(), spell_pal_beacon_of_light::PeriodicTick(), Spell::prepare(), Player::PrepareCharmAISpells(), Spell::PrepareTriggersExecutedOnHit(), spellinfo_commandscript::PrintEffects(), spellinfo_commandscript::PrintTargets(), Creature::reachWithSpellAttack(), Creature::reachWithSpellCure(), spell_wg_reduce_damage_by_distance::RecalculateDamage(), spell_gen_mounted_charge::Register(), spell_gen_defend::Register(), Player::removeSpell(), Player::resetTalents(), Spell::SelectEffectImplicitTargets(), Spell::SelectEffectTypeImplicitTargets(), Spell::SelectImplicitAreaTargets(), Spell::SelectImplicitCasterDestTargets(), Spell::SelectImplicitChainTargets(), Spell::SelectImplicitConeTargets(), Spell::SelectImplicitDestDestTargets(), Spell::SelectImplicitNearbyTargets(), Spell::SelectImplicitTargetDestTargets(), Spell::SelectImplicitTrajTargets(), Spell::SelectSpellTargets(), Spell::SendLogExecute(), Spell::SetSpellValue(), Unit::SpellDamageBonusDone(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), WorldObject::SpellHitResult(), WorldObject::SpellHitResult(), boss_onyxia::SpellHitTarget(), boss_rotface::boss_rotfaceAI::SpellHitTarget(), SpellInfo(), SpellValue::SpellValue(), Acore::Hyperlinks::LinkTags::trade::StoreTo(), go_wind_stone::go_wind_stoneAI::SummonNPC(), Spell::update(), Player::UpdateAttackPowerAndDamage(), Spell::UpdateChanneledTargetList(), spell_deathwhisper_dark_reckoning::Validate(), spell_mage_living_bomb::Validate(), spell_entropius_negative_energy_periodic::Validate(), spell_icehowl_arctic_breath::Validate(), spell_putricide_ooze_tank_protection::Validate(), spell_q11652_rescue_injured_soldier::Validate(), spell_broggok_poison_cloud::Validate(), spell_dru_wild_growth::Validate(), spell_gen_arena_drink::Validate(), spell_gen_eject_passenger::Validate(), spell_hun_cobra_strikes::Validate(), spell_hun_rapid_recuperation::Validate(), spell_pal_beacon_of_light::Validate(), spell_pal_improved_lay_of_hands::Validate(), spell_rog_turn_the_tables::Validate(), spell_sha_mana_tide::Validate(), and Spell::WriteCastResultInfo().

◆ EquippedItemClass

◆ EquippedItemInventoryTypeMask

◆ EquippedItemSubClassMask

◆ ExcludeCasterAuraSpell

◆ ExcludeTargetAuraSpell

◆ ExplicitTargetMask

uint32 SpellInfo::ExplicitTargetMask

◆ FacingCasterFlags

uint32 SpellInfo::FacingCasterFlags

Referenced by Spell::CheckRange(), and SpellInfo().

◆ Id

uint32 SpellInfo::Id

Referenced by Player::_addSpell(), Aura::_ApplyForTarget(), Spell::_cast(), Unit::_CreateAuraApplication(), Spell::_handle_finish_phase(), _IsPositiveEffect(), _LoadImmunityInfo(), Unit::_TryStackingOrRefreshingExistingAura(), Aura::_UnapplyForTarget(), Unit::_UpdateAutoRepeatSpell(), _SpellScript::_Validate(), SpellScript::_Validate(), AuraScript::_Validate(), boss_grand_champion::boss_grand_championAI::AddCreatureAddonAuras(), AddItemsSetItem(), SpellMgr::AddSameEffectStackRuleSpellGroups(), Player::addSpell(), Player::AddSpellAndCategoryCooldowns(), Creature::AddSpellCooldown(), CharmInfo::AddSpellToActionBar(), ApplyAllSpellImmunitiesTo(), Unit::ApplyEffectModifiers(), Player::ApplyEquipSpell(), Unit::CalcAbsorbResist(), Unit::CalcArmorReducedDamage(), SpellEffectInfo::CalcDamageMultiplier(), CalcPowerCost(), SpellEffectInfo::CalcRadius(), AuraEffect::CalculateAmount(), ThreatManager::CalculateModifiedThreat(), Unit::CalculateSpellDamageTaken(), SpellEffectInfo::CalcValueMultiplier(), Spell::CanAutoCast(), Spell::cancel(), Player::CanExecutePendingSpellCastRequest(), Spell::CanOpenLock(), Player::CanRequestSpellCast(), Unit::CanRestoreMana(), Aura::CanStackWith(), Player::CastItemCombatSpell(), Player::CastItemUseSpell(), WorldObject::CastSpell(), spell_yogg_saron_in_the_maws_of_the_old_god::CheckCast(), Spell::CheckCast(), Spell::CheckCasterAuras(), Spell::CheckEffectTarget(), CheckLocation(), Spell::CheckPetCast(), spell_dk_dancing_rune_weapon::CheckProc(), spell_dru_t10_restoration_4p_bonus_dummy::CheckProc(), spell_item_meteoric_inspiration::CheckProc(), spell_mage_brain_freeze::CheckProc(), spell_mage_empowered_fire::CheckProc(), spell_warr_improved_spell_reflection::CheckProc(), spell_pri_body_and_soul::CheckProcDummy(), Spell::CheckRange(), Spell::CheckRuneCost(), CheckShapeshift(), cast_commandscript::CheckSpellExistsAndIsValid(), SpellMgr::CheckSpellGroupStackRules(), SpellMgr::ComputeIsSpellValid(), Unit::DealDamage(), Unit::DealDamageShieldDamage(), Spell::Delayed(), Spell::DelayedChannel(), Spell::DoAllEffectOnTarget(), Spell::DoCreateItem(), Spell::DoSpellHitOnUnit(), Spell::DoTriggersOnSpellHit(), Spell::EffectActivateObject(), Spell::EffectActivateRune(), Spell::EffectAddFarsight(), Spell::EffectAddHonor(), Spell::EffectCreateItem2(), Spell::EffectCreateRandomItem(), Spell::EffectCreateTamedPet(), Spell::EffectDisEnchant(), Spell::EffectDispel(), Spell::EffectDuel(), Spell::EffectDummy(), Spell::EffectEnchantHeldItem(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Spell::EffectEnchantItemTmp(), Spell::EffectEnergize(), Spell::EffectEnergizePct(), Spell::EffectForceCast(), Spell::EffectForceDeselect(), Spell::EffectHeal(), Spell::EffectInstaKill(), Spell::EffectInterruptCast(), Spell::EffectJumpDest(), Spell::EffectKillCredit(), Spell::EffectLearnPetSpell(), Spell::EffectLearnSpell(), Spell::EffectOpenLock(), Spell::EffectPersistentAA(), Spell::EffectPlayMusic(), Spell::EffectPlaySound(), Spell::EffectPowerBurn(), Spell::EffectPowerDrain(), Spell::EffectRedirectThreat(), Spell::EffectSchoolDMG(), Spell::EffectScriptEffect(), Spell::EffectSendEvent(), Spell::EffectSendTaxi(), Spell::EffectStealBeneficialBuff(), Spell::EffectSummonObject(), Spell::EffectSummonObjectWild(), Spell::EffectSummonPet(), Spell::EffectSummonType(), Spell::EffectTameCreature(), Spell::EffectTaunt(), Spell::EffectTeleportUnits(), Spell::EffectTransmitted(), Spell::EffectTriggerMissileSpell(), Spell::EffectTriggerRitualOfSummoning(), Spell::EffectTriggerSpell(), Spell::EffectWeaponDmg(), spell_lady_vashj_summons::FilterTargets(), Spell::finish(), Spell::GetDebugInfo(), GetDiminishingReturnsGroupForSpell(), SpellMgr::GetFirstSpellInChain(), Unit::GetHighestExclusiveSameEffectSpellGroupValue(), AuraEffect::GetId(), Aura::GetId(), GetMaxRange(), Unit::GetPPMProcChance(), SpellMgr::GetSpellForDifficultyFromSpell(), Spell::handle_immediate(), spell_igb_on_gunship_deck_aura::HandleApply(), misc_commandscript::HandleAuraCommand(), AuraEffect::HandleAuraDummy(), AuraEffect::HandleAuraModSchoolImmunity(), Unit::HandleAuraRaidProcFromCharge(), Unit::HandleAuraRaidProcFromChargeWithValue(), Aura::HandleAuraSpecificMods(), misc_commandscript::HandleAuraStacksCommand(), WorldSession::HandleCancelChanneling(), cast_commandscript::HandleCastBackCommand(), cast_commandscript::HandleCastCommand(), cast_commandscript::HandleCastDestCommand(), cast_commandscript::HandleCastDistCommand(), cast_commandscript::HandleCastSelfCommand(), cast_commandscript::HandleCastTargetCommad(), spell_hun_readiness::HandleDummy(), spell_mage_cold_snap::HandleDummy(), spell_rog_preparation::HandleDummy(), spell_pal_improved_aura::HandleEffectRemove(), Spell::HandleEffects(), spell_ioc_bomb_blast_criteria::HandleGameObjectDamage(), spell_chapter5_return_to_capital::HandleHit(), Acore::PlayerCommand::HandleLearnSpellCommand(), lookup_commandscript::HandleLookupSpellIdCommand(), spell_warr_heroic_strike::HandleOnHit(), AuraEffect::HandlePeriodicTriggerSpellAuraTick(), pet_commandscript::HandlePetLearnCommand(), pet_commandscript::HandlePetUnlearnCommand(), spell_dk_rime::HandleProc(), spell_mage_glyph_of_ice_block::HandleProc(), spell_deathbringer_blood_link_aura::HandleProc(), spell_item_blood_draining_enchant::HandleProc(), spell_hun_cobra_strikes::HandleProc(), spell_item_healing_trance::HandleProc(), spell_dk_sudden_doom::HandleProc(), spell_mage_master_of_elements::HandleProc(), spell_sha_glyph_of_earth_shield::HandleProc(), spell_warr_sweeping_strikes::HandleProc(), ArenaSpectator::HandleResetCommand(), spell_pvp_trinket_wotf_shared_cd::HandleScript(), spell_dreamwalker_summon_portal::HandleScript(), spell_gen_profession_research::HandleScript(), spell_gen_dalaran_disguise::HandleScript(), spell_item_book_of_glyph_mastery::HandleScript(), spell_capacitus_polarity_charge::HandleTargets(), spell_thaddius_pos_neg_charge::HandleTargets(), Spell::HandleThreatSpells(), Acore::PlayerCommand::HandleUnlearnSpellCommand(), WorldSession::HandleUpdateMissileTrajectory(), Unit::HasSchoolImmunityForMask(), Pet::InitLevelupSpellsForLevel(), IsAbilityLearnedWithProfession(), IsAbilityOfSkillType(), IsDifferentRankOf(), IsExplicitDiscovery(), Unit::IsHighestExclusiveAuraEffect(), Unit::IsImmunedToSpell(), Totem::IsImmunedToSpellEffect(), IsMultiSlotAura(), LinkValidator< LinkTags::enchant >::IsTextValid(), spell_item_brewfest_hops::Load(), spell_pal_seal_of_vengeance_aura::Load(), LoadAuraState(), ObjectMgr::LoadCreatureAddons(), ObjectMgr::LoadCreatureTemplateAddons(), LoadLootTemplates_Spell(), SpellMgr::LoadPetLevelupSpellMap(), ObjectMgr::LoadQuests(), Aura::LoadScripts(), Spell::LoadScripts(), SpellMgr::LoadSpellInfoCustomAttributes(), SpellMgr::LoadSpellProcs(), ObjectMgr::LoadSpellScriptNames(), LoadSpellSpecific(), WorldObject::MagicSpellHitResult(), Unit::MeleeSpellHitResult(), WorldObject::ModSpellCastTime(), NeedsToBeTriggeredByCaster(), boss_stormcaller_brundir::OnChannelFinished(), spell_item_mind_amplify_dish::OnDummyEffect(), spell_lurker_below_spout::OnPeriodic(), boss_onyxia::OnSpellCast(), boss_stormcaller_brundir::OnSpellCast(), boss_yoggsaron_brain::OnSpellCast(), SmartAI::OnSpellFailed(), boss_stormcaller_brundir::OnSpellFailed(), Spell::OnSpellLaunch(), Acore::AbsorbAuraOrderPred::operator()(), Unit::PetSpellFail(), Spell::prepare(), Player::PrepareCharmAISpells(), Spell::prepareDataForTriggerSystem(), Spell::PrepareTriggersExecutedOnHit(), spellinfo_commandscript::PrintBasicInfo(), SmartScript::ProcessEvent(), spell_pri_power_word_shield_aura::ReflectDamage(), RemoveItemsSetItem(), Player::RestoreSpellMods(), Spell::SelectEffectImplicitTargets(), Spell::SelectImplicitCasterDestTargets(), Spell::SelectImplicitChainTargets(), Spell::SelectImplicitChannelTargets(), Spell::SelectImplicitConeTargets(), Spell::SelectImplicitNearbyTargets(), Spell::SendChannelStart(), Player::SendCooldownEvent(), Unit::SendHealSpellLog(), Spell::SendInterrupted(), Spell::SendLogExecute(), Spell::SendSpellCooldown(), Spell::SendSpellGo(), Unit::SendSpellNonMeleeDamageLog(), WorldObject::SendSpellNonMeleeDamageLog(), Unit::SendSpellNonMeleeReflectLog(), Spell::SendSpellStart(), AuraEffect::SendTickImmune(), Unit::SetCurrentCastedSpell(), boss_mimiron::SetData(), CharmInfo::SetSpellAutocast(), list_commandscript::ShouldListAura(), Unit::SpellCriticalDamageBonus(), Unit::SpellCriticalHealingBonus(), Unit::SpellDamageBonusDone(), Unit::SpellDamageBonusTaken(), Unit::SpellDoneCritChance(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), npc_kerlonian::npc_kerlonianAI::SpellHit(), npc_ringo::npc_ringoAI::SpellHit(), boss_pyroguard_emberseer::SpellHit(), npc_netherspite_infernal::SpellHit(), boss_terestian_illhoof::SpellHit(), boss_halazzi::SpellHit(), npc_harrison_jones::SpellHit(), npc_crate_helper::npc_crate_helperAI::SpellHit(), boss_buru::SpellHit(), boss_ossirian::SpellHit(), npc_omen::npc_omenAI::SpellHit(), npc_taskmaster_fizzule::npc_taskmaster_fizzuleAI::SpellHit(), boss_eadric::boss_eadricAI::SpellHit(), npc_black_knight_ghoul::npc_black_knight_ghoulAI::SpellHit(), boss_grand_champion::boss_grand_championAI::SpellHit(), npc_frost_sphere::SpellHit(), boss_prince_keleseth_icc::boss_prince_kelesethAI::SpellHit(), boss_prince_taldaram_icc::boss_prince_taldaramAI::SpellHit(), boss_prince_valanar_icc::boss_prince_valanarAI::SpellHit(), npc_high_overlord_saurfang_icc::npc_high_overlord_saurfangAI::SpellHit(), npc_muradin_bronzebeard_icc::npc_muradin_bronzebeard_iccAI::SpellHit(), npc_saurfang_event::npc_saurfang_eventAI::SpellHit(), npc_cult_fanatic::npc_cult_fanaticAI::SpellHit(), npc_cult_adherent::npc_cult_adherentAI::SpellHit(), npc_putricide_oozeAI::SpellHit(), boss_the_lich_king::boss_the_lich_kingAI::SpellHit(), npc_tirion_fordring_tft::npc_tirion_fordringAI::SpellHit(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::SpellHit(), npc_argent_captainAI::SpellHit(), npc_gothik_trigger::npc_gothik_triggerAI::SpellHit(), boss_malygos::SpellHit(), boss_urom::boss_uromAI::SpellHit(), boss_ionar::SpellHit(), npc_ulduar_hodir_priest::SpellHit(), npc_ulduar_hodir_druid::SpellHit(), npc_ulduar_hodir_shaman::SpellHit(), npc_ulduar_hodir_mage::SpellHit(), npc_ulduar_iron_construct::SpellHit(), npc_ulduar_leviathan_mkii::SpellHit(), npc_ulduar_aerial_command_unit::SpellHit(), npc_ulduar_flames_spread::SpellHit(), npc_ichor_globule::SpellHit(), npc_preparations_for_war_vehicle::SpellHit(), npc_wintergarde_gryphon::SpellHit(), npc_frostbrood_skytalon::npc_frostbrood_skytalonAI::SpellHit(), npc_maiev_illidan::SpellHit(), boss_shade_of_akama::SpellHit(), npc_infernal_attacker::npc_infernal_attackerAI::SpellHit(), npc_shadowmoon_tuber_node::npc_shadowmoon_tuber_nodeAI::SpellHit(), npc_venomhide_hatchling::npc_venomhide_hatchlingAI::SpellHit(), npc_necropolis::SpellHit(), npc_necropolis_health::SpellHit(), npc_necropolis_relay::SpellHit(), boss_majordomo::SpellHit(), boss_attumen::SpellHit(), npc_balance_of_light_and_shadow::npc_balance_of_light_and_shadowAI::SpellHit(), npc_dark_iron_guzzler::SpellHit(), boss_headless_horseman::SpellHit(), boss_headless_horseman_pumpkin::SpellHit(), npc_pilgrims_bounty_chair::SpellHit(), npc_pilgrims_bounty_plate::SpellHit(), boss_veklor::SpellHit(), npc_rabid_thistle_bear::npc_rabid_thistle_bearAI::SpellHit(), boss_gal_darah::SpellHit(), npc_isle_of_conquest_turret::npc_isle_of_conquest_turretAI::SpellHit(), boss_steelbreaker::SpellHit(), boss_runemaster_molgeim::SpellHit(), boss_stormcaller_brundir::SpellHit(), boss_freya::SpellHit(), boss_hodir::SpellHit(), boss_mimiron::SpellHit(), boss_razorscale::SpellHit(), boss_thorim_pillar::SpellHit(), boss_thorim_runic_colossus::SpellHit(), boss_yoggsaron::SpellHit(), npc_ulduar_keeper::npc_ulduar_keeperAI::SpellHit(), npc_overlord_drakuru_betrayal::SpellHit(), npc_earthen_ring_flamecaller::SpellHit(), npc_pet_gen_soul_trader_beacon::SpellHit(), npc_pet_darting_hatchling::SpellHit(), npc_necropolis_proxy::SpellHit(), boss_tenris_mirkblood::SpellHit(), npc_forest_frog::SpellHit(), npc_zulian_prowler::npc_zulian_prowlerAI::SpellHit(), npc_midsummer_ribbon_pole_target::SpellHit(), npc_aged_dying_ancient_kodo::SpellHit(), npc_troll_volunteer::npc_troll_volunteerAI::SpellHit(), boss_sister_svalna::boss_sister_svalnaAI::SpellHit(), boss_faerlina::boss_faerlinaAI::SpellHit(), boss_razuvious::boss_razuviousAI::SpellHit(), npc_living_constellation::SpellHit(), boss_ignis::SpellHit(), npc_ulduar_vx001::SpellHit(), npc_xt_toy_pile::SpellHit(), npc_sinkhole_kill_credit::npc_sinkhole_kill_creditAI::SpellHit(), npc_torturer_lecraft::npc_torturer_lecraftAI::SpellHit(), npc_wounded_skirmisher::SpellHit(), npc_venture_co_straggler::npc_venture_co_stragglerAI::SpellHit(), npc_tournament_training_dummy::npc_tournament_training_dummyAI::SpellHit(), npc_brunnhildar_prisoner::npc_brunnhildar_prisonerAI::SpellHit(), boss_kaelthas::SpellHit(), advisor_baseAI::SpellHit(), npc_deaths_door_fell_cannon_target_bunny::npc_deaths_door_fell_cannon_target_bunnyAI::SpellHit(), npc_nether_drake::npc_nether_drakeAI::SpellHit(), npc_enslaved_netherwing_drake::SpellHit(), npc_dragonmaw_peon::npc_dragonmaw_peonAI::SpellHit(), npc_injured_patient::npc_injured_patientAI::SpellHit(), npc_garments_of_quests::npc_garments_of_questsAI::SpellHit(), npc_necrotic_shard::SpellHit(), npc_dark_iron_attack_generator::SpellHit(), npc_soh_fire_trigger::SpellHit(), npc_hallows_end_train_fire::SpellHit(), boss_headless_horseman_head::SpellHit(), npc_midsummer_bonfire::SpellHit(), npc_cos_stratholme_citizien::npc_cos_stratholme_citizienAI::SpellHit(), boss_viscidus::SpellHit(), boss_jaraxxus::SpellHit(), npc_icc_orb_controller::SpellHit(), boss_magus_telestra::SpellHit(), boss_flame_leviathan::SpellHit(), boss_thorim::SpellHit(), boss_yoggsaron_immortal_guardian::SpellHit(), npc_attracted_reef_bull::npc_attracted_reef_bullAI::SpellHit(), npc_plague_cauldron_target::SpellHit(), npc_jungle_punch_target::npc_jungle_punch_targetAI::SpellHit(), npc_iron_watcher::npc_iron_watcherAI::SpellHit(), npc_wild_wyrm::SpellHit(), npc_mature_netherwing_drake::npc_mature_netherwing_drakeAI::SpellHit(), npc_imprisoned_beryl_sorcerer::npc_imprisoned_beryl_sorcererAI::SpellHit(), boss_black_knight::boss_black_knightAI::SpellHitTarget(), boss_bronjahm::SpellHitTarget(), boss_garfrost::boss_garfrostAI::SpellHitTarget(), boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::SpellHitTarget(), npc_vengeful_shade::npc_vengeful_shadeAI::SpellHitTarget(), npc_putricide_oozeAI::SpellHitTarget(), boss_the_lich_king::boss_the_lich_kingAI::SpellHitTarget(), npc_maghar_captive::npc_maghar_captiveAI::SpellHitTarget(), npc_kurenai_captive::npc_kurenai_captiveAI::SpellHitTarget(), npc_necropolis_relay::SpellHitTarget(), boss_quartermaster_zigris::SpellHitTarget(), npc_demonic_vapor_trail::SpellHitTarget(), boss_headless_horseman_head::SpellHitTarget(), boss_taldaram::SpellHitTarget(), boss_anub_arak::SpellHitTarget(), boss_moorabi::boss_moorabiAI::SpellHitTarget(), boss_volkhan::SpellHitTarget(), boss_stormcaller_brundir::SpellHitTarget(), boss_ymiron::boss_ymironAI::SpellHitTarget(), npc_necropolis_proxy::SpellHitTarget(), npc_necrotic_shard::SpellHitTarget(), npc_frostwing_vrykul::npc_frostwing_vrykulAI::SpellHitTarget(), boss_malchezaar::SpellHitTarget(), boss_felmyst::SpellHitTarget(), npc_nerubian_burrower::SpellHitTarget(), boss_devourer_of_souls::SpellHitTarget(), npc_hor_lich_king::SpellHitTarget(), boss_ick::boss_ickAI::SpellHitTarget(), npc_pos_collapsing_icicle::npc_pos_collapsing_icicleAI::SpellHitTarget(), npc_pos_leader_second::npc_pos_leader_secondAI::SpellHitTarget(), boss_eck::SpellHitTarget(), boss_lady_deathwhisper::boss_lady_deathwhisperAI::SpellHitTarget(), boss_lord_marrowgar::SpellHitTarget(), boss_rotface::boss_rotfaceAI::SpellHitTarget(), boss_sindragosa::boss_sindragosaAI::SpellHitTarget(), boss_sister_svalna::boss_sister_svalnaAI::SpellHitTarget(), npc_icc_valkyr_herald::npc_icc_valkyr_heraldAI::SpellHitTarget(), npc_oculus_drake::npc_oculus_drakeAI::SpellHitTarget(), boss_flame_leviathan::SpellHitTarget(), boss_freya::SpellHitTarget(), boss_vezax::SpellHitTarget(), boss_hodir::SpellHitTarget(), npc_ulduar_hodir_shaman::SpellHitTarget(), npc_ulduar_rocket_strike_trigger::SpellHitTarget(), boss_cyanigosa::SpellHitTarget(), npc_q24545_lich_king::npc_q24545_lich_kingAI::SpellHitTarget(), npc_simon_bunny::npc_simon_bunnyAI::SpellHitTarget(), boss_lethon::boss_lethonAI::SpellHitTarget(), npc_chesspiece::SpellHitTarget(), boss_darkmaster_gandling::boss_darkmaster_gandlingAI::SpellHitTarget(), boss_zuljin::SpellHitTarget(), boss_headless_horseman::SpellHitTarget(), npc_pilgrims_bounty_chair::SpellHitTarget(), boss_epoch::boss_epochAI::SpellHitTarget(), boss_ouro::SpellHitTarget(), npc_anubisath_sentinel::aqsentinelAI::SpellHitTarget(), boss_krik_thir::boss_krik_thirAI::SpellHitTarget(), boss_sapphiron::boss_sapphironAI::SpellHitTarget(), boss_thorim::SpellHitTarget(), boss_yoggsaron_voice::SpellHitTarget(), boss_emalon::boss_emalonAI::SpellHitTarget(), npc_overlord_drakuru_betrayal::SpellHitTarget(), boss_shirrak_the_dead_watcher::SpellHitTarget(), npc_pet_gen_fetch_ball::SpellHitTarget(), npc_necropolis_health::SpellHitTarget(), SpellInfo(), Unit::SpellPctHealingModsDone(), Spell::SummonGuardian(), go_wind_stone::go_wind_stoneAI::SummonNPC(), Spell::TakePower(), Spell::TakeRunePower(), Pet::ToggleAutocast(), CharmInfo::ToggleCreatureAutocast(), Spell::TriggerGlobalCooldown(), Spell::update(), PetAI::UpdateAI(), Spell::UpdateChanneledTargetList(), spell_gen_arena_drink::Validate(), ValidateAttribute6SpellDamageMods(), ObjectMgr::ValidateSpellScripts(), Spell::WriteCastResultInfo(), Spell::~Spell(), and SpellEvent::~SpellEvent().

◆ InterruptFlags

◆ JumpDistance

float SpellInfo::JumpDistance

◆ ManaCost

◆ ManaCostPercentage

◆ ManaCostPerlevel

uint32 SpellInfo::ManaCostPerlevel

Referenced by SpellInfo().

◆ ManaPerSecond

◆ ManaPerSecondPerLevel

uint32 SpellInfo::ManaPerSecondPerLevel

◆ MaxAffectedTargets

◆ MaxLevel

◆ MaxTargetLevel

uint32 SpellInfo::MaxTargetLevel

◆ Mechanic

◆ PowerType

◆ PreventionType

◆ ProcChance

◆ ProcCharges

◆ ProcFlags

◆ RangeEntry

◆ Rank

std::array<char const*, 16> SpellInfo::Rank

◆ Reagent

◆ ReagentCount

◆ RecoveryTime

◆ RequiresSpellFocus

◆ RuneCostID

◆ SchoolMask

◆ Speed

◆ SpellFamilyFlags

flag96 SpellInfo::SpellFamilyFlags

Referenced by AuraEffect::CalcPeriodicCritChance(), Player::CanNoReagentCast(), Aura::CanStackWith(), Spell::CheckItems(), spell_dk_dancing_rune_weapon::CheckProc(), spell_dru_eclipse::CheckProc(), spell_gen_black_magic_enchant::CheckProc(), spell_hun_misdirection::CheckProc(), spell_mage_brain_freeze::CheckProc(), spell_mage_gen_extra_effects::CheckProc(), spell_mage_missile_barrage::CheckProc(), spell_mage_clearcasting::CheckProc(), spell_pal_seal_of_light::CheckProc(), spell_pal_item_t6_trinket::CheckProc(), spell_pal_seal_of_vengeance_aura::CheckProc(), spell_pri_vampiric_touch::CheckProc(), spell_pri_vampiric_embrace::CheckProc(), spell_rog_focused_attacks::CheckProc(), spell_rog_cold_blood::CheckProc(), spell_rog_remorseless_attacks::CheckProc(), spell_sha_lightning_overload::CheckProc(), spell_sha_imp_water_shield::CheckProc(), spell_hun_ascpect_of_the_viper::CheckProc(), spell_pri_body_and_soul::CheckProcTriggerSpell(), Spell::EffectEnchantItemTmp(), Spell::EffectHeal(), Spell::EffectSchoolDMG(), Spell::EffectWeaponDmg(), Unit::GetAuraEffect(), GetDiminishingReturnsGroupForSpell(), GetDiminishingReturnsLimitDuration(), spell_rog_deadly_poison::HandleAfterHit(), Unit::HandleAuraRaidProcFromChargeWithValue(), Aura::HandleAuraSpecificMods(), spell_rog_preparation::HandleDummy(), spell_warr_heroic_strike::HandleOnHit(), AuraEffect::HandlePeriodicManaLeechAuraTick(), spell_mage_glyph_of_ice_block::HandleProc(), spell_dk_threat_of_thassarian::HandleProc(), spell_dru_eclipse::HandleProc(), spell_dru_item_t6_trinket::HandleProc(), spell_hun_thrill_of_the_hunt::HandleProc(), spell_pal_infusion_of_light::HandleProc(), spell_pal_illumination::HandleProc(), spell_sha_lightning_overload::HandleProc(), spell_sha_item_t6_trinket::HandleProc(), spell_hun_rapid_recuperation_trigger::HandleRapidFireProc(), spell_hun_rapid_recuperation_trigger::HandleRapidKillingProc(), spell_dk_glyph_of_scourge_strike_script::HandleScriptEffect(), spell_hun_chimera_shot::HandleScriptEffect(), IsAffected(), spell_yogg_saron_diminish_power_aura::IsJudgementDamageSpell(), IsJudgementDamageSpell(), IsRangedWeaponSpell(), LoadAuraState(), SpellMgr::LoadSpellInfoCorrections(), SpellMgr::LoadSpellInfoCustomAttributes(), LoadSpellSpecific(), Unit::MeleeDamageBonusTaken(), WorldObject::ModSpellDuration(), Spell::prepareDataForTriggerSystem(), Spell::PrepareTriggersExecutedOnHit(), spellinfo_commandscript::PrintGeneralInfo(), spell_dru_enrage::RecalculateBaseArmor(), Unit::RemoveAurasByShapeShift(), Unit::RemoveAurasDueToSpellByDispel(), Unit::RemoveAurasWithFamily(), Player::RestoreSpellMods(), Unit::SpellDamageBonusDone(), Unit::SpellHealingBonusTaken(), SpellInfo(), Unit::SpellPctDamageModsDone(), Unit::SpellTakenCritChance(), AuraScriptProcTestFixture::TestSpellFamilyMatch(), and ValidateAttribute6SpellDamageMods().

◆ SpellFamilyName

uint32 SpellInfo::SpellFamilyName

Referenced by Player::AddSpellAndCategoryCooldowns(), AuraEffect::CalcPeriodicCritChance(), Aura::CanStackWith(), Spell::CheckCast(), Spell::CheckItems(), spell_dru_omen_of_clarity::CheckProc(), spell_gen_allow_proc_from_spells_with_cost::CheckProc(), spell_gen_black_magic_enchant::CheckProc(), spell_item_essence_of_life::CheckProc(), spell_mage_gen_extra_effects::CheckProc(), spell_mage_dragon_breath::CheckProc(), spell_mage_clearcasting::CheckProc(), spell_pal_seal_of_vengeance_aura::CheckProc(), spell_pri_vampiric_touch::CheckProc(), spell_rog_focused_attacks::CheckProc(), spell_rog_cold_blood::CheckProc(), spell_rog_remorseless_attacks::CheckProc(), CheckTargetCreatureType(), ComputeIsStackableWithRanks(), Spell::EffectDispel(), Spell::EffectDummy(), Spell::EffectEnchantItemTmp(), Spell::EffectEnergize(), Spell::EffectHeal(), Spell::EffectLeapBack(), Spell::EffectSchoolDMG(), Spell::EffectScriptEffect(), Spell::EffectTeleportUnits(), Spell::EffectTriggerSpell(), Spell::EffectWeaponDmg(), Unit::GetAuraEffect(), Unit::GetAuraEffect(), GetDiminishingReturnsGroupForSpell(), GetDiminishingReturnsLimitDuration(), spell_rog_deadly_poison::HandleAfterHit(), AuraEffect::HandleAuraDummy(), AuraEffect::HandleAuraModShapeshift(), Unit::HandleAuraRaidProcFromChargeWithValue(), Aura::HandleAuraSpecificMods(), spell_hun_readiness::HandleDummy(), spell_mage_cold_snap::HandleDummy(), spell_rog_preparation::HandleDummy(), Spell::HandleLaunchPhase(), spell_warr_heroic_strike::HandleOnHit(), AuraEffect::HandlePeriodicManaLeechAuraTick(), AuraEffect::HandlePeriodicTriggerSpellAuraTick(), spell_mage_glyph_of_ice_block::HandleProc(), spell_mage_master_of_elements::HandleProc(), spell_dk_glyph_of_scourge_strike_script::HandleScriptEffect(), IsAffected(), IsAffectedBySpellMod(), AuraEffect::IsAffectedOnSpell(), spell_yogg_saron_diminish_power_aura::IsJudgementDamageSpell(), IsJudgementDamageSpell(), IsRangedWeaponSpell(), LoadAuraState(), SpellMgr::LoadSpellInfoCorrections(), SpellMgr::LoadSpellInfoCustomAttributes(), LoadSpellSpecific(), Unit::MeleeDamageBonusTaken(), WorldObject::ModSpellDuration(), Acore::AbsorbAuraOrderPred::operator()(), Player::PrepareCharmAISpells(), Spell::prepareDataForTriggerSystem(), Spell::PrepareTriggersExecutedOnHit(), spellinfo_commandscript::PrintGeneralInfo(), spell_dru_enrage::RecalculateBaseArmor(), Unit::RemoveAurasByShapeShift(), Unit::RemoveAurasDueToSpellByDispel(), Unit::RemoveAurasWithFamily(), ArenaSpectator::ShouldSendAura(), Unit::SpellDamageBonusDone(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), WorldObject::SpellHitResult(), WorldObject::SpellHitResult(), SpellInfo(), Unit::SpellPctDamageModsDone(), Unit::SpellPctHealingModsDone(), Unit::SpellTakenCritChance(), AuraScriptProcTestFixture::TestSpellFamilyMatch(), and ValidateAttribute6SpellDamageMods().

◆ SpellIconID

◆ SpellLevel

◆ SpellName

◆ SpellPriority

uint32 SpellInfo::SpellPriority

Referenced by SpellInfo().

◆ SpellVisual

◆ StackAmount

◆ Stances

◆ StancesNot

◆ StartRecoveryCategory

◆ StartRecoveryTime

◆ TargetAuraSpell

uint32 SpellInfo::TargetAuraSpell

Referenced by CheckTarget(), and SpellInfo().

◆ TargetAuraState

uint32 SpellInfo::TargetAuraState

◆ TargetAuraStateNot

uint32 SpellInfo::TargetAuraStateNot

Referenced by CheckTarget(), and SpellInfo().

◆ TargetCreatureType

uint32 SpellInfo::TargetCreatureType

◆ Targets

◆ Totem

std::array<uint32, 2> SpellInfo::Totem

◆ TotemCategory

std::array<uint32, 2> SpellInfo::TotemCategory

The documentation for this class was generated from the following files: