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

Static Public Member Functions

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

Public Attributes

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

Private Member Functions

std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > & _GetEffects ()
 
SpellEffectInfo_GetEffect (SpellEffIndex index)
 

Friends

class SpellMgr
 

Detailed Description

Constructor & Destructor Documentation

◆ SpellInfo()

SpellInfo::SpellInfo ( SpellEntry const *  spellEntry)
779{
780 Id = spellEntry->Id;
781 CategoryEntry = spellEntry->Category ? sSpellCategoryStore.LookupEntry(spellEntry->Category) : nullptr;
782 Dispel = spellEntry->Dispel;
783 Mechanic = spellEntry->Mechanic;
784 Attributes = spellEntry->Attributes;
785 AttributesEx = spellEntry->AttributesEx;
786 AttributesEx2 = spellEntry->AttributesEx2;
787 AttributesEx3 = spellEntry->AttributesEx3;
788 AttributesEx4 = spellEntry->AttributesEx4;
789 AttributesEx5 = spellEntry->AttributesEx5;
790 AttributesEx6 = spellEntry->AttributesEx6;
791 AttributesEx7 = spellEntry->AttributesEx7;
792 AttributesCu = 0;
793 Stances = spellEntry->Stances;
794 StancesNot = spellEntry->StancesNot;
795 Targets = spellEntry->Targets;
796 TargetCreatureType = spellEntry->TargetCreatureType;
797 RequiresSpellFocus = spellEntry->RequiresSpellFocus;
798 FacingCasterFlags = spellEntry->FacingCasterFlags;
799 CasterAuraState = spellEntry->CasterAuraState;
800 TargetAuraState = spellEntry->TargetAuraState;
801 CasterAuraStateNot = spellEntry->CasterAuraStateNot;
802 TargetAuraStateNot = spellEntry->TargetAuraStateNot;
803 CasterAuraSpell = spellEntry->CasterAuraSpell;
804 TargetAuraSpell = spellEntry->TargetAuraSpell;
805 ExcludeCasterAuraSpell = spellEntry->ExcludeCasterAuraSpell;
806 ExcludeTargetAuraSpell = spellEntry->ExcludeTargetAuraSpell;
807 CastTimeEntry = spellEntry->CastingTimeIndex ? sSpellCastTimesStore.LookupEntry(spellEntry->CastingTimeIndex) : nullptr;
808 RecoveryTime = spellEntry->RecoveryTime;
809 CategoryRecoveryTime = spellEntry->CategoryRecoveryTime;
810 StartRecoveryCategory = spellEntry->StartRecoveryCategory;
811 StartRecoveryTime = spellEntry->StartRecoveryTime;
812 InterruptFlags = spellEntry->InterruptFlags;
813 AuraInterruptFlags = spellEntry->AuraInterruptFlags;
814 ChannelInterruptFlags = spellEntry->ChannelInterruptFlags;
815 ProcFlags = spellEntry->ProcFlags;
816 ProcChance = spellEntry->ProcChance;
817 ProcCharges = spellEntry->ProcCharges;
818 MaxLevel = spellEntry->MaxLevel;
819 BaseLevel = spellEntry->BaseLevel;
820 SpellLevel = spellEntry->SpellLevel;
821 DurationEntry = spellEntry->DurationIndex ? sSpellDurationStore.LookupEntry(spellEntry->DurationIndex) : nullptr;
822 PowerType = spellEntry->PowerType;
823 ManaCost = spellEntry->ManaCost;
824 ManaCostPerlevel = spellEntry->ManaCostPerlevel;
825 ManaPerSecond = spellEntry->ManaPerSecond;
826 ManaPerSecondPerLevel = spellEntry->ManaPerSecondPerLevel;
827 ManaCostPercentage = spellEntry->ManaCostPercentage;
828 RuneCostID = spellEntry->RuneCostID;
829 RangeEntry = spellEntry->RangeIndex ? sSpellRangeStore.LookupEntry(spellEntry->RangeIndex) : nullptr;
830 Speed = spellEntry->Speed;
831 StackAmount = spellEntry->StackAmount;
832 Totem = spellEntry->Totem;
833 Reagent = spellEntry->Reagent;
834 ReagentCount = spellEntry->ReagentCount;
835 EquippedItemClass = spellEntry->EquippedItemClass;
836 EquippedItemSubClassMask = spellEntry->EquippedItemSubClassMask;
837 EquippedItemInventoryTypeMask = spellEntry->EquippedItemInventoryTypeMask;
838 TotemCategory = spellEntry->TotemCategory;
839 SpellVisual = spellEntry->SpellVisual;
840 SpellIconID = spellEntry->SpellIconID;
841 ActiveIconID = spellEntry->ActiveIconID;
842 SpellPriority = spellEntry->SpellPriority;
843 SpellName = spellEntry->SpellName;
844 Rank = spellEntry->Rank;
845 MaxTargetLevel = spellEntry->MaxTargetLevel;
846 MaxAffectedTargets = spellEntry->MaxAffectedTargets;
847 SpellFamilyName = spellEntry->SpellFamilyName;
848 SpellFamilyFlags = spellEntry->SpellFamilyFlags;
849 DmgClass = spellEntry->DmgClass;
850 PreventionType = spellEntry->PreventionType;
851 AreaGroupId = spellEntry->AreaGroupId;
852 SchoolMask = spellEntry->SchoolMask;
853 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
854 Effects[i] = SpellEffectInfo(spellEntry, this, i);
855
856 ChainEntry = nullptr;
858
859 // Mine
860 _isStackableWithRanks = false;
861 _isSpellValid = true;
862 _isCritCapable = false;
863 _requireCooldownInfo = false;
864}
std::uint8_t uint8
Definition: Define.h:109
#define MAX_SPELL_EFFECTS
Definition: DBCStructure.h:1636
Targets
Definition: SharedDefines.h:1409
TotemCategory
Definition: SharedDefines.h:3083
ProcFlags
Definition: SpellMgr.h:104
PowerType
Definition: VehicleDefines.h:29
DBCStorage< SpellCategoryEntry > sSpellCategoryStore(SpellCategoryfmt)
DBCStorage< SpellCastTimesEntry > sSpellCastTimesStore(SpellCastTimefmt)
DBCStorage< SpellRangeEntry > sSpellRangeStore(SpellRangefmt)
DBCStorage< SpellDurationEntry > sSpellDurationStore(SpellDurationfmt)
Definition: Totem.h:51
Totem(SummonPropertiesEntry const *properties, ObjectGuid owner)
Definition: Totem.cpp:27
Definition: SpellInfo.h:249
uint32 ChannelInterruptFlags
Definition: SpellInfo.h:354
uint32 RequiresSpellFocus
Definition: SpellInfo.h:337
uint32 BaseLevel
Definition: SpellInfo.h:359
uint32 MaxLevel
Definition: SpellInfo.h:358
uint32 SpellLevel
Definition: SpellInfo.h:360
uint32 TargetAuraState
Definition: SpellInfo.h:340
std::array< int32, MAX_SPELL_REAGENTS > Reagent
Definition: SpellInfo.h:373
uint32 ExcludeTargetAuraSpell
Definition: SpellInfo.h:346
uint32 TargetAuraStateNot
Definition: SpellInfo.h:342
uint32 PreventionType
Definition: SpellInfo.h:390
uint32 CasterAuraSpell
Definition: SpellInfo.h:343
uint32 RuneCostID
Definition: SpellInfo.h:368
uint32 MaxTargetLevel
Definition: SpellInfo.h:385
uint32 Stances
Definition: SpellInfo.h:333
uint32 ManaCostPerlevel
Definition: SpellInfo.h:364
flag96 SpellFamilyFlags
Definition: SpellInfo.h:388
uint32 AttributesCu
Definition: SpellInfo.h:332
uint32 RecoveryTime
Definition: SpellInfo.h:348
uint32 ManaPerSecondPerLevel
Definition: SpellInfo.h:366
bool _isSpellValid
Definition: SpellInfo.h:401
uint32 StancesNot
Definition: SpellInfo.h:334
uint32 StackAmount
Definition: SpellInfo.h:371
uint32 Mechanic
Definition: SpellInfo.h:323
uint32 Id
Definition: SpellInfo.h:320
SpellRangeEntry const * RangeEntry
Definition: SpellInfo.h:369
uint32 ProcCharges
Definition: SpellInfo.h:357
bool _requireCooldownInfo
Definition: SpellInfo.h:403
bool _isStackableWithRanks
Definition: SpellInfo.h:400
uint32 Dispel
Definition: SpellInfo.h:322
uint32 ActiveIconID
Definition: SpellInfo.h:381
float Speed
Definition: SpellInfo.h:370
int32 EquippedItemClass
Definition: SpellInfo.h:375
uint32 SchoolMask
Definition: SpellInfo.h:392
uint32 CasterAuraState
Definition: SpellInfo.h:339
std::array< uint32, 2 > SpellVisual
Definition: SpellInfo.h:379
uint32 CategoryRecoveryTime
Definition: SpellInfo.h:349
uint32 ExplicitTargetMask
Definition: SpellInfo.h:394
uint32 AttributesEx3
Definition: SpellInfo.h:327
uint32 CasterAuraStateNot
Definition: SpellInfo.h:341
int32 AreaGroupId
Definition: SpellInfo.h:391
uint32 ManaPerSecond
Definition: SpellInfo.h:365
std::array< uint32, MAX_SPELL_REAGENTS > ReagentCount
Definition: SpellInfo.h:374
uint32 InterruptFlags
Definition: SpellInfo.h:352
SpellDurationEntry const * DurationEntry
Definition: SpellInfo.h:361
uint32 Attributes
Definition: SpellInfo.h:324
uint32 AttributesEx
Definition: SpellInfo.h:325
uint32 SpellPriority
Definition: SpellInfo.h:382
SpellCategoryEntry const * CategoryEntry
Definition: SpellInfo.h:321
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
Definition: SpellInfo.h:393
uint32 MaxAffectedTargets
Definition: SpellInfo.h:386
uint32 ManaCostPercentage
Definition: SpellInfo.h:367
uint32 AttributesEx6
Definition: SpellInfo.h:330
uint32 AttributesEx7
Definition: SpellInfo.h:331
int32 EquippedItemSubClassMask
Definition: SpellInfo.h:376
uint32 FacingCasterFlags
Definition: SpellInfo.h:338
uint32 StartRecoveryTime
Definition: SpellInfo.h:351
uint32 TargetAuraSpell
Definition: SpellInfo.h:344
uint32 SpellIconID
Definition: SpellInfo.h:380
SpellChainNode const * ChainEntry
Definition: SpellInfo.h:395
bool _isCritCapable
Definition: SpellInfo.h:402
SpellCastTimesEntry const * CastTimeEntry
Definition: SpellInfo.h:347
int32 EquippedItemInventoryTypeMask
Definition: SpellInfo.h:377
uint32 TargetCreatureType
Definition: SpellInfo.h:336
uint32 ProcChance
Definition: SpellInfo.h:356
uint32 AttributesEx2
Definition: SpellInfo.h:326
uint32 DmgClass
Definition: SpellInfo.h:389
uint32 AttributesEx5
Definition: SpellInfo.h:329
uint32 AttributesEx4
Definition: SpellInfo.h:328
uint32 ExcludeCasterAuraSpell
Definition: SpellInfo.h:345
uint32 StartRecoveryCategory
Definition: SpellInfo.h:350
uint32 SpellFamilyName
Definition: SpellInfo.h:387
uint32 ManaCost
Definition: SpellInfo.h:363
std::array< char const *, 16 > SpellName
Definition: SpellInfo.h:383
uint32 AuraInterruptFlags
Definition: SpellInfo.h:353
std::array< char const *, 16 > Rank
Definition: SpellInfo.h:384

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, 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 ( )
867{
869}
void _UnloadImplicitTargetConditionLists()
Definition: SpellInfo.cpp:2873

References _UnloadImplicitTargetConditionLists().

Member Function Documentation

◆ _GetEffect()

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

References ASSERT.

◆ _GetEffects()

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

◆ _InitializeExplicitTargetMask()

void SpellInfo::_InitializeExplicitTargetMask ( )
2593{
2594 bool srcSet = false;
2595 bool dstSet = false;
2596 uint32 targetMask = Targets;
2597 // prepare target mask using effect target entries
2598 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2599 {
2600 if (!Effects[i].IsEffect())
2601 continue;
2602 targetMask |= Effects[i].TargetA.GetExplicitTargetMask(srcSet, dstSet);
2603 targetMask |= Effects[i].TargetB.GetExplicitTargetMask(srcSet, dstSet);
2604
2605 // add explicit target flags based on spell effects which have EFFECT_IMPLICIT_TARGET_EXPLICIT and no valid target provided
2606 if (Effects[i].GetImplicitTargetType() != EFFECT_IMPLICIT_TARGET_EXPLICIT)
2607 continue;
2608
2609 // extend explicit target mask only if valid targets for effect could not be provided by target types
2610 uint32 effectTargetMask = Effects[i].GetMissingTargetMask(srcSet, dstSet, targetMask);
2611
2612 // don't add explicit object/dest flags when spell has no max range
2613 if (GetMaxRange(true) == 0.0f && GetMaxRange(false) == 0.0f)
2615 targetMask |= effectTargetMask;
2616 }
2617 ExplicitTargetMask = targetMask;
2618}
std::uint32_t uint32
Definition: Define.h:107
@ EFFECT_IMPLICIT_TARGET_EXPLICIT
Definition: SpellInfo.h:143
@ TARGET_FLAG_GAMEOBJECT
Definition: SpellInfo.h:57
@ TARGET_FLAG_DEST_LOCATION
Definition: SpellInfo.h:52
@ TARGET_FLAG_UNIT_MASK
Definition: SpellInfo.h:68
@ TARGET_FLAG_CORPSE_MASK
Definition: SpellInfo.h:71
float GetMaxRange(bool positive=false, Unit *caster=nullptr, Spell *spell=nullptr) const
Definition: SpellInfo.cpp:2323
uint32 Targets
Definition: SpellInfo.h:335

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
2621{
2622 // not found a single positive spell with this attribute
2624 return false;
2625
2626 switch (Mechanic)
2627 {
2629 return true;
2630 default:
2631 break;
2632 }
2633
2634 // Special case: effects which determine positivity of whole spell
2635 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2636 {
2637 if (Effects[i].IsAura() && Effects[i].ApplyAuraName == SPELL_AURA_MOD_STEALTH)
2638 return true;
2639 }
2640
2641 switch (Effects[effIndex].Effect)
2642 {
2643 case SPELL_EFFECT_DUMMY:
2644 // some explicitly required dummy effect sets
2645 switch (Id)
2646 {
2647 case 28441:
2648 return false; // AB Effect 000
2649 default:
2650 break;
2651 }
2652 break;
2653 // always positive effects (check before target checks that provided non-positive result in some case for positive effects)
2654 case SPELL_EFFECT_HEAL:
2659 return true;
2661 return false;
2662
2664 return false;
2665
2667 {
2668 bool only = true;
2669 for (int i = EFFECT_0; i <= EFFECT_2; ++i)
2670 {
2671 if (Effects[effIndex].Effect > 0 && Effects[effIndex].Effect != SPELL_EFFECT_SCHOOL_DAMAGE)
2672 only = false;
2673 if (Effects[effIndex].Effect == SPELL_EFFECT_GAMEOBJECT_DAMAGE)
2674 return false;
2675 }
2676 // effects with school damage only cannot be positive...
2677 if (only)
2678 return false;
2679 break;
2680 }
2683 {
2684 for (int i = EFFECT_0; i <= EFFECT_2; ++i)
2685 if (Effects[effIndex].Effect == SPELL_EFFECT_GAMEOBJECT_DAMAGE)
2686 return false;
2687 break;
2688 }
2689
2690 // non-positive aura use
2693 {
2694 switch (Effects[effIndex].ApplyAuraName)
2695 {
2696 case SPELL_AURA_MOD_DAMAGE_DONE: // dependent from bas point sign (negative -> negative)
2703 if (Effects[effIndex].CalcValue() < 0)
2704 return false;
2705 break;
2706 case SPELL_AURA_MOD_DAMAGE_TAKEN: // dependent from bas point sign (positive -> negative)
2707 if (Effects[effIndex].CalcValue() > 0)
2708 return false;
2709 break;
2712 if (Effects[effIndex].CalcValue() > 0)
2713 return true; // some expected positive spells have SPELL_ATTR1_NEGATIVE
2714 break;
2716 return true;
2720 if (!deep)
2721 {
2722 if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(Effects[effIndex].TriggerSpell))
2723 {
2724 // negative targets of main spell return early
2725 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2726 {
2727 if (!spellTriggeredProto->Effects[i].Effect)
2728 continue;
2729 // if non-positive trigger cast targeted to positive target this main cast is non-positive
2730 // this will place this spell auras as debuffs
2731 if (_IsPositiveTarget(spellTriggeredProto->Effects[i].TargetA.GetTarget(), spellTriggeredProto->Effects[i].TargetB.GetTarget()) && !spellTriggeredProto->_IsPositiveEffect(i, true))
2732 return false;
2733 }
2734 }
2735 }
2737 // many positive auras have negative triggered spells at damage for example and this not make it negative (it can be canceled for example)
2738 break;
2739 case SPELL_AURA_MOD_STUN: //have positive and negative spells, we can't sort its correctly at this moment.
2740 if (effIndex == 0 && Effects[1].Effect == 0 && Effects[2].Effect == 0)
2741 return false; // but all single stun aura spells is negative
2742 break;
2744 if (Id == 24740) // Wisp Costume
2745 return true;
2746 return false;
2750 case SPELL_AURA_GHOST:
2755 return false;
2756 case SPELL_AURA_PERIODIC_DAMAGE: // used in positive spells also.
2757 // part of negative spell if casted at self (prevent cancel)
2758 if (Effects[effIndex].TargetA.GetTarget() == TARGET_UNIT_CASTER)
2759 return false;
2760 break;
2761 case SPELL_AURA_MOD_DECREASE_SPEED: // used in positive spells also
2762 // part of positive spell if casted at self
2763 if (Effects[effIndex].TargetA.GetTarget() != TARGET_UNIT_CASTER)
2764 return false;
2765 // but not this if this first effect (didn't find better check)
2766 if (HasAttribute(SPELL_ATTR0_AURA_IS_DEBUFF) && effIndex == 0)
2767 return false;
2768 break;
2770 {
2771 // non-positive immunities
2772 switch (Effects[effIndex].MiscValue)
2773 {
2774 case MECHANIC_BANDAGE:
2775 case MECHANIC_SHIELD:
2776 case MECHANIC_MOUNT:
2778 return false;
2779 default:
2780 break;
2781 }
2782 break;
2783 }
2784 case SPELL_AURA_ADD_FLAT_MODIFIER: // mods
2786 {
2787 // non-positive mods
2788 switch (Effects[effIndex].MiscValue)
2789 {
2790 case SPELLMOD_COST: // dependent from bas point sign (negative -> positive)
2791 if (Effects[effIndex].CalcValue() > 0)
2792 {
2793 if (!deep)
2794 {
2795 bool negative = true;
2796 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2797 {
2798 if (i != effIndex)
2799 if (_IsPositiveEffect(i, true))
2800 {
2801 negative = false;
2802 break;
2803 }
2804 }
2805 if (negative)
2806 return false;
2807 }
2808 }
2809 break;
2810 default:
2811 break;
2812 }
2813 break;
2814 }
2815 default:
2816 break;
2817 }
2818 break;
2819 }
2820 default:
2821 break;
2822 }
2823
2824 // non-positive targets
2825 if (!_IsPositiveTarget(Effects[effIndex].TargetA.GetTarget(), Effects[effIndex].TargetB.GetTarget()))
2826 return false;
2827
2828 // negative spell if triggered spell is negative
2829 if (!deep && !Effects[effIndex].ApplyAuraName && Effects[effIndex].TriggerSpell)
2830 {
2831 if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(Effects[effIndex].TriggerSpell))
2832 if (!spellTriggeredProto->_IsPositiveSpell())
2833 return false;
2834 }
2835
2836 // ok, positive
2837 return true;
2838}
@ EFFECT_0
Definition: SharedDefines.h:31
@ EFFECT_2
Definition: SharedDefines.h:33
@ SPELL_EFFECT_DUMMY
Definition: SharedDefines.h:781
@ SPELL_EFFECT_ENERGIZE_PCT
Definition: SharedDefines.h:915
@ SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
Definition: SharedDefines.h:906
@ SPELL_EFFECT_HEAL
Definition: SharedDefines.h:788
@ SPELL_EFFECT_KNOCK_BACK_DEST
Definition: SharedDefines.h:922
@ SPELL_EFFECT_KNOCK_BACK
Definition: SharedDefines.h:876
@ SPELL_EFFECT_SCHOOL_DAMAGE
Definition: SharedDefines.h:780
@ SPELL_EFFECT_GAMEOBJECT_DAMAGE
Definition: SharedDefines.h:865
@ SPELL_EFFECT_LEARN_SPELL
Definition: SharedDefines.h:814
@ SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
Definition: SharedDefines.h:907
@ SPELL_EFFECT_HEAL_PCT
Definition: SharedDefines.h:914
@ SPELL_EFFECT_SKILL_STEP
Definition: SharedDefines.h:822
@ SPELL_EFFECT_APPLY_AURA
Definition: SharedDefines.h:784
@ TARGET_UNIT_CASTER
Definition: SharedDefines.h:1410
@ MECHANIC_MOUNT
Definition: SharedDefines.h:1346
@ MECHANIC_INVULNERABILITY
Definition: SharedDefines.h:1350
@ MECHANIC_BANDAGE
Definition: SharedDefines.h:1341
@ MECHANIC_IMMUNE_SHIELD
Definition: SharedDefines.h:1354
@ MECHANIC_SHIELD
Definition: SharedDefines.h:1344
@ SPELL_ATTR0_AURA_IS_DEBUFF
Definition: SharedDefines.h:408
@ SPELLMOD_COST
Definition: SpellDefines.h:90
@ 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
#define sSpellMgr
Definition: SpellMgr.h:825
Definition: SpellInfo.h:316
static bool _IsPositiveTarget(uint32 targetA, uint32 targetB)
Definition: SpellInfo.cpp:2850
bool _IsPositiveEffect(uint8 effIndex, bool deep) const
Definition: SpellInfo.cpp:2620
bool HasAttribute(SpellAttr0 attribute) const
Definition: SpellInfo.h:415

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_DUMMY, 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
2841{
2842 // spells with at least one negative effect are considered negative
2843 // some self-applied spells have negative effects but in self casting case negative check ignored.
2844 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2845 if (!_IsPositiveEffect(i, true))
2846 return false;
2847 return true;
2848}

References _IsPositiveEffect(), and MAX_SPELL_EFFECTS.

Referenced by Spell::HandleThreatSpells().

◆ _IsPositiveTarget()

bool SpellInfo::_IsPositiveTarget ( uint32  targetA,
uint32  targetB 
)
static
2851{
2852 // non-positive targets
2853 switch (targetA)
2854 {
2864 return false;
2865 default:
2866 break;
2867 }
2868 if (targetB)
2869 return _IsPositiveTarget(targetB, 0);
2870 return true;
2871}
@ TARGET_DEST_DYNOBJ_ENEMY
Definition: SharedDefines.h:1432
@ TARGET_UNIT_DEST_AREA_ENEMY
Definition: SharedDefines.h:1421
@ TARGET_UNIT_CONE_ENEMY_104
Definition: SharedDefines.h:1508
@ TARGET_UNIT_SRC_AREA_ENEMY
Definition: SharedDefines.h:1420
@ TARGET_DEST_TARGET_ENEMY
Definition: SharedDefines.h:1457
@ TARGET_UNIT_TARGET_ENEMY
Definition: SharedDefines.h:1415
@ TARGET_UNIT_CONE_ENEMY_54
Definition: SharedDefines.h:1458
@ TARGET_UNIT_CONE_ENEMY_24
Definition: SharedDefines.h:1428
@ TARGET_UNIT_NEARBY_ENEMY
Definition: SharedDefines.h:1411

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().

◆ _UnloadImplicitTargetConditionLists()

void SpellInfo::_UnloadImplicitTargetConditionLists ( )
2874{
2875 // find the same instances of ConditionList and delete them.
2876 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2877 {
2878 ConditionList* cur = Effects[i].ImplicitTargetConditions;
2879 if (!cur)
2880 continue;
2881 for (uint8 j = i; j < MAX_SPELL_EFFECTS; ++j)
2882 {
2883 if (Effects[j].ImplicitTargetConditions == cur)
2884 Effects[j].ImplicitTargetConditions = nullptr;
2885 }
2886 delete cur;
2887 }
2888}
std::list< Condition * > ConditionList
Definition: ConditionMgr.h:237

References Effects, and MAX_SPELL_EFFECTS.

Referenced by ~SpellInfo().

◆ CalcCastTime()

uint32 SpellInfo::CalcCastTime ( Unit caster = nullptr,
Spell spell = nullptr 
) const
2353{
2354 // not all spells have cast time index and this is all is pasiive abilities
2355 if (!CastTimeEntry)
2356 return 0;
2357
2358 int32 castTime = CastTimeEntry->CastTime;
2360 castTime += 500;
2361
2362 if (caster)
2363 caster->ModSpellCastTime(this, castTime, spell);
2364
2365 return (castTime > 0) ? uint32(castTime) : 0;
2366}
std::int32_t int32
Definition: Define.h:103
@ SPELL_ATTR0_USES_RANGED_SLOT
Definition: SharedDefines.h:383
void ModSpellCastTime(SpellInfo const *spellProto, int32 &castTime, Spell *spell=nullptr)
Definition: Unit.cpp:14973
bool IsAutoRepeatRangedSpell() const
Definition: SpellInfo.cpp:1283
int32 CastTime
Definition: DBCStructure.h:1759

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

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

◆ CalcPowerCost()

int32 SpellInfo::CalcPowerCost ( Unit const *  caster,
SpellSchoolMask  schoolMask,
Spell spell = nullptr 
) const
2402{
2403 // Spell drain all exist power on cast (Only paladin lay of Hands)
2405 {
2406 // If power type - health drain all
2407 if (PowerType == POWER_HEALTH)
2408 return caster->GetHealth();
2409 // Else drain all power
2410 if (PowerType < MAX_POWERS)
2411 return caster->GetPower(Powers(PowerType));
2412 LOG_ERROR("spells", "SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {}", PowerType, Id);
2413 return 0;
2414 }
2415
2416 // Base powerCost
2417 int32 powerCost = ManaCost;
2418 // PCT cost from total amount
2420 {
2421 switch (PowerType)
2422 {
2423 // health as power used
2424 case POWER_HEALTH:
2425 powerCost += int32(CalculatePct(caster->GetCreateHealth(), ManaCostPercentage));
2426 break;
2427 case POWER_MANA:
2428 powerCost += int32(CalculatePct(caster->GetCreateMana(), ManaCostPercentage));
2429 break;
2430 case POWER_RAGE:
2431 case POWER_FOCUS:
2432 case POWER_ENERGY:
2433 case POWER_HAPPINESS:
2434 powerCost += int32(CalculatePct(caster->GetMaxPower(Powers(PowerType)), ManaCostPercentage));
2435 break;
2436 case POWER_RUNE:
2437 case POWER_RUNIC_POWER:
2438 LOG_DEBUG("spells.aura", "CalculateManaCost: Not implemented yet!");
2439 break;
2440 default:
2441 LOG_ERROR("spells", "CalculateManaCost: Unknown power type '{}' in spell {}", PowerType, Id);
2442 return 0;
2443 }
2444 }
2445 SpellSchools school = GetFirstSchoolInMask(schoolMask);
2446 // Flat mod from caster auras by spell school
2447 powerCost += caster->GetInt32Value(static_cast<uint16>(UNIT_FIELD_POWER_COST_MODIFIER) + school);
2448
2449 // Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost)
2451 {
2452 uint32 speed = 0;
2453 if (SpellShapeshiftFormEntry const* ss = sSpellShapeshiftFormStore.LookupEntry(caster->GetShapeshiftForm()))
2454 speed = ss->attackSpeed;
2455 else
2456 {
2459 slot = OFF_ATTACK;
2460
2461 speed = caster->GetAttackTime(slot);
2462 }
2463
2464 powerCost += speed / 100;
2465 }
2466
2467 // Apply cost mod by spell
2468 if (Player* modOwner = caster->GetSpellModOwner())
2469 modOwner->ApplySpellMod(Id, SPELLMOD_COST, powerCost, spell);
2470
2471 if (!caster->IsControlledByPlayer())
2472 {
2474 {
2475 GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(SpellLevel - 1);
2476 GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(caster->GetLevel() - 1);
2477 if (spellScaler && casterScaler)
2478 powerCost *= casterScaler->ratio / spellScaler->ratio;
2479 }
2480 }
2481
2482 // PCT mod from user auras by school
2483 powerCost = int32(powerCost * (1.0f + caster->GetFloatValue(static_cast<uint16>(UNIT_FIELD_POWER_COST_MULTIPLIER) + school)));
2484 if (powerCost < 0)
2485 powerCost = 0;
2486 return powerCost;
2487}
#define LOG_ERROR(filterType__,...)
Definition: Log.h:157
#define LOG_DEBUG(filterType__,...)
Definition: Log.h:169
T CalculatePct(T base, U pct)
Definition: Util.h:61
std::uint16_t uint16
Definition: Define.h:108
Powers
Definition: SharedDefines.h:268
@ MAX_POWERS
Definition: SharedDefines.h:276
@ POWER_RAGE
Definition: SharedDefines.h:270
@ POWER_HEALTH
Definition: SharedDefines.h:278
@ POWER_RUNIC_POWER
Definition: SharedDefines.h:275
@ POWER_HAPPINESS
Definition: SharedDefines.h:273
@ POWER_ENERGY
Definition: SharedDefines.h:272
@ POWER_MANA
Definition: SharedDefines.h:269
@ POWER_RUNE
Definition: SharedDefines.h:274
@ POWER_FOCUS
Definition: SharedDefines.h:271
SpellSchools
Definition: SharedDefines.h:282
@ SPELL_ATTR1_USE_ALL_MANA
Definition: SharedDefines.h:420
SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
Definition: SharedDefines.h:318
@ SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON
Definition: SharedDefines.h:517
@ SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL
Definition: SharedDefines.h:401
@ SPELL_ATTR4_WEAPON_SPEED_COST_SCALING
Definition: SharedDefines.h:540
@ UNIT_FIELD_POWER_COST_MODIFIER
Definition: UpdateFields.h:170
@ UNIT_FIELD_POWER_COST_MULTIPLIER
Definition: UpdateFields.h:171
WeaponAttackType
Definition: Unit.h:208
@ OFF_ATTACK
Definition: Unit.h:210
@ BASE_ATTACK
Definition: Unit.h:209
DBCStorage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore(SpellShapeshiftFormEntryfmt)
DBCStorage< GtNPCManaCostScalerEntry > sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt)
Definition: Player.h:1081
Player * GetSpellModOwner() const
Definition: Unit.cpp:16577
Definition: DBCStructure.h:1066
float ratio
Definition: DBCStructure.h:1067
Definition: DBCStructure.h:1816

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

Referenced by PetAI::_canMeleeAttack(), Spell::CheckPetCast(), Spell::EffectCastButtons(), Unit::HandleDummyAuraProc(), spell_warr_execute::HandleEffect(), spell_hun_glyph_of_arcane_shot::HandleProc(), spell_mage_burnout::HandleProc(), spell_mage_master_of_elements::HandleProc(), spell_sha_item_mana_surge::HandleProc(), Spell::prepare(), and SmartScript::ProcessAction().

◆ CanBeUsedInCombat()

bool SpellInfo::CanBeUsedInCombat ( ) const
1233{
1235}
@ SPELL_ATTR0_NOT_IN_COMBAT_ONLY_PEACEFUL
Definition: SharedDefines.h:410

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 *  aura) const
1351{
1352 // Xinef: Passive auras cannot be dispelled
1353 if (aura->IsPassive())
1354 return false;
1355
1356 // These auras (like Divine Shield) can't be dispelled
1357 if (aura->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
1358 return false;
1359
1360 // These spells (like Mass Dispel) can dispell all auras
1362 return true;
1363
1364 // These auras (Cyclone for example) are not dispelable
1365 if ((aura->HasAttribute(SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS) && aura->Mechanic != MECHANIC_NONE)
1366 || aura->HasAttribute(SPELL_ATTR2_NO_SCHOOL_IMMUNITIES))
1367 {
1368 return false;
1369 }
1370
1371 return true;
1372}
@ SPELL_ATTR2_NO_SCHOOL_IMMUNITIES
Definition: SharedDefines.h:482
@ SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS
Definition: SharedDefines.h:435
@ MECHANIC_NONE
Definition: SharedDefines.h:1325
@ SPELL_ATTR0_NO_IMMUNITIES
Definition: SharedDefines.h:411

References HasAttribute(), IsPassive(), Mechanic, MECHANIC_NONE, SPELL_ATTR0_NO_IMMUNITIES, SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS, and SPELL_ATTR2_NO_SCHOOL_IMMUNITIES.

◆ CanPierceImmuneAura()

bool SpellInfo::CanPierceImmuneAura ( SpellInfo const *  aura) const
1324{
1325 // aura can't be pierced
1326 if (!aura || aura->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
1327 {
1328 return false;
1329 }
1330
1331 // these spells pierce all avalible spells (Resurrection Sickness for example)
1333 return true;
1334
1335 // these spells (Cyclone for example) can pierce all...
1337 {
1338 if (aura->Mechanic != MECHANIC_IMMUNE_SHIELD &&
1339 aura->Mechanic != MECHANIC_INVULNERABILITY &&
1340 aura->Mechanic != MECHANIC_BANISH)
1341 {
1342 return true;
1343 }
1344
1345 }
1346
1347 return false;
1348}
@ MECHANIC_BANISH
Definition: SharedDefines.h:1343

References HasAttribute(), Mechanic, MECHANIC_BANISH, MECHANIC_IMMUNE_SHIELD, MECHANIC_INVULNERABILITY, SPELL_ATTR0_NO_IMMUNITIES, SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS, and SPELL_ATTR2_NO_SCHOOL_IMMUNITIES.

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

◆ CheckElixirStacking()

bool SpellInfo::CheckElixirStacking ( Unit const *  caster) const
2891{
2892 if (!caster)
2893 {
2894 return true;
2895 }
2896
2897 // xinef: check spell group
2898 uint32 groupId = sSpellMgr->GetSpellGroup(Id);
2900 {
2901 return true;
2902 }
2903
2904 SpellGroupSpecialFlags sFlag = sSpellMgr->GetSpellGroupSpecialFlags(Id);
2905 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
2906 {
2907 if (!Effects[i].IsAura())
2908 {
2909 continue;
2910 }
2911
2912 Unit::AuraApplicationMap const& Auras = caster->GetAppliedAuras();
2913 for (Unit::AuraApplicationMap::const_iterator itr = Auras.begin(); itr != Auras.end(); ++itr)
2914 {
2915 // xinef: aura is not groupped or in different group
2916 uint32 auraGroup = sSpellMgr->GetSpellGroup(itr->first);
2917 if (auraGroup != groupId)
2918 {
2919 continue;
2920 }
2921
2922 // Cannot apply guardian/battle elixir if flask is present
2924 {
2925 SpellGroupSpecialFlags sAuraFlag = sSpellMgr->GetSpellGroupSpecialFlags(itr->first);
2927 {
2928 return false;
2929 }
2930 }
2931 }
2932 }
2933
2934 return true;
2935}
@ SPELL_GROUP_GUARDIAN_AND_BATTLE_ELIXIRS
Definition: SpellMgr.h:372
SpellGroupSpecialFlags
Definition: SpellMgr.h:334
@ SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE
Definition: SpellMgr.h:336
@ SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN
Definition: SpellMgr.h:337
@ SPELL_GROUP_SPECIAL_FLAG_FLASK
Definition: SpellMgr.h:352
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Definition: Unit.h:639

References EFFECT_0, Effects, Unit::GetAppliedAuras(), Id, MAX_SPELL_EFFECTS, SPELL_GROUP_GUARDIAN_AND_BATTLE_ELIXIRS, SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE, SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN, SPELL_GROUP_SPECIAL_FLAG_FLASK, and sSpellMgr.

Referenced by Player::CastItemUseSpell().

◆ CheckExplicitTarget()

SpellCastResult SpellInfo::CheckExplicitTarget ( Unit const *  caster,
WorldObject const *  target,
Item const *  itemTarget = nullptr 
) const
1938{
1939 uint32 neededTargets = GetExplicitTargetMask();
1940 if (!target)
1941 {
1943 if (!(neededTargets & TARGET_FLAG_GAMEOBJECT_ITEM) || !itemTarget)
1945 return SPELL_CAST_OK;
1946 }
1947
1948 if (Unit const* unitTarget = target->ToUnit())
1949 {
1951 {
1952 if (neededTargets & TARGET_FLAG_UNIT_ENEMY)
1953 if (caster->_IsValidAttackTarget(unitTarget, this))
1954 return SPELL_CAST_OK;
1955 if (neededTargets & TARGET_FLAG_UNIT_ALLY
1956 || (neededTargets & TARGET_FLAG_UNIT_PARTY && caster->IsInPartyWith(unitTarget))
1957 || (neededTargets & TARGET_FLAG_UNIT_RAID && caster->IsInRaidWith(unitTarget)))
1958 if (caster->_IsValidAssistTarget(unitTarget, this))
1959 return SPELL_CAST_OK;
1960 if (neededTargets & TARGET_FLAG_UNIT_MINIPET)
1961 if (unitTarget->GetGUID() == caster->GetCritterGUID())
1962 return SPELL_CAST_OK;
1963 if (neededTargets & TARGET_FLAG_UNIT_PASSENGER)
1964 if (unitTarget->IsOnVehicle(caster))
1965 return SPELL_CAST_OK;
1967 }
1968 }
1969 return SPELL_CAST_OK;
1970}
@ SPELL_FAILED_BAD_TARGETS
Definition: SharedDefines.h:961
@ SPELL_CAST_OK
Definition: SharedDefines.h:1138
@ TARGET_FLAG_UNIT_RAID
Definition: SpellInfo.h:48
@ TARGET_FLAG_UNIT_ENEMY
Definition: SpellInfo.h:53
@ TARGET_FLAG_UNIT_MINIPET
Definition: SpellInfo.h:62
@ TARGET_FLAG_UNIT_PASSENGER
Definition: SpellInfo.h:66
@ TARGET_FLAG_GAMEOBJECT_ITEM
Definition: SpellInfo.h:60
@ TARGET_FLAG_UNIT_ALLY
Definition: SpellInfo.h:54
@ TARGET_FLAG_GAMEOBJECT_MASK
Definition: SpellInfo.h:70
@ TARGET_FLAG_UNIT_PARTY
Definition: SpellInfo.h:49
Unit * ToUnit()
Definition: Object.h:209
Definition: Unit.h:630
uint32 GetExplicitTargetMask() const
Definition: SpellInfo.cpp:2055

References Unit::_IsValidAssistTarget(), Unit::_IsValidAttackTarget(), Unit::GetCritterGUID(), GetExplicitTargetMask(), Unit::IsInPartyWith(), Unit::IsInRaidWith(), SPELL_CAST_OK, SPELL_FAILED_BAD_TARGETS, TARGET_FLAG_CORPSE_MASK, TARGET_FLAG_GAMEOBJECT_ITEM, TARGET_FLAG_GAMEOBJECT_MASK, TARGET_FLAG_UNIT_ALLY, TARGET_FLAG_UNIT_ENEMY, TARGET_FLAG_UNIT_MASK, TARGET_FLAG_UNIT_MINIPET, TARGET_FLAG_UNIT_PARTY, TARGET_FLAG_UNIT_PASSENGER, TARGET_FLAG_UNIT_RAID, and Object::ToUnit().

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

◆ CheckLocation()

SpellCastResult SpellInfo::CheckLocation ( uint32  map_id,
uint32  zone_id,
uint32  area_id,
Player player = nullptr,
bool  strict = true 
) const
1490{
1491 // normal case
1492 if (AreaGroupId > 0)
1493 {
1494 bool found = false;
1495 AreaGroupEntry const* groupEntry = sAreaGroupStore.LookupEntry(AreaGroupId);
1496 while (groupEntry)
1497 {
1498 for (uint8 i = 0; i < MAX_GROUP_AREA_IDS; ++i)
1499 if (groupEntry->AreaId[i] == zone_id || groupEntry->AreaId[i] == area_id)
1500 found = true;
1501 if (found || !groupEntry->nextGroup)
1502 break;
1503 // Try search in next group
1504 groupEntry = sAreaGroupStore.LookupEntry(groupEntry->nextGroup);
1505 }
1506
1507 if (!found)
1509 }
1510
1511 // continent limitation (virtual continent)
1512 if (HasAttribute(SPELL_ATTR4_ONLY_FLYING_AREAS) && (area_id || zone_id))
1513 {
1514 AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(area_id);
1515 if (!areaEntry)
1516 {
1517 areaEntry = sAreaTableStore.LookupEntry(zone_id);
1518 }
1519
1520 if (!areaEntry || !areaEntry->IsFlyable() || (strict && (areaEntry->flags & AREA_FLAG_NO_FLY_ZONE) != 0) || !player->canFlyInZone(map_id, zone_id, this))
1521 {
1523 }
1524 }
1525
1526 // raid instance limitation
1528 {
1529 MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
1530 if (!mapEntry || mapEntry->IsRaid())
1532 }
1533
1534 // DB base check (if non empty then must fit at least single for allow)
1535 SpellAreaMapBounds saBounds = sSpellMgr->GetSpellAreaMapBounds(Id);
1536 if (saBounds.first != saBounds.second)
1537 {
1538 for (SpellAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
1539 {
1540 if (itr->second.IsFitToRequirements(player, zone_id, area_id))
1541 return SPELL_CAST_OK;
1542 }
1544 }
1545
1546 // bg spell checks
1547 switch (Id)
1548 {
1549 case 23333: // Warsong Flag
1550 case 23335: // Silverwing Flag
1551 return map_id == 489 && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
1552 case 34976: // Netherstorm Flag
1553 return map_id == 566 && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
1554 case 2584: // Waiting to Resurrect
1555 case 22011: // Spirit Heal Channel
1556 case 22012: // Spirit Heal
1557 case 42792: // Recently Dropped Flag
1558 case 43681: // Inactive
1559 case 44535: // Spirit Heal (mana)
1560 {
1561 MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
1562 if (!mapEntry)
1564
1565 return zone_id == 4197 || (mapEntry->IsBattleground() && player && player->InBattleground()) ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
1566 }
1567 case 32724: // Gold Team (Alliance)
1568 case 32725: // Green Team (Alliance)
1569 case 35774: // Gold Team (Horde)
1570 case 35775: // Green Team (Horde)
1571 {
1572 MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
1573 if (!mapEntry)
1575
1576 return mapEntry->IsBattleArena() && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
1577 }
1578 }
1579
1580 return SPELL_CAST_OK;
1581}
#define MAX_GROUP_AREA_IDS
Definition: DBCStructure.h:545
@ AREA_FLAG_NO_FLY_ZONE
Definition: DBCEnums.h:262
@ SPELL_FAILED_INCORRECT_AREA
Definition: SharedDefines.h:988
@ SPELL_FAILED_NOT_IN_RAID_INSTANCE
Definition: SharedDefines.h:1116
@ SPELL_FAILED_REQUIRES_AREA
Definition: SharedDefines.h:1050
@ SPELL_ATTR4_ONLY_FLYING_AREAS
Definition: SharedDefines.h:556
@ SPELL_ATTR6_NOT_IN_RAID_INSTANCES
Definition: SharedDefines.h:615
std::pair< SpellAreaMap::const_iterator, SpellAreaMap::const_iterator > SpellAreaMapBounds
Definition: SpellMgr.h:547
DBCStorage< AreaGroupEntry > sAreaGroupStore(AreaGroupEntryfmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
bool InBattleground() const
Definition: Player.h:2252
bool canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const *bySpell)
Definition: Player.cpp:13679
Definition: DBCStructure.h:518
bool IsFlyable() const
Definition: DBCStructure.h:539
uint32 flags
Definition: DBCStructure.h:523
Definition: DBCStructure.h:548
uint32 nextGroup
Definition: DBCStructure.h:551
uint32 AreaId[MAX_GROUP_AREA_IDS]
Definition: DBCStructure.h:550
Definition: DBCStructure.h:1324
bool IsBattleground() const
Definition: DBCStructure.h:1354
bool IsRaid() const
Definition: DBCStructure.h:1353
bool IsBattleArena() const
Definition: DBCStructure.h:1355
Definition: System.cpp:62

References AREA_FLAG_NO_FLY_ZONE, AreaGroupId, AreaGroupEntry::AreaId, Player::canFlyInZone(), AreaTableEntry::flags, HasAttribute(), Id, Player::InBattleground(), MapEntry::IsBattleArena(), MapEntry::IsBattleground(), AreaTableEntry::IsFlyable(), MapEntry::IsRaid(), 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
1435{
1436 // talents that learn spells can have stance requirements that need ignore
1437 // (this requirement only for client-side stance show in talent description)
1438 if (GetTalentSpellCost(Id) > 0 &&
1440 return SPELL_CAST_OK;
1441
1442 uint32 stanceMask = (form ? 1 << (form - 1) : 0);
1443
1444 if (stanceMask & StancesNot) // can explicitly not be casted in this stance
1446
1447 if (stanceMask & Stances) // can explicitly be casted in this stance
1448 return SPELL_CAST_OK;
1449
1450 bool actAsShifted = false;
1451 SpellShapeshiftFormEntry const* shapeInfo = nullptr;
1452 if (form > 0)
1453 {
1454 shapeInfo = sSpellShapeshiftFormStore.LookupEntry(form);
1455 if (!shapeInfo)
1456 {
1457 LOG_ERROR("spells", "GetErrorAtShapeshiftedCast: unknown shapeshift {}", form);
1458 return SPELL_CAST_OK;
1459 }
1460 actAsShifted = !(shapeInfo->flags1 & 1); // shapeshift acts as normal form for spells
1461 }
1462
1463 if (actAsShifted)
1464 {
1465 if (HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFTED)) // not while shapeshifted
1467 else if (Stances != 0) // needs other shapeshift
1469 }
1470 else
1471 {
1472 // needs shapeshift
1475 }
1476
1477 // Check if stance disables cast of not-stance spells
1478 // Example: cannot cast any other spells in zombie or ghoul form
1480 if (shapeInfo && shapeInfo->flags1 & 0x400)
1481 {
1482 if (!(stanceMask & Stances))
1484 }
1485
1486 return SPELL_CAST_OK;
1487}
@ SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED
Definition: SharedDefines.h:475
@ SPELL_ATTR0_NOT_SHAPESHIFTED
Definition: SharedDefines.h:398
@ SPELL_FAILED_ONLY_SHAPESHIFT
Definition: SharedDefines.h:1043
@ SPELL_FAILED_NOT_SHAPESHIFT
Definition: SharedDefines.h:1017
uint32 GetTalentSpellCost(uint32 spellId)
Definition: DBCStores.cpp:686
uint32 flags1
Definition: DBCStructure.h:1821

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

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

◆ CheckTarget()

SpellCastResult SpellInfo::CheckTarget ( Unit const *  caster,
WorldObject const *  target,
bool  implicit = true 
) const
1760{
1761 if (AttributesEx & SPELL_ATTR1_EXCLUDE_CASTER && caster == target)
1763
1764 // check visibility - ignore stealth for implicit (area) targets
1765 if (!(AttributesEx6 & SPELL_ATTR6_IGNORE_PHASE_SHIFT) && !caster->CanSeeOrDetect(target, implicit))
1767
1768 Unit const* unitTarget = target->ToUnit();
1769
1770 // creature/player specific target checks
1771 if (unitTarget)
1772 {
1773 // xinef: spells cannot be cast if player is in fake combat also
1774 if (AttributesEx & SPELL_ATTR1_ONLY_PEACEFUL_TARGETS && (unitTarget->IsInCombat() || unitTarget->IsPetInCombat()))
1776
1777 // only spells with SPELL_ATTR3_ONLY_ON_GHOSTS can target ghosts
1779 {
1780 if (!unitTarget->HasGhostAura())
1784 }
1785
1786 if (caster != unitTarget)
1787 {
1788 if (caster->IsPlayer())
1789 {
1790 // Do not allow these spells to target creatures not tapped by us (Banish, Polymorph, many quest spells)
1792 if (Creature const* targetCreature = unitTarget->ToCreature())
1793 if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->ToPlayer()))
1795
1797 {
1798 Creature const* targetCreature = unitTarget->ToCreature();
1799 if (!targetCreature)
1801
1804 }
1805
1806 // Not allow disarm unarmed player
1808 {
1809 bool valid = false;
1810 for (uint8 i = BASE_ATTACK; i < MAX_ATTACK; ++i)
1811 {
1812 AuraType disarmAuraType = SPELL_AURA_MOD_DISARM;
1813 switch (i)
1814 {
1815 case OFF_ATTACK:
1816 disarmAuraType = SPELL_AURA_MOD_DISARM_OFFHAND;
1817 break;
1818 case RANGED_ATTACK:
1819 disarmAuraType = SPELL_AURA_MOD_DISARM_RANGED;
1820 break;
1821 }
1822
1823 if (HasAura(disarmAuraType))
1824 {
1825 if (Player const* player = unitTarget->ToPlayer())
1826 {
1827 if (player->GetWeaponForAttack(WeaponAttackType(BASE_ATTACK + i), true))
1828 {
1829 valid = true;
1830 break;
1831 }
1832 }
1833 else if (unitTarget->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + i))
1834 {
1835 valid = true;
1836 break;
1837 }
1838 }
1839 }
1840
1841 if (!valid)
1842 {
1844 }
1845 }
1846 }
1847 }
1848 }
1849 // corpse specific target checks
1850 else if (Corpse const* corpseTarget = target->ToCorpse())
1851 {
1852 // cannot target bare bones
1853 if (corpseTarget->GetType() == CORPSE_BONES)
1855 // we have to use owner for some checks (aura preventing resurrection for example)
1856 if (Player* owner = ObjectAccessor::FindPlayer(corpseTarget->GetOwnerGUID()))
1857 unitTarget = owner;
1858 // we're not interested in corpses without owner
1859 else
1861 }
1862 // other types of objects - always valid
1863 else return SPELL_CAST_OK;
1864
1865 // corpseOwner and unit specific target checks
1866 if (AttributesEx3 & SPELL_ATTR3_ONLY_ON_PLAYER && !unitTarget->ToPlayer())
1868
1869 if (!IsAllowingDeadTarget() && !unitTarget->IsAlive())
1871
1872 // check this flag only for implicit targets (chain and area), allow to explicitly target units for spells like Shield of Righteousness
1875
1876 // checked in Unit::IsValidAttack/AssistTarget, shouldn't be checked for ENTRY targets
1877 //if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_UNTARGETABLE) && target->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
1878 // return SPELL_FAILED_BAD_TARGETS;
1879
1880 //if (!(AttributesEx6 & SPELL_ATTR6_NO_AURA_LOG)
1881
1882 if (!CheckTargetCreatureType(unitTarget))
1883 {
1884 if (target->IsPlayer())
1886 else
1888 }
1889
1890 // check GM mode and GM invisibility - only for player casts (npc casts are controlled by AI) and negative spells
1891 if (unitTarget != caster && (caster->IsControlledByPlayer() || !IsPositive()) && unitTarget->IsPlayer())
1892 {
1893 if (!unitTarget->ToPlayer()->IsVisible())
1895
1896 if (unitTarget->ToPlayer()->IsGameMaster())
1898 }
1899
1900 // not allow casting on flying player
1903
1904 /* TARGET_UNIT_MASTER gets blocked here for passengers, because the whole idea of this check is to
1905 not allow passengers to be implicitly hit by spells, however this target type should be an exception,
1906 if this is left it kills spells that award kill credit from vehicle to master (few spells),
1907 the use of these 2 covers passenger target check, logically, if vehicle cast this to master it should always hit
1908 him, because it would be it's passenger, there's no such case where this gets to fail legitimacy, this problem
1909 cannot be solved from within the check in other way since target type cannot be called for the spell currently
1910 Spell examples: [ID - 52864 Devour Water, ID - 52862 Devour Wind, ID - 49370 Wyrmrest Defender: Destabilize Azure Dragonshrine Effect] */
1911 if (!caster->IsVehicle() && caster->GetCharmerOrOwner() != target)
1912 {
1913 if (TargetAuraState && !unitTarget->HasAuraState(AuraStateType(TargetAuraState), this, caster))
1915
1916 if (TargetAuraStateNot && unitTarget->HasAuraState(AuraStateType(TargetAuraStateNot), this, caster))
1918 }
1919
1920 if (TargetAuraSpell && !unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(TargetAuraSpell, caster)))
1922
1923 if (ExcludeTargetAuraSpell && unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(ExcludeTargetAuraSpell, caster)))
1925
1929
1930 // xinef: check if stronger aura is active
1931 if (IsStrongerAuraActive(caster, unitTarget))
1933
1934 return SPELL_CAST_OK;
1935}
@ SPELL_ATTR7_BYPASS_NO_RESURRECTION_AURA
Definition: SharedDefines.h:668
@ SPELL_EFFECT_SELF_RESURRECT
Definition: SharedDefines.h:872
@ SPELL_EFFECT_RESURRECT
Definition: SharedDefines.h:796
@ SPELL_EFFECT_RESURRECT_NEW
Definition: SharedDefines.h:891
@ SPELL_ATTR2_CANNOT_CAST_ON_TAPPED
Definition: SharedDefines.h:462
@ SPELL_ATTR1_EXCLUDE_CASTER
Definition: SharedDefines.h:438
@ SPELL_ATTR1_ONLY_PEACEFUL_TARGETS
Definition: SharedDefines.h:427
@ SPELL_ATTR3_ONLY_ON_PLAYER
Definition: SharedDefines.h:501
@ MECHANIC_DISARM
Definition: SharedDefines.h:1328
AuraStateType
Definition: SharedDefines.h:1288
@ SPELL_FAILED_TARGET_NOT_PLAYER
Definition: SharedDefines.h:1071
@ SPELL_FAILED_TARGET_NO_POCKETS
Definition: SharedDefines.h:1072
@ SPELL_FAILED_TARGET_IS_PLAYER
Definition: SharedDefines.h:1066
@ SPELL_FAILED_CANT_CAST_ON_TAPPED
Definition: SharedDefines.h:967
@ SPELL_FAILED_TARGET_AURASTATE
Definition: SharedDefines.h:1060
@ SPELL_FAILED_BM_OR_INVISGOD
Definition: SharedDefines.h:1108
@ SPELL_FAILED_TARGETS_DEAD
Definition: SharedDefines.h:1058
@ SPELL_FAILED_AURA_BOUNCED
Definition: SharedDefines.h:958
@ SPELL_FAILED_TARGET_NOT_GHOST
Definition: SharedDefines.h:1092
@ SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED
Definition: SharedDefines.h:1135
@ SPELL_FAILED_TARGET_NO_WEAPONS
Definition: SharedDefines.h:1073
@ SPELL_FAILED_TARGET_AFFECTING_COMBAT
Definition: SharedDefines.h:1059
@ SPELL_ATTR6_DO_NOT_CHAIN_TO_CROWD_CONTROLLED_TARGETS
Definition: SharedDefines.h:612
@ SPELL_ATTR6_IGNORE_PHASE_SHIFT
Definition: SharedDefines.h:617
@ SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET
Definition: SpellInfo.h:194
@ SPELL_ATTR0_CU_PICKPOCKET
Definition: SpellInfo.h:186
AuraType
Definition: SpellAuraDefines.h:62
@ SPELL_AURA_MOD_DISARM_RANGED
Definition: SpellAuraDefines.h:341
@ SPELL_AURA_MOD_DISARM
Definition: SpellAuraDefines.h:130
@ SPELL_AURA_MOD_DISARM_OFFHAND
Definition: SpellAuraDefines.h:317
@ CORPSE_BONES
Definition: Corpse.h:28
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition: UpdateFields.h:116
@ MAX_ATTACK
Definition: Unit.h:212
@ RANGED_ATTACK
Definition: Unit.h:211
@ UNIT_STATE_CONTROLLED
Definition: UnitDefines.h:190
LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template", "creature pickpocket lootid", true)
Player * FindPlayer(ObjectGuid const guid)
Definition: ObjectAccessor.cpp:245
Definition: Corpse.h:49
Definition: Creature.h:43
CreatureTemplate const * GetCreatureTemplate() const
Definition: Creature.h:205
uint32 pickpocketLootId
Definition: CreatureData.h:225
Corpse * ToCorpse()
Definition: Object.h:217
bool IsPlayer() const
Definition: Object.h:200
uint32 GetUInt32Value(uint16 index) const
Definition: Object.cpp:305
Player * ToPlayer()
Definition: Object.h:201
Creature * ToCreature()
Definition: Object.h:205
bool IsGameMaster() const
Definition: Player.h:1175
bool IsAlive() const
Definition: Unit.h:1654
bool HasGhostAura() const
Definition: Unit.h:1659
bool IsPetInCombat() const
Definition: Unit.h:887
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5698
bool HasPreventResurectionAura() const
Definition: Unit.h:1668
bool IsInFlight() const
Definition: Unit.h:1572
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
Definition: Unit.cpp:10547
bool IsVisible() const
Definition: Unit.h:1876
bool HasUnitState(const uint32 f) const
Definition: Unit.h:701
bool IsInCombat() const
Definition: Unit.h:884
bool HaveLootFor(uint32 loot_id) const
Definition: LootMgr.h:224
bool IsStrongerAuraActive(Unit const *caster, Unit const *target) const
Definition: SpellInfo.cpp:1583
bool IsRequiringDeadTarget() const
Definition: SpellInfo.cpp:1222
bool IsDeathPersistent() const
Definition: SpellInfo.cpp:1217
bool CheckTargetCreatureType(Unit const *target) const
Definition: SpellInfo.cpp:1972
bool IsAllowingDeadTarget() const
Definition: SpellInfo.cpp:1227
bool HasEffect(SpellEffects effect) const
Definition: SpellInfo.cpp:876
bool IsPositive() const
Definition: SpellInfo.cpp:1237
bool HasAura(AuraType aura) const
Definition: SpellInfo.cpp:893

References AttributesEx, AttributesEx2, AttributesEx3, 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(), IsStrongerAuraActive(), 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_ONLY_ON_PLAYER, 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_AURA_BOUNCED, 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_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()(), and Acore::WorldObjectSpellTargetCheck::operator()().

◆ CheckTargetCreatureType()

bool SpellInfo::CheckTargetCreatureType ( Unit const *  target) const
1973{
1974 // Curse of Doom & Exorcism: not find another way to fix spell target check :/
1976 {
1977 // not allow cast at player
1978 if (target->IsPlayer())
1979 return false;
1980 else
1981 return true;
1982 }
1983 uint32 creatureType = target->GetCreatureTypeMask();
1984 return !TargetCreatureType || !creatureType || (creatureType & TargetCreatureType);
1985}
@ SPELLFAMILY_WARLOCK
Definition: SharedDefines.h:3533
uint32 GetCategory() const
Definition: SpellInfo.cpp:871

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

Referenced by CheckTarget().

◆ ComputeIsCritCapable()

bool SpellInfo::ComputeIsCritCapable ( ) const
1156{
1157 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1158 {
1159 switch (Effects[i].Effect)
1160 {
1163 case SPELL_EFFECT_HEAL:
1171 return true;
1172 }
1173 }
1174 return false;
1175}
@ SPELL_EFFECT_POWER_BURN
Definition: SharedDefines.h:840
@ SPELL_EFFECT_HEALTH_LEECH
Definition: SharedDefines.h:787
@ SPELL_EFFECT_WEAPON_DAMAGE
Definition: SharedDefines.h:836
@ SPELL_EFFECT_NORMALIZED_WEAPON_DMG
Definition: SharedDefines.h:899
@ SPELL_EFFECT_HEAL_MECHANICAL
Definition: SharedDefines.h:853
@ SPELL_EFFECT_WEAPON_PERCENT_DAMAGE
Definition: SharedDefines.h:809
@ SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL
Definition: SharedDefines.h:795

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
1113{
1114 if (IsPassive())
1115 return false;
1117 return false;
1119 return false;
1120
1122 return false;
1123
1124 // All stance spells. if any better way, change it.
1125 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1126 {
1127 switch (SpellFamilyName)
1128 {
1130 // Paladin aura Spell
1132 return false;
1133 break;
1134 case SPELLFAMILY_DRUID:
1135 // Druid form Spell
1136 if (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA &&
1137 Effects[i].ApplyAuraName == SPELL_AURA_MOD_SHAPESHIFT)
1138 return false;
1139 break;
1140 }
1141 }
1142 return true;
1143}
@ SPELL_EFFECT_APPLY_AREA_AURA_RAID
Definition: SharedDefines.h:843
@ SPELLFAMILY_PALADIN
Definition: SharedDefines.h:3538
@ SPELLFAMILY_DRUID
Definition: SharedDefines.h:3535
@ SPELL_AURA_MOD_SHAPESHIFT
Definition: SpellAuraDefines.h:99
bool IsProfessionOrRiding() const
Definition: SpellInfo.cpp:938
bool IsPassive() const
Definition: SpellInfo.cpp:1098
bool IsAbilityLearnedWithProfession() const
Definition: SpellInfo.cpp:988

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
2527{
2528 // ignore passive spells
2529 //if (IsPassive())
2530 // return this;
2531
2532 bool needRankSelection = false;
2533 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2534 {
2535 if (IsPositiveEffect(i) &&
2536 (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA ||
2539 {
2540 needRankSelection = true;
2541 break;
2542 }
2543 }
2544
2545 // not required
2546 if (!needRankSelection)
2547 return this;
2548
2549 SpellInfo const* nextSpellInfo = nullptr;
2550
2551 sScriptMgr->OnBeforeAuraRankForLevel(this, nextSpellInfo, level);
2552
2553 if (nextSpellInfo != nullptr)
2554 return nextSpellInfo;
2555
2556 for (nextSpellInfo = this; nextSpellInfo != nullptr; nextSpellInfo = nextSpellInfo->GetPrevRankSpell())
2557 {
2558 // if found appropriate level
2559 if (uint32(level + 10) >= nextSpellInfo->SpellLevel)
2560 return nextSpellInfo;
2561
2562 // one rank less then
2563 }
2564
2565 // not found
2566 return nullptr;
2567}
@ SPELL_EFFECT_APPLY_AREA_AURA_PARTY
Definition: SharedDefines.h:813
#define sScriptMgr
Definition: ScriptMgr.h:709
SpellInfo const * GetPrevRankSpell() const
Definition: SpellInfo.cpp:2519
bool IsPositiveEffect(uint8 effIndex) const
Definition: SpellInfo.cpp:1242

References Effects, GetPrevRankSpell(), IsPositiveEffect(), MAX_SPELL_EFFECTS, 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
2061{
2062 return _auraState;
2063}
AuraStateType _auraState
Definition: SpellInfo.h:398

References _auraState.

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

◆ GetCategory()

◆ GetDispelMask() [1/2]

uint32 SpellInfo::GetDispelMask ( ) const

◆ GetDispelMask() [2/2]

uint32 SpellInfo::GetDispelMask ( DispelType  type)
static
2047{
2048 // If dispel all
2049 if (type == DISPEL_ALL)
2050 return DISPEL_ALL_MASK;
2051 else
2052 return uint32(1 << type);
2053}
#define DISPEL_ALL_MASK
Definition: SharedDefines.h:1386
@ DISPEL_ALL
Definition: SharedDefines.h:1379

References DISPEL_ALL, and DISPEL_ALL_MASK.

◆ GetDuration()

◆ GetEffect()

◆ GetEffectMechanic()

Mechanics SpellInfo::GetEffectMechanic ( uint8  effIndex) const
2025{
2026 if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
2027 return Mechanics(Effects[effIndex].Mechanic);
2028 if (Mechanic)
2029 return Mechanics(Mechanic);
2030 return MECHANIC_NONE;
2031}
Mechanics
Definition: SharedDefines.h:1324

References Effects, Mechanic, and MECHANIC_NONE.

Referenced by Unit::GetMechanicResistChance().

◆ GetEffectMechanicMask()

uint32 SpellInfo::GetEffectMechanicMask ( uint8  effIndex) const
2004{
2005 uint32 mask = 0;
2006 if (Mechanic)
2007 mask |= 1 << Mechanic;
2008 if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
2009 mask |= 1 << Effects[effIndex].Mechanic;
2010 return mask;
2011}

References Effects, and Mechanic.

Referenced by Unit::IsDamageReducedByArmor().

◆ GetEffects()

std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > const & SpellInfo::GetEffects ( ) const
inline
527{ return Effects; }

Referenced by SpellMgr::LoadSpellInfoCorrections().

◆ GetExplicitTargetMask()

◆ GetFirstRankSpell()

SpellInfo const * SpellInfo::GetFirstRankSpell ( ) const

◆ GetLastRankSpell()

SpellInfo const * SpellInfo::GetLastRankSpell ( ) const
2508{
2509 if (!ChainEntry)
2510 return nullptr;
2511 return ChainEntry->last;
2512}
SpellInfo const * last
Definition: SpellMgr.h:558

References ChainEntry, and SpellChainNode::last.

◆ GetMaxDuration()

◆ GetMaxRange()

◆ GetMaxTicks()

uint32 SpellInfo::GetMaxTicks ( ) const
2369{
2370 int32 DotDuration = GetDuration();
2371 if (DotDuration == 0)
2372 return 1;
2373
2374 // 200% limit
2375 if (DotDuration > 30000)
2376 DotDuration = 30000;
2377
2378 for (uint8 x = 0; x < MAX_SPELL_EFFECTS; x++)
2379 {
2380 if (Effects[x].Effect == SPELL_EFFECT_APPLY_AURA)
2381 switch (Effects[x].ApplyAuraName)
2382 {
2387 if (Effects[x].Amplitude != 0)
2388 return DotDuration / Effects[x].Amplitude;
2389 break;
2390 }
2391 }
2392
2393 return 6;
2394}
@ SPELL_AURA_PERIODIC_HEAL
Definition: SpellAuraDefines.h:71
int32 GetDuration() const
Definition: SpellInfo.cpp:2338

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_pri_glyph_of_prayer_of_healing::HandleProc(), spell_sha_t10_restoration_4p_bonus::HandleProc(), and spell_sha_t8_electrified::HandleProc().

◆ GetMinRange()

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

◆ GetNextRankSpell()

SpellInfo const * SpellInfo::GetNextRankSpell ( ) const
2514{
2515 if (!ChainEntry)
2516 return nullptr;
2517 return ChainEntry->next;
2518}
SpellInfo const * next
Definition: SpellMgr.h:556

References ChainEntry, and SpellChainNode::next.

Referenced by Player::addSpell(), SpellMgr::LoadSpellProcEvents(), SpellMgr::LoadSpellProcs(), and ObjectMgr::LoadSpellScriptNames().

◆ GetPrevRankSpell()

SpellInfo const * SpellInfo::GetPrevRankSpell ( ) const
2520{
2521 if (!ChainEntry)
2522 return nullptr;
2523 return ChainEntry->prev;
2524}
SpellInfo const * prev
Definition: SpellMgr.h:555

References ChainEntry, and SpellChainNode::prev.

Referenced by GetAuraRankForLevel().

◆ GetRank()

◆ GetRecoveryTime()

uint32 SpellInfo::GetRecoveryTime ( ) const

◆ GetSchoolMask()

SpellSchoolMask SpellInfo::GetSchoolMask ( ) const
1988{
1990}
SpellSchoolMask
Definition: SharedDefines.h:295

References SchoolMask.

Referenced by PetAI::_canMeleeAttack(), Unit::CalcArmorReducedDamage(), spell_pal_sacred_shield_base::CalculateAmount(), spell_mage_ice_barrier_aura::CalculateSpellAmount(), spell_mage_ice_barrier::CalculateSpellAmount(), CalculateSpellAmount(), Unit::CalculateSpellDamageTaken(), Creature::CanCastSpell(), Spell::CheckCast(), Spell::CheckCasterAuras(), spell_gen_adaptive_warding::CheckProc(), spell_gen_obsidian_armor::CheckProc(), spell_hun_lock_and_load::CheckTrapProc(), Unit::DealMeleeDamage(), Spell::DoAllEffectOnTarget(), Spell::EffectCastButtons(), Spell::EffectEnvironmentalDMG(), Spell::EffectHeal(), Spell::EffectInterruptCast(), Spell::EffectWeaponDmg(), AuraEffect::HandleAuraModSchoolImmunity(), spell_mage_cold_snap::HandleDummy(), Unit::HandleDummyAuraProc(), AuraEffect::HandlePeriodicTriggerSpellAuraTick(), spell_gen_adaptive_warding::HandleProc(), spell_gen_obsidian_armor::HandleProc(), spell_hun_glyph_of_arcane_shot::HandleProc(), spell_hun_lock_and_load::HandleProcs(), Unit::HandleProcTriggerSpell(), Spell::HandleThreatSpells(), Unit::IsImmunedToDamage(), Unit::IsImmunedToSchool(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpellEffect(), spell_hun_lock_and_load::IsTargetValid(), LoadAuraState(), Unit::MagicSpellHitResult(), SmartScript::ProcessAction(), Player::ProhibitSpellSchool(), Unit::SendPeriodicAuraLog(), Spell::Spell(), Unit::SpellCriticalDamageBonus(), Unit::SpellDamageBonusDone(), Unit::SpellDamageBonusTaken(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), boss_viscidus::SpellHit(), Unit::SpellHitResult(), Unit::SpellPctDamageModsDone(), and HostileRefMgr::threatAssist().

◆ GetSpellMechanicMaskByEffectMask()

uint32 SpellInfo::GetSpellMechanicMaskByEffectMask ( uint32  effectMask) const
2014{
2015 uint32 mask = 0;
2016 if (Mechanic)
2017 mask |= 1 << Mechanic;
2018 for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
2019 if ((effectMask & (1 << i)) && Effects[i].Mechanic)
2020 mask |= 1 << Effects[i].Mechanic;
2021 return mask;
2022}

References Effects, MAX_SPELL_EFFECTS, and Mechanic.

Referenced by Unit::ModSpellDuration().

◆ GetSpellSpecific()

SpellSpecificType SpellInfo::GetSpellSpecific ( ) const
2138{
2139 return _spellSpecific;
2140}
SpellSpecificType _spellSpecific
Definition: SpellInfo.h:399

References _spellSpecific.

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

◆ HasAnyAura()

bool SpellInfo::HasAnyAura ( ) const
902{
903 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
904 if (Effects[i].IsAura())
905 return true;
906 return false;
907}

References Effects, and MAX_SPELL_EFFECTS.

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

◆ HasAnyEffectMechanic()

bool SpellInfo::HasAnyEffectMechanic ( ) const
2034{
2035 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2036 if (Effects[i].Mechanic)
2037 return true;
2038 return false;
2039}

References Effects, MAX_SPELL_EFFECTS, and Mechanic.

◆ HasAreaAuraEffect()

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

References Effects, and MAX_SPELL_EFFECTS.

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

◆ HasAttribute() [1/9]

bool SpellInfo::HasAttribute ( SpellAttr0  attribute) const
inline
415{ 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(), Player::ApplyEquipCooldown(), Unit::ApplySpellDispelImmunity(), Aura::Aura(), AuraApplication::BuildUpdatePacket(), Unit::CalcAbsorbResist(), CalcCastTime(), CalcPowerCost(), AuraEffect::CalculatePeriodic(), boss_mandokir::boss_mandokirAI::CalculateThreat(), SpellEffectInfo::CalcValue(), PetAI::CanAttack(), Aura::CanBeSaved(), CanBeUsedInCombat(), CanDispelAura(), Spell::CanExecuteTriggersOnHit(), Player::canFlyInZone(), Player::CanNoReagentCast(), CanPierceImmuneAura(), 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::DoAllEffectOnTarget(), Spell::DoSpellHitOnUnit(), Spell::EffectCastButtons(), Spell::EffectCharge(), Spell::EffectEnergize(), Spell::EffectEnergizePct(), Spell::EffectForceDeselect(), Spell::EffectSanctuary(), Spell::EffectSchoolDMG(), Spell::EffectStealBeneficialBuff(), Spell::EffectTriggerSpell(), Spell::EffectWeaponDmg(), UnitAI::FillAISpellInfo(), DynObjAura::FillTargetMap(), Spell::finish(), Creature::FocusTarget(), Unit::GetDispellableAuraList(), Unit::GetMagicHitRedirectTarget(), Spell::GetSearcherTypeMask(), AuraEffect::GetTotalTicks(), Spell::handle_immediate(), WorldSession::HandleCancelAuraOpcode(), WorldSession::HandleCancelChanneling(), AuraEffect::HandleFeignDeath(), Spell::HandleLaunchPhase(), AuraEffect::HandleModStateImmunityMask(), AuraEffect::HandleModTotalPercentStat(), AuraEffect::HandlePeriodicEnergizeAuraTick(), WorldSession::HandlePetAction(), Unit::HandleProcTriggerSpell(), AuraEffect::HandleShapeshiftBoosts(), Spell::HandleThreatSpells(), IsActionAllowedChannel(), Spell::IsAutoActionResetSpell(), IsAutocastable(), IsCooldownStartedOnEvent(), Unit::IsDamageReducedByArmor(), Unit::IsImmunedToDamage(), Unit::IsImmunedToSchool(), Unit::IsImmunedToSpell(), Creature::IsImmunedToSpell(), Unit::IsImmunedToSpellEffect(), Player::IsNeedCastPassiveSpellAtLearn(), Spell::IsNextMeleeSwingSpell(), IsPassive(), Aura::IsProcTriggeredOnEvent(), IsRangedWeaponSpell(), Aura::IsRemovedOnShapeLost(), Unit::isSpellBlocked(), Unit::IsTriggeredAtSpellProcEvent(), ThreatCalcHelper::isValidProcess(), Player::LearnTalent(), SpellMgr::LoadEnchantCustomAttr(), LoadLootTemplates_Spell(), SpellMgr::LoadSpellInfoCustomAttributes(), LoadSpellSpecific(), Unit::MagicSpellHitResult(), Unit::MeleeDamageBonusDone(), Unit::MeleeDamageBonusTaken(), Unit::MeleeSpellHitResult(), Unit::MeleeSpellMissChance(), Unit::ModSpellDuration(), Aura::ModStackAmount(), Acore::WorldObjectSpellConeTargetCheck::operator()(), AuraEffect::PeriodicTick(), Player::PrepareCharmAISpells(), Spell::prepareDataForTriggerSystem(), Aura::PrepareProcToTrigger(), Unit::ProcDamageAndSpellFor(), 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::SpellHitResult(), Unit::SpellPctDamageModsDone(), Unit::SpellPctHealingModsDone(), Unit::SpellTakenCritChance(), Acore::Hyperlinks::LinkTags::enchant::StoreTo(), Spell::TriggerGlobalCooldown(), Spell::UpdateChanneledTargetList(), and Aura::UpdateTargetMap().

◆ HasAttribute() [2/9]

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

◆ HasAttribute() [3/9]

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

◆ HasAttribute() [4/9]

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

◆ HasAttribute() [5/9]

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

◆ HasAttribute() [6/9]

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

◆ HasAttribute() [7/9]

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

◆ HasAttribute() [8/9]

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

◆ HasAttribute() [9/9]

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

◆ HasAura()

◆ HasEffect()

◆ HasEffectMechanic()

bool SpellInfo::HasEffectMechanic ( Mechanics  mechanic) const
885{
886 for (auto const& effect : Effects)
887 if (effect.Mechanic == mechanic)
888 return true;
889
890 return false;
891}

References Effects.

Referenced by Unit::RemoveMovementImpairingAuras().

◆ IsAbilityLearnedWithProfession()

bool SpellInfo::IsAbilityLearnedWithProfession ( ) const
989{
990 SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
991
992 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
993 {
994 SkillLineAbilityEntry const* pAbility = _spell_idx->second;
995 if (!pAbility || pAbility->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE)
996 continue;
997
998 if (pAbility->MinSkillLineRank > 0)
999 return true;
1000 }
1001
1002 return false;
1003}
@ SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE
Definition: DBCEnums.h:360
std::pair< SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator > SkillLineAbilityMapBounds
Definition: SpellMgr.h:584
Definition: DBCStructure.h:1597
uint32 MinSkillLineRank
Definition: DBCStructure.h:1605
uint32 AcquireMethod
Definition: DBCStructure.h:1607

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
1006{
1007 SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
1008
1009 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
1010 if (_spell_idx->second->SkillLine == uint32(skillType))
1011 return true;
1012
1013 return false;
1014}

References Id, and sSpellMgr.

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

◆ IsActionAllowedChannel()

bool SpellInfo::IsActionAllowedChannel ( ) const
1262{
1264}
@ SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL
Definition: SharedDefines.h:567
bool IsChanneled() const
Definition: SpellInfo.cpp:1256

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

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

◆ IsAffectedBySpellMod()

bool SpellInfo::IsAffectedBySpellMod ( SpellModifier const *  mod) const
1294{
1295 // xinef: dont check duration mod
1296 if (mod->op != SPELLMOD_DURATION)
1297 if (!IsAffectedBySpellMods())
1298 return false;
1299
1300 SpellInfo const* affectSpell = sSpellMgr->GetSpellInfo(mod->spellId);
1301
1302 if (!affectSpell)
1303 {
1304 return false;
1305 }
1306
1307 if (!sScriptMgr->OnIsAffectedBySpellModCheck(affectSpell, this, mod))
1308 {
1309 return true;
1310 }
1311
1312 // False if affect_spell == nullptr or spellFamily not equal
1313 if (affectSpell->SpellFamilyName != SpellFamilyName)
1314 return false;
1315
1316 // true
1317 if (mod->mask & SpellFamilyFlags)
1318 return true;
1319
1320 return false;
1321}
@ SPELLMOD_DURATION
Definition: SpellDefines.h:77
bool IsAffectedBySpellMods() const
Definition: SpellInfo.cpp:1288

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

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

◆ IsAffectedBySpellMods()

bool SpellInfo::IsAffectedBySpellMods ( ) const
1289{
1291}
@ SPELL_ATTR3_IGNORE_CASTER_MODIFIERS
Definition: SharedDefines.h:522

References AttributesEx3, and SPELL_ATTR3_IGNORE_CASTER_MODIFIERS.

Referenced by IsAffectedBySpellMod().

◆ IsAffectingArea()

bool SpellInfo::IsAffectingArea ( ) const
1017{
1018 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1019 if (Effects[i].IsEffect() && (Effects[i].IsTargetingArea() || Effects[i].IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA) || Effects[i].IsAreaAuraEffect()))
1020 return true;
1021 return false;
1022}
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
Definition: SharedDefines.h:805
bool IsTargetingArea() const
Definition: SpellInfo.cpp:1025

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

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

◆ IsAllowingDeadTarget()

bool SpellInfo::IsAllowingDeadTarget ( ) const
1228{
1230}
@ SPELL_ATTR2_ALLOW_DEAD_TARGET
Definition: SharedDefines.h:456
@ TARGET_FLAG_CORPSE_ALLY
Definition: SpellInfo.h:61
@ TARGET_FLAG_UNIT_DEAD
Definition: SpellInfo.h:56
@ TARGET_FLAG_CORPSE_ENEMY
Definition: SpellInfo.h:55

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
1699{
1700 uint8 matchCount = 0;
1701 uint8 auraCount = 0;
1702 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
1703 {
1704 // xinef: skip non-aura efects
1705 if (!Effects[i].IsAura())
1706 continue;
1707
1708 bool effectFound = false;
1709 for (uint8 j = EFFECT_0; j < MAX_SPELL_EFFECTS; ++j)
1710 {
1711 if (!otherSpellInfo->Effects[j].IsAura())
1712 continue;
1713
1714 if (Effects[i].ApplyAuraName != otherSpellInfo->Effects[j].ApplyAuraName || Effects[i].MiscValue != otherSpellInfo->Effects[j].MiscValue)
1715 continue;
1716
1717 effectFound = true;
1718 break;
1719 }
1720
1721 if (!effectFound)
1722 return false;
1723 ++matchCount;
1724 }
1725
1726 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
1727 {
1728 if (Effects[i].IsAura())
1729 ++auraCount;
1730 if (otherSpellInfo->Effects[i].IsAura())
1731 ++auraCount;
1732 }
1733
1734 return matchCount * 2 == auraCount;
1735}

References EFFECT_0, Effects, and MAX_SPELL_EFFECTS.

Referenced by Spell::DoAllEffectOnTarget(), and IsStrongerAuraActive().

◆ IsAuraExclusiveBySpecificPerCasterWith()

bool SpellInfo::IsAuraExclusiveBySpecificPerCasterWith ( SpellInfo const *  spellInfo) const
1416{
1417 SpellSpecificType spellSpec = GetSpellSpecific();
1418 switch (spellSpec)
1419 {
1428 return spellSpec == spellInfo->GetSpellSpecific();
1429 default:
1430 return false;
1431 }
1432}
SpellSpecificType
Definition: SpellInfo.h:149
@ SPELL_SPECIFIC_STING
Definition: SpellInfo.h:153
@ SPELL_SPECIFIC_ASPECT
Definition: SpellInfo.h:155
@ SPELL_SPECIFIC_WARLOCK_CORRUPTION
Definition: SpellInfo.h:162
@ SPELL_SPECIFIC_CURSE
Definition: SpellInfo.h:154
@ SPELL_SPECIFIC_JUDGEMENT
Definition: SpellInfo.h:161
@ SPELL_SPECIFIC_HAND
Definition: SpellInfo.h:171
@ SPELL_SPECIFIC_AURA
Definition: SpellInfo.h:152
@ SPELL_SPECIFIC_SEAL
Definition: SpellInfo.h:151
SpellSpecificType GetSpellSpecific() const
Definition: SpellInfo.cpp:2137

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
1384{
1385 SpellSpecificType spellSpec1 = GetSpellSpecific();
1386 SpellSpecificType spellSpec2 = spellInfo->GetSpellSpecific();
1387 switch (spellSpec1)
1388 {
1399 return spellSpec1 == spellSpec2;
1401 return spellSpec2 == SPELL_SPECIFIC_FOOD
1402 || spellSpec2 == SPELL_SPECIFIC_FOOD_AND_DRINK;
1404 return spellSpec2 == SPELL_SPECIFIC_DRINK
1405 || spellSpec2 == SPELL_SPECIFIC_FOOD_AND_DRINK;
1407 return spellSpec2 == SPELL_SPECIFIC_FOOD
1408 || spellSpec2 == SPELL_SPECIFIC_DRINK
1409 || spellSpec2 == SPELL_SPECIFIC_FOOD_AND_DRINK;
1410 default:
1411 return false;
1412 }
1413}
@ SPELL_SPECIFIC_FOOD
Definition: SpellInfo.h:163
@ SPELL_SPECIFIC_MAGE_ARMOR
Definition: SpellInfo.h:158
@ SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE
Definition: SpellInfo.h:169
@ SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT
Definition: SpellInfo.h:170
@ SPELL_SPECIFIC_ELEMENTAL_SHIELD
Definition: SpellInfo.h:159
@ SPELL_SPECIFIC_PRESENCE
Definition: SpellInfo.h:166
@ SPELL_SPECIFIC_DRINK
Definition: SpellInfo.h:164
@ SPELL_SPECIFIC_WARLOCK_ARMOR
Definition: SpellInfo.h:157
@ SPELL_SPECIFIC_SCROLL
Definition: SpellInfo.h:168
@ SPELL_SPECIFIC_MAGE_POLYMORPH
Definition: SpellInfo.h:160
@ SPELL_SPECIFIC_TRACKER
Definition: SpellInfo.h:156
@ SPELL_SPECIFIC_FOOD_AND_DRINK
Definition: SpellInfo.h:165
@ SPELL_SPECIFIC_CHARM
Definition: SpellInfo.h:167

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

Referenced by Aura::CanStackWith().

◆ IsAutocastable()

bool SpellInfo::IsAutocastable ( ) const
1104{
1106 return false;
1108 return false;
1109 return true;
1110}
@ SPELL_ATTR1_NO_AUTOCAST_AI
Definition: SharedDefines.h:436
@ SPELL_ATTR0_PASSIVE
Definition: SharedDefines.h:388

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
1272{
1274}
@ SPELL_ATTR1_ALLOW_WHILE_STEALTHED
Definition: SharedDefines.h:424

References AttributesEx, and SPELL_ATTR1_ALLOW_WHILE_STEALTHED.

Referenced by Spell::prepare().

◆ IsChannelCategorySpell()

bool SpellInfo::IsChannelCategorySpell ( ) const
1084{
1085 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1086 if (Effects[i].TargetA.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL || Effects[i].TargetB.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL)
1087 return true;
1088 return false;
1089}
@ TARGET_SELECT_CATEGORY_CHANNEL
Definition: SpellInfo.h:79

References Effects, MAX_SPELL_EFFECTS, and TARGET_SELECT_CATEGORY_CHANNEL.

Referenced by AuraEffect::HandlePeriodicTriggerSpellAuraTick().

◆ IsChanneled()

◆ IsCooldownStartedOnEvent()

◆ IsCritCapable()

bool SpellInfo::IsCritCapable ( ) const
1178{
1179 return _isCritCapable;
1180}

References _isCritCapable.

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

◆ IsDeathPersistent()

bool SpellInfo::IsDeathPersistent ( ) const
1218{
1220}
@ SPELL_ATTR3_ALLOW_AURA_WHILE_DEAD
Definition: SharedDefines.h:513

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
2575{
2576 if (Id == spellInfo->Id)
2577 return false;
2578 return IsRankOf(spellInfo);
2579}
bool IsRankOf(SpellInfo const *spellInfo) const
Definition: SpellInfo.cpp:2569

References Id, and IsRankOf().

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

◆ IsExplicitDiscovery()

bool SpellInfo::IsExplicitDiscovery ( ) const
918{
919 return ((Effects[0].Effect == SPELL_EFFECT_CREATE_RANDOM_ITEM
920 || Effects[0].Effect == SPELL_EFFECT_CREATE_ITEM_2)
921 && Effects[1].Effect == SPELL_EFFECT_SCRIPT_EFFECT)
922 || Id == 64323;
923}
@ SPELL_EFFECT_SCRIPT_EFFECT
Definition: SharedDefines.h:855
@ SPELL_EFFECT_CREATE_ITEM_2
Definition: SharedDefines.h:935
@ SPELL_EFFECT_CREATE_RANDOM_ITEM
Definition: SharedDefines.h:837

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
2582{
2583 if (ChainEntry && spellInfo->ChainEntry)
2584 {
2585 if (ChainEntry->first == spellInfo->ChainEntry->first)
2586 if (ChainEntry->rank > spellInfo->ChainEntry->rank)
2587 return true;
2588 }
2589 return false;
2590}

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

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

◆ IsLootCrafting()

bool SpellInfo::IsLootCrafting ( ) const
926{
927 return (Effects[0].Effect == SPELL_EFFECT_CREATE_RANDOM_ITEM ||
928 // different random cards from Inscription (121==Virtuoso Inking Set category) r without explicit item
929 (Effects[0].Effect == SPELL_EFFECT_CREATE_ITEM_2 &&
930 ((TotemCategory[0] != 0 || (Totem[0] != 0 && SpellIconID == 1)) || Effects[0].ItemType == 0)));
931}

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

References Id, and IsPassive().

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

◆ IsPassive()

◆ IsPassiveStackableWithRanks()

bool SpellInfo::IsPassiveStackableWithRanks ( ) const

◆ IsPositive()

bool SpellInfo::IsPositive ( ) const
1238{
1240}
@ SPELL_ATTR0_CU_POSITIVE
Definition: SpellInfo.h:211
@ SPELL_ATTR0_CU_NEGATIVE
Definition: SpellInfo.h:210

References AttributesCu, SPELL_ATTR0_CU_NEGATIVE, and SPELL_ATTR0_CU_POSITIVE.

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

◆ IsPositiveEffect()

bool SpellInfo::IsPositiveEffect ( uint8  effIndex) const
1243{
1244 switch (effIndex)
1245 {
1246 default:
1247 case 0:
1249 case 1:
1251 case 2:
1253 }
1254}
@ SPELL_ATTR0_CU_POSITIVE_EFF2
Definition: SpellInfo.h:203
@ SPELL_ATTR0_CU_NEGATIVE_EFF2
Definition: SpellInfo.h:190
@ SPELL_ATTR0_CU_NEGATIVE_EFF1
Definition: SpellInfo.h:189
@ SPELL_ATTR0_CU_POSITIVE_EFF0
Definition: SpellInfo.h:201
@ SPELL_ATTR0_CU_NEGATIVE_EFF0
Definition: SpellInfo.h:188
@ SPELL_ATTR0_CU_POSITIVE_EFF1
Definition: SpellInfo.h:202

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 AuraApplication::_InitFlags(), Spell::DoAllEffectOnTarget(), GetAuraRankForLevel(), Unit::IsImmunedToSpellEffect(), and Spell::prepare().

◆ IsPrimaryProfession()

bool SpellInfo::IsPrimaryProfession ( ) const
969{
970 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
971 {
972 if (Effects[i].Effect == SPELL_EFFECT_SKILL)
973 {
974 uint32 skill = Effects[i].MiscValue;
975
976 if (IsPrimaryProfessionSkill(skill))
977 return true;
978 }
979 }
980 return false;
981}
@ SPELL_EFFECT_SKILL
Definition: SharedDefines.h:896
bool IsPrimaryProfessionSkill(uint32 skill)
Definition: SpellMgr.cpp:36

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

Referenced by IsPrimaryProfessionFirstRank().

◆ IsPrimaryProfessionFirstRank()

bool SpellInfo::IsPrimaryProfessionFirstRank ( ) const
984{
985 return IsPrimaryProfession() && GetRank() == 1;
986}
uint8 GetRank() const
Definition: SpellInfo.cpp:2494
bool IsPrimaryProfession() const
Definition: SpellInfo.cpp:968

References GetRank(), and IsPrimaryProfession().

Referenced by Player::_addSpell(), Player::GetTrainerSpellState(), Player::removeSpell(), and WorldSession::SendTrainerList().

◆ IsProfession()

bool SpellInfo::IsProfession ( ) const
954{
955 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
956 {
957 if (Effects[i].Effect == SPELL_EFFECT_SKILL)
958 {
959 uint32 skill = Effects[i].MiscValue;
960
961 if (IsProfessionSkill(skill))
962 return true;
963 }
964 }
965 return false;
966}
bool IsProfessionSkill(uint32 skill)
Definition: SpellMgr.h:618

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

Referenced by ObjectMgr::AddSpellToTrainer().

◆ IsProfessionOrRiding()

bool SpellInfo::IsProfessionOrRiding ( ) const
939{
940 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
941 {
942 if (Effects[i].Effect == SPELL_EFFECT_SKILL)
943 {
944 uint32 skill = Effects[i].MiscValue;
945
946 if (IsProfessionOrRidingSkill(skill))
947 return true;
948 }
949 }
950 return false;
951}
bool IsProfessionOrRidingSkill(uint32 skill)
Definition: SpellMgr.h:623

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

Referenced by ComputeIsStackableWithRanks().

◆ IsQuestTame()

bool SpellInfo::IsQuestTame ( ) const
934{
935 return Effects[0].Effect == SPELL_EFFECT_THREAT && Effects[1].Effect == SPELL_EFFECT_APPLY_AURA && Effects[1].ApplyAuraName == SPELL_AURA_DUMMY;
936}
@ SPELL_EFFECT_THREAT
Definition: SharedDefines.h:841
@ 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
1277{
1278 return (SpellFamilyName == SPELLFAMILY_HUNTER && !(SpellFamilyFlags[1] & 0x10000000)) // for 53352, cannot find better way
1280 || (HasAttribute(SPELL_ATTR0_USES_RANGED_SLOT)); // Xinef: added
1281}
@ SPELLFAMILY_HUNTER
Definition: SharedDefines.h:3537
#define ITEM_SUBCLASS_MASK_WEAPON_RANGED
Definition: ItemTemplate.h:367

References EquippedItemSubClassMask, HasAttribute(), ITEM_SUBCLASS_MASK_WEAPON_RANGED, SPELL_ATTR0_USES_RANGED_SLOT, SPELLFAMILY_HUNTER, SpellFamilyFlags, and SpellFamilyName.

Referenced by Spell::handle_immediate(), Unit::MeleeSpellHitResult(), Spell::Spell(), Unit::SpellDamageBonusDone(), and Unit::SpellHealingBonusDone().

◆ IsRanked()

bool SpellInfo::IsRanked ( ) const
2490{
2491 return ChainEntry != nullptr;
2492}

References ChainEntry.

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

◆ IsRankOf()

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

◆ IsRequiringDeadTarget()

bool SpellInfo::IsRequiringDeadTarget ( ) const
1223{
1225}
@ SPELL_ATTR3_ONLY_ON_GHOSTS
Definition: SharedDefines.h:505

References AttributesEx3, and SPELL_ATTR3_ONLY_ON_GHOSTS.

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

◆ IsSelfCast()

bool SpellInfo::IsSelfCast ( ) const
1091{
1092 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1093 if (Effects[i].Effect && Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER)
1094 return false;
1095 return true;
1096}

References Effects, MAX_SPELL_EFFECTS, and TARGET_UNIT_CASTER.

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

◆ IsSingleTarget()

bool SpellInfo::IsSingleTarget ( ) const
1375{
1376 // all other single target spells have if it has AttributesEx5
1378 return true;
1379
1380 return false;
1381}
@ SPELL_ATTR5_LIMIT_N
Definition: SharedDefines.h:572

References AttributesEx5, and SPELL_ATTR5_LIMIT_N.

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

◆ IsSpellValid()

bool SpellInfo::IsSpellValid ( ) const
1193{
1194 return _isSpellValid;
1195}

References _isSpellValid.

Referenced by SpellMgr::IsSpellValid().

◆ IsStackableWithRanks()

bool SpellInfo::IsStackableWithRanks ( ) const
1146{
1147 return _isStackableWithRanks;
1148}

References _isStackableWithRanks.

Referenced by Player::addSpell().

◆ IsStrongerAuraActive()

bool SpellInfo::IsStrongerAuraActive ( Unit const *  caster,
Unit const *  target 
) const
1584{
1585 if (!target)
1586 return false;
1587
1588 // xinef: check spell group
1589 uint32 groupId = sSpellMgr->GetSpellGroup(Id);
1590 if (!groupId)
1591 return false;
1592
1593 SpellGroupSpecialFlags sFlag = sSpellMgr->GetSpellGroupSpecialFlags(Id);
1595 return false;
1596
1597 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
1598 {
1599 // xinef: Skip Empty effects
1600 if (!Effects[i].IsEffect())
1601 continue;
1602
1603 // xinef: if non-aura effect is preset - return false
1604 if (!Effects[i].IsAura())
1605 return false;
1606
1607 // xinef: aura is periodic - return false
1608 if (Effects[i].Amplitude)
1609 return false;
1610
1611 // xinef: exclude dummy auras
1612 if (Effects[i].ApplyAuraName == SPELL_AURA_DUMMY)
1613 return false;
1614 }
1615
1616 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
1617 {
1618 // xinef: skip non-aura efects
1619 if (!Effects[i].IsAura())
1620 return false;
1621
1622 Unit::AuraEffectList const& auraList = target->GetAuraEffectsByType((AuraType)Effects[i].ApplyAuraName);
1623 for (Unit::AuraEffectList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
1624 {
1625 // xinef: aura is not groupped or in different group
1626 uint32 auraGroup = (*iter)->GetAuraGroup();
1627 if (!auraGroup || auraGroup != groupId)
1628 continue;
1629
1630 if (IsRankOf((*iter)->GetSpellInfo()) && (sFlag & SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_SAME_SPELL))
1631 {
1632 continue;
1633 }
1634
1635 // xinef: check priority before effect mask
1637 {
1638 SpellGroupSpecialFlags sFlagCurr = sSpellMgr->GetSpellGroupSpecialFlags((*iter)->GetId());
1639 if (sFlagCurr >= SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 && sFlagCurr <= SPELL_GROUP_SPECIAL_FLAG_PRIORITY4 && sFlagCurr < sFlag)
1640 {
1641 return true;
1642 }
1643 }
1644
1645 // xinef: check aura effect equal auras only, some auras have different effects on different ranks - check rank also
1646 if (!IsAuraEffectEqual((*iter)->GetSpellInfo()) && !IsRankOf((*iter)->GetSpellInfo()))
1647 continue;
1648
1649 // xinef: misc value mismatches
1650 // xinef: commented, checked above
1651 //if (Effects[i].MiscValue != (*iter)->GetMiscValue())
1652 // continue;
1653
1654 // xinef: should not happen, or effect is not active - stronger one is present
1655 AuraApplication* aurApp = (*iter)->GetBase()->GetApplicationOfTarget(target->GetGUID());
1656 if (!aurApp || !aurApp->IsActive((*iter)->GetEffIndex()))
1657 continue;
1658
1659 // xinef: assume that all spells are either positive or negative, otherwise they should not be in one group
1660 // xinef: take custom values into account
1661
1662 int32 basePoints = Effects[i].BasePoints;
1663 int32 duration = GetMaxDuration();
1664
1665 // xinef: should have the same id, can be different if spell is triggered
1666 // xinef: have to fix spell mods for triggered spell, turn off current spellmodtakingspell for preparing and restore after
1667 if (Player const* player = caster->GetSpellModOwner())
1668 if (player->m_spellModTakingSpell && player->m_spellModTakingSpell->m_spellInfo->Id == Id)
1669 basePoints = player->m_spellModTakingSpell->GetSpellValue()->EffectBasePoints[i];
1670
1671 int32 curValue = std::abs(Effects[i].CalcValue(caster, &basePoints));
1673 std::abs((*iter)->GetSpellInfo()->Effects[(*iter)->GetEffIndex()].CalcValue((*iter)->GetCaster())) :
1674 std::abs((*iter)->GetAmount());
1675
1676 // xinef: for same spells, divide amount by stack amount
1677 if (Id == (*iter)->GetId())
1678 auraValue /= (*iter)->GetBase()->GetStackAmount();
1679
1680 if (curValue < auraValue)
1681 return true;
1682
1683 // xinef: little hack, if current spell is the same as aura spell, asume it is not stronger
1684 // xinef: if values are the same, duration mods should be taken into account but they are almost always passive
1685 if (curValue == auraValue)
1686 {
1687 if (Id == (*iter)->GetId())
1688 continue;
1689 if (!(*iter)->GetBase()->IsPassive() && duration < (*iter)->GetBase()->GetDuration())
1690 return true;
1691 }
1692 }
1693 }
1694
1695 return false;
1696}
@ SPELL_GROUP_SPECIAL_FLAG_PRIORITY1
Definition: SpellMgr.h:344
@ SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK
Definition: SpellMgr.h:342
@ SPELL_GROUP_SPECIAL_FLAG_BASE_AMOUNT_CHECK
Definition: SpellMgr.h:343
@ SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_SAME_SPELL
Definition: SpellMgr.h:349
@ SPELL_GROUP_SPECIAL_FLAG_PRIORITY4
Definition: SpellMgr.h:347
std::list< AuraEffect * > AuraEffectList
Definition: Unit.h:646
Definition: SpellAuras.h:37
bool IsActive(uint8 effIdx)
Definition: SpellAuras.h:81
Aura * GetBase() const
Definition: SpellAuras.h:62
const AuraApplication * GetApplicationOfTarget(ObjectGuid guid) const
Definition: SpellAuras.h:183
int32 GetMaxDuration() const
Definition: SpellInfo.cpp:2345
bool IsAuraEffectEqual(SpellInfo const *otherSpellInfo) const
Definition: SpellInfo.cpp:1698

References EFFECT_0, Effects, Aura::GetApplicationOfTarget(), Unit::GetAuraEffectsByType(), AuraApplication::GetBase(), Object::GetGUID(), GetMaxDuration(), Unit::GetSpellModOwner(), Id, AuraApplication::IsActive(), IsAuraEffectEqual(), IsRankOf(), MAX_SPELL_EFFECTS, SPELL_AURA_DUMMY, SPELL_GROUP_SPECIAL_FLAG_BASE_AMOUNT_CHECK, SPELL_GROUP_SPECIAL_FLAG_PRIORITY1, SPELL_GROUP_SPECIAL_FLAG_PRIORITY4, SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK, SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_SAME_SPELL, and sSpellMgr.

Referenced by CheckTarget().

◆ IsTargetingArea()

◆ LoadAuraState()

AuraStateType SpellInfo::LoadAuraState ( ) const
2066{
2067 // Seals
2069 return AURA_STATE_JUDGEMENT;
2070
2071 // Conflagrate aura state on Immolate and Shadowflame
2073 // Immolate
2074 ((SpellFamilyFlags[0] & 4) ||
2075 // Shadowflame
2076 (SpellFamilyFlags[2] & 2)))
2078
2079 // Faerie Fire (druid versions)
2082
2083 // Sting (hunter's pet ability)
2084 if (GetCategory() == 1133)
2086
2087 // Victorious
2088 if (SpellFamilyName == SPELLFAMILY_WARRIOR && SpellFamilyFlags[1] & 0x00040000)
2090
2091 // Swiftmend state on Regrowth & Rejuvenation
2093 return AURA_STATE_SWIFTMEND;
2094
2095 // Deadly poison aura state
2096 if (SpellFamilyName == SPELLFAMILY_ROGUE && SpellFamilyFlags[0] & 0x10000)
2098
2099 // Enrage aura state
2100 if (Dispel == DISPEL_ENRAGE)
2101 return AURA_STATE_ENRAGE;
2102
2103 // Bleeding aura state
2105 return AURA_STATE_BLEEDING;
2106
2108 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2109 if (Effects[i].IsAura() && (Effects[i].ApplyAuraName == SPELL_AURA_MOD_STUN
2110 || Effects[i].ApplyAuraName == SPELL_AURA_MOD_ROOT))
2111 return AURA_STATE_FROZEN;
2112
2113 switch (Id)
2114 {
2115 case 71465: // Divine Surge
2116 case 50241: // Oculus, Drake spell Evasive Maneuvers
2117 return AURA_STATE_UNKNOWN22;
2118 case 9991: // Touch of Zanzil
2119 case 35331: // Black Blood
2120 case 9806: // Phantom Strike
2121 case 35325: // Glowing Blood
2122 case 35328: // Lambent Blood
2123 case 35329: // Vibrant Blood
2124 case 16498: // Faerie Fire
2125 case 6950:
2126 case 20656:
2127 case 25602:
2128 case 32129:
2130 default:
2131 break;
2132 }
2133
2134 return AURA_STATE_NONE;
2135}
@ MECHANIC_BLEED
Definition: SharedDefines.h:1340
@ SPELLFAMILY_WARRIOR
Definition: SharedDefines.h:3532
@ SPELLFAMILY_ROGUE
Definition: SharedDefines.h:3536
@ AURA_STATE_NONE
Definition: SharedDefines.h:1291
@ AURA_STATE_FROZEN
Definition: SharedDefines.h:1295
@ AURA_STATE_DEADLY_POISON
Definition: SharedDefines.h:1308
@ AURA_STATE_BLEEDING
Definition: SharedDefines.h:1310
@ AURA_STATE_FAERIE_FIRE
Definition: SharedDefines.h:1304
@ AURA_STATE_ENRAGE
Definition: SharedDefines.h:1309
@ AURA_STATE_WARRIOR_VICTORY_RUSH
Definition: SharedDefines.h:1302
@ AURA_STATE_UNKNOWN22
Definition: SharedDefines.h:1314
@ AURA_STATE_JUDGEMENT
Definition: SharedDefines.h:1296
@ AURA_STATE_SWIFTMEND
Definition: SharedDefines.h:1307
@ AURA_STATE_CONFLAGRATE
Definition: SharedDefines.h:1306
@ DISPEL_ENRAGE
Definition: SharedDefines.h:1381
@ SPELL_SCHOOL_MASK_FROST
Definition: SharedDefines.h:301
SpellSchoolMask GetSchoolMask() const
Definition: SpellInfo.cpp:1987
uint32 GetAllEffectsMechanicMask() const
Definition: SpellInfo.cpp:1992

References 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_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.
2143{
2144 switch (SpellFamilyName)
2145 {
2147 {
2148 // Food / Drinks (mostly)
2150 {
2151 bool food = false;
2152 bool drink = false;
2153 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2154 {
2155 if (!Effects[i].IsAura())
2156 continue;
2157 switch (Effects[i].ApplyAuraName)
2158 {
2159 // Food
2162 food = true;
2163 break;
2164 // Drink
2167 drink = true;
2168 break;
2169 default:
2170 break;
2171 }
2172 }
2173
2174 if (food && drink)
2176 else if (food)
2177 return SPELL_SPECIFIC_FOOD;
2178 else if (drink)
2179 return SPELL_SPECIFIC_DRINK;
2180 }
2181 // scrolls effects
2182 else
2183 {
2184 SpellInfo const* firstRankSpellInfo = GetFirstRankSpell();
2185 switch (firstRankSpellInfo->Id)
2186 {
2187 case 8118: // Strength
2188 case 8099: // Stamina
2189 case 8112: // Spirit
2190 case 8096: // Intellect
2191 case 8115: // Agility
2192 case 8091: // Armor
2193 return SPELL_SPECIFIC_SCROLL;
2194 }
2195 }
2196 break;
2197 }
2198 case SPELLFAMILY_MAGE:
2199 {
2200 // family flags 18(Molten), 25(Frost/Ice), 28(Mage)
2201 if (SpellFamilyFlags[0] & 0x12040000)
2203
2204 // Arcane brillance and Arcane intelect (normal check fails because of flags difference)
2205 if (SpellFamilyFlags[0] & 0x400)
2207
2208 if ((SpellFamilyFlags[0] & 0x1000000) && Effects[0].ApplyAuraName == SPELL_AURA_MOD_CONFUSE)
2210
2211 break;
2212 }
2214 {
2215 // only warlock curses have this
2216 if (Dispel == DISPEL_CURSE)
2217 return SPELL_SPECIFIC_CURSE;
2218
2219 // Warlock (Demon Armor | Demon Skin | Fel Armor)
2220 if (SpellFamilyFlags[1] & 0x20000020 || SpellFamilyFlags[2] & 0x00000010)
2222
2223 //seed of corruption and corruption
2224 if (SpellFamilyFlags[1] & 0x10 || SpellFamilyFlags[0] & 0x2)
2226 break;
2227 }
2228 case SPELLFAMILY_PRIEST:
2229 {
2230 // Divine Spirit and Prayer of Spirit
2231 if (SpellFamilyFlags[0] & 0x20)
2233
2234 break;
2235 }
2236 case SPELLFAMILY_HUNTER:
2237 {
2238 // only hunter stings have this
2239 if (Dispel == DISPEL_POISON)
2240 return SPELL_SPECIFIC_STING;
2241
2242 // only hunter aspects have this (but not all aspects in hunter family)
2243 if (SpellFamilyFlags.HasFlag(0x00380000, 0x00440000, 0x00001010))
2244 return SPELL_SPECIFIC_ASPECT;
2245
2246 break;
2247 }
2249 {
2250 // Collection of all the seal family flags. No other paladin spell has any of those.
2251 if (SpellFamilyFlags[1] & 0x26000C00
2252 || SpellFamilyFlags[0] & 0x0A000000)
2253 return SPELL_SPECIFIC_SEAL;
2254
2255 if (SpellFamilyFlags[0] & 0x00002190)
2256 return SPELL_SPECIFIC_HAND;
2257
2258 // Judgement of Wisdom, Judgement of Light, Judgement of Justice
2259 if (Id == 20184 || Id == 20185 || Id == 20186)
2261
2262 // only paladin auras have this (for palaldin class family)
2263 if (SpellFamilyFlags[2] & 0x00000020)
2264 return SPELL_SPECIFIC_AURA;
2265
2266 // Illidari Council Paladin (Gathios the Shatterer)
2267 if (Id == 41459 || Id == 41469)
2268 return SPELL_SPECIFIC_SEAL;
2269
2270 break;
2271 }
2272 case SPELLFAMILY_SHAMAN:
2273 {
2274 // family flags 10 (Lightning), 42 (Earth), 37 (Water), proc shield from T2 8 pieces bonus
2275 if (SpellFamilyFlags[1] & 0x420
2276 || (SpellFamilyFlags[0] & 0x00000400 && HasAttribute(SPELL_ATTR1_NO_THREAT))
2277 || Id == 23552)
2279
2280 break;
2281 }
2283 if (Id == 48266 || Id == 48263 || Id == 48265)
2285 break;
2286 }
2287
2288 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2289 {
2290 if (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA)
2291 {
2292 switch (Effects[i].ApplyAuraName)
2293 {
2298 return SPELL_SPECIFIC_CHARM;
2301 if (Id == 30645) // Gas Cloud Tracking
2302 return SPELL_SPECIFIC_NORMAL;
2303 [[fallthrough]];
2307 }
2308 }
2309 }
2310
2311 return SPELL_SPECIFIC_NORMAL;
2312}
@ SPELL_ATTR1_NO_THREAT
Definition: SharedDefines.h:429
@ SPELLFAMILY_PRIEST
Definition: SharedDefines.h:3534
@ SPELLFAMILY_MAGE
Definition: SharedDefines.h:3531
@ SPELLFAMILY_GENERIC
Definition: SharedDefines.h:3528
@ SPELLFAMILY_SHAMAN
Definition: SharedDefines.h:3539
@ SPELLFAMILY_DEATHKNIGHT
Definition: SharedDefines.h:3543
@ DISPEL_POISON
Definition: SharedDefines.h:1376
@ DISPEL_CURSE
Definition: SharedDefines.h:1374
@ SPELL_SPECIFIC_NORMAL
Definition: SpellInfo.h:150
@ AURA_INTERRUPT_FLAG_NOT_SEATED
Definition: SpellDefines.h:61
@ 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_MOD_CONFUSE
Definition: SpellAuraDefines.h:68
@ SPELL_AURA_TRACK_CREATURES
Definition: SpellAuraDefines.h:107
@ SPELL_AURA_MOD_POSSESS
Definition: SpellAuraDefines.h:65
@ SPELL_AURA_MOD_REGEN
Definition: SpellAuraDefines.h:147
bool HasFlag(uint32 p1=0, uint32 p2=0, uint32 p3=0) const
Definition: Util.h:468

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
1267{
1269}
@ SPELL_ATTR1_FINISHING_MOVE_DURATION
Definition: SharedDefines.h:441
@ SPELL_ATTR1_FINISHING_MOVE_DAMAGE
Definition: SharedDefines.h:439

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
1039{
1041 return true;
1042
1043 // pussywizard:
1044 if (effIndex < MAX_SPELL_EFFECTS && (triggeringSpell->Effects[effIndex].TargetA.GetCheckType() == TARGET_CHECK_ENTRY || triggeringSpell->Effects[effIndex].TargetB.GetCheckType() == TARGET_CHECK_ENTRY))
1045 {
1046 // xinef:
1047 if (Id == 60563)
1048 return true;
1049
1050 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1051 if (Effects[i].IsEffect() && (Effects[i].TargetA.GetCheckType() == TARGET_CHECK_ENTRY || Effects[i].TargetB.GetCheckType() == TARGET_CHECK_ENTRY))
1052 return true;
1053 }
1054
1055 /*
1056 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1057 {
1058 if (Effects[i].IsEffect())
1059 {
1060 if (Effects[i].TargetA.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL
1061 || Effects[i].TargetB.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CHANNEL)
1062 return true;
1063 }
1064 }
1065 */
1066
1067 if (triggeringSpell->IsChanneled())
1068 {
1069 uint32 mask = 0;
1070 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1071 {
1072 if (Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER && Effects[i].TargetA.GetTarget() != TARGET_DEST_CASTER)
1073 mask |= Effects[i].GetProvidedTargetMask();
1074 }
1075
1076 if (mask & TARGET_FLAG_UNIT_MASK)
1077 return true;
1078 }
1079
1080 return false;
1081}
@ TARGET_DEST_CASTER
Definition: SharedDefines.h:1423
@ TARGET_CHECK_ENTRY
Definition: SpellInfo.h:115
bool NeedsExplicitUnitTarget() const
Definition: SpellInfo.cpp:1033

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
1183{
1184 return _requireCooldownInfo;
1185}

References _requireCooldownInfo.

Referenced by Spell::SendSpellCooldown().

◆ SetCritCapable()

void SpellInfo::SetCritCapable ( bool  val)
1188{
1189 _isCritCapable = val;
1190}

References _isCritCapable.

◆ SetSpellValid()

void SpellInfo::SetSpellValid ( bool  val)
1198{
1199 _isSpellValid = val;
1200}

References _isSpellValid.

◆ SetStackableWithRanks()

void SpellInfo::SetStackableWithRanks ( bool  val)
1151{
1153}

References _isStackableWithRanks.

◆ ValidateAttribute6SpellDamageMods()

bool SpellInfo::ValidateAttribute6SpellDamageMods ( Unit const *  caster,
const AuraEffect auraEffect,
bool  isDot 
) const
1738{
1739 // Xinef: no attribute
1741 return true;
1742
1743 // Xinef we have a hook to decide which auras should profit to the spell, by default no profits
1744 // Xinef: Scourge Strike - Trigger
1745 if (Id == 70890 && auraEffect)
1746 {
1747 SpellInfo const* auraInfo = auraEffect->GetSpellInfo();
1748 return auraInfo->SpellIconID == 3086 ||
1749 (auraInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && (auraInfo->SpellFamilyFlags & flag96(8388608, 64, 16) || auraInfo->SpellIconID == 235 || auraInfo->SpellIconID == 154));
1750 }
1751 // Xinef: Necrosis, no profits for done and taken
1752 else if (Id == 51460)
1753 return false;
1754
1755 // Xinef: Do not affect dots and auras obtained from items, only affected by self casted auras
1756 return !isDot && auraEffect && (auraEffect->GetAmount() < 0 || (auraEffect->GetCasterGUID() == caster->GetGUID() && auraEffect->GetSpellInfo()->SpellFamilyName == SpellFamilyName)) && !auraEffect->GetBase()->GetCastItemGUID();
1757}
@ SPELL_ATTR6_IGNORE_CASTER_DAMAGE_MODIFIERS
Definition: SharedDefines.h:633
Definition: Util.h:451
SpellInfo const * GetSpellInfo() const
Definition: SpellAuraEffects.h:54
Aura * GetBase() const
Definition: SpellAuraEffects.h:49
ObjectGuid GetCasterGUID() const
Definition: SpellAuraEffects.h:48
int32 GetAmount() const
Definition: SpellAuraEffects.h:64
ObjectGuid GetCastItemGUID() const
Definition: SpellAuras.h:103

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 Function Documentation

◆ SpellMgr

friend class SpellMgr
friend

Member Data Documentation

◆ _auraState

AuraStateType SpellInfo::_auraState

◆ _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

Referenced by CalcPowerCost(), and SpellInfo().

◆ AttributesEx5

uint32 SpellInfo::AttributesEx5

◆ AttributesEx6

◆ AttributesEx7

uint32 SpellInfo::AttributesEx7

Referenced by SpellInfo().

◆ AuraInterruptFlags

◆ BaseLevel

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

SpellCastTimesEntry const* SpellInfo::CastTimeEntry

◆ CategoryEntry

◆ CategoryRecoveryTime

◆ ChainEntry

◆ ChannelInterruptFlags

uint32 SpellInfo::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(), Player::_removeTalentAurasAndSpells(), _UnloadImplicitTargetConditionLists(), spell_dk_will_of_the_necropolis::Absorb(), Spell::AddGOTarget(), Spell::AddItemTarget(), ObjectMgr::AddSpellToTrainer(), ConditionMgr::addToSpellImplicitTargetConditions(), Spell::AddUnitTarget(), Player::ApplyEquipSpell(), Aura::BuildEffectMaskForOwner(), Unit::CalcAbsorbResist(), ThreatCalcHelper::calcThreat(), spell_dk_anti_magic_zone::CalculateAmount(), spell_pal_sacred_shield_base::CalculateAmount(), AuraEffect::CalculateAmount(), spell_krystallus_shatter_effect::CalculateDamage(), spell_gruul_shatter_effect::CalculateDamage(), spell_igb_incinerating_blast::CalculateDamage(), Spell::CalculateJumpSpeeds(), AuraEffect::CalculatePeriodic(), spell_igb_cannon_blast::CalculatePower(), spell_dru_treant_scaling::CalculateResistanceAmount(), spell_hun_generic_scaling::CalculateResistanceAmount(), spell_mage_pet_scaling::CalculateResistanceAmount(), spell_pri_shadowfiend_scaling::CalculateResistanceAmount(), spell_sha_feral_spirit_scaling::CalculateResistanceAmount(), spell_sha_fire_elemental_scaling::CalculateResistanceAmount(), spell_warl_generic_scaling::CalculateResistanceAmount(), spell_warl_infernal_scaling::CalculateResistanceAmount(), Unit::CalculateSpellDamage(), AuraEffect::CalculateSpellMod(), spell_dk_pet_scaling::CalculateStatAmount(), spell_dru_treant_scaling::CalculateStatAmount(), spell_hun_generic_scaling::CalculateStatAmount(), spell_mage_pet_scaling::CalculateStatAmount(), spell_pri_shadowfiend_scaling::CalculateStatAmount(), spell_sha_feral_spirit_scaling::CalculateStatAmount(), spell_sha_fire_elemental_scaling::CalculateStatAmount(), spell_warl_generic_scaling::CalculateStatAmount(), spell_warl_infernal_scaling::CalculateStatAmount(), SpellEffectInfo::CalcValue(), Spell::CanAutoCast(), Spell::CanExecuteTriggersOnHit(), Spell::CanOpenLock(), 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(), Spell::CheckEffectTarget(), CheckElixirStacking(), Spell::CheckItems(), spell_hun_ascpect_of_the_viper::CheckProc(), CheckShapeshift(), spell_rotface_unstable_ooze_explosion::CheckTarget(), spell_hun_lock_and_load::CheckTrapProc(), 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(), AuraEffect::HandleAuraLinked(), Unit::HandleAuraProc(), 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(), Unit::HandleDummyAuraProc(), 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(), spell_putricide_unbound_plague_dmg_aura::HandlePeriodic(), AuraEffect::HandlePeriodicDamageAurasTick(), AuraEffect::HandlePeriodicHealAurasTick(), AuraEffect::HandlePeriodicHealthFunnelAuraTick(), AuraEffect::HandlePeriodicHealthLeechAuraTick(), AuraEffect::HandlePeriodicManaLeechAuraTick(), AuraEffect::HandlePeriodicPowerBurnAuraTick(), AuraEffect::HandlePeriodicTriggerSpellAuraTick(), AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(), WorldSession::HandlePetActionHelper(), spell_item_blood_draining_enchant::HandleProc(), spell_dk_blood_caked_blade::HandleProc(), spell_gen_proc_not_self::HandleProc(), spell_gen_blade_warding::HandleProc(), spell_pal_seal_of_command_aura::HandleProc(), spell_pal_sacred_shield_base::HandleProc(), spell_hun_lock_and_load::HandleProcs(), Unit::HandleProcTriggerSpell(), AuraEffect::HandleProcTriggerSpellAuraProc(), AuraEffect::HandleProcTriggerSpellWithValueAuraProc(), AuraEffect::HandleRaidProcFromChargeAuraProc(), AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(), spell_igb_rocket_pack_aura::HandleRemove(), spell_gen_set_health::HandleScript(), Unit::HandleSpellClick(), spell_wintergrasp_create_vehicle::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(), AuraEffect::HasSpellClassMask(), ItemTemplate::HasSpellPowerStat(), AuraEffect::IsAffectedOnSpell(), IsAffectingArea(), IsAuraEffectEqual(), IsChannelCategorySpell(), Unit::IsDamageReducedByArmor(), IsExplicitDiscovery(), Unit::IsImmunedToSpell(), Creature::IsImmunedToSpell(), Unit::IsImmunedToSpellEffect(), Creature::IsImmunedToSpellEffect(), Totem::IsImmunedToSpellEffect(), IsLootCrafting(), IsPrimaryProfession(), IsProfession(), IsProfessionOrRiding(), IsQuestTame(), IsSelfCast(), ConditionMgr::isSourceTypeValid(), IsStrongerAuraActive(), IsTargetingArea(), AchievementCriteriaData::IsValid(), Player::learnQuestRewardedSpells(), Player::LearnTalent(), spell_dk_anti_magic_shell_raid::Load(), spell_dk_anti_magic_shell_self::Load(), spell_dk_anti_magic_zone::Load(), spell_dk_spell_deflection::Load(), spell_dk_will_of_the_necropolis::Load(), spell_dru_moonkin_form_passive::Load(), spell_dru_primal_tenacity::Load(), spell_dru_savage_defense::Load(), spell_gen_absorb0_hitlimit1::Load(), spell_pal_ardent_defender::Load(), spell_pal_divine_sacrifice::Load(), spell_pal_divine_storm::Load(), spell_pri_guardian_spirit::Load(), spell_rog_cheat_death::Load(), spell_rog_nerves_of_steel::Load(), spell_sha_astral_shift::Load(), LoadAuraState(), SpellMgr::LoadEnchantCustomAttr(), SpellMgr::LoadPetDefaultSpells(), ObjectMgr::LoadQuests(), SpellMgr::LoadSpellInfoCorrections(), SpellMgr::LoadSpellInfoCustomAttributes(), SpellMgr::LoadSpellLearnSkills(), SpellMgr::LoadSpellPetAuras(), ObjectMgr::LoadSpellScripts(), LoadSpellSpecific(), SpellMgr::LoadSpellTargetPositions(), Unit::MagicSpellHitResult(), Unit::MeleeDamageBonusDone(), spell_gen_random_target32::ModDest(), spell_q12308_escape_from_silverbrook_summon_worgen::ModDest(), NeedsToBeTriggeredByCaster(), spell_kologarn_stone_shout_aura::OnPeriodic(), spell_item_fel_mana_potion::OnPeriodic(), spell_deathwhisper_dark_reckoning::OnPeriodic(), spell_putricide_mutated_plague_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::prepare(), Player::PrepareCharmAISpells(), Spell::PrepareTriggersExecutedOnHit(), Unit::ProcDamageAndSpellFor(), 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::SpellHitResult(), boss_onyxia::SpellHitTarget(), boss_rotface::boss_rotfaceAI::SpellHitTarget(), SpellInfo(), SpellValue::SpellValue(), Acore::Hyperlinks::LinkTags::trade::StoreTo(), boss_anub_arak::boss_anub_arakAI::SummonHelpers(), 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_broggok_poison_cloud::Validate(), spell_dru_wild_growth::Validate(), spell_gen_eject_passenger::Validate(), and Spell::WriteCastResultInfo().

◆ EquippedItemClass

◆ EquippedItemInventoryTypeMask

int32 SpellInfo::EquippedItemInventoryTypeMask

◆ EquippedItemSubClassMask

◆ ExcludeCasterAuraSpell

uint32 SpellInfo::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(), Unit::_TryStackingOrRefreshingExistingAura(), Aura::_UnapplyForTarget(), Unit::_UpdateAutoRepeatSpell(), _SpellScript::_Validate(), SpellScript::_Validate(), AuraScript::_Validate(), boss_grand_champion::boss_grand_championAI::AddCreatureAddonAuras(), AddItemsSetItem(), Player::addSpell(), Player::AddSpellAndCategoryCooldowns(), Creature::AddSpellCooldown(), CharmInfo::AddSpellToActionBar(), spell_mage_master_of_elements::AfterCheckProc(), Unit::ApplyEffectModifiers(), Player::ApplyEquipSpell(), Unit::ApplySpellDispelImmunity(), Unit::CalcAbsorbResist(), Unit::CalcArmorReducedDamage(), SpellEffectInfo::CalcDamageMultiplier(), CalcPowerCost(), SpellEffectInfo::CalcRadius(), ThreatCalcHelper::calcThreat(), AuraEffect::CalculateAmount(), Unit::CalculateSpellDamageTaken(), SpellEffectInfo::CalcValueMultiplier(), Spell::CanAutoCast(), Spell::cancel(), Player::CanExecutePendingSpellCastRequest(), Spell::CanOpenLock(), Player::CanRequestSpellCast(), Unit::CanRestoreMana(), Aura::CanStackWith(), Player::CastItemCombatSpell(), Player::CastItemUseSpell(), spell_yogg_saron_in_the_maws_of_the_old_god::CheckCast(), Spell::CheckCast(), Spell::CheckCasterAuras(), Spell::CheckEffectTarget(), CheckElixirStacking(), CheckLocation(), Spell::CheckPetCast(), spell_dk_dancing_rune_weapon::CheckProc(), spell_mage_brain_freeze::CheckProc(), spell_warr_improved_spell_reflection::CheckProc(), Spell::CheckRange(), Spell::CheckRuneCost(), CheckShapeshift(), cast_commandscript::CheckSpellExistsAndIsValid(), SpellMgr::CheckSpellGroupStackRules(), SpellMgr::ComputeIsSpellValid(), Unit::DealDamage(), Unit::DealMeleeDamage(), 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::EffectSanctuary(), 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(), 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::HandleAuraProc(), 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(), Unit::HandleDummyAuraProc(), Spell::HandleEffects(), spell_ioc_bomb_blast_criteria::HandleGameObjectDamage(), learn_commandscript::HandleLearnAllMySpellsCommand(), Acore::PlayerCommand::HandleLearnSpellCommand(), lookup_commandscript::HandleLookupSpellIdCommand(), AuraEffect::HandlePeriodicDummyAuraTick(), AuraEffect::HandlePeriodicTriggerSpellAuraTick(), pet_commandscript::HandlePetLearnCommand(), pet_commandscript::HandlePetUnlearnCommand(), spell_deathbringer_blood_link_aura::HandleProc(), spell_item_blood_draining_enchant::HandleProc(), spell_warr_sweeping_strikes::HandleProc(), Unit::HandleProcTriggerSpell(), ArenaSpectator::HandleResetCommand(), spell_dreamwalker_summon_portal::HandleScript(), spell_gen_profession_research::HandleScript(), spell_gen_dalaran_disguise::HandleScript(), spell_item_book_of_glyph_mastery::HandleScript(), spell_pal_seal_of_vengeance::HandleScriptEffect(), spell_capacitus_polarity_charge::HandleTargets(), spell_thaddius_pos_neg_charge::HandleTargets(), Spell::HandleThreatSpells(), Acore::PlayerCommand::HandleUnlearnSpellCommand(), WorldSession::HandleUpdateMissileTrajectory(), Pet::InitLevelupSpellsForLevel(), IsAbilityLearnedWithProfession(), IsAbilityOfSkillType(), IsDifferentRankOf(), IsExplicitDiscovery(), Unit::IsImmunedToSchool(), Unit::IsImmunedToSpell(), Totem::IsImmunedToSpellEffect(), IsMultiSlotAura(), IsStrongerAuraActive(), LinkValidator< LinkTags::enchant >::IsTextValid(), Unit::IsTriggeredAtSpellProcEvent(), LoadAuraState(), ObjectMgr::LoadCreatureAddons(), ObjectMgr::LoadCreatureTemplateAddons(), LoadLootTemplates_Spell(), SpellMgr::LoadPetLevelupSpellMap(), ObjectMgr::LoadQuests(), Aura::LoadScripts(), Spell::LoadScripts(), SpellMgr::LoadSpellInfoCustomAttributes(), SpellMgr::LoadSpellProcEvents(), SpellMgr::LoadSpellProcs(), ObjectMgr::LoadSpellScriptNames(), LoadSpellSpecific(), Unit::MagicSpellHitResult(), Unit::MeleeDamageBonusDone(), Unit::MeleeSpellHitResult(), Unit::ModSpellCastTime(), NeedsToBeTriggeredByCaster(), spell_lurker_below_spout::OnPeriodic(), spell_xt002_gravity_bomb_aura::OnRemove(), Spell::OnSpellLaunch(), Acore::AbsorbAuraOrderPred::operator()(), Unit::PetSpellFail(), Spell::prepare(), Player::PrepareCharmAISpells(), Spell::prepareDataForTriggerSystem(), Spell::PrepareTriggersExecutedOnHit(), Unit::ProcDamageAndSpellFor(), SmartScript::ProcessEvent(), spell_pri_power_word_shield_aura::ReflectDamage(), RemoveItemsSetItem(), Player::RestoreSpellMods(), Spell::SelectEffectImplicitTargets(), Spell::SelectImplicitCasterDestTargets(), Spell::SelectImplicitChainTargets(), Spell::SelectImplicitChannelTargets(), Spell::SelectImplicitNearbyTargets(), Spell::SendChannelStart(), Player::SendCooldownEvent(), Unit::SendHealSpellLog(), Spell::SendInterrupted(), Spell::SendLogExecute(), Spell::SendSpellCooldown(), Spell::SendSpellGo(), Unit::SendSpellNonMeleeDamageLog(), Unit::SendSpellNonMeleeReflectLog(), Spell::SendSpellStart(), AuraEffect::SendTickImmune(), Unit::SetCurrentCastedSpell(), boss_mimiron::boss_mimironAI::SetData(), CharmInfo::SetSpellAutocast(), Player::SetSpellModTakingSpell(), 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::boss_pyroguard_emberseerAI::SpellHit(), npc_netherspite_infernal::SpellHit(), boss_terestian_illhoof::SpellHit(), npc_mograine::npc_mograineAI::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::boss_malygosAI::SpellHit(), boss_urom::boss_uromAI::SpellHit(), boss_ionar::boss_ionarAI::SpellHit(), npc_ulduar_toasty_fire::npc_ulduar_toasty_fireAI::SpellHit(), npc_ulduar_hodir_priest::npc_ulduar_hodir_priestAI::SpellHit(), npc_ulduar_hodir_druid::npc_ulduar_hodir_druidAI::SpellHit(), npc_ulduar_hodir_shaman::npc_ulduar_hodir_shamanAI::SpellHit(), npc_ulduar_hodir_mage::npc_ulduar_hodir_mageAI::SpellHit(), npc_ulduar_iron_construct::npc_ulduar_iron_constructAI::SpellHit(), npc_ulduar_leviathan_mkii::npc_ulduar_leviathan_mkiiAI::SpellHit(), npc_ulduar_vx001::npc_ulduar_vx001AI::SpellHit(), npc_ulduar_aerial_command_unit::npc_ulduar_aerial_command_unitAI::SpellHit(), npc_ulduar_flames_spread::npc_ulduar_flames_spreadAI::SpellHit(), npc_ichor_globule::npc_ichor_globuleAI::SpellHit(), npc_wintergarde_gryphon::SpellHit(), npc_frostbrood_skytalon::npc_frostbrood_skytalonAI::SpellHit(), npc_vics_flying_machine::npc_vics_flying_machineAI::SpellHit(), npc_captured_rageclaw::npc_captured_rageclawAI::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(), boss_majordomo::boss_majordomoAI::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(), npc_isle_of_conquest_turret::npc_isle_of_conquest_turretAI::SpellHit(), boss_steelbreaker::boss_steelbreakerAI::SpellHit(), boss_runemaster_molgeim::boss_runemaster_molgeimAI::SpellHit(), boss_stormcaller_brundir::boss_stormcaller_brundirAI::SpellHit(), boss_freya::boss_freyaAI::SpellHit(), boss_hodir::boss_hodirAI::SpellHit(), boss_mimiron::boss_mimironAI::SpellHit(), boss_thorim_pillar::boss_thorim_pillarAI::SpellHit(), boss_thorim_runic_colossus::boss_thorim_runic_colossusAI::SpellHit(), boss_yoggsaron::boss_yoggsaronAI::SpellHit(), npc_ulduar_keeper::npc_ulduar_keeperAI::SpellHit(), npc_overlord_drakuru_betrayal::npc_overlord_drakuru_betrayalAI::SpellHit(), npc_earthen_ring_flamecaller::SpellHit(), npc_pet_darting_hatchling::SpellHit(), npc_death_knight_initiate::npc_death_knight_initiateAI::SpellHit(), npc_crusade_persuaded::npc_crusade_persuadedAI::SpellHit(), npc_zuljin_vortex::SpellHit(), npc_forest_frog::SpellHit(), npc_zulian_prowler::npc_zulian_prowlerAI::SpellHit(), npc_midsummer_ribbon_pole_target::SpellHit(), npc_aged_dying_ancient_kodo::npc_aged_dying_ancient_kodoAI::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::npc_living_constellationAI::SpellHit(), boss_ignis::boss_ignisAI::SpellHit(), boss_razorscale::boss_razorscaleAI::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(), npc_drakuru_shackles::npc_drakuru_shacklesAI::SpellHit(), npc_storm_cloud::npc_storm_cloudAI::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_greengill_slave::npc_greengill_slaveAI::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_midsummer_torch_target::SpellHit(), npc_cos_stratholme_citizien::npc_cos_stratholme_citizienAI::SpellHit(), boss_viscidus::SpellHit(), boss_magus_telestra::SpellHit(), boss_flame_leviathan::boss_flame_leviathanAI::SpellHit(), boss_thorim::boss_thorimAI::SpellHit(), boss_yoggsaron_immortal_guardian::boss_yoggsaron_immortal_guardianAI::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::npc_wild_wyrmAI::SpellHit(), npc_mature_netherwing_drake::npc_mature_netherwing_drakeAI::SpellHit(), npc_beryl_sorcerer::npc_beryl_sorcererAI::SpellHit(), npc_imprisoned_beryl_sorcerer::npc_imprisoned_beryl_sorcererAI::SpellHit(), boss_black_knight::boss_black_knightAI::SpellHitTarget(), boss_bronjahm::boss_bronjahmAI::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(), boss_quartermaster_zigris::SpellHitTarget(), npc_demonic_vapor_trail::SpellHitTarget(), boss_headless_horseman_head::SpellHitTarget(), boss_taldaram::SpellHitTarget(), boss_moorabi::boss_moorabiAI::SpellHitTarget(), boss_volkhan::boss_volkhanAI::SpellHitTarget(), boss_stormcaller_brundir::boss_stormcaller_brundirAI::SpellHitTarget(), boss_ymiron::boss_ymironAI::SpellHitTarget(), npc_frostwing_vrykul::npc_frostwing_vrykulAI::SpellHitTarget(), boss_malchezaar::SpellHitTarget(), npc_black_knight_ghoul::npc_black_knight_ghoulAI::SpellHitTarget(), npc_nerubian_burrower::npc_nerubian_burrowerAI::SpellHitTarget(), boss_devourer_of_souls::boss_devourer_of_soulsAI::SpellHitTarget(), npc_hor_lich_king::npc_hor_lich_kingAI::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_festergut::boss_festergutAI::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::boss_flame_leviathanAI::SpellHitTarget(), boss_freya::boss_freyaAI::SpellHitTarget(), boss_vezax::boss_vezaxAI::SpellHitTarget(), boss_hodir::boss_hodirAI::SpellHitTarget(), npc_ulduar_hodir_shaman::npc_ulduar_hodir_shamanAI::SpellHitTarget(), npc_ulduar_proximity_mine::npc_ulduar_proximity_mineAI::SpellHitTarget(), npc_ulduar_rocket_strike_trigger::npc_ulduar_rocket_strike_triggerAI::SpellHitTarget(), boss_cyanigosa::boss_cyanigosaAI::SpellHitTarget(), npc_q24545_lich_king::npc_q24545_lich_kingAI::SpellHitTarget(), npc_simon_bunny::npc_simon_bunnyAI::SpellHitTarget(), boss_lethon::boss_lethonAI::SpellHitTarget(), npc_chesspiece::SpellHitTarget(), boss_darkmaster_gandling::boss_darkmaster_gandlingAI::SpellHitTarget(), boss_zuljin::SpellHitTarget(), boss_headless_horseman::SpellHitTarget(), npc_pilgrims_bounty_chair::SpellHitTarget(), boss_epoch::boss_epochAI::SpellHitTarget(), boss_ouro::SpellHitTarget(), npc_anubisath_sentinel::aqsentinelAI::SpellHitTarget(), boss_grobbulus::boss_grobbulusAI::SpellHitTarget(), boss_sapphiron::boss_sapphironAI::SpellHitTarget(), boss_thorim::boss_thorimAI::SpellHitTarget(), npc_xt002_heart::npc_xt002_heartAI::SpellHitTarget(), boss_yoggsaron_sara::boss_yoggsaron_saraAI::SpellHitTarget(), boss_yoggsaron_voice::boss_yoggsaron_voiceAI::SpellHitTarget(), boss_skadi_grauf::boss_skadi_graufAI::SpellHitTarget(), boss_emalon::boss_emalonAI::SpellHitTarget(), npc_overlord_drakuru_betrayal::npc_overlord_drakuru_betrayalAI::SpellHitTarget(), boss_shirrak_the_dead_watcher::SpellHitTarget(), npc_pet_gen_soul_trader_beacon::SpellHitTarget(), npc_pet_gen_fetch_ball::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(), ValidateAttribute6SpellDamageMods(), ObjectMgr::ValidateSpellScripts(), Spell::WriteCastResultInfo(), Spell::~Spell(), and SpellEvent::~SpellEvent().

◆ InterruptFlags

◆ ManaCost

◆ ManaCostPercentage

◆ ManaCostPerlevel

uint32 SpellInfo::ManaCostPerlevel

◆ ManaPerSecond

◆ ManaPerSecondPerLevel

uint32 SpellInfo::ManaPerSecondPerLevel

◆ MaxAffectedTargets

◆ MaxLevel

◆ MaxTargetLevel

uint32 SpellInfo::MaxTargetLevel

Referenced by SpellInfo().

◆ Mechanic

◆ PowerType

◆ PreventionType

◆ ProcChance

◆ ProcCharges

uint32 SpellInfo::ProcCharges

◆ ProcFlags

◆ RangeEntry

◆ Rank

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

Referenced by SpellInfo().

◆ Reagent

◆ ReagentCount

◆ RecoveryTime

◆ RequiresSpellFocus

◆ RuneCostID

◆ SchoolMask

◆ Speed

◆ SpellFamilyFlags

flag96 SpellInfo::SpellFamilyFlags

Referenced by Player::CanNoReagentCast(), SpellMgr::CanSpellTriggerProcOnEvent(), Aura::CanStackWith(), Spell::CheckItems(), spell_dk_dancing_rune_weapon::CheckProc(), spell_gen_black_magic_enchant::CheckProc(), spell_mage_brain_freeze::CheckProc(), spell_pal_seal_of_light::CheckProc(), spell_pri_vampiric_touch::CheckProc(), spell_hun_ascpect_of_the_viper::CheckProc(), Spell::EffectEnchantItemTmp(), Spell::EffectHeal(), Spell::EffectSchoolDMG(), Spell::EffectWeaponDmg(), Unit::GetAuraEffect(), GetDiminishingReturnsGroupForSpell(), GetDiminishingReturnsLimitDuration(), spell_rog_deadly_poison::HandleAfterHit(), Unit::HandleAuraProc(), Unit::HandleAuraRaidProcFromChargeWithValue(), Aura::HandleAuraSpecificMods(), spell_rog_preparation::HandleDummy(), Unit::HandleDummyAuraProc(), AuraEffect::HandlePeriodicDummyAuraTick(), AuraEffect::HandlePeriodicManaLeechAuraTick(), spell_pal_sacred_shield_base::HandleProc(), Unit::HandleProcTriggerSpell(), spell_hun_chimera_shot::HandleScriptEffect(), IsAffectedBySpellMod(), AuraEffect::IsAffectedOnSpell(), IsRangedWeaponSpell(), SpellMgr::IsSpellProcEventCanTriggeredBy(), LoadAuraState(), SpellMgr::LoadSpellInfoCorrections(), SpellMgr::LoadSpellInfoCustomAttributes(), LoadSpellSpecific(), Unit::MeleeDamageBonusDone(), Unit::MeleeDamageBonusTaken(), Unit::ModSpellDuration(), Spell::prepareDataForTriggerSystem(), Spell::PrepareTriggersExecutedOnHit(), Unit::ProcDamageAndSpellFor(), spell_dru_enrage::RecalculateBaseArmor(), Unit::RemoveAurasByShapeShift(), Unit::RemoveAurasDueToSpellByDispel(), Unit::RemoveAurasWithFamily(), Player::RestoreSpellMods(), Unit::SpellDamageBonusDone(), Unit::SpellHealingBonusTaken(), SpellInfo(), Unit::SpellPctDamageModsDone(), Unit::SpellTakenCritChance(), and ValidateAttribute6SpellDamageMods().

◆ SpellFamilyName

uint32 SpellInfo::SpellFamilyName

Referenced by Player::AddSpellAndCategoryCooldowns(), SpellMgr::CanSpellTriggerProcOnEvent(), 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_pri_vampiric_touch::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(), GetDiminishingReturnsGroupForSpell(), GetDiminishingReturnsLimitDuration(), spell_rog_deadly_poison::HandleAfterHit(), AuraEffect::HandleAuraDummy(), AuraEffect::HandleAuraModShapeshift(), Unit::HandleAuraProc(), Unit::HandleAuraRaidProcFromChargeWithValue(), spell_hun_readiness::HandleDummy(), spell_mage_cold_snap::HandleDummy(), spell_rog_preparation::HandleDummy(), Unit::HandleDummyAuraProc(), Spell::HandleLaunchPhase(), learn_commandscript::HandleLearnAllMySpellsCommand(), AuraEffect::HandlePeriodicManaLeechAuraTick(), AuraEffect::HandlePeriodicTriggerSpellAuraTick(), spell_pal_sacred_shield_base::HandleProc(), Unit::HandleProcTriggerSpell(), IsAffectedBySpellMod(), AuraEffect::IsAffectedOnSpell(), IsRangedWeaponSpell(), SpellMgr::IsSpellProcEventCanTriggeredBy(), Unit::IsTriggeredAtSpellProcEvent(), LoadAuraState(), SpellMgr::LoadSpellInfoCorrections(), SpellMgr::LoadSpellInfoCustomAttributes(), LoadSpellSpecific(), Unit::MeleeDamageBonusDone(), Unit::MeleeDamageBonusTaken(), Unit::ModSpellDuration(), Acore::AbsorbAuraOrderPred::operator()(), Player::PrepareCharmAISpells(), Spell::prepareDataForTriggerSystem(), Spell::PrepareTriggersExecutedOnHit(), Unit::ProcDamageAndSpellFor(), spell_dru_enrage::RecalculateBaseArmor(), Unit::RemoveAurasByShapeShift(), Unit::RemoveAurasDueToSpellByDispel(), Unit::RemoveAurasWithFamily(), Player::RemoveSpellMods(), ArenaSpectator::ShouldSendAura(), Unit::SpellDamageBonusDone(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), Unit::SpellHitResult(), SpellInfo(), Unit::SpellPctDamageModsDone(), Unit::SpellPctHealingModsDone(), Unit::SpellTakenCritChance(), and ValidateAttribute6SpellDamageMods().

◆ SpellIconID

◆ SpellLevel

◆ SpellName

◆ SpellPriority

uint32 SpellInfo::SpellPriority

Referenced by Player::ApplySpellMod(), and SpellInfo().

◆ SpellVisual

◆ StackAmount

◆ Stances

◆ StancesNot

uint32 SpellInfo::StancesNot

Referenced by CheckShapeshift(), and SpellInfo().

◆ 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