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 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 (Unit const *caster, WorldObject const *target, bool implicit=true) const
 
SpellCastResult CheckExplicitTarget (Unit 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, const AuraEffect *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, Unit *caster=nullptr, Spell *spell=nullptr) const
 
int32 GetDuration () const
 
int32 GetMaxDuration () const
 
uint32 GetMaxTicks () const
 
uint32 CalcCastTime (Unit *caster=nullptr, Spell *spell=nullptr) const
 
uint32 GetRecoveryTime () const
 
int32 CalcPowerCost (Unit 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_REAGENTSReagent
 
std::array< uint32, MAX_SPELL_REAGENTSReagentCount
 
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_EFFECTSEffects
 
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)
787{
788 Id = spellEntry->Id;
789 CategoryEntry = spellEntry->Category ? sSpellCategoryStore.LookupEntry(spellEntry->Category) : nullptr;
790 Dispel = spellEntry->Dispel;
791 Mechanic = spellEntry->Mechanic;
792 Attributes = spellEntry->Attributes;
793 AttributesEx = spellEntry->AttributesEx;
794 AttributesEx2 = spellEntry->AttributesEx2;
795 AttributesEx3 = spellEntry->AttributesEx3;
796 AttributesEx4 = spellEntry->AttributesEx4;
797 AttributesEx5 = spellEntry->AttributesEx5;
798 AttributesEx6 = spellEntry->AttributesEx6;
799 AttributesEx7 = spellEntry->AttributesEx7;
800 AttributesCu = 0;
801 Stances = spellEntry->Stances;
802 StancesNot = spellEntry->StancesNot;
803 Targets = spellEntry->Targets;
804 TargetCreatureType = spellEntry->TargetCreatureType;
805 RequiresSpellFocus = spellEntry->RequiresSpellFocus;
806 FacingCasterFlags = spellEntry->FacingCasterFlags;
807 CasterAuraState = spellEntry->CasterAuraState;
808 TargetAuraState = spellEntry->TargetAuraState;
809 CasterAuraStateNot = spellEntry->CasterAuraStateNot;
810 TargetAuraStateNot = spellEntry->TargetAuraStateNot;
811 CasterAuraSpell = spellEntry->CasterAuraSpell;
812 TargetAuraSpell = spellEntry->TargetAuraSpell;
813 ExcludeCasterAuraSpell = spellEntry->ExcludeCasterAuraSpell;
814 ExcludeTargetAuraSpell = spellEntry->ExcludeTargetAuraSpell;
815 CastTimeEntry = spellEntry->CastingTimeIndex ? sSpellCastTimesStore.LookupEntry(spellEntry->CastingTimeIndex) : nullptr;
816 RecoveryTime = spellEntry->RecoveryTime;
817 CategoryRecoveryTime = spellEntry->CategoryRecoveryTime;
818 StartRecoveryCategory = spellEntry->StartRecoveryCategory;
819 StartRecoveryTime = spellEntry->StartRecoveryTime;
820 InterruptFlags = spellEntry->InterruptFlags;
821 AuraInterruptFlags = spellEntry->AuraInterruptFlags;
822 ChannelInterruptFlags = spellEntry->ChannelInterruptFlags;
823 ProcFlags = spellEntry->ProcFlags;
824 ProcChance = spellEntry->ProcChance;
825 ProcCharges = spellEntry->ProcCharges;
826 MaxLevel = spellEntry->MaxLevel;
827 BaseLevel = spellEntry->BaseLevel;
828 SpellLevel = spellEntry->SpellLevel;
829 DurationEntry = spellEntry->DurationIndex ? sSpellDurationStore.LookupEntry(spellEntry->DurationIndex) : nullptr;
830 PowerType = spellEntry->PowerType;
831 ManaCost = spellEntry->ManaCost;
832 ManaCostPerlevel = spellEntry->ManaCostPerlevel;
833 ManaPerSecond = spellEntry->ManaPerSecond;
834 ManaPerSecondPerLevel = spellEntry->ManaPerSecondPerLevel;
835 ManaCostPercentage = spellEntry->ManaCostPercentage;
836 RuneCostID = spellEntry->RuneCostID;
837 RangeEntry = spellEntry->RangeIndex ? sSpellRangeStore.LookupEntry(spellEntry->RangeIndex) : nullptr;
838 Speed = spellEntry->Speed;
839 StackAmount = spellEntry->StackAmount;
840 Totem = spellEntry->Totem;
841 Reagent = spellEntry->Reagent;
842 ReagentCount = spellEntry->ReagentCount;
843 EquippedItemClass = spellEntry->EquippedItemClass;
844 EquippedItemSubClassMask = spellEntry->EquippedItemSubClassMask;
845 EquippedItemInventoryTypeMask = spellEntry->EquippedItemInventoryTypeMask;
846 TotemCategory = spellEntry->TotemCategory;
847 SpellVisual = spellEntry->SpellVisual;
848 SpellIconID = spellEntry->SpellIconID;
849 ActiveIconID = spellEntry->ActiveIconID;
850 SpellPriority = spellEntry->SpellPriority;
851 SpellName = spellEntry->SpellName;
852 Rank = spellEntry->Rank;
853 MaxTargetLevel = spellEntry->MaxTargetLevel;
854 MaxAffectedTargets = spellEntry->MaxAffectedTargets;
855 SpellFamilyName = spellEntry->SpellFamilyName;
856 SpellFamilyFlags = spellEntry->SpellFamilyFlags;
857 DmgClass = spellEntry->DmgClass;
858 PreventionType = spellEntry->PreventionType;
859 AreaGroupId = spellEntry->AreaGroupId;
860 SchoolMask = spellEntry->SchoolMask;
861 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
862 Effects[i] = SpellEffectInfo(spellEntry, this, i);
863
864 ChainEntry = nullptr;
866
867 // Mine
868 _isStackableWithRanks = false;
869 _isSpellValid = true;
870 _isCritCapable = false;
871 _requireCooldownInfo = false;
872 JumpDistance = 0.0f;
873}
DBCStorage< SpellCategoryEntry > sSpellCategoryStore(SpellCategoryfmt)
DBCStorage< SpellCastTimesEntry > sSpellCastTimesStore(SpellCastTimefmt)
DBCStorage< SpellRangeEntry > sSpellRangeStore(SpellRangefmt)
DBCStorage< SpellDurationEntry > sSpellDurationStore(SpellDurationfmt)
#define MAX_SPELL_EFFECTS
Definition DBCStructure.h:1637
std::uint8_t uint8
Definition Define.h:109
Targets
Definition SharedDefines.h:1415
TotemCategory
Definition SharedDefines.h:3318
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 ( )
876{
878}
void _UnloadImplicitTargetConditionLists()
Definition SpellInfo.cpp:3266

References _UnloadImplicitTargetConditionLists().

Member Function Documentation

◆ _GetEffect()

SpellEffectInfo & SpellInfo::_GetEffect ( SpellEffIndex  index)
inline
582{ 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
581{ return Effects; }

◆ _InitializeExplicitTargetMask()

void SpellInfo::_InitializeExplicitTargetMask ( )
2999{
3000 bool srcSet = false;
3001 bool dstSet = false;
3002 uint32 targetMask = Targets;
3003 // prepare target mask using effect target entries
3004 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3005 {
3006 if (!Effects[i].IsEffect())
3007 continue;
3008 targetMask |= Effects[i].TargetA.GetExplicitTargetMask(srcSet, dstSet);
3009 targetMask |= Effects[i].TargetB.GetExplicitTargetMask(srcSet, dstSet);
3010
3011 // add explicit target flags based on spell effects which have EFFECT_IMPLICIT_TARGET_EXPLICIT and no valid target provided
3012 if (Effects[i].GetImplicitTargetType() != EFFECT_IMPLICIT_TARGET_EXPLICIT)
3013 continue;
3014
3015 // extend explicit target mask only if valid targets for effect could not be provided by target types
3016 uint32 effectTargetMask = Effects[i].GetMissingTargetMask(srcSet, dstSet, targetMask);
3017
3018 // don't add explicit object/dest flags when spell has no max range
3019 if (GetMaxRange(true) == 0.0f && GetMaxRange(false) == 0.0f)
3021 targetMask |= effectTargetMask;
3022 }
3023 ExplicitTargetMask = targetMask;
3024}
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, Unit *caster=nullptr, Spell *spell=nullptr) const
Definition SpellInfo.cpp:2723
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
3027{
3028 // not found a single positive spell with this attribute
3030 return false;
3031
3032 switch (Mechanic)
3033 {
3035 return true;
3036 default:
3037 break;
3038 }
3039
3040 // Special case: effects which determine positivity of whole spell
3041 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3042 {
3043 if (Effects[i].IsAura() && Effects[i].ApplyAuraName == SPELL_AURA_MOD_STEALTH)
3044 return true;
3045 }
3046
3047 switch (Effects[effIndex].Effect)
3048 {
3049 // always positive effects (check before target checks that provided non-positive result in some case for positive effects)
3050 case SPELL_EFFECT_HEAL:
3055 return true;
3057 return false;
3059 return false;
3061 {
3062 bool only = true;
3063 for (int i = EFFECT_0; i <= EFFECT_2; ++i)
3064 {
3065 if (Effects[effIndex].Effect > 0 && Effects[effIndex].Effect != SPELL_EFFECT_SCHOOL_DAMAGE)
3066 only = false;
3067 if (Effects[effIndex].Effect == SPELL_EFFECT_GAMEOBJECT_DAMAGE)
3068 return false;
3069 }
3070 // effects with school damage only cannot be positive...
3071 if (only)
3072 return false;
3073 break;
3074 }
3077 {
3078 for (int i = EFFECT_0; i <= EFFECT_2; ++i)
3079 if (Effects[effIndex].Effect == SPELL_EFFECT_GAMEOBJECT_DAMAGE)
3080 return false;
3081 break;
3082 }
3083 // non-positive aura use
3086 {
3087 switch (Effects[effIndex].ApplyAuraName)
3088 {
3089 case SPELL_AURA_MOD_DAMAGE_DONE: // dependent from bas point sign (negative -> negative)
3096 if (Effects[effIndex].CalcValue() < 0)
3097 return false;
3098 break;
3099 case SPELL_AURA_MOD_DAMAGE_TAKEN: // dependent from bas point sign (positive -> negative)
3100 if (Effects[effIndex].CalcValue() > 0)
3101 return false;
3102 break;
3105 if (Effects[effIndex].CalcValue() > 0)
3106 return true; // some expected positive spells have SPELL_ATTR1_NEGATIVE
3107 break;
3109 return true;
3113 if (!deep)
3114 {
3115 if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(Effects[effIndex].TriggerSpell))
3116 {
3117 // negative targets of main spell return early
3118 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3119 {
3120 if (!spellTriggeredProto->Effects[i].Effect)
3121 continue;
3122 // if non-positive trigger cast targeted to positive target this main cast is non-positive
3123 // this will place this spell auras as debuffs
3124 if (_IsPositiveTarget(spellTriggeredProto->Effects[i].TargetA.GetTarget(), spellTriggeredProto->Effects[i].TargetB.GetTarget()) && !spellTriggeredProto->_IsPositiveEffect(i, true))
3125 return false;
3126 }
3127 }
3128 }
3130 // many positive auras have negative triggered spells at damage for example and this not make it negative (it can be canceled for example)
3131 break;
3132 case SPELL_AURA_MOD_STUN: //have positive and negative spells, we can't sort its correctly at this moment.
3133 if (effIndex == 0 && Effects[1].Effect == 0 && Effects[2].Effect == 0)
3134 return false; // but all single stun aura spells is negative
3135 break;
3137 if (Id == 24740) // Wisp Costume
3138 return true;
3139 return false;
3143 case SPELL_AURA_GHOST:
3148 return false;
3149 case SPELL_AURA_PERIODIC_DAMAGE: // used in positive spells also.
3150 // part of negative spell if casted at self (prevent cancel)
3151 if (Effects[effIndex].TargetA.GetTarget() == TARGET_UNIT_CASTER)
3152 return false;
3153 break;
3154 case SPELL_AURA_MOD_DECREASE_SPEED: // used in positive spells also
3155 // part of positive spell if casted at self
3156 if (Effects[effIndex].TargetA.GetTarget() != TARGET_UNIT_CASTER)
3157 return false;
3158 // but not this if this first effect (didn't find better check)
3159 if (HasAttribute(SPELL_ATTR0_AURA_IS_DEBUFF) && effIndex == 0)
3160 return false;
3161 break;
3163 {
3164 // non-positive immunities
3165 switch (Effects[effIndex].MiscValue)
3166 {
3167 case MECHANIC_BANDAGE:
3168 case MECHANIC_SHIELD:
3169 case MECHANIC_MOUNT:
3171 return false;
3172 default:
3173 break;
3174 }
3175 break;
3176 }
3177 case SPELL_AURA_ADD_FLAT_MODIFIER: // mods
3179 {
3180 // non-positive mods
3181 switch (Effects[effIndex].MiscValue)
3182 {
3183 case SPELLMOD_COST: // dependent from bas point sign (negative -> positive)
3184 if (Effects[effIndex].CalcValue() > 0)
3185 {
3186 if (!deep)
3187 {
3188 bool negative = true;
3189 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3190 {
3191 if (i != effIndex)
3192 if (_IsPositiveEffect(i, true))
3193 {
3194 negative = false;
3195 break;
3196 }
3197 }
3198 if (negative)
3199 return false;
3200 }
3201 }
3202 break;
3203 default:
3204 break;
3205 }
3206 break;
3207 }
3208 default:
3209 break;
3210 }
3211 break;
3212 }
3213 default:
3214 break;
3215 }
3216
3217 // non-positive targets
3218 if (!_IsPositiveTarget(Effects[effIndex].TargetA.GetTarget(), Effects[effIndex].TargetB.GetTarget()))
3219 return false;
3220
3221 // negative spell if triggered spell is negative
3222 if (!deep && !Effects[effIndex].ApplyAuraName && Effects[effIndex].TriggerSpell)
3223 {
3224 if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(Effects[effIndex].TriggerSpell))
3225 if (!spellTriggeredProto->_IsPositiveSpell())
3226 return false;
3227 }
3228
3229 // ok, positive
3230 return true;
3231}
@ 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:1416
@ 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:90
#define sSpellMgr
Definition SpellMgr.h:836
Definition SpellInfo.h:340
static bool _IsPositiveTarget(uint32 targetA, uint32 targetB)
Definition SpellInfo.cpp:3243
bool _IsPositiveEffect(uint8 effIndex, bool deep) const
Definition SpellInfo.cpp:3026
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
3234{
3235 // spells with at least one negative effect are considered negative
3236 // some self-applied spells have negative effects but in self casting case negative check ignored.
3237 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3238 if (!_IsPositiveEffect(i, true))
3239 return false;
3240 return true;
3241}

References _IsPositiveEffect(), and MAX_SPELL_EFFECTS.

Referenced by Spell::HandleThreatSpells().

◆ _IsPositiveTarget()

bool SpellInfo::_IsPositiveTarget ( uint32  targetA,
uint32  targetB 
)
static
3244{
3245 // non-positive targets
3246 switch (targetA)
3247 {
3257 return false;
3258 default:
3259 break;
3260 }
3261 if (targetB)
3262 return _IsPositiveTarget(targetB, 0);
3263 return true;
3264}
@ TARGET_DEST_DYNOBJ_ENEMY
Definition SharedDefines.h:1438
@ TARGET_UNIT_DEST_AREA_ENEMY
Definition SharedDefines.h:1427
@ TARGET_UNIT_CONE_ENEMY_104
Definition SharedDefines.h:1514
@ TARGET_UNIT_SRC_AREA_ENEMY
Definition SharedDefines.h:1426
@ TARGET_DEST_TARGET_ENEMY
Definition SharedDefines.h:1463
@ TARGET_UNIT_TARGET_ENEMY
Definition SharedDefines.h:1421
@ TARGET_UNIT_CONE_ENEMY_54
Definition SharedDefines.h:1464
@ TARGET_UNIT_CONE_ENEMY_24
Definition SharedDefines.h:1434
@ TARGET_UNIT_NEARBY_ENEMY
Definition SharedDefines.h:1417

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 ( )
2230{
2231 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2232 {
2233 SpellEffectInfo& effectInfo = Effects[i];
2234 if (!effectInfo.Effect)
2235 continue;
2236
2237 uint32 schoolImmunityMask = 0;
2238 uint32 applyHarmfulAuraImmunityMask = 0;
2239 uint64 mechanicImmunityMask = 0;
2240 uint32 dispelImmunityMask = 0;
2241 uint32 damageImmunityMask = 0;
2242
2243 int32 miscVal = effectInfo.MiscValue;
2244 int32 amount = effectInfo.CalcValue();
2245
2246 ImmunityInfo& immuneInfo = _immunityInfo[i];
2247
2248 switch (effectInfo.ApplyAuraName)
2249 {
2251 {
2252 switch (miscVal)
2253 {
2254 case 27:
2255 mechanicImmunityMask |= (1ULL << MECHANIC_SILENCE);
2256 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_SILENCE);
2257 break;
2258 case 96:
2259 case 1615:
2260 {
2261 if (amount)
2262 {
2263 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT)
2264 | (1ULL << MECHANIC_FEAR) | (1ULL << MECHANIC_STUN)
2265 | (1ULL << MECHANIC_SLEEP) | (1ULL << MECHANIC_CHARM)
2266 | (1ULL << MECHANIC_SAPPED) | (1ULL << MECHANIC_HORROR)
2267 | (1ULL << MECHANIC_POLYMORPH) | (1ULL << MECHANIC_DISORIENTED)
2268 | (1ULL << MECHANIC_FREEZE) | (1ULL << MECHANIC_TURN);
2269
2270 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2272 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2273 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2274 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2275 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2276 }
2277 break;
2278 }
2279 case 679:
2280 {
2281 if (Id == 57742)
2282 {
2283 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT)
2284 | (1ULL << MECHANIC_FEAR) | (1ULL << MECHANIC_STUN)
2285 | (1ULL << MECHANIC_SLEEP) | (1ULL << MECHANIC_CHARM)
2286 | (1ULL << MECHANIC_SAPPED) | (1ULL << MECHANIC_HORROR)
2287 | (1ULL << MECHANIC_POLYMORPH) | (1ULL << MECHANIC_DISORIENTED)
2288 | (1ULL << MECHANIC_FREEZE) | (1ULL << MECHANIC_TURN);
2289
2290 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2292 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2293 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2294 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2295 }
2296 break;
2297 }
2298 case 1557:
2299 {
2300 if (Id == 64187)
2301 {
2302 mechanicImmunityMask |= (1ULL << MECHANIC_STUN);
2303 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2304 }
2305 else
2306 {
2307 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT)
2308 | (1ULL << MECHANIC_FEAR) | (1ULL << MECHANIC_STUN)
2309 | (1ULL << MECHANIC_SLEEP) | (1ULL << MECHANIC_CHARM)
2310 | (1ULL << MECHANIC_SAPPED) | (1ULL << MECHANIC_HORROR)
2311 | (1ULL << MECHANIC_POLYMORPH) | (1ULL << MECHANIC_DISORIENTED)
2312 | (1ULL << MECHANIC_FREEZE) | (1ULL << MECHANIC_TURN);
2313
2314 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2316 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2317 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2318 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2319 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2320 }
2321 break;
2322 }
2323 case 1614:
2324 case 1694:
2325 {
2326 immuneInfo.SpellEffectImmune.insert(SPELL_EFFECT_ATTACK_ME);
2327 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_TAUNT);
2328 break;
2329 }
2330 case 1630:
2331 {
2332 if (Id == 64112)
2333 {
2334 immuneInfo.SpellEffectImmune.insert(SPELL_EFFECT_ATTACK_ME);
2335 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_TAUNT);
2336 }
2337 else
2338 {
2339 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT)
2340 | (1ULL << MECHANIC_FEAR) | (1ULL << MECHANIC_STUN)
2341 | (1ULL << MECHANIC_SLEEP) | (1ULL << MECHANIC_CHARM)
2342 | (1ULL << MECHANIC_SAPPED) | (1ULL << MECHANIC_HORROR)
2343 | (1ULL << MECHANIC_POLYMORPH) | (1ULL << MECHANIC_DISORIENTED)
2344 | (1ULL << MECHANIC_FREEZE) | (1ULL << MECHANIC_TURN);
2345
2346 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2348 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2349 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2350 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2351 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2352 }
2353 break;
2354 }
2355 case 477:
2356 case 1733:
2357 {
2358 if (!amount)
2359 {
2360 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT)
2361 | (1ULL << MECHANIC_FEAR) | (1ULL << MECHANIC_STUN)
2362 | (1ULL << MECHANIC_SLEEP) | (1ULL << MECHANIC_CHARM)
2363 | (1ULL << MECHANIC_SAPPED) | (1ULL << MECHANIC_HORROR)
2364 | (1ULL << MECHANIC_POLYMORPH) | (1ULL << MECHANIC_DISORIENTED)
2365 | (1ULL << MECHANIC_FREEZE) | (1ULL << MECHANIC_TURN);
2366
2367 immuneInfo.SpellEffectImmune.insert(SPELL_EFFECT_KNOCK_BACK);
2369
2370 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2372 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2373 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2374 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2375 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2376 }
2377 break;
2378 }
2379 case 878:
2380 {
2381 if (Id == 66092)
2382 {
2383 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_STUN)
2384 | (1ULL << MECHANIC_DISORIENTED) | (1ULL << MECHANIC_FREEZE);
2385
2386 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2388 }
2389 break;
2390 }
2391 default:
2392 break;
2393 }
2394
2395 if (immuneInfo.AuraTypeImmune.empty())
2396 {
2397 if (miscVal & (1 << 10))
2398 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_STUN);
2399 if (miscVal & (1 << 1))
2400 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_TRANSFORM);
2401
2402 if (miscVal & (1 << 6))
2404 if (miscVal & (1 << 0))
2405 {
2406 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT);
2407 }
2408 if (miscVal & (1 << 2))
2409 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
2410 if (miscVal & (1 << 9))
2411 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
2412 if (miscVal & (1 << 7))
2413 immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_DISARM);
2414 }
2415 break;
2416 }
2418 {
2419 switch (Id)
2420 {
2421 case 34471: // The Beast Within
2422 case 19574: // Bestial Wrath
2423 case 42292: // PvP trinket
2424 case 46227: // Medallion of Immunity
2425 case 59752: // Every Man for Himself
2426 case 53490: // Bullheaded
2427 case 65547: // PvP Trinket
2428 case 134946: // Supremacy of the Alliance
2429 case 134956: // Supremacy of the Horde
2430 case 195710: // Honorable Medallion
2431 case 208683: // Gladiator's Medallion
2433 break;
2434 case 54508: // Demonic Empowerment
2435 mechanicImmunityMask |= (1ULL << MECHANIC_SNARE) | (1ULL << MECHANIC_ROOT) | (1ULL << MECHANIC_STUN);
2436 break;
2437 default:
2438 if (miscVal < 1)
2439 break;
2440
2441 mechanicImmunityMask |= 1ULL << miscVal;
2442 break;
2443 }
2444 break;
2445 }
2447 {
2448 immuneInfo.SpellEffectImmune.insert(static_cast<SpellEffects>(miscVal));
2449 break;
2450 }
2452 {
2453 immuneInfo.AuraTypeImmune.insert(static_cast<AuraType>(miscVal));
2454 break;
2455 }
2457 {
2458 schoolImmunityMask |= uint32(miscVal);
2459 break;
2460 }
2462 {
2463 applyHarmfulAuraImmunityMask |= uint32(miscVal);
2464 break;
2465 }
2467 {
2468 damageImmunityMask |= uint32(miscVal);
2469 break;
2470 }
2472 {
2473 dispelImmunityMask = uint32(miscVal);
2474 break;
2475 }
2476 default:
2477 break;
2478 }
2479
2480 immuneInfo.SchoolImmuneMask = schoolImmunityMask;
2481 immuneInfo.ApplyHarmfulAuraImmuneMask = applyHarmfulAuraImmunityMask;
2482 immuneInfo.MechanicImmuneMask = mechanicImmunityMask;
2483 immuneInfo.DispelImmuneMask = dispelImmunityMask;
2484 immuneInfo.DamageSchoolMask = damageImmunityMask;
2485 }
2486}
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
AuraType ApplyAuraName
Definition SpellInfo.h:275
uint32 Effect
Definition SpellInfo.h:274
int32 CalcValue(Unit const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr) const
Definition SpellInfo.cpp:409
int32 MiscValue
Definition SpellInfo.h:284
ImmunityInfo _immunityInfo[MAX_SPELL_EFFECTS]
Definition SpellInfo.h:580
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 ( )
3267{
3268 // find the same instances of ConditionList and delete them.
3269 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3270 {
3271 ConditionList* cur = Effects[i].ImplicitTargetConditions;
3272 if (!cur)
3273 continue;
3274 for (uint8 j = i; j < MAX_SPELL_EFFECTS; ++j)
3275 {
3276 if (Effects[j].ImplicitTargetConditions == cur)
3277 Effects[j].ImplicitTargetConditions = nullptr;
3278 }
3279 delete cur;
3280 }
3281}
std::list< Condition * > ConditionList
Definition ConditionMgr.h:239

References Effects, and MAX_SPELL_EFFECTS.

Referenced by ~SpellInfo().

◆ ApplyAllSpellImmunitiesTo()

void SpellInfo::ApplyAllSpellImmunitiesTo ( Unit target,
SpellEffectInfo const *  effect,
bool  apply 
) const
2489{
2490 ImmunityInfo const* immuneInfo = nullptr;
2491 if (effect)
2492 {
2493 uint8 effIndex = effect->EffectIndex;
2494 if (effIndex < MAX_SPELL_EFFECTS)
2495 immuneInfo = &_immunityInfo[effIndex];
2496 }
2497
2498 if (!immuneInfo)
2499 return;
2500
2501 if (uint32 schoolImmunity = immuneInfo->SchoolImmuneMask)
2502 {
2503 target->ApplySpellImmune(Id, IMMUNITY_SCHOOL, schoolImmunity, apply);
2504
2506{
2507 target->RemoveAppliedAuras([this, target, schoolImmunity](AuraApplication const* aurApp) -> bool
2508 {
2509 SpellInfo const* auraSpellInfo = aurApp->GetBase()->GetSpellInfo();
2510 if (auraSpellInfo->Id == Id) // Don't remove self
2511 return false;
2512 if (auraSpellInfo->IsPassive()) // Don't remove passive auras
2513 return false;
2514 if (!(auraSpellInfo->GetSchoolMask() & schoolImmunity)) // Check for school mask
2515 return false;
2516 if (!CanDispelAura(auraSpellInfo))
2517 return false;
2519 {
2520 Unit* existingAuraCaster = aurApp->GetBase()->GetCaster();
2521 if (existingAuraCaster && existingAuraCaster->IsFriendlyTo(target)) // Don't remove friendly auras
2522 return false;
2523 }
2524 return true;
2525 });
2526 }
2527 }
2528
2529 if (uint64 mechanicImmunity = immuneInfo->MechanicImmuneMask)
2530 {
2531 for (uint32 i = 0; i < MAX_MECHANIC; ++i)
2532 if (mechanicImmunity & (1ULL << i))
2533 target->ApplySpellImmune(Id, IMMUNITY_MECHANIC, i, apply);
2534
2536 target->RemoveAurasWithMechanic(mechanicImmunity, AURA_REMOVE_BY_DEFAULT, Id);
2537 }
2538
2539 if (uint32 dispelImmunity = immuneInfo->DispelImmuneMask)
2540 {
2541 target->ApplySpellImmune(Id, IMMUNITY_DISPEL, dispelImmunity, apply);
2542
2544 {
2545 target->RemoveAppliedAuras([dispelImmunity](AuraApplication const* aurApp) -> bool
2546 {
2547 SpellInfo const* spellInfo = aurApp->GetBase()->GetSpellInfo();
2548 if (spellInfo->Dispel == dispelImmunity)
2549 return true;
2550
2551 return false;
2552 });
2553 }
2554 }
2555
2556 if (uint32 damageImmunity = immuneInfo->DamageSchoolMask)
2557 target->ApplySpellImmune(Id, IMMUNITY_DAMAGE, damageImmunity, apply);
2558
2559 for (AuraType auraType : immuneInfo->AuraTypeImmune)
2560 {
2561 target->ApplySpellImmune(Id, IMMUNITY_STATE, auraType, apply);
2563 {
2564 target->RemoveAppliedAuras([this, auraType](AuraApplication const* aurApp) -> bool
2565 {
2566 Aura const* aura = aurApp->GetBase();
2567 if (!aura->GetSpellInfo()->HasAura(auraType))
2568 return false;
2569 return CanDispelAura(aura->GetSpellInfo());
2570 });
2571 }
2572 }
2573
2574 for (SpellEffects effectType : immuneInfo->SpellEffectImmune)
2575 target->ApplySpellImmune(Id, IMMUNITY_EFFECT, effectType, apply);
2576}
@ 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:1401
@ IMMUNITY_EFFECT
Definition SharedDefines.h:1400
@ IMMUNITY_DAMAGE
Definition SharedDefines.h:1403
@ IMMUNITY_MECHANIC
Definition SharedDefines.h:1405
@ IMMUNITY_SCHOOL
Definition SharedDefines.h:1402
@ IMMUNITY_DISPEL
Definition SharedDefines.h:1404
@ AURA_REMOVE_BY_DEFAULT
Definition SpellAuraDefines.h:392
Definition SpellAuras.h:37
Aura * GetBase() const
Definition SpellAuras.h:62
Definition SpellAuras.h:87
Unit * GetCaster() const
Definition SpellAuras.cpp:410
SpellInfo const * GetSpellInfo() const
Definition SpellAuras.h:100
bool CanDispelAura(SpellInfo const *auraSpellInfo) const
Definition SpellInfo.cpp:1371
bool IsPassive() const
Definition SpellInfo.cpp:1130
SpellSchoolMask GetSchoolMask() const
Definition SpellInfo.cpp:1894
bool HasAura(AuraType aura) const
Definition SpellInfo.cpp:902
Definition Unit.h:664
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition Unit.cpp:10437
void RemoveAppliedAuras(std::function< bool(AuraApplication const *)> const &check)
Definition Unit.cpp:5118
void RemoveAurasWithMechanic(uint64 mechanic_mask, AuraRemoveMode removemode=AURA_REMOVE_BY_DEFAULT, uint32 except=0)
Definition Unit.cpp:5508
bool IsFriendlyTo(Unit const *unit) const
Definition Unit.cpp:7241
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 ( Unit caster = nullptr,
Spell spell = nullptr 
) const
2753{
2754 // not all spells have cast time index and this is all is pasiive abilities
2755 if (!CastTimeEntry)
2756 return 0;
2757
2758 int32 castTime = CastTimeEntry->CastTime;
2760 castTime += 500;
2761
2762 if (caster)
2763 caster->ModSpellCastTime(this, castTime, spell);
2764
2765 return (castTime > 0) ? uint32(castTime) : 0;
2766}
@ SPELL_ATTR0_USES_RANGED_SLOT
Definition SharedDefines.h:371
bool IsAutoRepeatRangedSpell() const
Definition SpellInfo.cpp:1315
void ModSpellCastTime(SpellInfo const *spellProto, int32 &castTime, Spell *spell=nullptr)
Definition Unit.cpp:11680
int32 CastTime
Definition DBCStructure.h:1760

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

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

◆ CalcPowerCost()

int32 SpellInfo::CalcPowerCost ( Unit const *  caster,
SpellSchoolMask  schoolMask,
Spell spell = nullptr 
) const
2804{
2805 // Spell drain all exist power on cast (Only paladin lay of Hands)
2807 {
2808 // If power type - health drain all
2809 if (PowerType == POWER_HEALTH)
2810 return caster->GetHealth();
2811 // Else drain all power
2812 if (PowerType < MAX_POWERS)
2813 return caster->GetPower(Powers(PowerType));
2814 LOG_ERROR("spells", "SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {}", PowerType, Id);
2815 return 0;
2816 }
2817
2818 // Base powerCost
2819 int32 powerCost = ManaCost;
2820 // PCT cost from total amount
2822 {
2823 switch (PowerType)
2824 {
2825 // health as power used
2826 case POWER_HEALTH:
2827 powerCost += int32(CalculatePct(caster->GetCreateHealth(), ManaCostPercentage));
2828 break;
2829 case POWER_MANA:
2830 powerCost += int32(CalculatePct(caster->GetCreateMana(), ManaCostPercentage));
2831 break;
2832 case POWER_RAGE:
2833 case POWER_FOCUS:
2834 case POWER_ENERGY:
2835 case POWER_HAPPINESS:
2836 powerCost += int32(CalculatePct(caster->GetMaxPower(Powers(PowerType)), ManaCostPercentage));
2837 break;
2838 case POWER_RUNE:
2839 case POWER_RUNIC_POWER:
2840 LOG_DEBUG("spells.aura", "CalculateManaCost: Not implemented yet!");
2841 break;
2842 default:
2843 LOG_ERROR("spells", "CalculateManaCost: Unknown power type '{}' in spell {}", PowerType, Id);
2844 return 0;
2845 }
2846 }
2847 SpellSchools school = GetFirstSchoolInMask(schoolMask);
2848 // Flat mod from caster auras by spell school
2849 powerCost += caster->GetInt32Value(static_cast<uint16>(UNIT_FIELD_POWER_COST_MODIFIER) + school);
2850
2851 // Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost)
2853 {
2854 uint32 speed = 0;
2855 if (SpellShapeshiftFormEntry const* ss = sSpellShapeshiftFormStore.LookupEntry(caster->GetShapeshiftForm()))
2856 speed = ss->attackSpeed;
2857 else
2858 {
2861 slot = OFF_ATTACK;
2862
2863 speed = caster->GetAttackTime(slot);
2864 }
2865
2866 powerCost += speed / 100;
2867 }
2868
2869 // Apply cost mod by spell
2870 if (Player* modOwner = caster->GetSpellModOwner())
2871 modOwner->ApplySpellMod(Id, SPELLMOD_COST, powerCost, spell);
2872
2873 if (!caster->IsControlledByPlayer())
2874 {
2876 {
2877 GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(SpellLevel - 1);
2878 GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(caster->GetLevel() - 1);
2879 if (spellScaler && casterScaler)
2880 powerCost *= casterScaler->ratio / spellScaler->ratio;
2881 }
2882 }
2883
2884 // PCT mod from user auras by school
2885 powerCost = int32(powerCost * (1.0f + caster->GetFloatValue(static_cast<uint16>(UNIT_FIELD_POWER_COST_MULTIPLIER) + school)));
2886 if (powerCost < 0)
2887 powerCost = 0;
2888 return powerCost;
2889}
DBCStorage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore(SpellShapeshiftFormEntryfmt)
DBCStorage< GtNPCManaCostScalerEntry > sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt)
std::uint16_t uint16
Definition Define.h:108
#define LOG_ERROR(filterType__,...)
Definition Log.h:158
#define LOG_DEBUG(filterType__,...)
Definition Log.h:170
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:214
@ OFF_ATTACK
Definition Unit.h:216
@ BASE_ATTACK
Definition Unit.h:215
@ 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
Definition Player.h:1084
Player * GetSpellModOwner() const
Definition Unit.cpp:12925
Definition DBCStructure.h:1070
float ratio
Definition DBCStructure.h:1071
Definition DBCStructure.h:1817

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, 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(), Spell::prepare(), and SmartScript::ProcessAction().

◆ CanBeUsedInCombat()

bool SpellInfo::CanBeUsedInCombat ( ) const
1265{
1267}
@ 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
1372{
1373 // Xinef: Passive auras cannot be dispelled
1374 if (auraSpellInfo->IsPassive())
1375 return false;
1376
1377 // These auras (like Divine Shield) can't be dispelled
1378 if (auraSpellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
1379 return false;
1380
1381 return true;
1382}
@ SPELL_ATTR0_NO_IMMUNITIES
Definition SharedDefines.h:399

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

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

◆ CanPierceImmuneAura()

bool SpellInfo::CanPierceImmuneAura ( SpellInfo const *  auraSpellInfo) const
1363{
1364 // Dispels other auras on immunity, check if this spell makes the unit immune to aura
1366 return true;
1367
1368 return false;
1369}
bool CanSpellProvideImmunityAgainstAura(SpellInfo const *auraSpellInfo) const
Definition SpellInfo.cpp:2578

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

Referenced by Unit::IsImmunedToDamage(), Unit::IsImmunedToSchool(), Unit::IsImmunedToSchool(), and Unit::IsImmunedToSpell().

◆ CanSpellCastOverrideAuraEffect()

bool SpellInfo::CanSpellCastOverrideAuraEffect ( AuraEffect const *  aurEff) const
2663{
2665 return false;
2666
2667 if (aurEff->GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
2668 return false;
2669
2670 SpellEffectInfo const* aurEffInfo = &aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()];
2671
2672 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2673 {
2674 SpellEffectInfo const& effectInfo = Effects[i];
2675 if (!effectInfo.Effect)
2676 continue;
2677
2678 if (effectInfo.Effect != SPELL_EFFECT_APPLY_AURA)
2679 continue;
2680
2681 uint32 const miscValue = static_cast<uint32>(effectInfo.MiscValue);
2682 switch (effectInfo.ApplyAuraName)
2683 {
2685 if (miscValue != aurEffInfo->ApplyAuraName)
2686 continue;
2687 break;
2690 if (aurEff->GetSpellInfo()->HasAttribute(SPELL_ATTR2_NO_SCHOOL_IMMUNITIES) || !(aurEff->GetSpellInfo()->SchoolMask & miscValue))
2691 continue;
2692 break;
2694 if (miscValue != aurEff->GetSpellInfo()->Dispel)
2695 continue;
2696 break;
2698 if (miscValue != aurEff->GetSpellInfo()->Mechanic)
2699 {
2700 if (miscValue != aurEffInfo->Mechanic)
2701 continue;
2702 }
2703 break;
2704 default:
2705 continue;
2706 }
2707
2708 return true;
2709 }
2710
2711 return false;
2712}
@ 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
2579{
2580 if (!auraSpellInfo)
2581 return false;
2582
2583 for (SpellEffectInfo const& effectInfo : Effects)
2584 {
2585 if (!effectInfo.Effect)
2586 continue;
2587
2588 ImmunityInfo const* immuneInfo = effectInfo.GetImmunityInfo();
2589 if (!immuneInfo)
2590 continue;
2591
2592 if (!auraSpellInfo->HasAttribute(SPELL_ATTR2_NO_SCHOOL_IMMUNITIES))
2593 {
2594 if (uint32 schoolImmunity = immuneInfo->SchoolImmuneMask)
2595 if ((auraSpellInfo->SchoolMask & schoolImmunity) != 0)
2596 return true;
2597 }
2598
2599 if (uint64 mechanicImmunity = immuneInfo->MechanicImmuneMask)
2600 if ((mechanicImmunity & (1ULL << auraSpellInfo->Mechanic)) != 0)
2601 return true;
2602
2603 if (uint32 dispelImmunity = immuneInfo->DispelImmuneMask)
2604 if (auraSpellInfo->Dispel == dispelImmunity)
2605 return true;
2606
2607 bool immuneToAllEffects = true;
2608 for (SpellEffectInfo const& auraSpellEffectInfo : auraSpellInfo->Effects)
2609 {
2610 if (!auraSpellEffectInfo.Effect)
2611 continue;
2612
2613 uint32 effectName = auraSpellEffectInfo.Effect;
2614 if (!effectName)
2615 continue;
2616
2617 if (immuneInfo->SpellEffectImmune.find(static_cast<SpellEffects>(effectName)) == immuneInfo->SpellEffectImmune.cend())
2618 {
2619 immuneToAllEffects = false;
2620 break;
2621 }
2622
2623 if (uint32 mechanic = auraSpellEffectInfo.Mechanic)
2624 {
2625 if (!(immuneInfo->MechanicImmuneMask & (1ULL << mechanic)))
2626 {
2627 immuneToAllEffects = false;
2628 break;
2629 }
2630 }
2631
2632 if (uint32 auraName = auraSpellEffectInfo.ApplyAuraName)
2633 {
2634 bool isImmuneToAuraEffectApply = false;
2635 if (immuneInfo->AuraTypeImmune.find(static_cast<AuraType>(auraName)) != immuneInfo->AuraTypeImmune.cend())
2636 isImmuneToAuraEffectApply = true;
2637
2638 if (!isImmuneToAuraEffectApply && !auraSpellInfo->IsPositiveEffect(auraSpellEffectInfo.EffectIndex) &&
2639 !auraSpellInfo->HasAttribute(SPELL_ATTR2_NO_SCHOOL_IMMUNITIES))
2640 {
2641 if (uint32 applyHarmfulAuraImmuneMask = immuneInfo->ApplyHarmfulAuraImmuneMask)
2642 if ((auraSpellInfo->SchoolMask & applyHarmfulAuraImmuneMask) != 0)
2643 isImmuneToAuraEffectApply = true;
2644 }
2645
2646 if (!isImmuneToAuraEffectApply)
2647 {
2648 immuneToAllEffects = false;
2649 break;
2650 }
2651 }
2652 }
2653
2654 if (immuneToAllEffects)
2655 return true;
2656 }
2657
2658 return false;
2659}

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 ( Unit const *  caster,
WorldObject const *  target,
Item const *  itemTarget = nullptr 
) const
1845{
1846 uint32 neededTargets = GetExplicitTargetMask();
1847 if (!target)
1848 {
1850 if (!(neededTargets & TARGET_FLAG_GAMEOBJECT_ITEM) || !itemTarget)
1852 return SPELL_CAST_OK;
1853 }
1854
1855 if (Unit const* unitTarget = target->ToUnit())
1856 {
1858 {
1859 if (neededTargets & TARGET_FLAG_UNIT_ENEMY)
1860 if (caster->_IsValidAttackTarget(unitTarget, this))
1861 return SPELL_CAST_OK;
1862 if (neededTargets & TARGET_FLAG_UNIT_ALLY
1863 || (neededTargets & TARGET_FLAG_UNIT_PARTY && caster->IsInPartyWith(unitTarget))
1864 || (neededTargets & TARGET_FLAG_UNIT_RAID && caster->IsInRaidWith(unitTarget)))
1865 if (caster->_IsValidAssistTarget(unitTarget, this))
1866 return SPELL_CAST_OK;
1867 if (neededTargets & TARGET_FLAG_UNIT_MINIPET)
1868 if (unitTarget->GetGUID() == caster->GetCritterGUID())
1869 return SPELL_CAST_OK;
1870 if (neededTargets & TARGET_FLAG_UNIT_PASSENGER)
1871 if (unitTarget->IsOnVehicle(caster))
1872 return SPELL_CAST_OK;
1874 }
1875 }
1876 return SPELL_CAST_OK;
1877}
@ 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
Unit * ToUnit()
Definition Object.h:210
uint32 GetExplicitTargetMask() const
Definition SpellInfo.cpp:1962

References Unit::_IsValidAssistTarget(), Unit::_IsValidAttackTarget(), Unit::GetCritterGUID(), GetExplicitTargetMask(), Unit::IsInPartyWith(), Unit::IsInRaidWith(), 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
1500{
1501 // normal case
1502 if (AreaGroupId > 0)
1503 {
1504 bool found = false;
1505 AreaGroupEntry const* groupEntry = sAreaGroupStore.LookupEntry(AreaGroupId);
1506 while (groupEntry)
1507 {
1508 for (uint8 i = 0; i < MAX_GROUP_AREA_IDS; ++i)
1509 if (groupEntry->AreaId[i] == zone_id || groupEntry->AreaId[i] == area_id)
1510 found = true;
1511 if (found || !groupEntry->nextGroup)
1512 break;
1513 // Try search in next group
1514 groupEntry = sAreaGroupStore.LookupEntry(groupEntry->nextGroup);
1515 }
1516
1517 if (!found)
1519 }
1520
1521 // continent limitation (virtual continent)
1522 if (HasAttribute(SPELL_ATTR4_ONLY_FLYING_AREAS) && (area_id || zone_id))
1523 {
1524 AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(area_id);
1525 if (!areaEntry)
1526 {
1527 areaEntry = sAreaTableStore.LookupEntry(zone_id);
1528 }
1529
1530 if (!areaEntry || !areaEntry->IsFlyable() || (strict && (areaEntry->flags & AREA_FLAG_NO_FLY_ZONE) != 0) || !player->canFlyInZone(map_id, zone_id, this))
1531 {
1533 }
1534 }
1535
1536 // raid instance limitation
1538 {
1539 MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
1540 if (!mapEntry || mapEntry->IsRaid())
1542 }
1543
1544 // DB base check (if non empty then must fit at least single for allow)
1545 SpellAreaMapBounds saBounds = sSpellMgr->GetSpellAreaMapBounds(Id);
1546 if (saBounds.first != saBounds.second)
1547 {
1548 for (SpellAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
1549 {
1550 if (itr->second.IsFitToRequirements(player, zone_id, area_id))
1551 return SPELL_CAST_OK;
1552 }
1554 }
1555
1556 // bg spell checks
1557 switch (Id)
1558 {
1559 case 23333: // Warsong Flag
1560 case 23335: // Silverwing Flag
1562 case 34976: // Netherstorm Flag
1564 case 2584: // Waiting to Resurrect
1565 case 22011: // Spirit Heal Channel
1566 case 22012: // Spirit Heal
1567 case 42792: // Recently Dropped Flag
1568 case 43681: // Inactive
1569 case 44535: // Spirit Heal (mana)
1570 {
1571 MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
1572 if (!mapEntry)
1574
1575 return zone_id == AREA_WINTERGRASP || (mapEntry->IsBattleground() && player && player->InBattleground()) ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
1576 }
1577 case 32724: // Gold Team (Alliance)
1578 case 32725: // Green Team (Alliance)
1579 case 35774: // Gold Team (Horde)
1580 case 35775: // Green Team (Horde)
1581 {
1582 MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
1583 if (!mapEntry)
1585
1586 return mapEntry->IsBattleArena() && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
1587 }
1588 }
1589
1590 return SPELL_CAST_OK;
1591}
@ MAP_EYE_OF_THE_STORM
Definition AreaDefines.h:241
@ MAP_WARSONG_GULCH
Definition AreaDefines.h:214
@ 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:537
bool InBattleground() const
Definition Player.h:2287
bool canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const *bySpell)
Definition Player.cpp:13663
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:1325
bool IsBattleground() const
Definition DBCStructure.h:1355
bool IsRaid() const
Definition DBCStructure.h:1354
bool IsBattleArena() const
Definition DBCStructure.h:1356
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
1445{
1446 // talents that learn spells can have stance requirements that need ignore
1447 // (this requirement only for client-side stance show in talent description)
1448 if (GetTalentSpellCost(Id) > 0 &&
1450 return SPELL_CAST_OK;
1451
1452 uint32 stanceMask = (form ? 1 << (form - 1) : 0);
1453
1454 if (stanceMask & StancesNot) // can explicitly not be casted in this stance
1456
1457 if (stanceMask & Stances) // can explicitly be casted in this stance
1458 return SPELL_CAST_OK;
1459
1460 bool actAsShifted = false;
1461 SpellShapeshiftFormEntry const* shapeInfo = nullptr;
1462 if (form > 0)
1463 {
1464 shapeInfo = sSpellShapeshiftFormStore.LookupEntry(form);
1465 if (!shapeInfo)
1466 {
1467 LOG_ERROR("spells", "GetErrorAtShapeshiftedCast: unknown shapeshift {}", form);
1468 return SPELL_CAST_OK;
1469 }
1470 actAsShifted = !(shapeInfo->flags1 & SHAPESHIFT_FLAG_STANCE); // shapeshift acts as normal form for spells
1471 }
1472
1473 if (actAsShifted)
1474 {
1475 if (HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFTED)) // not while shapeshifted
1477 else if (Stances != 0) // needs other shapeshift
1479 }
1480 else
1481 {
1482 // needs shapeshift
1485 }
1486
1487 // Check if stance disables cast of not-stance spells
1488 // Example: cannot cast any other spells in zombie or ghoul form
1490 if (shapeInfo && (shapeInfo->flags1 & SHAPESHIFT_FLAG_CAN_ONLY_CAST_SHAPESHIFT_SPELLS))
1491 {
1492 if (!(stanceMask & Stances))
1494 }
1495
1496 return SPELL_CAST_OK;
1497}
uint32 GetTalentSpellCost(uint32 spellId)
Definition DBCStores.cpp:686
@ 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:1822

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(), and Spell::CheckCast().

◆ CheckTarget()

SpellCastResult SpellInfo::CheckTarget ( Unit const *  caster,
WorldObject const *  target,
bool  implicit = true 
) const
1654{
1655 if (AttributesEx & SPELL_ATTR1_EXCLUDE_CASTER && caster == target)
1657
1658 // check visibility - ignore stealth for implicit (area) targets
1659 if (!(AttributesEx6 & SPELL_ATTR6_IGNORE_PHASE_SHIFT) && !caster->CanSeeOrDetect(target, implicit))
1661
1662 Unit const* unitTarget = target->ToUnit();
1663
1664 // creature/player specific target checks
1665 if (unitTarget)
1666 {
1667 // xinef: spells cannot be cast if player is in fake combat also
1668 if (AttributesEx & SPELL_ATTR1_ONLY_PEACEFUL_TARGETS && (unitTarget->IsInCombat() || unitTarget->IsPetInCombat()))
1670
1672 if (auto creature = unitTarget->ToCreature())
1673 if (CreatureImmunities const* immunities = sSpellMgr->GetCreatureImmunities(creature->GetCreatureTemplate()->CreatureImmunitiesId))
1674 if (immunities->ImmuneAoE)
1676
1677 // only spells with SPELL_ATTR3_ONLY_ON_GHOSTS can target ghosts
1679 {
1680 if (!unitTarget->HasGhostAura())
1684 }
1685
1686 if (caster != unitTarget)
1687 {
1688 if (caster->IsPlayer())
1689 {
1690 // Do not allow these spells to target creatures not tapped by us (Banish, Polymorph, many quest spells)
1692 if (Creature const* targetCreature = unitTarget->ToCreature())
1693 if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->ToPlayer()))
1695
1697 {
1698 Creature const* targetCreature = unitTarget->ToCreature();
1699 if (!targetCreature)
1701
1704 }
1705
1706 // Not allow disarm unarmed player
1708 {
1709 bool valid = false;
1710 for (uint8 i = BASE_ATTACK; i < MAX_ATTACK; ++i)
1711 {
1712 AuraType disarmAuraType = SPELL_AURA_MOD_DISARM;
1713 switch (i)
1714 {
1715 case OFF_ATTACK:
1716 disarmAuraType = SPELL_AURA_MOD_DISARM_OFFHAND;
1717 break;
1718 case RANGED_ATTACK:
1719 disarmAuraType = SPELL_AURA_MOD_DISARM_RANGED;
1720 break;
1721 }
1722
1723 if (HasAura(disarmAuraType))
1724 {
1725 if (Player const* player = unitTarget->ToPlayer())
1726 {
1727 if (player->GetWeaponForAttack(WeaponAttackType(i), true))
1728 {
1729 valid = true;
1730 break;
1731 }
1732 }
1733 else if (unitTarget->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + i))
1734 {
1735 valid = true;
1736 break;
1737 }
1738 }
1739 }
1740
1741 if (!valid)
1742 {
1744 }
1745 }
1746 }
1747 }
1748 }
1749 // corpse specific target checks
1750 else if (Corpse const* corpseTarget = target->ToCorpse())
1751 {
1752 // cannot target bare bones
1753 if (corpseTarget->GetType() == CORPSE_BONES)
1755 // we have to use owner for some checks (aura preventing resurrection for example)
1756 if (Player* owner = ObjectAccessor::FindPlayer(corpseTarget->GetOwnerGUID()))
1757 unitTarget = owner;
1758 // we're not interested in corpses without owner
1759 else
1761 }
1762 // other types of objects - always valid
1763 else return SPELL_CAST_OK;
1764
1765 // corpseOwner and unit specific target checks
1766 if (unitTarget->IsPlayer())
1767 {
1770 }
1771 else
1772 {
1775
1778 }
1779
1780 if (!IsAllowingDeadTarget() && !unitTarget->IsAlive())
1782
1783 // check this flag only for implicit targets (chain and area), allow to explicitly target units for spells like Shield of Righteousness
1786
1787 // checked in Unit::IsValidAttack/AssistTarget, shouldn't be checked for ENTRY targets
1788 //if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_UNTARGETABLE) && target->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
1789 // return SPELL_FAILED_BAD_TARGETS;
1790
1791 //if (!(AttributesEx6 & SPELL_ATTR6_NO_AURA_LOG)
1792
1793 if (!CheckTargetCreatureType(unitTarget))
1794 {
1795 if (target->IsPlayer())
1797 else
1799 }
1800
1801 // check GM mode and GM invisibility - only for player casts (npc casts are controlled by AI) and negative spells
1802 if (unitTarget != caster && (caster->IsControlledByPlayer() || !IsPositive()) && unitTarget->IsPlayer())
1803 {
1804 if (!unitTarget->ToPlayer()->IsVisible())
1806
1807 if (unitTarget->ToPlayer()->IsGameMaster())
1809 }
1810
1811 // not allow casting on flying player
1814
1815 /* TARGET_UNIT_MASTER gets blocked here for passengers, because the whole idea of this check is to
1816 not allow passengers to be implicitly hit by spells, however this target type should be an exception,
1817 if this is left it kills spells that award kill credit from vehicle to master (few spells),
1818 the use of these 2 covers passenger target check, logically, if vehicle cast this to master it should always hit
1819 him, because it would be it's passenger, there's no such case where this gets to fail legitimacy, this problem
1820 cannot be solved from within the check in other way since target type cannot be called for the spell currently
1821 Spell examples: [ID - 52864 Devour Water, ID - 52862 Devour Wind, ID - 49370 Wyrmrest Defender: Destabilize Azure Dragonshrine Effect] */
1822 if (!caster->IsVehicle() && caster->GetCharmerOrOwner() != target)
1823 {
1824 if (TargetAuraState && !unitTarget->HasAuraState(AuraStateType(TargetAuraState), this, caster))
1826
1827 if (TargetAuraStateNot && unitTarget->HasAuraState(AuraStateType(TargetAuraStateNot), this, caster))
1829 }
1830
1831 if (TargetAuraSpell && !unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(TargetAuraSpell, caster)))
1833
1834 if (ExcludeTargetAuraSpell && unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(ExcludeTargetAuraSpell, caster)))
1836
1840
1841 return SPELL_CAST_OK;
1842}
@ 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_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_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:218
@ RANGED_ATTACK
Definition Unit.h:217
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition UpdateFields.h:116
Definition Corpse.h:49
Definition Creature.h:47
CreatureTemplate const * GetCreatureTemplate() const
Definition Creature.h:206
bool HaveLootFor(uint32 loot_id) const
Definition LootMgr.h:224
Corpse * ToCorpse()
Definition Object.h:218
bool IsPlayer() const
Definition Object.h:201
uint32 GetUInt32Value(uint16 index) const
Definition Object.cpp:294
Player * ToPlayer()
Definition Object.h:202
Creature * ToCreature()
Definition Object.h:206
bool IsGameMaster() const
Definition Player.h:1174
bool IsRequiringDeadTarget() const
Definition SpellInfo.cpp:1254
bool IsDeathPersistent() const
Definition SpellInfo.cpp:1249
bool CheckTargetCreatureType(Unit const *target) const
Definition SpellInfo.cpp:1879
bool IsAllowingDeadTarget() const
Definition SpellInfo.cpp:1259
bool HasEffect(SpellEffects effect) const
Definition SpellInfo.cpp:885
bool IsPositive() const
Definition SpellInfo.cpp:1269
bool IsAlive() const
Definition Unit.h:1793
bool HasGhostAura() const
Definition Unit.h:1798
bool IsPetInCombat() const
Definition Unit.h:938
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5982
bool HasPreventResurectionAura() const
Definition Unit.h:1807
bool IsInFlight() const
Definition Unit.h:1705
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
Definition Unit.cpp:7629
bool IsVisible() const
Definition Unit.h:2013
bool HasUnitState(const uint32 f) const
Definition Unit.h:736
bool IsControlledByPlayer() const
Definition Unit.h:1307
bool IsInCombat() const
Definition Unit.h:935
Player * FindPlayer(ObjectGuid const guid)
Definition ObjectAccessor.cpp:245
Definition SpellMgr.h:564
uint32 pickpocketLootId
Definition CreatureData.h:221

References AttributesEx, AttributesEx2, AttributesEx6, BASE_ATTACK, WorldObject::CanSeeOrDetect(), CheckTargetCreatureType(), CORPSE_BONES, ExcludeTargetAuraSpell, ObjectAccessor::FindPlayer(), 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(), IsDeathPersistent(), Player::IsGameMaster(), Unit::IsInCombat(), Unit::IsInFlight(), Unit::IsPetInCombat(), Object::IsPlayer(), IsPositive(), IsRequiringDeadTarget(), 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_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_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
1880{
1881 // Curse of Doom & Exorcism: not find another way to fix spell target check :/
1883 {
1884 // not allow cast at player
1885 if (target->IsPlayer())
1886 return false;
1887 else
1888 return true;
1889 }
1890 uint32 creatureType = target->GetCreatureTypeMask();
1891 return !TargetCreatureType || !creatureType || (creatureType & TargetCreatureType);
1892}
@ SPELLFAMILY_WARLOCK
Definition SharedDefines.h:3791
uint32 GetCategory() const
Definition SpellInfo.cpp:880

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

Referenced by CheckTarget().

◆ ComputeIsCritCapable()

bool SpellInfo::ComputeIsCritCapable ( ) const
1188{
1189 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1190 {
1191 switch (Effects[i].Effect)
1192 {
1195 case SPELL_EFFECT_HEAL:
1203 return true;
1204 }
1205 }
1206 return false;
1207}
@ 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
1145{
1146 if (IsPassive())
1147 return false;
1149 return false;
1151 return false;
1152
1154 return false;
1155
1156 // All stance spells. if any better way, change it.
1157 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1158 {
1159 switch (SpellFamilyName)
1160 {
1162 // Paladin aura Spell
1164 return false;
1165 break;
1166 case SPELLFAMILY_DRUID:
1167 // Druid form Spell
1168 if (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA &&
1169 Effects[i].ApplyAuraName == SPELL_AURA_MOD_SHAPESHIFT)
1170 return false;
1171 break;
1172 }
1173 }
1174 return true;
1175}
@ SPELL_EFFECT_APPLY_AREA_AURA_RAID
Definition SharedDefines.h:831
@ SPELLFAMILY_PALADIN
Definition SharedDefines.h:3796
@ SPELLFAMILY_DRUID
Definition SharedDefines.h:3793
@ SPELL_AURA_MOD_SHAPESHIFT
Definition SpellAuraDefines.h:99
bool IsProfessionOrRiding() const
Definition SpellInfo.cpp:970
bool IsAbilityLearnedWithProfession() const
Definition SpellInfo.cpp:1020

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
2929{
2930 // ignore passive spells
2931 //if (IsPassive())
2932 // return this;
2933
2934 // Client ignores spell with these attributes (sub_53D9D0)
2936 return this;
2937
2938 bool needRankSelection = false;
2939 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2940 {
2941 if (IsPositiveEffect(i) &&
2942 (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA ||
2945 {
2946 needRankSelection = true;
2947 break;
2948 }
2949 }
2950
2951 // not required
2952 if (!needRankSelection)
2953 return this;
2954
2955 SpellInfo const* nextSpellInfo = nullptr;
2956
2957 sScriptMgr->OnBeforeAuraRankForLevel(this, nextSpellInfo, level);
2958
2959 if (nextSpellInfo != nullptr)
2960 return nextSpellInfo;
2961
2962 for (nextSpellInfo = this; nextSpellInfo != nullptr; nextSpellInfo = nextSpellInfo->GetPrevRankSpell())
2963 {
2964 // if found appropriate level
2965 if (uint32(level + 10) >= nextSpellInfo->SpellLevel)
2966 return nextSpellInfo;
2967
2968 // one rank less then
2969 }
2970
2971 // not found
2972 return nullptr;
2973}
#define sScriptMgr
Definition ScriptMgr.h:734
@ 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:2921
bool IsPositiveEffect(uint8 effIndex) const
Definition SpellInfo.cpp:1274

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
1968{
1969 return _auraState;
1970}
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
1949{
1951}
DispelType
Definition SharedDefines.h:1376
uint32 GetDispelMask() const
Definition SpellInfo.cpp:1948

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
1954{
1955 // If dispel all
1956 if (type == DISPEL_ALL)
1957 return DISPEL_ALL_MASK;
1958 else
1959 return uint32(1 << type);
1960}
#define DISPEL_ALL_MASK
Definition SharedDefines.h:1392
@ DISPEL_ALL
Definition SharedDefines.h:1384

References DISPEL_ALL, and DISPEL_ALL_MASK.

◆ GetDuration()

◆ GetEffect()

◆ GetEffectMechanic()

Mechanics SpellInfo::GetEffectMechanic ( uint8  effIndex) const
1932{
1933 if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
1934 return Mechanics(Effects[effIndex].Mechanic);
1935 if (Mechanic)
1936 return Mechanics(Mechanic);
1937 return MECHANIC_NONE;
1938}
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
1911{
1912 uint64 mask = 0;
1913 if (Mechanic)
1914 mask |= UI64LIT(1) << Mechanic;
1915 if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
1916 mask |= UI64LIT(1) << Effects[effIndex].Mechanic;
1917 return mask;
1918}

References Effects, Mechanic, and UI64LIT.

Referenced by Unit::IsDamageReducedByArmor().

◆ GetEffects()

◆ GetExplicitTargetMask()

◆ GetFirstRankSpell()

◆ GetImmunityInfo()

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

References MAX_SPELL_EFFECTS.

Referenced by SpellEffectInfo::GetImmunityInfo().

◆ GetLastRankSpell()

SpellInfo const * SpellInfo::GetLastRankSpell ( ) const
2910{
2911 if (!ChainEntry)
2912 return nullptr;
2913 return ChainEntry->last;
2914}
SpellInfo const * last
Definition SpellMgr.h:548

References ChainEntry, and SpellChainNode::last.

◆ GetMaxDuration()

◆ GetMaxRange()

◆ GetMaxTicks()

uint32 SpellInfo::GetMaxTicks ( ) const
2769{
2770 int32 DotDuration = GetDuration();
2771 if (DotDuration == 0)
2772 return 1;
2773
2774 // 200% limit
2775 if (DotDuration > 30000)
2776 DotDuration = 30000;
2777
2778 for (uint8 x = 0; x < MAX_SPELL_EFFECTS; x++)
2779 {
2780 if (Effects[x].Effect == SPELL_EFFECT_APPLY_AURA)
2781 switch (Effects[x].ApplyAuraName)
2782 {
2787 if (Effects[x].Amplitude != 0)
2788 return DotDuration / Effects[x].Amplitude;
2789 break;
2790 default:
2791 break;
2792 }
2793 }
2794
2795 return 6;
2796}
@ SPELL_AURA_PERIODIC_HEAL
Definition SpellAuraDefines.h:71
int32 GetDuration() const
Definition SpellInfo.cpp:2738

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
2922{
2923 if (!ChainEntry)
2924 return nullptr;
2925 return ChainEntry->prev;
2926}
SpellInfo const * prev
Definition SpellMgr.h:545

References ChainEntry, and SpellChainNode::prev.

Referenced by GetAuraRankForLevel().

◆ GetRank()

◆ GetRecoveryTime()

uint32 SpellInfo::GetRecoveryTime ( ) const

◆ GetSchoolMask()

SpellSchoolMask SpellInfo::GetSchoolMask ( ) const
1895{
1897}
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::IsImmunedToSchool(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpellEffect(), LoadAuraState(), Unit::MagicSpellHitResult(), SmartScript::ProcessAction(), Player::ProhibitSpellSchool(), Unit::SendPeriodicAuraLog(), Spell::Spell(), Unit::SpellCriticalDamageBonus(), Unit::SpellDamageBonusDone(), Unit::SpellDamageBonusTaken(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), boss_viscidus::SpellHit(), Unit::SpellHitResult(), Unit::SpellHitResult(), and Unit::SpellPctDamageModsDone().

◆ GetSpellMechanicMaskByEffectMask()

uint64 SpellInfo::GetSpellMechanicMaskByEffectMask ( uint32  effectMask) const
1921{
1922 uint64 mask = 0;
1923 if (Mechanic)
1924 mask |= UI64LIT(1) << Mechanic;
1925 for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
1926 if ((effectMask & (1 << i)) && Effects[i].Mechanic)
1927 mask |= UI64LIT(1) << Effects[i].Mechanic;
1928 return mask;
1929}

References Effects, MAX_SPELL_EFFECTS, Mechanic, and UI64LIT.

Referenced by Unit::ModSpellDuration().

◆ GetSpellSpecific()

SpellSpecificType SpellInfo::GetSpellSpecific ( ) const
2050{
2051 return _spellSpecific;
2052}
SpellSpecificType _spellSpecific
Definition SpellInfo.h:423

References _spellSpecific.

Referenced by IsAuraExclusiveBySpecificPerCasterWith(), IsAuraExclusiveBySpecificWith(), Unit::IsPolymorphed(), Aura::IsSingleTargetWith(), and LoadAuraState().

◆ HasAnyAura()

bool SpellInfo::HasAnyAura ( ) const
911{
912 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
913 if (Effects[i].IsAura())
914 return true;
915 return false;
916}

References Effects, and MAX_SPELL_EFFECTS.

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

◆ HasAnyEffectMechanic()

bool SpellInfo::HasAnyEffectMechanic ( ) const
1941{
1942 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1943 if (Effects[i].Mechanic)
1944 return true;
1945 return false;
1946}

References Effects, MAX_SPELL_EFFECTS, and Mechanic.

◆ HasAreaAuraEffect()

bool SpellInfo::HasAreaAuraEffect ( ) const
919{
920 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
921 if (Effects[i].IsAreaAuraEffect())
922 return true;
923 return false;
924}

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(), 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(), 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::finish(), Creature::FocusTarget(), ThreatManager::ForwardThreatForAssistingMe(), GetAuraRankForLevel(), Unit::GetDispellableAuraList(), Unit::GetEffectiveResistChance(), Unit::GetMagicHitRedirectTarget(), 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(), IsActionAllowedChannel(), Spell::IsAutoActionResetSpell(), IsAutocastable(), IsCooldownStartedOnEvent(), Unit::IsDamageReducedByArmor(), Unit::IsImmunedToAuraPeriodicTick(), Unit::IsImmunedToDamage(), Unit::IsImmunedToSchool(), Unit::IsImmunedToSchool(), Unit::IsImmunedToSpell(), Creature::IsImmunedToSpell(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpellEffect(), Player::IsNeedCastPassiveSpellAtLearn(), Spell::IsNextMeleeSwingSpell(), IsPassive(), IsRangedWeaponSpell(), Aura::IsRemovedOnShapeLost(), Unit::isSpellBlocked(), Player::LearnTalent(), SpellMgr::LoadEnchantCustomAttr(), LoadLootTemplates_Spell(), SpellMgr::LoadSpellInfoCustomAttributes(), LoadSpellSpecific(), Unit::MagicSpellHitResult(), Unit::MeleeDamageBonusTaken(), Unit::MeleeSpellHitResult(), Unit::MeleeSpellMissChance(), Unit::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(), Unit::SpellHitResult(), Unit::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
894{
895 for (auto const& effect : Effects)
896 if (effect.Mechanic == mechanic)
897 return true;
898
899 return false;
900}

References Effects.

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

◆ HasInitialAggro()

bool SpellInfo::HasInitialAggro ( ) const
1321{
1323}
@ 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 Spell::DoAllEffectOnTarget(), and Spell::HandleLaunchPhase().

◆ HasOnlyDamageEffects()

bool SpellInfo::HasOnlyDamageEffects ( ) const
927{
928 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
929 {
930 if (Effects[i].IsEffect())
931 {
932 switch (Effects[i].Effect)
933 {
940 continue;
941 default:
942 return false;
943 }
944 }
945 }
946 return true;
947}
@ 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 Unit::SpellHitResult().

◆ IsAbilityLearnedWithProfession()

bool SpellInfo::IsAbilityLearnedWithProfession ( ) const
1021{
1022 SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
1023
1024 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
1025 {
1026 SkillLineAbilityEntry const* pAbility = _spell_idx->second;
1027 if (!pAbility || pAbility->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE)
1028 continue;
1029
1030 if (pAbility->MinSkillLineRank > 0)
1031 return true;
1032 }
1033
1034 return false;
1035}
@ SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE
Definition DBCEnums.h:360
std::pair< SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator > SkillLineAbilityMapBounds
Definition SpellMgr.h:586
Definition DBCStructure.h:1598
uint32 MinSkillLineRank
Definition DBCStructure.h:1606
uint32 AcquireMethod
Definition DBCStructure.h:1608

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
1038{
1039 SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
1040
1041 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
1042 if (_spell_idx->second->SkillLine == uint32(skillType))
1043 return true;
1044
1045 return false;
1046}

References Id, and sSpellMgr.

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

◆ IsActionAllowedChannel()

bool SpellInfo::IsActionAllowedChannel ( ) const
1294{
1296}
@ SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL
Definition SharedDefines.h:555
bool IsChanneled() const
Definition SpellInfo.cpp:1288

References HasAttribute(), IsChanneled(), and SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL.

Referenced by Creature::IsMovementPreventedByCasting(), and Spell::prepare().

◆ IsAffected()

bool SpellInfo::IsAffected ( uint32  familyName,
flag96 const &  familyFlags 
) const
1326{
1327 if (!familyName)
1328 return true;
1329
1330 if (familyName != SpellFamilyName)
1331 return false;
1332
1333 if (familyFlags && !(familyFlags & SpellFamilyFlags))
1334 return false;
1335
1336 return true;
1337}

References SpellFamilyFlags, and SpellFamilyName.

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

◆ IsAffectedBySpellMod()

bool SpellInfo::IsAffectedBySpellMod ( SpellModifier const *  mod) const
1345{
1346 // xinef: dont check duration mod
1347 if (mod->op != SPELLMOD_DURATION)
1348 if (!IsAffectedBySpellMods())
1349 return false;
1350
1351 SpellInfo const* affectSpell = sSpellMgr->GetSpellInfo(mod->spellId);
1352
1353 if (!affectSpell)
1354 return false;
1355
1356 if (!sScriptMgr->OnIsAffectedBySpellModCheck(affectSpell, this, mod))
1357 return true;
1358
1359 return IsAffected(affectSpell->SpellFamilyName, mod->mask);
1360}
@ SPELLMOD_DURATION
Definition SpellDefines.h:77
bool IsAffected(uint32 familyName, flag96 const &familyFlags) const
Definition SpellInfo.cpp:1325
bool IsAffectedBySpellMods() const
Definition SpellInfo.cpp:1339

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
1340{
1342}
@ 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
1049{
1050 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1051 if (Effects[i].IsEffect() && (Effects[i].IsTargetingArea() || Effects[i].IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA) || Effects[i].IsAreaAuraEffect()))
1052 return true;
1053 return false;
1054}
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
Definition SharedDefines.h:793
bool IsTargetingArea() const
Definition SpellInfo.cpp:1057

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

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

◆ IsAllowingDeadTarget()

bool SpellInfo::IsAllowingDeadTarget ( ) const
1260{
1262}
@ 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
1593{
1594 uint8 matchCount = 0;
1595 uint8 auraCount = 0;
1596 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
1597 {
1598 // xinef: skip non-aura efects
1599 if (!Effects[i].IsAura())
1600 continue;
1601
1602 bool effectFound = false;
1603 for (uint8 j = EFFECT_0; j < MAX_SPELL_EFFECTS; ++j)
1604 {
1605 if (!otherSpellInfo->Effects[j].IsAura())
1606 continue;
1607
1608 if (Effects[i].ApplyAuraName != otherSpellInfo->Effects[j].ApplyAuraName || Effects[i].MiscValue != otherSpellInfo->Effects[j].MiscValue)
1609 continue;
1610
1611 effectFound = true;
1612 break;
1613 }
1614
1615 if (!effectFound)
1616 return false;
1617 ++matchCount;
1618 }
1619
1620 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
1621 {
1622 if (Effects[i].IsAura())
1623 ++auraCount;
1624 if (otherSpellInfo->Effects[i].IsAura())
1625 ++auraCount;
1626 }
1627
1628 return matchCount * 2 == auraCount;
1629}

References EFFECT_0, Effects, and MAX_SPELL_EFFECTS.

Referenced by Spell::DoAllEffectOnTarget().

◆ IsAuraExclusiveBySpecificPerCasterWith()

bool SpellInfo::IsAuraExclusiveBySpecificPerCasterWith ( SpellInfo const *  spellInfo) const
1426{
1427 SpellSpecificType spellSpec = GetSpellSpecific();
1428 switch (spellSpec)
1429 {
1438 return spellSpec == spellInfo->GetSpellSpecific();
1439 default:
1440 return false;
1441 }
1442}
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:2049

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
1394{
1395 SpellSpecificType spellSpec1 = GetSpellSpecific();
1396 SpellSpecificType spellSpec2 = spellInfo->GetSpellSpecific();
1397 switch (spellSpec1)
1398 {
1409 return spellSpec1 == spellSpec2;
1411 return spellSpec2 == SPELL_SPECIFIC_FOOD
1412 || spellSpec2 == SPELL_SPECIFIC_FOOD_AND_DRINK;
1414 return spellSpec2 == SPELL_SPECIFIC_DRINK
1415 || spellSpec2 == SPELL_SPECIFIC_FOOD_AND_DRINK;
1417 return spellSpec2 == SPELL_SPECIFIC_FOOD
1418 || spellSpec2 == SPELL_SPECIFIC_DRINK
1419 || spellSpec2 == SPELL_SPECIFIC_FOOD_AND_DRINK;
1420 default:
1421 return false;
1422 }
1423}
@ 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, and SPELL_SPECIFIC_WARLOCK_ARMOR.

Referenced by Aura::CanStackWith().

◆ IsAutocastable()

bool SpellInfo::IsAutocastable ( ) const
1136{
1138 return false;
1140 return false;
1141 return true;
1142}
@ 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
1304{
1306}
@ 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
1116{
1117 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1118 if (Effects[i].TargetA.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL || Effects[i].TargetB.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL)
1119 return true;
1120 return false;
1121}
@ 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
1210{
1211 return _isCritCapable;
1212}

References _isCritCapable.

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

◆ IsDeathPersistent()

bool SpellInfo::IsDeathPersistent ( ) const
1250{
1252}
@ 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
2981{
2982 if (Id == spellInfo->Id)
2983 return false;
2984 return IsRankOf(spellInfo);
2985}
bool IsRankOf(SpellInfo const *spellInfo) const
Definition SpellInfo.cpp:2975

References Id, and IsRankOf().

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

◆ IsExplicitDiscovery()

bool SpellInfo::IsExplicitDiscovery ( ) const
950{
951 return ((Effects[0].Effect == SPELL_EFFECT_CREATE_RANDOM_ITEM
952 || Effects[0].Effect == SPELL_EFFECT_CREATE_ITEM_2)
953 && Effects[1].Effect == SPELL_EFFECT_SCRIPT_EFFECT)
954 || Id == 64323;
955}
@ 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
2988{
2989 if (ChainEntry && spellInfo->ChainEntry)
2990 {
2991 if (ChainEntry->first == spellInfo->ChainEntry->first)
2992 if (ChainEntry->rank > spellInfo->ChainEntry->rank)
2993 return true;
2994 }
2995 return false;
2996}

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

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

◆ IsLootCrafting()

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

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
1240{
1241 return IsPassive() || Id == 40075; // No other way to make 40075 have more than 1 copy of aura
1242}

References Id, and IsPassive().

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

◆ IsPassive()

◆ IsPassiveStackableWithRanks()

bool SpellInfo::IsPassiveStackableWithRanks ( ) const

◆ IsPositive()

bool SpellInfo::IsPositive ( ) const
1270{
1272}
@ 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(), SmartAI::InitializeAI(), GameObject::IsAtInteractDistance(), Totem::IsImmunedToSpellEffect(), Unit::MagicSpellHitResult(), Unit::PetSpellFail(), Spell::prepare(), Spell::PrepareTriggersExecutedOnHit(), Spell::SelectExplicitTargets(), Spell::SelectImplicitNearbyTargets(), ArenaSpectator::ShouldSendAura(), Spell::Spell(), Unit::SpellHitResult(), Unit::SpellHitResult(), Unit::SpellTakenCritChance(), PetAI::UpdateAI(), and Spell::UpdateChanneledTargetList().

◆ IsPositiveEffect()

bool SpellInfo::IsPositiveEffect ( uint8  effIndex) const
1275{
1276 switch (effIndex)
1277 {
1278 default:
1279 case 0:
1281 case 1:
1283 case 2:
1285 }
1286}
@ 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
1001{
1002 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1003 {
1004 if (Effects[i].Effect == SPELL_EFFECT_SKILL)
1005 {
1006 uint32 skill = Effects[i].MiscValue;
1007
1008 if (IsPrimaryProfessionSkill(skill))
1009 return true;
1010 }
1011 }
1012 return false;
1013}
@ SPELL_EFFECT_SKILL
Definition SharedDefines.h:884
bool IsPrimaryProfessionSkill(uint32 skill)
Definition SpellMgr.cpp:36

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

Referenced by IsPrimaryProfessionFirstRank().

◆ IsPrimaryProfessionFirstRank()

bool SpellInfo::IsPrimaryProfessionFirstRank ( ) const
1016{
1017 return IsPrimaryProfession() && GetRank() == 1;
1018}
uint8 GetRank() const
Definition SpellInfo.cpp:2896
bool IsPrimaryProfession() const
Definition SpellInfo.cpp:1000

References GetRank(), and IsPrimaryProfession().

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

◆ IsProfession()

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

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

◆ IsProfessionOrRiding()

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

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

Referenced by ComputeIsStackableWithRanks().

◆ IsQuestTame()

bool SpellInfo::IsQuestTame ( ) const
966{
967 return Effects[0].Effect == SPELL_EFFECT_THREAT && Effects[1].Effect == SPELL_EFFECT_APPLY_AURA && Effects[1].ApplyAuraName == SPELL_AURA_DUMMY;
968}
@ 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
2892{
2893 return ChainEntry != nullptr;
2894}

References ChainEntry.

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

◆ IsRankOf()

bool SpellInfo::IsRankOf ( SpellInfo const *  spellInfo) const

◆ IsRequiringDeadTarget()

bool SpellInfo::IsRequiringDeadTarget ( ) const
1255{
1257}
@ 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
1123{
1124 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1125 if (Effects[i].Effect && Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER)
1126 return false;
1127 return true;
1128}

References Effects, MAX_SPELL_EFFECTS, and TARGET_UNIT_CASTER.

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

◆ IsSingleTarget()

bool SpellInfo::IsSingleTarget ( ) const
1385{
1386 // all other single target spells have if it has AttributesEx5
1388 return true;
1389
1390 return false;
1391}
@ 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
1225{
1226 return _isSpellValid;
1227}

References _isSpellValid.

Referenced by SpellMgr::IsSpellValid().

◆ IsStackableWithRanks()

bool SpellInfo::IsStackableWithRanks ( ) const
1178{
1179 return _isStackableWithRanks;
1180}

References _isStackableWithRanks.

Referenced by Player::addSpell().

◆ IsTargetingArea()

◆ LoadAuraState()

AuraStateType SpellInfo::LoadAuraState ( ) const
1973{
1974 // Seals
1976 return AURA_STATE_JUDGEMENT;
1977
1978 // Conflagrate aura state on Immolate and Shadowflame
1980 // Immolate
1981 ((SpellFamilyFlags[0] & 4) ||
1982 // Shadowflame
1983 (SpellFamilyFlags[2] & 2)))
1985
1986 // Faerie Fire (druid versions)
1989
1990 // Sting (hunter's pet ability)
1991 if (GetCategory() == 1133)
1993
1994 // Victorious
1995 if (SpellFamilyName == SPELLFAMILY_WARRIOR && SpellFamilyFlags[1] & 0x00040000)
1997
1998 // Swiftmend state on Regrowth & Rejuvenation
2000 return AURA_STATE_SWIFTMEND;
2001
2002 // Deadly poison aura state
2003 if (SpellFamilyName == SPELLFAMILY_ROGUE && SpellFamilyFlags[0] & 0x10000)
2005
2006 // Enrage aura state
2007 if (Dispel == DISPEL_ENRAGE)
2008 return AURA_STATE_ENRAGE;
2009
2010 // Bleeding aura state
2012 return AURA_STATE_BLEEDING;
2013
2014 // Banished aura state
2016 return AURA_STATE_BANISHED;
2017
2019 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2020 if (Effects[i].IsAura() && (Effects[i].ApplyAuraName == SPELL_AURA_MOD_STUN
2021 || Effects[i].ApplyAuraName == SPELL_AURA_MOD_ROOT))
2022 return AURA_STATE_FROZEN;
2023
2024 switch (Id)
2025 {
2026 case 71465: // Divine Surge
2027 case 50241: // Oculus, Drake spell Evasive Maneuvers
2028 return AURA_STATE_UNKNOWN22;
2029 case 9991: // Touch of Zanzil
2030 case 35331: // Black Blood
2031 case 9806: // Phantom Strike
2032 case 35325: // Glowing Blood
2033 case 35328: // Lambent Blood
2034 case 35329: // Vibrant Blood
2035 case 16498: // Faerie Fire
2036 case 6950:
2037 case 20656:
2038 case 25602:
2039 case 32129:
2040 case 49163: // Perpetual Instability (Element 115)
2042 default:
2043 break;
2044 }
2045
2046 return AURA_STATE_NONE;
2047}
@ MECHANIC_BLEED
Definition SharedDefines.h:1328
@ MECHANIC_BANISH
Definition SharedDefines.h:1331
@ SPELLFAMILY_WARRIOR
Definition SharedDefines.h:3790
@ SPELLFAMILY_ROGUE
Definition SharedDefines.h:3794
@ 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:1386
@ SPELL_SCHOOL_MASK_FROST
Definition SharedDefines.h:289
uint64 GetAllEffectsMechanicMask() const
Definition SpellInfo.cpp:1899

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, SpellFamilyName, and UI64LIT.

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.
2055{
2056 switch (SpellFamilyName)
2057 {
2059 {
2060 // Food / Drinks (mostly)
2062 {
2063 bool food = false;
2064 bool drink = false;
2065 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2066 {
2067 if (!Effects[i].IsAura())
2068 continue;
2069 switch (Effects[i].ApplyAuraName)
2070 {
2071 // Food
2074 food = true;
2075 break;
2076 // Drink
2079 drink = true;
2080 break;
2081 default:
2082 break;
2083 }
2084 }
2085
2086 if (food && drink)
2088 else if (food)
2089 return SPELL_SPECIFIC_FOOD;
2090 else if (drink)
2091 return SPELL_SPECIFIC_DRINK;
2092 }
2093 // scrolls effects
2094 else
2095 {
2096 SpellInfo const* firstRankSpellInfo = GetFirstRankSpell();
2097 switch (firstRankSpellInfo->Id)
2098 {
2099 case 8118: // Strength
2100 case 8099: // Stamina
2101 case 8112: // Spirit
2102 case 8096: // Intellect
2103 case 8115: // Agility
2104 case 8091: // Armor
2105 return SPELL_SPECIFIC_SCROLL;
2106 }
2107 }
2108 break;
2109 }
2110 case SPELLFAMILY_MAGE:
2111 {
2112 // family flags 18(Molten), 25(Frost/Ice), 28(Mage)
2113 if (SpellFamilyFlags[0] & 0x12040000)
2115
2116 // Arcane brillance and Arcane intelect (normal check fails because of flags difference)
2117 if (SpellFamilyFlags[0] & 0x400)
2119
2120 if ((SpellFamilyFlags[0] & 0x1000000) && Effects[0].ApplyAuraName == SPELL_AURA_MOD_CONFUSE)
2122
2123 break;
2124 }
2126 {
2127 // only warlock curses have this
2128 if (Dispel == DISPEL_CURSE)
2129 return SPELL_SPECIFIC_CURSE;
2130
2131 // Warlock (Demon Armor | Demon Skin | Fel Armor)
2132 if (SpellFamilyFlags[1] & 0x20000020 || SpellFamilyFlags[2] & 0x00000010)
2134
2135 //seed of corruption and corruption
2136 if (SpellFamilyFlags[1] & 0x10 || SpellFamilyFlags[0] & 0x2)
2138 break;
2139 }
2140 case SPELLFAMILY_PRIEST:
2141 {
2142 // Divine Spirit and Prayer of Spirit
2143 if (SpellFamilyFlags[0] & 0x20)
2145
2146 break;
2147 }
2148 case SPELLFAMILY_HUNTER:
2149 {
2150 // only hunter stings have this
2151 if (Dispel == DISPEL_POISON)
2152 return SPELL_SPECIFIC_STING;
2153
2154 // only hunter aspects have this (but not all aspects in hunter family)
2155 if (SpellFamilyFlags.HasFlag(0x00380000, 0x00440000, 0x00001010))
2156 return SPELL_SPECIFIC_ASPECT;
2157
2158 break;
2159 }
2161 {
2162 // Collection of all the seal family flags. No other paladin spell has any of those.
2163 if (SpellFamilyFlags[1] & 0x26000C00
2164 || SpellFamilyFlags[0] & 0x0A000000)
2165 return SPELL_SPECIFIC_SEAL;
2166
2167 if (SpellFamilyFlags[0] & 0x00002190)
2168 return SPELL_SPECIFIC_HAND;
2169
2170 // Judgement of Wisdom, Judgement of Light, Judgement of Justice
2171 if (Id == 20184 || Id == 20185 || Id == 20186)
2173
2174 // only paladin auras have this (for palaldin class family)
2175 if (SpellFamilyFlags[2] & 0x00000020)
2176 return SPELL_SPECIFIC_AURA;
2177
2178 // Illidari Council Paladin (Gathios the Shatterer)
2179 if (Id == 41459 || Id == 41469)
2180 return SPELL_SPECIFIC_SEAL;
2181
2182 break;
2183 }
2184 case SPELLFAMILY_SHAMAN:
2185 {
2186 // family flags 10 (Lightning), 42 (Earth), 37 (Water), proc shield from T2 8 pieces bonus
2187 if (SpellFamilyFlags[1] & 0x420
2188 || (SpellFamilyFlags[0] & 0x00000400 && HasAttribute(SPELL_ATTR1_NO_THREAT))
2189 || Id == 23552)
2191
2192 break;
2193 }
2195 if (Id == 48266 || Id == 48263 || Id == 48265)
2197 break;
2198 }
2199
2200 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2201 {
2202 if (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA)
2203 {
2204 switch (Effects[i].ApplyAuraName)
2205 {
2210 return SPELL_SPECIFIC_CHARM;
2213 if (Id == 30645) // Gas Cloud Tracking
2214 return SPELL_SPECIFIC_NORMAL;
2215 [[fallthrough]];
2219 default:
2220 break;
2221 }
2222 }
2223 }
2224
2225 return SPELL_SPECIFIC_NORMAL;
2226}
@ SPELLFAMILY_PRIEST
Definition SharedDefines.h:3792
@ SPELLFAMILY_MAGE
Definition SharedDefines.h:3789
@ SPELLFAMILY_GENERIC
Definition SharedDefines.h:3786
@ SPELLFAMILY_SHAMAN
Definition SharedDefines.h:3797
@ SPELLFAMILY_DEATHKNIGHT
Definition SharedDefines.h:3801
@ DISPEL_POISON
Definition SharedDefines.h:1381
@ DISPEL_CURSE
Definition SharedDefines.h:1379
@ 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:61
@ 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
1299{
1301}
@ 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
1071{
1073 return true;
1074
1075 // pussywizard:
1076 if (effIndex < MAX_SPELL_EFFECTS && (triggeringSpell->Effects[effIndex].TargetA.GetCheckType() == TARGET_CHECK_ENTRY || triggeringSpell->Effects[effIndex].TargetB.GetCheckType() == TARGET_CHECK_ENTRY))
1077 {
1078 // xinef:
1079 if (Id == 60563)
1080 return true;
1081
1082 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1083 if (Effects[i].IsEffect() && (Effects[i].TargetA.GetCheckType() == TARGET_CHECK_ENTRY || Effects[i].TargetB.GetCheckType() == TARGET_CHECK_ENTRY))
1084 return true;
1085 }
1086
1087 /*
1088 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1089 {
1090 if (Effects[i].IsEffect())
1091 {
1092 if (Effects[i].TargetA.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL
1093 || Effects[i].TargetB.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL)
1094 return true;
1095 }
1096 }
1097 */
1098
1099 if (triggeringSpell->IsChanneled())
1100 {
1101 uint32 mask = 0;
1102 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1103 {
1104 if (Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER && Effects[i].TargetA.GetTarget() != TARGET_DEST_CASTER)
1105 mask |= Effects[i].GetProvidedTargetMask();
1106 }
1107
1108 if (mask & TARGET_FLAG_UNIT_MASK)
1109 return true;
1110 }
1111
1112 return false;
1113}
@ TARGET_DEST_CASTER
Definition SharedDefines.h:1429
@ TARGET_CHECK_ENTRY
Definition SpellInfo.h:116
bool NeedsExplicitUnitTarget() const
Definition SpellInfo.cpp:1065

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
1215{
1216 return _requireCooldownInfo;
1217}

References _requireCooldownInfo.

Referenced by Spell::SendSpellCooldown().

◆ SetCritCapable()

void SpellInfo::SetCritCapable ( bool  val)
1220{
1221 _isCritCapable = val;
1222}

References _isCritCapable.

◆ SetSpellValid()

void SpellInfo::SetSpellValid ( bool  val)
1230{
1231 _isSpellValid = val;
1232}

References _isSpellValid.

◆ SetStackableWithRanks()

void SpellInfo::SetStackableWithRanks ( bool  val)
1183{
1185}

References _isStackableWithRanks.

◆ ValidateAttribute6SpellDamageMods()

bool SpellInfo::ValidateAttribute6SpellDamageMods ( Unit const *  caster,
const AuraEffect auraEffect,
bool  isDot 
) const
1632{
1633 // Xinef: no attribute
1635 return true;
1636
1637 // Xinef we have a hook to decide which auras should profit to the spell, by default no profits
1638 // Xinef: Scourge Strike - Trigger
1639 if (Id == 70890 && auraEffect)
1640 {
1641 SpellInfo const* auraInfo = auraEffect->GetSpellInfo();
1642 return auraInfo->SpellIconID == 3086 ||
1643 (auraInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && (auraInfo->SpellFamilyFlags & flag96(8388608, 64, 16) || auraInfo->SpellIconID == 235 || auraInfo->SpellIconID == 154));
1644 }
1645 // Xinef: Necrosis, no profits for done and taken
1646 else if (Id == 51460)
1647 return false;
1648
1649 // Xinef: Do not affect dots and auras obtained from items, only affected by self casted auras
1650 return !isDot && auraEffect && (auraEffect->GetAmount() < 0 || (auraEffect->GetCasterGUID() == caster->GetGUID() && auraEffect->GetSpellInfo()->SpellFamilyName == SpellFamilyName)) && !auraEffect->GetBase()->GetCastItemGUID();
1651}
@ SPELL_ATTR6_IGNORE_CASTER_DAMAGE_MODIFIERS
Definition SharedDefines.h:621
SpellInfo const * GetSpellInfo() const
Definition SpellAuraEffects.h:54
Aura * GetBase() const
Definition SpellAuraEffects.h:49
ObjectGuid GetCasterGUID() const
Definition SpellAuraEffects.h:48
int32 GetAmount() const
Definition SpellAuraEffects.h:64
ObjectGuid GetCastItemGUID() const
Definition SpellAuras.h:103
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(), Unit::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(), GameObject::CastSpell(), _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_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(), 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(), 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_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(), Unit::IsImmunedToSpell(), Creature::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::LoadSpellInfoCorrections(), SpellMgr::LoadSpellInfoCustomAttributes(), SpellMgr::LoadSpellLearnSkills(), SpellMgr::LoadSpellPetAuras(), SpellMgr::LoadSpellProcs(), ObjectMgr::LoadSpellScripts(), LoadSpellSpecific(), SpellMgr::LoadSpellTargetPositions(), Unit::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(), Unit::SpellHitResult(), Unit::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_putricide_ooze_tank_protection::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(), 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_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_ulduar_stone_grip_cast_target::FilterTargetsInitial(), 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(), Pet::InitLevelupSpellsForLevel(), IsAbilityLearnedWithProfession(), IsAbilityOfSkillType(), IsDifferentRankOf(), IsExplicitDiscovery(), Unit::IsImmunedToSchool(), Unit::IsImmunedToSchool(), Unit::IsImmunedToSpell(), Totem::IsImmunedToSpellEffect(), SmartAI::IsMainSpellPrevented(), 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(), Unit::MagicSpellHitResult(), Unit::MeleeSpellHitResult(), Unit::ModSpellCastTime(), NeedsToBeTriggeredByCaster(), boss_stormcaller_brundir::OnChannelFinished(), spell_lurker_below_spout::OnPeriodic(), spell_xt002_gravity_bomb_aura::OnRemove(), boss_stormcaller_brundir::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::SelectImplicitNearbyTargets(), Spell::SendChannelStart(), Player::SendCooldownEvent(), Unit::SendHealSpellLog(), Spell::SendInterrupted(), Spell::SendLogExecute(), Spell::SendSpellCooldown(), Spell::SendSpellGo(), Unit::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::npc_frost_sphereAI::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_toasty_fire::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_vx001::SpellHit(), npc_ulduar_aerial_command_unit::SpellHit(), npc_ulduar_flames_spread::SpellHit(), npc_ichor_globule::npc_ichor_globuleAI::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_thorim_pillar::SpellHit(), boss_thorim_runic_colossus::SpellHit(), boss_yoggsaron::SpellHit(), npc_ulduar_keeper::npc_ulduar_keeperAI::SpellHit(), boss_skadi_grauf::boss_skadi_graufAI::SpellHit(), npc_overlord_drakuru_betrayal::SpellHit(), npc_earthen_ring_flamecaller::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_jaraxxus::boss_jaraxxusAI::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(), boss_razorscale::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_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_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_felmyst::SpellHitTarget(), boss_malchezaar::SpellHitTarget(), npc_nerubian_burrower::npc_nerubian_burrowerAI::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::boss_cyanigosaAI::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(), npc_xt002_heart::SpellHitTarget(), boss_yoggsaron_sara::SpellHitTarget(), boss_yoggsaron_voice::SpellHitTarget(), boss_emalon::boss_emalonAI::SpellHitTarget(), npc_overlord_drakuru_betrayal::SpellHitTarget(), boss_shirrak_the_dead_watcher::SpellHitTarget(), npc_pet_gen_soul_trader_beacon::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_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(), IsJudgementDamageSpell(), IsRangedWeaponSpell(), LoadAuraState(), SpellMgr::LoadSpellInfoCorrections(), SpellMgr::LoadSpellInfoCustomAttributes(), LoadSpellSpecific(), Unit::MeleeDamageBonusTaken(), Unit::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(), 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(), IsJudgementDamageSpell(), IsRangedWeaponSpell(), LoadAuraState(), SpellMgr::LoadSpellInfoCorrections(), SpellMgr::LoadSpellInfoCustomAttributes(), LoadSpellSpecific(), Unit::MeleeDamageBonusTaken(), Unit::ModSpellDuration(), Acore::AbsorbAuraOrderPred::operator()(), Player::PrepareCharmAISpells(), Spell::prepareDataForTriggerSystem(), Spell::PrepareTriggersExecutedOnHit(), spellinfo_commandscript::PrintGeneralInfo(), spell_dru_enrage::RecalculateBaseArmor(), Unit::RemoveAurasByShapeShift(), Unit::RemoveAurasDueToSpellByDispel(), Unit::RemoveAurasWithFamily(), Player::RemoveSpellMods(), ArenaSpectator::ShouldSendAura(), Unit::SpellDamageBonusDone(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), Unit::SpellHitResult(), Unit::SpellHitResult(), SpellInfo(), Unit::SpellPctDamageModsDone(), Unit::SpellPctHealingModsDone(), Unit::SpellTakenCritChance(), AuraScriptProcTestFixture::TestSpellFamilyMatch(), and ValidateAttribute6SpellDamageMods().

◆ SpellIconID

uint32 SpellInfo::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: