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

#include "SpellInfo.h"

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

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

Friends

class SpellMgr
 

Detailed Description

Constructor & Destructor Documentation

◆ SpellInfo()

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

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

◆ ~SpellInfo()

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

References _UnloadImplicitTargetConditionLists().

Member Function Documentation

◆ _GetEffect()

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

◆ _InitializeExplicitTargetMask()

void SpellInfo::_InitializeExplicitTargetMask ( )
3030{
3031 bool srcSet = false;
3032 bool dstSet = false;
3033 uint32 targetMask = Targets;
3034 // prepare target mask using effect target entries
3035 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3036 {
3037 if (!Effects[i].IsEffect())
3038 continue;
3039 targetMask |= Effects[i].TargetA.GetExplicitTargetMask(srcSet, dstSet);
3040 targetMask |= Effects[i].TargetB.GetExplicitTargetMask(srcSet, dstSet);
3041
3042 // add explicit target flags based on spell effects which have EFFECT_IMPLICIT_TARGET_EXPLICIT and no valid target provided
3043 if (Effects[i].GetImplicitTargetType() != EFFECT_IMPLICIT_TARGET_EXPLICIT)
3044 continue;
3045
3046 // extend explicit target mask only if valid targets for effect could not be provided by target types
3047 uint32 effectTargetMask = Effects[i].GetMissingTargetMask(srcSet, dstSet, targetMask);
3048
3049 // don't add explicit object/dest flags when spell has no max range
3050 if (GetMaxRange(true) == 0.0f && GetMaxRange(false) == 0.0f)
3052 targetMask |= effectTargetMask;
3053 }
3054 ExplicitTargetMask = targetMask;
3055}
std::uint32_t uint32
Definition Define.h:107
@ EFFECT_IMPLICIT_TARGET_EXPLICIT
Definition SpellInfo.h:144
@ TARGET_FLAG_GAMEOBJECT
Definition SpellInfo.h:58
@ TARGET_FLAG_DEST_LOCATION
Definition SpellInfo.h:53
@ TARGET_FLAG_UNIT_MASK
Definition SpellInfo.h:69
@ TARGET_FLAG_CORPSE_MASK
Definition SpellInfo.h:72
float GetMaxRange(bool positive=false, WorldObject *caster=nullptr, Spell *spell=nullptr) const
Definition SpellInfo.cpp:2750
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
3058{
3059 // not found a single positive spell with this attribute
3061 return false;
3062
3063 switch (Mechanic)
3064 {
3066 return true;
3067 default:
3068 break;
3069 }
3070
3071 // Special case: effects which determine positivity of whole spell
3072 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3073 {
3074 if (Effects[i].IsAura() && Effects[i].ApplyAuraName == SPELL_AURA_MOD_STEALTH)
3075 return true;
3076 }
3077
3078 switch (Effects[effIndex].Effect)
3079 {
3080 // always positive effects (check before target checks that provided non-positive result in some case for positive effects)
3081 case SPELL_EFFECT_HEAL:
3086 return true;
3088 return false;
3090 return false;
3092 {
3093 bool only = true;
3094 for (int i = EFFECT_0; i <= EFFECT_2; ++i)
3095 {
3096 if (Effects[effIndex].Effect > 0 && Effects[effIndex].Effect != SPELL_EFFECT_SCHOOL_DAMAGE)
3097 only = false;
3098 if (Effects[effIndex].Effect == SPELL_EFFECT_GAMEOBJECT_DAMAGE)
3099 return false;
3100 }
3101 // effects with school damage only cannot be positive...
3102 if (only)
3103 return false;
3104 break;
3105 }
3108 {
3109 for (int i = EFFECT_0; i <= EFFECT_2; ++i)
3110 if (Effects[effIndex].Effect == SPELL_EFFECT_GAMEOBJECT_DAMAGE)
3111 return false;
3112 break;
3113 }
3114 // non-positive aura use
3117 {
3118 switch (Effects[effIndex].ApplyAuraName)
3119 {
3120 case SPELL_AURA_MOD_DAMAGE_DONE: // dependent from bas point sign (negative -> negative)
3127 if (Effects[effIndex].CalcValue() < 0)
3128 return false;
3129 break;
3130 case SPELL_AURA_MOD_DAMAGE_TAKEN: // dependent from bas point sign (positive -> negative)
3131 if (Effects[effIndex].CalcValue() > 0)
3132 return false;
3133 break;
3136 if (Effects[effIndex].CalcValue() > 0)
3137 return true; // some expected positive spells have SPELL_ATTR1_NEGATIVE
3138 break;
3140 return true;
3144 if (!deep)
3145 {
3146 if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(Effects[effIndex].TriggerSpell))
3147 {
3148 // negative targets of main spell return early
3149 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3150 {
3151 if (!spellTriggeredProto->Effects[i].Effect)
3152 continue;
3153 // if non-positive trigger cast targeted to positive target this main cast is non-positive
3154 // this will place this spell auras as debuffs
3155 if (_IsPositiveTarget(spellTriggeredProto->Effects[i].TargetA.GetTarget(), spellTriggeredProto->Effects[i].TargetB.GetTarget()) && !spellTriggeredProto->_IsPositiveEffect(i, true))
3156 return false;
3157 }
3158 }
3159 }
3161 // many positive auras have negative triggered spells at damage for example and this not make it negative (it can be canceled for example)
3162 break;
3163 case SPELL_AURA_MOD_STUN: //have positive and negative spells, we can't sort its correctly at this moment.
3164 if (effIndex == 0 && Effects[1].Effect == 0 && Effects[2].Effect == 0)
3165 return false; // but all single stun aura spells is negative
3166 break;
3168 if (Id == 24740) // Wisp Costume
3169 return true;
3170 return false;
3174 case SPELL_AURA_GHOST:
3179 return false;
3180 case SPELL_AURA_PERIODIC_DAMAGE: // used in positive spells also.
3181 // part of negative spell if casted at self (prevent cancel)
3182 if (Effects[effIndex].TargetA.GetTarget() == TARGET_UNIT_CASTER)
3183 return false;
3184 break;
3185 case SPELL_AURA_MOD_DECREASE_SPEED: // used in positive spells also
3186 // part of positive spell if casted at self
3187 if (Effects[effIndex].TargetA.GetTarget() != TARGET_UNIT_CASTER)
3188 return false;
3189 // but not this if this first effect (didn't find better check)
3190 if (HasAttribute(SPELL_ATTR0_AURA_IS_DEBUFF) && effIndex == 0)
3191 return false;
3192 break;
3194 {
3195 // non-positive immunities
3196 switch (Effects[effIndex].MiscValue)
3197 {
3198 case MECHANIC_BANDAGE:
3199 case MECHANIC_SHIELD:
3200 case MECHANIC_MOUNT:
3202 return false;
3203 default:
3204 break;
3205 }
3206 break;
3207 }
3208 case SPELL_AURA_ADD_FLAT_MODIFIER: // mods
3210 {
3211 // non-positive mods
3212 switch (Effects[effIndex].MiscValue)
3213 {
3214 case SPELLMOD_COST: // dependent from bas point sign (negative -> positive)
3215 if (Effects[effIndex].CalcValue() > 0)
3216 {
3217 if (!deep)
3218 {
3219 bool negative = true;
3220 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3221 {
3222 if (i != effIndex)
3223 if (_IsPositiveEffect(i, true))
3224 {
3225 negative = false;
3226 break;
3227 }
3228 }
3229 if (negative)
3230 return false;
3231 }
3232 }
3233 break;
3234 default:
3235 break;
3236 }
3237 break;
3238 }
3239 default:
3240 break;
3241 }
3242 break;
3243 }
3244 default:
3245 break;
3246 }
3247
3248 // non-positive targets
3249 if (!_IsPositiveTarget(Effects[effIndex].TargetA.GetTarget(), Effects[effIndex].TargetB.GetTarget()))
3250 return false;
3251
3252 // negative spell if triggered spell is negative
3253 if (!deep && !Effects[effIndex].ApplyAuraName && Effects[effIndex].TriggerSpell)
3254 {
3255 if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(Effects[effIndex].TriggerSpell))
3256 if (!spellTriggeredProto->_IsPositiveSpell())
3257 return false;
3258 }
3259
3260 // ok, positive
3261 return true;
3262}
@ EFFECT_0
Definition SharedDefines.h:31
@ EFFECT_2
Definition SharedDefines.h:33
@ SPELL_EFFECT_ENERGIZE_PCT
Definition SharedDefines.h:903
@ SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
Definition SharedDefines.h:894
@ SPELL_EFFECT_HEAL
Definition SharedDefines.h:776
@ SPELL_EFFECT_KNOCK_BACK_DEST
Definition SharedDefines.h:910
@ SPELL_EFFECT_KNOCK_BACK
Definition SharedDefines.h:864
@ SPELL_EFFECT_SCHOOL_DAMAGE
Definition SharedDefines.h:768
@ SPELL_EFFECT_GAMEOBJECT_DAMAGE
Definition SharedDefines.h:853
@ SPELL_EFFECT_LEARN_SPELL
Definition SharedDefines.h:802
@ SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
Definition SharedDefines.h:895
@ SPELL_EFFECT_HEAL_PCT
Definition SharedDefines.h:902
@ SPELL_EFFECT_SKILL_STEP
Definition SharedDefines.h:810
@ SPELL_EFFECT_APPLY_AURA
Definition SharedDefines.h:772
@ TARGET_UNIT_CASTER
Definition SharedDefines.h:1414
@ MECHANIC_MOUNT
Definition SharedDefines.h:1334
@ MECHANIC_INVULNERABILITY
Definition SharedDefines.h:1338
@ MECHANIC_BANDAGE
Definition SharedDefines.h:1329
@ MECHANIC_IMMUNE_SHIELD
Definition SharedDefines.h:1342
@ MECHANIC_SHIELD
Definition SharedDefines.h:1332
@ SPELL_ATTR0_AURA_IS_DEBUFF
Definition SharedDefines.h:396
@ SPELL_AURA_PREVENT_RESURRECTION
Definition SpellAuraDefines.h:377
@ SPELL_AURA_MOD_SKILL
Definition SpellAuraDefines.h:93
@ SPELL_AURA_PERIODIC_DAMAGE
Definition SpellAuraDefines.h:66
@ SPELL_AURA_ADD_PCT_MODIFIER
Definition SpellAuraDefines.h:171
@ SPELL_AURA_PROC_TRIGGER_SPELL
Definition SpellAuraDefines.h:105
@ SPELL_AURA_MOD_FEAR
Definition SpellAuraDefines.h:70
@ SPELL_AURA_ADD_FLAT_MODIFIER
Definition SpellAuraDefines.h:170
@ SPELL_AURA_MOD_STALKED
Definition SpellAuraDefines.h:131
@ SPELL_AURA_MOD_SPELL_CRIT_CHANCE
Definition SpellAuraDefines.h:120
@ SPELL_AURA_PERIODIC_DAMAGE_PERCENT
Definition SpellAuraDefines.h:152
@ SPELL_AURA_MOD_DODGE_PERCENT
Definition SpellAuraDefines.h:112
@ SPELL_AURA_MOD_SILENCE
Definition SpellAuraDefines.h:90
@ SPELL_AURA_ADD_TARGET_TRIGGER
Definition SpellAuraDefines.h:172
@ SPELL_AURA_MOD_STAT
Definition SpellAuraDefines.h:92
@ SPELL_AURA_MOD_HEALING_DONE
Definition SpellAuraDefines.h:198
@ SPELL_AURA_MOD_HEALING_PCT
Definition SpellAuraDefines.h:181
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
Definition SpellAuraDefines.h:142
@ SPELL_AURA_GHOST
Definition SpellAuraDefines.h:158
@ SPELL_AURA_MOD_ROOT
Definition SpellAuraDefines.h:89
@ SPELL_AURA_MECHANIC_IMMUNITY
Definition SpellAuraDefines.h:140
@ SPELL_AURA_MOD_DAMAGE_TAKEN
Definition SpellAuraDefines.h:77
@ SPELL_AURA_MOD_CRIT_PCT
Definition SpellAuraDefines.h:353
@ SPELL_AURA_MOD_PACIFY_SILENCE
Definition SpellAuraDefines.h:123
@ SPELL_AURA_MOD_DECREASE_SPEED
Definition SpellAuraDefines.h:96
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE
Definition SpellAuraDefines.h:290
@ SPELL_AURA_PERIODIC_LEECH
Definition SpellAuraDefines.h:116
@ SPELL_AURA_MOD_DAMAGE_DONE
Definition SpellAuraDefines.h:76
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT
Definition SpellAuraDefines.h:111
@ SPELL_AURA_MOD_STEALTH
Definition SpellAuraDefines.h:79
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
Definition SpellAuraDefines.h:86
@ SPELL_AURA_MOD_STUN
Definition SpellAuraDefines.h:75
@ SPELLMOD_COST
Definition SpellDefines.h:98
#define sSpellMgr
Definition SpellMgr.h:847
Definition SpellInfo.h:340
static bool _IsPositiveTarget(uint32 targetA, uint32 targetB)
Definition SpellInfo.cpp:3274
bool _IsPositiveEffect(uint8 effIndex, bool deep) const
Definition SpellInfo.cpp:3057
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
3265{
3266 // spells with at least one negative effect are considered negative
3267 // some self-applied spells have negative effects but in self casting case negative check ignored.
3268 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
3269 if (!_IsPositiveEffect(i, true))
3270 return false;
3271 return true;
3272}

References _IsPositiveEffect(), and MAX_SPELL_EFFECTS.

Referenced by Spell::HandleThreatSpells().

◆ _IsPositiveTarget()

bool SpellInfo::_IsPositiveTarget ( uint32  targetA,
uint32  targetB 
)
static
3275{
3276 // non-positive targets
3277 switch (targetA)
3278 {
3288 return false;
3289 default:
3290 break;
3291 }
3292 if (targetB)
3293 return _IsPositiveTarget(targetB, 0);
3294 return true;
3295}
@ TARGET_DEST_DYNOBJ_ENEMY
Definition SharedDefines.h:1436
@ TARGET_UNIT_DEST_AREA_ENEMY
Definition SharedDefines.h:1425
@ TARGET_UNIT_CONE_ENEMY_104
Definition SharedDefines.h:1512
@ TARGET_UNIT_SRC_AREA_ENEMY
Definition SharedDefines.h:1424
@ TARGET_DEST_TARGET_ENEMY
Definition SharedDefines.h:1461
@ TARGET_UNIT_TARGET_ENEMY
Definition SharedDefines.h:1419
@ TARGET_UNIT_CONE_ENEMY_54
Definition SharedDefines.h:1462
@ TARGET_UNIT_CONE_ENEMY_24
Definition SharedDefines.h:1432
@ TARGET_UNIT_NEARBY_ENEMY
Definition SharedDefines.h:1415

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

Referenced by _IsPositiveEffect(), and _IsPositiveTarget().

◆ _LoadImmunityInfo()

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

References Effects, and MAX_SPELL_EFFECTS.

Referenced by ~SpellInfo().

◆ ApplyAllSpellImmunitiesTo()

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

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

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

◆ CalcCastTime()

uint32 SpellInfo::CalcCastTime ( WorldObject *  caster = nullptr,
Spell *  spell = nullptr 
) const
2779{
2780 // not all spells have cast time index and this is all is pasiive abilities
2781 if (!CastTimeEntry)
2782 return 0;
2783
2784 int32 castTime = CastTimeEntry->CastTime;
2786 castTime += 500;
2787
2788 if (caster)
2789 caster->ModSpellCastTime(this, castTime, spell);
2790
2791 return (castTime > 0) ? uint32(castTime) : 0;
2792}
@ SPELL_ATTR0_USES_RANGED_SLOT
Definition SharedDefines.h:371
bool IsAutoRepeatRangedSpell() const
Definition SpellInfo.cpp:1328
void ModSpellCastTime(SpellInfo const *spellProto, int32 &castTime, Spell *spell=nullptr) const
Definition Object.cpp:3495
int32 CastTime
Definition DBCStructure.h:1796

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

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

◆ CalcPowerCost()

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

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

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

◆ CanBeRedirectedBySpellMagnet()

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

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

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

◆ CanBeUsedInCombat()

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

References HasAttribute(), and SPELL_ATTR0_NOT_IN_COMBAT_ONLY_PEACEFUL.

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

◆ CanDispelAura()

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

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

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

◆ CanPierceImmuneAura()

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

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

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

◆ CanSpellCastOverrideAuraEffect()

bool SpellInfo::CanSpellCastOverrideAuraEffect ( AuraEffect const *  aurEff) const
2690{
2692 return false;
2693
2694 if (aurEff->GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
2695 return false;
2696
2697 SpellEffectInfo const* aurEffInfo = &aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()];
2698
2699 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2700 {
2701 SpellEffectInfo const& effectInfo = Effects[i];
2702 if (!effectInfo.Effect)
2703 continue;
2704
2705 if (effectInfo.Effect != SPELL_EFFECT_APPLY_AURA)
2706 continue;
2707
2708 uint32 const miscValue = static_cast<uint32>(effectInfo.MiscValue);
2709 switch (effectInfo.ApplyAuraName)
2710 {
2712 if (miscValue != aurEffInfo->ApplyAuraName)
2713 continue;
2714 break;
2717 if (aurEff->GetSpellInfo()->HasAttribute(SPELL_ATTR2_NO_SCHOOL_IMMUNITIES) || !(aurEff->GetSpellInfo()->SchoolMask & miscValue))
2718 continue;
2719 break;
2721 if (miscValue != aurEff->GetSpellInfo()->Dispel)
2722 continue;
2723 break;
2725 if (miscValue != aurEff->GetSpellInfo()->Mechanic)
2726 {
2727 if (miscValue != aurEffInfo->Mechanic)
2728 continue;
2729 }
2730 break;
2731 default:
2732 continue;
2733 }
2734
2735 return true;
2736 }
2737
2738 return false;
2739}
@ 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
2606{
2607 if (!auraSpellInfo)
2608 return false;
2609
2610 for (SpellEffectInfo const& effectInfo : Effects)
2611 {
2612 if (!effectInfo.Effect)
2613 continue;
2614
2615 ImmunityInfo const* immuneInfo = effectInfo.GetImmunityInfo();
2616 if (!immuneInfo)
2617 continue;
2618
2619 if (!auraSpellInfo->HasAttribute(SPELL_ATTR2_NO_SCHOOL_IMMUNITIES))
2620 {
2621 if (uint32 schoolImmunity = immuneInfo->SchoolImmuneMask)
2622 if ((auraSpellInfo->SchoolMask & schoolImmunity) != 0)
2623 return true;
2624 }
2625
2626 if (uint64 mechanicImmunity = immuneInfo->MechanicImmuneMask)
2627 if ((mechanicImmunity & (1ULL << auraSpellInfo->Mechanic)) != 0)
2628 return true;
2629
2630 if (uint32 dispelImmunity = immuneInfo->DispelImmuneMask)
2631 if (auraSpellInfo->Dispel == dispelImmunity)
2632 return true;
2633
2634 bool immuneToAllEffects = true;
2635 for (SpellEffectInfo const& auraSpellEffectInfo : auraSpellInfo->Effects)
2636 {
2637 if (!auraSpellEffectInfo.Effect)
2638 continue;
2639
2640 uint32 effectName = auraSpellEffectInfo.Effect;
2641 if (!effectName)
2642 continue;
2643
2644 if (immuneInfo->SpellEffectImmune.find(static_cast<SpellEffects>(effectName)) == immuneInfo->SpellEffectImmune.cend())
2645 {
2646 immuneToAllEffects = false;
2647 break;
2648 }
2649
2650 if (uint32 mechanic = auraSpellEffectInfo.Mechanic)
2651 {
2652 if (!(immuneInfo->MechanicImmuneMask & (1ULL << mechanic)))
2653 {
2654 immuneToAllEffects = false;
2655 break;
2656 }
2657 }
2658
2659 if (uint32 auraName = auraSpellEffectInfo.ApplyAuraName)
2660 {
2661 bool isImmuneToAuraEffectApply = false;
2662 if (immuneInfo->AuraTypeImmune.find(static_cast<AuraType>(auraName)) != immuneInfo->AuraTypeImmune.cend())
2663 isImmuneToAuraEffectApply = true;
2664
2665 if (!isImmuneToAuraEffectApply && !auraSpellInfo->IsPositiveEffect(auraSpellEffectInfo.EffectIndex) &&
2666 !auraSpellInfo->HasAttribute(SPELL_ATTR2_NO_SCHOOL_IMMUNITIES))
2667 {
2668 if (uint32 applyHarmfulAuraImmuneMask = immuneInfo->ApplyHarmfulAuraImmuneMask)
2669 if ((auraSpellInfo->SchoolMask & applyHarmfulAuraImmuneMask) != 0)
2670 isImmuneToAuraEffectApply = true;
2671 }
2672
2673 if (!isImmuneToAuraEffectApply)
2674 {
2675 immuneToAllEffects = false;
2676 break;
2677 }
2678 }
2679 }
2680
2681 if (immuneToAllEffects)
2682 return true;
2683 }
2684
2685 return false;
2686}

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

Referenced by CanPierceImmuneAura().

◆ CheckExplicitTarget()

SpellCastResult SpellInfo::CheckExplicitTarget ( WorldObject const *  caster,
WorldObject const *  target,
Item const *  itemTarget = nullptr 
) const
1871{
1872 uint32 neededTargets = GetExplicitTargetMask();
1873 if (!target)
1874 {
1876 if (!(neededTargets & TARGET_FLAG_GAMEOBJECT_ITEM) || !itemTarget)
1878 return SPELL_CAST_OK;
1879 }
1880
1881 Unit const* unitCaster = caster->ToUnit();
1882 if (Unit const* unitTarget = target->ToUnit())
1883 {
1885 {
1886 if (neededTargets & TARGET_FLAG_UNIT_ENEMY)
1887 if (caster->IsValidAttackTarget(unitTarget, this))
1888 return SPELL_CAST_OK;
1889 if (neededTargets & TARGET_FLAG_UNIT_ALLY
1890 || (neededTargets & TARGET_FLAG_UNIT_PARTY && unitCaster && unitCaster->IsInPartyWith(unitTarget))
1891 || (neededTargets & TARGET_FLAG_UNIT_RAID && unitCaster && unitCaster->IsInRaidWith(unitTarget)))
1892 if (caster->IsValidAssistTarget(unitTarget, this))
1893 return SPELL_CAST_OK;
1894 if (neededTargets & TARGET_FLAG_UNIT_MINIPET)
1895 if (unitCaster && unitTarget->GetGUID() == unitCaster->GetCritterGUID())
1896 return SPELL_CAST_OK;
1897 if (neededTargets & TARGET_FLAG_UNIT_PASSENGER)
1898 if (unitCaster && unitTarget->IsOnVehicle(unitCaster))
1899 return SPELL_CAST_OK;
1901 }
1902 }
1903 return SPELL_CAST_OK;
1904}
@ SPELL_FAILED_BAD_TARGETS
Definition SharedDefines.h:949
@ SPELL_CAST_OK
Definition SharedDefines.h:1126
@ TARGET_FLAG_UNIT_RAID
Definition SpellInfo.h:49
@ TARGET_FLAG_UNIT_ENEMY
Definition SpellInfo.h:54
@ TARGET_FLAG_UNIT_MINIPET
Definition SpellInfo.h:63
@ TARGET_FLAG_UNIT_PASSENGER
Definition SpellInfo.h:67
@ TARGET_FLAG_GAMEOBJECT_ITEM
Definition SpellInfo.h:61
@ TARGET_FLAG_UNIT_ALLY
Definition SpellInfo.h:55
@ TARGET_FLAG_GAMEOBJECT_MASK
Definition SpellInfo.h:71
@ TARGET_FLAG_UNIT_PARTY
Definition SpellInfo.h:50
uint32 GetExplicitTargetMask() const
Definition SpellInfo.cpp:1989
ObjectGuid GetCritterGUID() const
Definition Unit.h:728
bool IsInRaidWith(Unit const *unit) const
Definition Unit.cpp:14685
bool IsInPartyWith(Unit const *unit) const
Definition Unit.cpp:14662

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

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

◆ CheckLocation()

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

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

Referenced by Spell::CheckCast().

◆ CheckShapeshift()

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

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

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

◆ CheckTarget()

SpellCastResult SpellInfo::CheckTarget ( WorldObject const *  caster,
WorldObject const *  target,
bool  implicit = true 
) const
1678{
1679 if (AttributesEx & SPELL_ATTR1_EXCLUDE_CASTER && caster == target)
1681
1682 // check visibility - ignore stealth for implicit (area) targets
1683 if (!(AttributesEx6 & SPELL_ATTR6_IGNORE_PHASE_SHIFT) && !caster->CanSeeOrDetect(target, implicit))
1685
1686 Unit const* unitCaster = caster->ToUnit();
1687
1688 Unit const* unitTarget = target->ToUnit();
1689
1690 // creature/player specific target checks
1691 if (unitTarget)
1692 {
1693 // xinef: spells cannot be cast if player is in fake combat also
1694 if (AttributesEx & SPELL_ATTR1_ONLY_PEACEFUL_TARGETS && (unitTarget->IsInCombat() || unitTarget->IsPetInCombat()))
1696
1698 if (auto creature = unitTarget->ToCreature())
1699 if (CreatureImmunities const* immunities = sSpellMgr->GetCreatureImmunities(creature->GetCreatureTemplate()->CreatureImmunitiesId))
1700 if (immunities->ImmuneAoE)
1702
1703 // only spells with SPELL_ATTR3_ONLY_ON_GHOSTS can target ghosts
1705 {
1706 if (!unitTarget->HasGhostAura())
1710 }
1711
1712 if (caster != unitTarget)
1713 {
1714 if (caster->IsPlayer())
1715 {
1716 // Do not allow these spells to target creatures not tapped by us (Banish, Polymorph, many quest spells)
1718 if (Creature const* targetCreature = unitTarget->ToCreature())
1719 if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->ToPlayer()))
1721
1723 {
1724 Creature const* targetCreature = unitTarget->ToCreature();
1725 if (!targetCreature)
1727
1730 }
1731
1732 // Not allow disarm unarmed player
1734 {
1735 bool valid = false;
1736 for (uint8 i = BASE_ATTACK; i < MAX_ATTACK; ++i)
1737 {
1738 AuraType disarmAuraType = SPELL_AURA_MOD_DISARM;
1739 switch (i)
1740 {
1741 case OFF_ATTACK:
1742 disarmAuraType = SPELL_AURA_MOD_DISARM_OFFHAND;
1743 break;
1744 case RANGED_ATTACK:
1745 disarmAuraType = SPELL_AURA_MOD_DISARM_RANGED;
1746 break;
1747 }
1748
1749 if (HasAura(disarmAuraType))
1750 {
1751 if (Player const* player = unitTarget->ToPlayer())
1752 {
1753 if (player->GetWeaponForAttack(WeaponAttackType(i), true))
1754 {
1755 valid = true;
1756 break;
1757 }
1758 }
1759 else if (unitTarget->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + i))
1760 {
1761 valid = true;
1762 break;
1763 }
1764 }
1765 }
1766
1767 if (!valid)
1768 {
1770 }
1771 }
1772 }
1773 }
1774 }
1775 // corpse specific target checks
1776 else if (Corpse const* corpseTarget = target->ToCorpse())
1777 {
1778 // cannot target bare bones
1779 if (corpseTarget->GetType() == CORPSE_BONES)
1781 // we have to use owner for some checks (aura preventing resurrection for example)
1782 if (Player* owner = ObjectAccessor::FindPlayer(corpseTarget->GetOwnerGUID()))
1783 unitTarget = owner;
1784 // we're not interested in corpses without owner
1785 else
1787 }
1788 // other types of objects - always valid
1789 else return SPELL_CAST_OK;
1790
1791 // corpseOwner and unit specific target checks
1792 if (unitTarget->IsPlayer())
1793 {
1796 }
1797 else
1798 {
1801
1804 }
1805
1806 if (!IsAllowingDeadTarget() && !unitTarget->IsAlive())
1808
1809 // check this flag only for implicit targets (chain and area), allow to explicitly target units for spells like Shield of Righteousness
1812
1813 // checked in Unit::IsValidAttack/AssistTarget, shouldn't be checked for ENTRY targets
1814 //if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_UNTARGETABLE) && target->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
1815 // return SPELL_FAILED_BAD_TARGETS;
1816
1817 //if (!(AttributesEx6 & SPELL_ATTR6_NO_AURA_LOG)
1818
1819 if (!CheckTargetCreatureType(unitTarget))
1820 {
1821 if (target->IsPlayer())
1823 else
1825 }
1826
1827 // check GM mode and GM invisibility - only for player casts (npc casts are controlled by AI) and negative spells
1828 if (unitTarget != caster && ((unitCaster && unitCaster->IsControlledByPlayer()) || !IsPositive()) && unitTarget->IsPlayer())
1829 {
1830 if (!unitTarget->ToPlayer()->IsVisible())
1832
1833 if (unitTarget->ToPlayer()->IsGameMaster())
1835 }
1836
1837 // not allow casting on flying player
1840
1841 /* TARGET_UNIT_MASTER gets blocked here for passengers, because the whole idea of this check is to
1842 not allow passengers to be implicitly hit by spells, however this target type should be an exception,
1843 if this is left it kills spells that award kill credit from vehicle to master (few spells),
1844 the use of these 2 covers passenger target check, logically, if vehicle cast this to master it should always hit
1845 him, because it would be it's passenger, there's no such case where this gets to fail legitimacy, this problem
1846 cannot be solved from within the check in other way since target type cannot be called for the spell currently
1847 Spell examples: [ID - 52864 Devour Water, ID - 52862 Devour Wind, ID - 49370 Wyrmrest Defender: Destabilize Azure Dragonshrine Effect] */
1848 if ((!unitCaster || !unitCaster->IsVehicle()) && (!unitCaster || unitCaster->GetCharmerOrOwner() != target))
1849 {
1850 if (TargetAuraState && !unitTarget->HasAuraState(AuraStateType(TargetAuraState), this, unitCaster))
1852
1853 if (TargetAuraStateNot && unitTarget->HasAuraState(AuraStateType(TargetAuraStateNot), this, unitCaster))
1855 }
1856
1857 if (TargetAuraSpell && !unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(TargetAuraSpell, caster)))
1859
1860 if (ExcludeTargetAuraSpell && unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(ExcludeTargetAuraSpell, caster)))
1862
1866
1867 return SPELL_CAST_OK;
1868}
@ 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:221
@ RANGED_ATTACK
Definition Unit.h:220
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition UpdateFields.h:116
Definition Corpse.h:49
Definition Creature.h:47
CreatureTemplate const * GetCreatureTemplate() const
Definition Creature.h:207
bool HaveLootFor(uint32 loot_id) const
Definition LootMgr.h:224
Corpse * ToCorpse()
Definition Object.h:224
bool IsPlayer() const
Definition Object.h:207
uint32 GetUInt32Value(uint16 index) const
Definition Object.cpp:303
Player * ToPlayer()
Definition Object.h:208
Creature * ToCreature()
Definition Object.h:212
bool IsGameMaster() const
Definition Player.h:1178
bool IsRequiringDeadTarget() const
Definition SpellInfo.cpp:1267
bool IsDeathPersistent() const
Definition SpellInfo.cpp:1262
bool CheckTargetCreatureType(Unit const *target) const
Definition SpellInfo.cpp:1906
bool IsAllowingDeadTarget() const
Definition SpellInfo.cpp:1272
bool HasEffect(SpellEffects effect) const
Definition SpellInfo.cpp:889
bool IsPositive() const
Definition SpellInfo.cpp:1282
bool IsVehicle() const
Definition Unit.h:803
bool IsAlive() const
Definition Unit.h:1798
bool HasGhostAura() const
Definition Unit.h:1803
bool IsPetInCombat() const
Definition Unit.h:946
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5764
bool HasPreventResurectionAura() const
Definition Unit.h:1812
Unit * GetCharmerOrOwner() const
Definition Unit.h:1293
bool IsInFlight() const
Definition Unit.h:1714
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
Definition Unit.cpp:7434
bool IsVisible() const
Definition Unit.h:2021
bool HasUnitState(const uint32 f) const
Definition Unit.h:739
bool IsInCombat() const
Definition Unit.h:943
Player * FindPlayer(ObjectGuid const guid)
Definition ObjectAccessor.cpp:269
Definition SpellMgr.h:571
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
1907{
1908 // Curse of Doom & Exorcism: not find another way to fix spell target check :/
1910 {
1911 // not allow cast at player
1912 if (target->IsPlayer())
1913 return false;
1914 else
1915 return true;
1916 }
1917 uint32 creatureType = target->GetCreatureTypeMask();
1918 return !TargetCreatureType || !creatureType || (creatureType & TargetCreatureType);
1919}
@ SPELLFAMILY_WARLOCK
Definition SharedDefines.h:3789
uint32 GetCategory() const
Definition SpellInfo.cpp:884

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

Referenced by CheckTarget().

◆ ComputeIsCritCapable()

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

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

◆ ComputeIsStackableWithRanks()

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

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

◆ GetAllEffectsMechanicMask()

◆ GetAuraRankForLevel()

SpellInfo const * SpellInfo::GetAuraRankForLevel ( uint8  level) const
2960{
2961 // ignore passive spells
2962 //if (IsPassive())
2963 // return this;
2964
2965 // Client ignores spell with these attributes (sub_53D9D0)
2967 return this;
2968
2969 bool needRankSelection = false;
2970 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2971 {
2972 if (IsPositiveEffect(i) &&
2973 (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA ||
2976 {
2977 needRankSelection = true;
2978 break;
2979 }
2980 }
2981
2982 // not required
2983 if (!needRankSelection)
2984 return this;
2985
2986 SpellInfo const* nextSpellInfo = nullptr;
2987
2988 sScriptMgr->OnBeforeAuraRankForLevel(this, nextSpellInfo, level);
2989
2990 if (nextSpellInfo != nullptr)
2991 return nextSpellInfo;
2992
2993 for (nextSpellInfo = this; nextSpellInfo != nullptr; nextSpellInfo = nextSpellInfo->GetPrevRankSpell())
2994 {
2995 // if found appropriate level
2996 if (uint32(level + 10) >= nextSpellInfo->SpellLevel)
2997 return nextSpellInfo;
2998
2999 // one rank less then
3000 }
3001
3002 // not found
3003 return nullptr;
3004}
#define sScriptMgr
Definition ScriptMgr.h:766
@ 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:2952
bool IsPositiveEffect(uint8 effIndex) const
Definition SpellInfo.cpp:1287

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

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

◆ GetAuraState()

AuraStateType SpellInfo::GetAuraState ( ) const
1995{
1996 return _auraState;
1997}
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
1976{
1978}
DispelType
Definition SharedDefines.h:1374
uint32 GetDispelMask() const
Definition SpellInfo.cpp:1975

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
1981{
1982 // If dispel all
1983 if (type == DISPEL_ALL)
1984 return DISPEL_ALL_MASK;
1985 else
1986 return uint32(1 << type);
1987}
#define DISPEL_ALL_MASK
Definition SharedDefines.h:1390
@ DISPEL_ALL
Definition SharedDefines.h:1382

References DISPEL_ALL, and DISPEL_ALL_MASK.

◆ GetDuration()

◆ GetEffect()

◆ GetEffectMechanic()

Mechanics SpellInfo::GetEffectMechanic ( uint8  effIndex) const
1959{
1960 if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
1961 return Mechanics(Effects[effIndex].Mechanic);
1962 if (Mechanic)
1963 return Mechanics(Mechanic);
1964 return MECHANIC_NONE;
1965}
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
1938{
1939 uint64 mask = 0;
1940 if (Mechanic)
1941 mask |= 1ULL << Mechanic;
1942 if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
1943 mask |= 1ULL << Effects[effIndex].Mechanic;
1944 return mask;
1945}

References Effects, and Mechanic.

Referenced by Unit::IsDamageReducedByArmor().

◆ GetEffects()

◆ GetExplicitTargetMask()

◆ GetFirstRankSpell()

◆ GetImmunityInfo()

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

References MAX_SPELL_EFFECTS.

Referenced by SpellEffectInfo::GetImmunityInfo().

◆ GetLastRankSpell()

SpellInfo const * SpellInfo::GetLastRankSpell ( ) const
2941{
2942 if (!ChainEntry)
2943 return nullptr;
2944 return ChainEntry->last;
2945}
SpellInfo const * last
Definition SpellMgr.h:555

References ChainEntry, and SpellChainNode::last.

◆ GetMaxDuration()

◆ GetMaxRange()

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

◆ GetMaxTicks()

uint32 SpellInfo::GetMaxTicks ( ) const
2795{
2796 int32 DotDuration = GetDuration();
2797 if (DotDuration == 0)
2798 return 1;
2799
2800 // 200% limit
2801 if (DotDuration > 30000)
2802 DotDuration = 30000;
2803
2804 for (uint8 x = 0; x < MAX_SPELL_EFFECTS; x++)
2805 {
2806 if (Effects[x].Effect == SPELL_EFFECT_APPLY_AURA)
2807 switch (Effects[x].ApplyAuraName)
2808 {
2813 if (Effects[x].Amplitude != 0)
2814 return DotDuration / Effects[x].Amplitude;
2815 break;
2816 default:
2817 break;
2818 }
2819 }
2820
2821 return 6;
2822}
@ SPELL_AURA_PERIODIC_HEAL
Definition SpellAuraDefines.h:71
int32 GetDuration() const
Definition SpellInfo.cpp:2764

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
2953{
2954 if (!ChainEntry)
2955 return nullptr;
2956 return ChainEntry->prev;
2957}
SpellInfo const * prev
Definition SpellMgr.h:552

References ChainEntry, and SpellChainNode::prev.

Referenced by GetAuraRankForLevel().

◆ GetRank()

◆ GetRecoveryTime()

uint32 SpellInfo::GetRecoveryTime ( ) const

◆ GetSchoolMask()

SpellSchoolMask SpellInfo::GetSchoolMask ( ) const
1922{
1924}
SpellSchoolMask
Definition SharedDefines.h:283

References SchoolMask.

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

◆ GetSpellMechanicMaskByEffectMask()

uint64 SpellInfo::GetSpellMechanicMaskByEffectMask ( uint32  effectMask) const
1948{
1949 uint64 mask = 0;
1950 if (Mechanic)
1951 mask |= 1ULL << Mechanic;
1952 for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
1953 if ((effectMask & (1 << i)) && Effects[i].Mechanic)
1954 mask |= 1ULL << Effects[i].Mechanic;
1955 return mask;
1956}

References Effects, MAX_SPELL_EFFECTS, and Mechanic.

Referenced by WorldObject::ModSpellDuration().

◆ GetSpellSpecific()

◆ HasAnyAura()

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

References Effects, and MAX_SPELL_EFFECTS.

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

◆ HasAnyEffectMechanic()

bool SpellInfo::HasAnyEffectMechanic ( ) const
1968{
1969 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1970 if (Effects[i].Mechanic)
1971 return true;
1972 return false;
1973}

References Effects, MAX_SPELL_EFFECTS, and Mechanic.

◆ HasAreaAuraEffect()

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

References Effects, and MAX_SPELL_EFFECTS.

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

◆ HasAttribute() [1/9]

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

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

◆ HasAttribute() [2/9]

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

◆ HasAttribute() [3/9]

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

◆ HasAttribute() [4/9]

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

◆ HasAttribute() [5/9]

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

◆ HasAttribute() [6/9]

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

◆ HasAttribute() [7/9]

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

◆ HasAttribute() [8/9]

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

◆ HasAttribute() [9/9]

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

◆ HasAura()

◆ HasEffect()

◆ HasEffectMechanic()

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

References Effects.

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

◆ HasInitialAggro()

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

References HasAttribute(), SPELL_ATTR1_NO_THREAT, and SPELL_ATTR3_SUPPRESS_TARGET_PROCS.

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

◆ HasOnlyDamageEffects()

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

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

Referenced by WorldObject::SpellHitResult().

◆ IsAbilityLearnedWithProfession()

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

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

Referenced by ComputeIsStackableWithRanks().

◆ IsAbilityOfSkillType()

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

References Id, and sSpellMgr.

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

◆ IsActionAllowedChannel()

bool SpellInfo::IsActionAllowedChannel ( ) const

◆ IsAffected()

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

References SpellFamilyFlags, and SpellFamilyName.

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

◆ IsAffectedBySpellMod()

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

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

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

◆ IsAffectedBySpellMods()

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

References AttributesEx3, and SPELL_ATTR3_IGNORE_CASTER_MODIFIERS.

Referenced by IsAffectedBySpellMod().

◆ IsAffectingArea()

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

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

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

◆ IsAllowingDeadTarget()

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

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

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

◆ IsAuraEffectEqual()

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

References EFFECT_0, Effects, and MAX_SPELL_EFFECTS.

Referenced by Spell::DoAllEffectOnTarget().

◆ IsAuraExclusiveBySpecificPerCasterWith()

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

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

Referenced by Aura::CanStackWith().

◆ IsAuraExclusiveBySpecificWith()

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

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

Referenced by Aura::CanStackWith().

◆ IsAutocastable()

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

References HasAttribute(), SPELL_ATTR0_PASSIVE, and SPELL_ATTR1_NO_AUTOCAST_AI.

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

◆ IsAutoRepeatRangedSpell()

bool SpellInfo::IsAutoRepeatRangedSpell ( ) const

◆ IsBreakingStealth()

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

References AttributesEx, and SPELL_ATTR1_ALLOW_WHILE_STEALTHED.

Referenced by Spell::prepare().

◆ IsChannelCategorySpell()

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

References Effects, MAX_SPELL_EFFECTS, and TARGET_SELECT_CATEGORY_CHANNEL.

Referenced by AuraEffect::HandlePeriodicTriggerSpellAuraTick().

◆ IsChanneled()

◆ IsCooldownStartedOnEvent()

◆ IsCritCapable()

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

References _isCritCapable.

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

◆ IsDeathPersistent()

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

References AttributesEx3, and SPELL_ATTR3_ALLOW_AURA_WHILE_DEAD.

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

◆ IsDifferentRankOf()

bool SpellInfo::IsDifferentRankOf ( SpellInfo const *  spellInfo) const
3012{
3013 if (Id == spellInfo->Id)
3014 return false;
3015 return IsRankOf(spellInfo);
3016}
bool IsRankOf(SpellInfo const *spellInfo) const
Definition SpellInfo.cpp:3006

References Id, and IsRankOf().

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

◆ IsExplicitDiscovery()

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

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

Referenced by LoadSkillDiscoveryTable().

◆ IsHighRankOf()

bool SpellInfo::IsHighRankOf ( SpellInfo const *  spellInfo) const
3019{
3020 if (ChainEntry && spellInfo->ChainEntry)
3021 {
3022 if (ChainEntry->first == spellInfo->ChainEntry->first)
3023 if (ChainEntry->rank > spellInfo->ChainEntry->rank)
3024 return true;
3025 }
3026 return false;
3027}

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

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

◆ IsLootCrafting()

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

References Effects, SPELL_EFFECT_CREATE_ITEM_2, SPELL_EFFECT_CREATE_RANDOM_ITEM, and SpellIconID.

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

◆ IsMultiSlotAura()

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

References Id, and IsPassive().

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

◆ IsPassive()

◆ IsPassiveStackableWithRanks()

bool SpellInfo::IsPassiveStackableWithRanks ( ) const

◆ IsPositive()

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

References AttributesCu, SPELL_ATTR0_CU_NEGATIVE, and SPELL_ATTR0_CU_POSITIVE.

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

◆ IsPositiveEffect()

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

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

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

◆ IsPrimaryProfession()

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

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

Referenced by IsPrimaryProfessionFirstRank().

◆ IsPrimaryProfessionFirstRank()

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

References GetRank(), and IsPrimaryProfession().

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

◆ IsProfession()

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

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

◆ IsProfessionOrRiding()

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

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

Referenced by ComputeIsStackableWithRanks().

◆ IsQuestTame()

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

References Effects, SPELL_AURA_DUMMY, SPELL_EFFECT_APPLY_AURA, and SPELL_EFFECT_THREAT.

◆ IsRangedWeaponSpell()

bool SpellInfo::IsRangedWeaponSpell ( ) const

◆ IsRanked()

bool SpellInfo::IsRanked ( ) const
2923{
2924 return ChainEntry != nullptr;
2925}

References ChainEntry.

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

◆ IsRankOf()

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

◆ IsRequiringDeadTarget()

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

References AttributesEx3, and SPELL_ATTR3_ONLY_ON_GHOSTS.

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

◆ IsSelfCast()

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

References Effects, MAX_SPELL_EFFECTS, and TARGET_UNIT_CASTER.

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

◆ IsSingleTarget()

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

References AttributesEx5, and SPELL_ATTR5_LIMIT_N.

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

◆ IsSpellValid()

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

References _isSpellValid.

Referenced by SpellMgr::IsSpellValid().

◆ IsStackableWithRanks()

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

References _isStackableWithRanks.

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

◆ IsTargetingArea()

bool SpellInfo::IsTargetingArea ( ) const

◆ LoadAuraState()

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

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

Referenced by SpellMgr::LoadSpellSpecificAndAuraState().

◆ LoadSpellSpecific()

SpellSpecificType SpellInfo::LoadSpellSpecific ( ) const

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

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

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

Referenced by SpellMgr::LoadSpellSpecificAndAuraState().

◆ NeedsComboPoints()

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

References AttributesEx, SPELL_ATTR1_FINISHING_MOVE_DAMAGE, and SPELL_ATTR1_FINISHING_MOVE_DURATION.

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

◆ NeedsExplicitUnitTarget()

◆ NeedsToBeTriggeredByCaster()

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

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

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

◆ RequireCooldownInfo()

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

References _requireCooldownInfo.

Referenced by Spell::SendSpellCooldown().

◆ SetCritCapable()

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

References _isCritCapable.

◆ SetSpellValid()

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

References _isSpellValid.

◆ SetStackableWithRanks()

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

References _isStackableWithRanks.

◆ ValidateAttribute6SpellDamageMods()

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

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

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

Friends And Related Symbol Documentation

◆ SpellMgr

friend class SpellMgr
friend

Member Data Documentation

◆ _auraState

AuraStateType SpellInfo::_auraState

◆ _diminishInfoNonTriggered

SpellDiminishInfo SpellInfo::_diminishInfoNonTriggered

◆ _diminishInfoTriggered

SpellDiminishInfo SpellInfo::_diminishInfoTriggered

◆ _immunityInfo

ImmunityInfo SpellInfo::_immunityInfo[MAX_SPELL_EFFECTS]

◆ _isCritCapable

bool SpellInfo::_isCritCapable

◆ _isSpellValid

bool SpellInfo::_isSpellValid

◆ _isStackableWithRanks

bool SpellInfo::_isStackableWithRanks

◆ _requireCooldownInfo

bool SpellInfo::_requireCooldownInfo

◆ _spellSpecific

◆ ActiveIconID

uint32 SpellInfo::ActiveIconID

◆ AreaGroupId

int32 SpellInfo::AreaGroupId

◆ Attributes

◆ AttributesCu

◆ AttributesEx

◆ AttributesEx2

◆ AttributesEx3

◆ AttributesEx4

uint32 SpellInfo::AttributesEx4

◆ AttributesEx5

◆ AttributesEx6

◆ AttributesEx7

uint32 SpellInfo::AttributesEx7

◆ AuraInterruptFlags

◆ BaseLevel

◆ CasterAuraSpell

uint32 SpellInfo::CasterAuraSpell

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

◆ CasterAuraState

uint32 SpellInfo::CasterAuraState

◆ CasterAuraStateNot

uint32 SpellInfo::CasterAuraStateNot

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

◆ CastTimeEntry

◆ CategoryEntry

◆ CategoryRecoveryTime

◆ ChainEntry

◆ ChannelInterruptFlags

◆ Dispel

◆ DmgClass

◆ DurationEntry

◆ Effects

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

Referenced by Player::_addSpell(), Player::_addTalentAurasAndSpells(), Spell::_handle_immediate_phase(), _InitializeExplicitTargetMask(), _IsPositiveEffect(), _LoadImmunityInfo(), Player::_removeTalentAurasAndSpells(), _UnloadImplicitTargetConditionLists(), spell_dk_will_of_the_necropolis::Absorb(), Spell::AddGOTarget(), Spell::AddItemTarget(), ConditionMgr::addToSpellImplicitTargetConditions(), Spell::AddUnitTarget(), Aura::BuildEffectMaskForOwner(), Unit::CalcAbsorbResist(), spell_dk_anti_magic_zone::CalculateAmount(), AuraEffect::CalculateAmount(), spell_krystallus_shatter_effect::CalculateDamage(), spell_gruul_shatter_effect::CalculateDamage(), spell_igb_incinerating_blast::CalculateDamage(), Spell::CalculateJumpSpeeds(), AuraEffect::CalculatePeriodic(), spell_igb_cannon_blast::CalculatePower(), spell_dru_treant_scaling::CalculateResistanceAmount(), spell_hun_generic_scaling::CalculateResistanceAmount(), spell_mage_pet_scaling::CalculateResistanceAmount(), spell_pri_shadowfiend_scaling::CalculateResistanceAmount(), spell_sha_feral_spirit_scaling::CalculateResistanceAmount(), spell_sha_fire_elemental_scaling::CalculateResistanceAmount(), spell_warl_generic_scaling::CalculateResistanceAmount(), spell_warl_infernal_scaling::CalculateResistanceAmount(), WorldObject::CalculateSpellDamage(), AuraEffect::CalculateSpellMod(), spell_dk_pet_scaling::CalculateStatAmount(), spell_dru_treant_scaling::CalculateStatAmount(), spell_hun_generic_scaling::CalculateStatAmount(), spell_mage_pet_scaling::CalculateStatAmount(), spell_pri_shadowfiend_scaling::CalculateStatAmount(), spell_sha_feral_spirit_scaling::CalculateStatAmount(), spell_sha_fire_elemental_scaling::CalculateStatAmount(), spell_warl_generic_scaling::CalculateStatAmount(), spell_warl_infernal_scaling::CalculateStatAmount(), SpellEffectInfo::CalcValue(), Spell::CanExecuteTriggersOnHit(), Spell::CanOpenLock(), CanSpellCastOverrideAuraEffect(), CanSpellProvideImmunityAgainstAura(), Aura::CanStackWith(), 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_item_proc_below_pct_damaged::CheckProc(), spell_sha_nature_guardian::CheckProc(), spell_hun_ascpect_of_the_viper::CheckProc(), CheckShapeshift(), spell_rotface_unstable_ooze_explosion::CheckTarget(), AuraEffect::CleanupTriggeredSpells(), ComputeIsCritCapable(), SpellMgr::ComputeIsSpellValid(), ComputeIsStackableWithRanks(), Spell::DoAllEffectOnLaunchTarget(), Spell::DoAllEffectOnTarget(), Spell::DoSpellHitOnUnit(), Spell::EffectActivateObject(), Spell::EffectActivateRune(), Spell::EffectAddFarsight(), Spell::EffectApplyGlyph(), Spell::EffectBind(), Spell::EffectCastButtons(), Spell::EffectCreateItem(), Spell::EffectCreateItem2(), Spell::EffectCreateTamedPet(), Spell::EffectDiscoverTaxi(), Spell::EffectDispel(), Spell::EffectDispelMechanic(), Spell::EffectDuel(), Spell::EffectDurabilityDamage(), Spell::EffectDurabilityDamagePCT(), Spell::EffectEnchantHeldItem(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Spell::EffectEnchantItemTmp(), Spell::EffectEnergize(), Spell::EffectEnergizePct(), Spell::EffectFeedPet(), Spell::EffectForceCast(), Spell::EffectForceDeselect(), Spell::EffectGameObjectSetDestructionState(), Spell::EffectKillCredit(), Spell::EffectKillCreditPersonal(), Spell::EffectKnockBack(), Spell::EffectLeapBack(), Spell::EffectLearnPetSpell(), Spell::EffectLearnSkill(), Spell::EffectLearnSpell(), Spell::EffectPersistentAA(), Spell::EffectPlayMusic(), Spell::EffectPlaySound(), Spell::EffectPowerBurn(), Spell::EffectPowerDrain(), Spell::EffectPullTowards(), Spell::EffectQuestClear(), Spell::EffectQuestComplete(), Spell::EffectQuestFail(), Spell::EffectQuestStart(), Spell::EffectRechargeManaGem(), Spell::EffectRemoveAura(), Spell::EffectReputation(), Spell::EffectResurrectNew(), Spell::EffectSanctuary(), Spell::EffectSchoolDMG(), Spell::EffectScriptEffect(), Spell::EffectSelfResurrect(), Spell::EffectSendEvent(), Spell::EffectSendTaxi(), Spell::EffectStealBeneficialBuff(), Spell::EffectSummonChangeItem(), Spell::EffectSummonObject(), Spell::EffectSummonObjectWild(), Spell::EffectSummonPet(), Spell::EffectSummonType(), Spell::EffectTransmitted(), Spell::EffectTriggerMissileSpell(), Spell::EffectTriggerRitualOfSummoning(), Spell::EffectTriggerSpell(), Spell::EffectUnlearnSpecialization(), Spell::EffectWeaponDmg(), EquippedOk(), UnitAI::FillAISpellInfo(), ScriptMgr::FillSpellSummary(), UnitAura::FillTargetMap(), DynObjAura::FillTargetMap(), 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_q13010_jokkum_summon::HandleSummon(), spell_wintergrasp_create_vehicle::HandleSummon(), spell_item_summon_or_dismiss::HandleSummon(), spell_item_draenic_pale_ale::HandleSummon(), spell_putricide_mutated_plague_aura::HandleTriggerSpell(), spell_mage_arcane_blast::HandleTriggerSpell(), Player::Has310Flyer(), HasAnyAura(), HasAnyEffectMechanic(), HasAreaAuraEffect(), HasAura(), Unit::HasAuraWithMechanic(), HasEffect(), HasEffectMechanic(), Player::HasItemFitToSpellRequirements(), HasOnlyDamageEffects(), AuraEffect::HasSpellClassMask(), ItemTemplate::HasSpellPowerStat(), AuraEffect::IsAffectedOnSpell(), IsAffectingArea(), IsAuraEffectEqual(), IsChannelCategorySpell(), Unit::IsDamageReducedByArmor(), IsExplicitDiscovery(), Creature::IsImmunedToSpell(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpellEffect(), Creature::IsImmunedToSpellEffect(), Totem::IsImmunedToSpellEffect(), IsLootCrafting(), IsPrimaryProfession(), IsProfession(), IsProfessionOrRiding(), IsQuestTame(), IsSelfCast(), ConditionMgr::isSourceTypeValid(), IsTargetingArea(), AchievementCriteriaData::IsValid(), Player::learnQuestRewardedSpells(), Player::LearnTalent(), spell_shield_generator_aura::Load(), spell_dk_anti_magic_shell_raid::Load(), spell_dk_anti_magic_shell_self::Load(), spell_dk_anti_magic_zone::Load(), spell_dk_spell_deflection::Load(), spell_dk_will_of_the_necropolis::Load(), spell_dru_moonkin_form_passive::Load(), spell_dru_primal_tenacity::Load(), spell_dru_savage_defense::Load(), spell_gen_absorb0_hitlimit1::Load(), spell_pal_ardent_defender::Load(), spell_pal_divine_sacrifice::Load(), spell_pal_divine_storm::Load(), spell_pri_guardian_spirit::Load(), spell_rog_cheat_death::Load(), spell_rog_nerves_of_steel::Load(), spell_sha_astral_shift::Load(), LoadAuraState(), SpellMgr::LoadEnchantCustomAttr(), SpellMgr::LoadPetDefaultSpells(), ObjectMgr::LoadQuests(), SpellMgr::LoadSpellCones(), SpellMgr::LoadSpellInfoCorrections(), SpellMgr::LoadSpellInfoCustomAttributes(), SpellMgr::LoadSpellLearnSkills(), SpellMgr::LoadSpellPetAuras(), SpellMgr::LoadSpellProcs(), ObjectMgr::LoadSpellScripts(), LoadSpellSpecific(), SpellMgr::LoadSpellTargetPositions(), WorldObject::MagicSpellHitResult(), Unit::MeleeDamageBonusDone(), spell_gen_random_target32::ModDest(), spell_q12308_escape_from_silverbrook_summon_worgen::ModDest(), NeedsToBeTriggeredByCaster(), spell_dru_rejuvenation_moonglade_2_set::OnApply(), spell_valithria_suppression_aura::OnApply(), spell_kologarn_stone_shout_aura::OnPeriodic(), spell_item_fel_mana_potion::OnPeriodic(), spell_deathwhisper_dark_reckoning::OnPeriodic(), spell_pal_glyph_of_divinity::OnProc(), spell_putricide_mutated_plague_aura::OnRemove(), spell_valithria_suppression_aura::OnRemove(), spell_dru_rejuvenation_moonglade_2_set::OnRemove(), spell_hor_shared_suffering_aura::OnRemove(), spell_gen_sober_up::OnRemove(), spell_entropius_negative_energy_periodic::PeriodicTick(), spell_doomfire::PeriodicTick(), spell_blood_queen_pact_of_the_darkfallen_dmg_aura::PeriodicTick(), spell_broggok_poison_cloud::PeriodicTick(), spell_pal_beacon_of_light::PeriodicTick(), Spell::prepare(), Player::PrepareCharmAISpells(), Spell::PrepareTriggersExecutedOnHit(), spellinfo_commandscript::PrintEffects(), spellinfo_commandscript::PrintTargets(), Creature::reachWithSpellAttack(), Creature::reachWithSpellCure(), spell_wg_reduce_damage_by_distance::RecalculateDamage(), spell_gen_mounted_charge::Register(), spell_gen_defend::Register(), Player::removeSpell(), Player::resetTalents(), Spell::SelectEffectImplicitTargets(), Spell::SelectEffectTypeImplicitTargets(), Spell::SelectImplicitAreaTargets(), Spell::SelectImplicitCasterDestTargets(), Spell::SelectImplicitChainTargets(), Spell::SelectImplicitConeTargets(), Spell::SelectImplicitDestDestTargets(), Spell::SelectImplicitNearbyTargets(), Spell::SelectImplicitTargetDestTargets(), Spell::SelectImplicitTrajTargets(), Spell::SelectSpellTargets(), Spell::SendLogExecute(), Spell::SetSpellValue(), Unit::SpellDamageBonusDone(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), WorldObject::SpellHitResult(), WorldObject::SpellHitResult(), boss_onyxia::SpellHitTarget(), boss_rotface::boss_rotfaceAI::SpellHitTarget(), SpellInfo(), SpellValue::SpellValue(), Acore::Hyperlinks::LinkTags::trade::StoreTo(), go_wind_stone::go_wind_stoneAI::SummonNPC(), Spell::update(), Player::UpdateAttackPowerAndDamage(), Spell::UpdateChanneledTargetList(), spell_deathwhisper_dark_reckoning::Validate(), spell_mage_living_bomb::Validate(), spell_entropius_negative_energy_periodic::Validate(), spell_putricide_ooze_tank_protection::Validate(), spell_q11652_rescue_injured_soldier::Validate(), spell_broggok_poison_cloud::Validate(), spell_dru_wild_growth::Validate(), spell_gen_arena_drink::Validate(), spell_gen_eject_passenger::Validate(), spell_hun_cobra_strikes::Validate(), spell_hun_rapid_recuperation::Validate(), spell_pal_beacon_of_light::Validate(), spell_pal_improved_lay_of_hands::Validate(), spell_rog_turn_the_tables::Validate(), spell_sha_mana_tide::Validate(), and Spell::WriteCastResultInfo().

◆ EquippedItemClass

◆ EquippedItemInventoryTypeMask

◆ EquippedItemSubClassMask

◆ ExcludeCasterAuraSpell

◆ ExcludeTargetAuraSpell

◆ ExplicitTargetMask

uint32 SpellInfo::ExplicitTargetMask

◆ FacingCasterFlags

uint32 SpellInfo::FacingCasterFlags

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

◆ Id

uint32 SpellInfo::Id

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

◆ InterruptFlags

◆ JumpDistance

float SpellInfo::JumpDistance

◆ ManaCost

◆ ManaCostPercentage

◆ ManaCostPerlevel

uint32 SpellInfo::ManaCostPerlevel

Referenced by SpellInfo().

◆ ManaPerSecond

◆ ManaPerSecondPerLevel

uint32 SpellInfo::ManaPerSecondPerLevel

◆ MaxAffectedTargets

◆ MaxLevel

◆ MaxTargetLevel

uint32 SpellInfo::MaxTargetLevel

◆ Mechanic

◆ PowerType

◆ PreventionType

◆ ProcChance

◆ ProcCharges

◆ ProcFlags

◆ RangeEntry

◆ Rank

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

◆ Reagent

◆ ReagentCount

◆ RecoveryTime

◆ RequiresSpellFocus

◆ RuneCostID

◆ SchoolMask

◆ Speed

◆ SpellFamilyFlags

flag96 SpellInfo::SpellFamilyFlags

Referenced by AuraEffect::CalcPeriodicCritChance(), Player::CanNoReagentCast(), Aura::CanStackWith(), Spell::CheckItems(), spell_dk_dancing_rune_weapon::CheckProc(), spell_dru_eclipse::CheckProc(), spell_gen_black_magic_enchant::CheckProc(), spell_hun_misdirection::CheckProc(), spell_mage_brain_freeze::CheckProc(), spell_mage_gen_extra_effects::CheckProc(), spell_mage_missile_barrage::CheckProc(), spell_mage_clearcasting::CheckProc(), spell_pal_seal_of_light::CheckProc(), spell_pal_item_t6_trinket::CheckProc(), spell_pal_seal_of_vengeance_aura::CheckProc(), spell_pri_vampiric_touch::CheckProc(), spell_pri_vampiric_embrace::CheckProc(), spell_rog_focused_attacks::CheckProc(), spell_rog_cold_blood::CheckProc(), spell_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(), WorldObject::ModSpellDuration(), Spell::prepareDataForTriggerSystem(), Spell::PrepareTriggersExecutedOnHit(), spellinfo_commandscript::PrintGeneralInfo(), spell_dru_enrage::RecalculateBaseArmor(), Unit::RemoveAurasByShapeShift(), Unit::RemoveAurasDueToSpellByDispel(), Unit::RemoveAurasWithFamily(), Player::RestoreSpellMods(), Unit::SpellDamageBonusDone(), Unit::SpellHealingBonusTaken(), SpellInfo(), Unit::SpellPctDamageModsDone(), Unit::SpellTakenCritChance(), AuraScriptProcTestFixture::TestSpellFamilyMatch(), and ValidateAttribute6SpellDamageMods().

◆ SpellFamilyName

uint32 SpellInfo::SpellFamilyName

Referenced by Player::AddSpellAndCategoryCooldowns(), AuraEffect::CalcPeriodicCritChance(), Aura::CanStackWith(), Spell::CheckCast(), Spell::CheckItems(), spell_dru_omen_of_clarity::CheckProc(), spell_gen_allow_proc_from_spells_with_cost::CheckProc(), spell_gen_black_magic_enchant::CheckProc(), spell_item_essence_of_life::CheckProc(), spell_mage_gen_extra_effects::CheckProc(), spell_mage_dragon_breath::CheckProc(), spell_mage_clearcasting::CheckProc(), spell_pal_seal_of_vengeance_aura::CheckProc(), spell_pri_vampiric_touch::CheckProc(), spell_rog_focused_attacks::CheckProc(), spell_rog_cold_blood::CheckProc(), 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(), WorldObject::ModSpellDuration(), Acore::AbsorbAuraOrderPred::operator()(), Player::PrepareCharmAISpells(), Spell::prepareDataForTriggerSystem(), Spell::PrepareTriggersExecutedOnHit(), spellinfo_commandscript::PrintGeneralInfo(), spell_dru_enrage::RecalculateBaseArmor(), Unit::RemoveAurasByShapeShift(), Unit::RemoveAurasDueToSpellByDispel(), Unit::RemoveAurasWithFamily(), ArenaSpectator::ShouldSendAura(), Unit::SpellDamageBonusDone(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), WorldObject::SpellHitResult(), WorldObject::SpellHitResult(), SpellInfo(), Unit::SpellPctDamageModsDone(), Unit::SpellPctHealingModsDone(), Unit::SpellTakenCritChance(), AuraScriptProcTestFixture::TestSpellFamilyMatch(), and ValidateAttribute6SpellDamageMods().

◆ SpellIconID

◆ SpellLevel

◆ SpellName

◆ SpellPriority

uint32 SpellInfo::SpellPriority

Referenced by SpellInfo().

◆ SpellVisual

◆ StackAmount

◆ Stances

◆ StancesNot

◆ StartRecoveryCategory

◆ StartRecoveryTime

◆ TargetAuraSpell

uint32 SpellInfo::TargetAuraSpell

Referenced by CheckTarget(), and SpellInfo().

◆ TargetAuraState

uint32 SpellInfo::TargetAuraState

◆ TargetAuraStateNot

uint32 SpellInfo::TargetAuraStateNot

Referenced by CheckTarget(), and SpellInfo().

◆ TargetCreatureType

uint32 SpellInfo::TargetCreatureType

◆ Targets

◆ Totem

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

◆ TotemCategory

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

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