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

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}
DBCStorage< SpellCategoryEntry > sSpellCategoryStore(SpellCategoryfmt)
DBCStorage< SpellCastTimesEntry > sSpellCastTimesStore(SpellCastTimefmt)
DBCStorage< SpellRangeEntry > sSpellRangeStore(SpellRangefmt)
DBCStorage< SpellDurationEntry > sSpellDurationStore(SpellDurationfmt)
#define MAX_SPELL_EFFECTS
Definition DBCStructure.h:1635
std::uint8_t uint8
Definition Define.h:109
Targets
Definition SharedDefines.h:1420
TotemCategory
Definition SharedDefines.h:3333
ProcFlags
Definition SpellMgr.h:103
PowerType
Definition VehicleDefines.h:29
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
Definition Totem.h:51
Totem(SummonPropertiesEntry const *properties, ObjectGuid owner)
Definition Totem.cpp:27

References _isCritCapable, _isSpellValid, _isStackableWithRanks, _requireCooldownInfo, ActiveIconID, SpellEntry::ActiveIconID, AreaGroupId, SpellEntry::AreaGroupId, Attributes, SpellEntry::Attributes, AttributesCu, AttributesEx, SpellEntry::AttributesEx, AttributesEx2, SpellEntry::AttributesEx2, AttributesEx3, SpellEntry::AttributesEx3, AttributesEx4, SpellEntry::AttributesEx4, AttributesEx5, SpellEntry::AttributesEx5, AttributesEx6, SpellEntry::AttributesEx6, AttributesEx7, SpellEntry::AttributesEx7, AuraInterruptFlags, SpellEntry::AuraInterruptFlags, BaseLevel, SpellEntry::BaseLevel, CasterAuraSpell, SpellEntry::CasterAuraSpell, CasterAuraState, SpellEntry::CasterAuraState, CasterAuraStateNot, SpellEntry::CasterAuraStateNot, SpellEntry::CastingTimeIndex, CastTimeEntry, SpellEntry::Category, CategoryEntry, CategoryRecoveryTime, SpellEntry::CategoryRecoveryTime, ChainEntry, ChannelInterruptFlags, SpellEntry::ChannelInterruptFlags, Dispel, SpellEntry::Dispel, DmgClass, SpellEntry::DmgClass, DurationEntry, SpellEntry::DurationIndex, Effects, EquippedItemClass, SpellEntry::EquippedItemClass, EquippedItemInventoryTypeMask, SpellEntry::EquippedItemInventoryTypeMask, EquippedItemSubClassMask, SpellEntry::EquippedItemSubClassMask, ExcludeCasterAuraSpell, SpellEntry::ExcludeCasterAuraSpell, ExcludeTargetAuraSpell, SpellEntry::ExcludeTargetAuraSpell, ExplicitTargetMask, FacingCasterFlags, SpellEntry::FacingCasterFlags, Id, SpellEntry::Id, InterruptFlags, SpellEntry::InterruptFlags, 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:2760

References _UnloadImplicitTargetConditionLists().

Member Function Documentation

◆ _GetEffect()

SpellEffectInfo & SpellInfo::_GetEffect ( SpellEffIndex  index)
inlineprivate
542{ 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
541{ return Effects; }

◆ _InitializeExplicitTargetMask()

void SpellInfo::_InitializeExplicitTargetMask ( )
2493{
2494 bool srcSet = false;
2495 bool dstSet = false;
2496 uint32 targetMask = Targets;
2497 // prepare target mask using effect target entries
2498 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2499 {
2500 if (!Effects[i].IsEffect())
2501 continue;
2502 targetMask |= Effects[i].TargetA.GetExplicitTargetMask(srcSet, dstSet);
2503 targetMask |= Effects[i].TargetB.GetExplicitTargetMask(srcSet, dstSet);
2504
2505 // add explicit target flags based on spell effects which have EFFECT_IMPLICIT_TARGET_EXPLICIT and no valid target provided
2506 if (Effects[i].GetImplicitTargetType() != EFFECT_IMPLICIT_TARGET_EXPLICIT)
2507 continue;
2508
2509 // extend explicit target mask only if valid targets for effect could not be provided by target types
2510 uint32 effectTargetMask = Effects[i].GetMissingTargetMask(srcSet, dstSet, targetMask);
2511
2512 // don't add explicit object/dest flags when spell has no max range
2513 if (GetMaxRange(true) == 0.0f && GetMaxRange(false) == 0.0f)
2515 targetMask |= effectTargetMask;
2516 }
2517 ExplicitTargetMask = targetMask;
2518}
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:2217
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
2521{
2522 // not found a single positive spell with this attribute
2524 return false;
2525
2526 switch (Mechanic)
2527 {
2529 return true;
2530 default:
2531 break;
2532 }
2533
2534 // Special case: effects which determine positivity of whole spell
2535 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2536 {
2537 if (Effects[i].IsAura() && Effects[i].ApplyAuraName == SPELL_AURA_MOD_STEALTH)
2538 return true;
2539 }
2540
2541 switch (Effects[effIndex].Effect)
2542 {
2543 // always positive effects (check before target checks that provided non-positive result in some case for positive effects)
2544 case SPELL_EFFECT_HEAL:
2549 return true;
2551 return false;
2553 return false;
2555 {
2556 bool only = true;
2557 for (int i = EFFECT_0; i <= EFFECT_2; ++i)
2558 {
2559 if (Effects[effIndex].Effect > 0 && Effects[effIndex].Effect != SPELL_EFFECT_SCHOOL_DAMAGE)
2560 only = false;
2561 if (Effects[effIndex].Effect == SPELL_EFFECT_GAMEOBJECT_DAMAGE)
2562 return false;
2563 }
2564 // effects with school damage only cannot be positive...
2565 if (only)
2566 return false;
2567 break;
2568 }
2571 {
2572 for (int i = EFFECT_0; i <= EFFECT_2; ++i)
2573 if (Effects[effIndex].Effect == SPELL_EFFECT_GAMEOBJECT_DAMAGE)
2574 return false;
2575 break;
2576 }
2577 // non-positive aura use
2580 {
2581 switch (Effects[effIndex].ApplyAuraName)
2582 {
2583 case SPELL_AURA_MOD_DAMAGE_DONE: // dependent from bas point sign (negative -> negative)
2590 if (Effects[effIndex].CalcValue() < 0)
2591 return false;
2592 break;
2593 case SPELL_AURA_MOD_DAMAGE_TAKEN: // dependent from bas point sign (positive -> negative)
2594 if (Effects[effIndex].CalcValue() > 0)
2595 return false;
2596 break;
2599 if (Effects[effIndex].CalcValue() > 0)
2600 return true; // some expected positive spells have SPELL_ATTR1_NEGATIVE
2601 break;
2603 return true;
2607 if (!deep)
2608 {
2609 if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(Effects[effIndex].TriggerSpell))
2610 {
2611 // negative targets of main spell return early
2612 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2613 {
2614 if (!spellTriggeredProto->Effects[i].Effect)
2615 continue;
2616 // if non-positive trigger cast targeted to positive target this main cast is non-positive
2617 // this will place this spell auras as debuffs
2618 if (_IsPositiveTarget(spellTriggeredProto->Effects[i].TargetA.GetTarget(), spellTriggeredProto->Effects[i].TargetB.GetTarget()) && !spellTriggeredProto->_IsPositiveEffect(i, true))
2619 return false;
2620 }
2621 }
2622 }
2624 // many positive auras have negative triggered spells at damage for example and this not make it negative (it can be canceled for example)
2625 break;
2626 case SPELL_AURA_MOD_STUN: //have positive and negative spells, we can't sort its correctly at this moment.
2627 if (effIndex == 0 && Effects[1].Effect == 0 && Effects[2].Effect == 0)
2628 return false; // but all single stun aura spells is negative
2629 break;
2631 if (Id == 24740) // Wisp Costume
2632 return true;
2633 return false;
2637 case SPELL_AURA_GHOST:
2642 return false;
2643 case SPELL_AURA_PERIODIC_DAMAGE: // used in positive spells also.
2644 // part of negative spell if casted at self (prevent cancel)
2645 if (Effects[effIndex].TargetA.GetTarget() == TARGET_UNIT_CASTER)
2646 return false;
2647 break;
2648 case SPELL_AURA_MOD_DECREASE_SPEED: // used in positive spells also
2649 // part of positive spell if casted at self
2650 if (Effects[effIndex].TargetA.GetTarget() != TARGET_UNIT_CASTER)
2651 return false;
2652 // but not this if this first effect (didn't find better check)
2653 if (HasAttribute(SPELL_ATTR0_AURA_IS_DEBUFF) && effIndex == 0)
2654 return false;
2655 break;
2657 {
2658 // non-positive immunities
2659 switch (Effects[effIndex].MiscValue)
2660 {
2661 case MECHANIC_BANDAGE:
2662 case MECHANIC_SHIELD:
2663 case MECHANIC_MOUNT:
2665 return false;
2666 default:
2667 break;
2668 }
2669 break;
2670 }
2671 case SPELL_AURA_ADD_FLAT_MODIFIER: // mods
2673 {
2674 // non-positive mods
2675 switch (Effects[effIndex].MiscValue)
2676 {
2677 case SPELLMOD_COST: // dependent from bas point sign (negative -> positive)
2678 if (Effects[effIndex].CalcValue() > 0)
2679 {
2680 if (!deep)
2681 {
2682 bool negative = true;
2683 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2684 {
2685 if (i != effIndex)
2686 if (_IsPositiveEffect(i, true))
2687 {
2688 negative = false;
2689 break;
2690 }
2691 }
2692 if (negative)
2693 return false;
2694 }
2695 }
2696 break;
2697 default:
2698 break;
2699 }
2700 break;
2701 }
2702 default:
2703 break;
2704 }
2705 break;
2706 }
2707 default:
2708 break;
2709 }
2710
2711 // non-positive targets
2712 if (!_IsPositiveTarget(Effects[effIndex].TargetA.GetTarget(), Effects[effIndex].TargetB.GetTarget()))
2713 return false;
2714
2715 // negative spell if triggered spell is negative
2716 if (!deep && !Effects[effIndex].ApplyAuraName && Effects[effIndex].TriggerSpell)
2717 {
2718 if (SpellInfo const* spellTriggeredProto = sSpellMgr->GetSpellInfo(Effects[effIndex].TriggerSpell))
2719 if (!spellTriggeredProto->_IsPositiveSpell())
2720 return false;
2721 }
2722
2723 // ok, positive
2724 return true;
2725}
@ EFFECT_0
Definition SharedDefines.h:31
@ EFFECT_2
Definition SharedDefines.h:33
@ SPELL_EFFECT_ENERGIZE_PCT
Definition SharedDefines.h:926
@ SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
Definition SharedDefines.h:917
@ SPELL_EFFECT_HEAL
Definition SharedDefines.h:799
@ SPELL_EFFECT_KNOCK_BACK_DEST
Definition SharedDefines.h:933
@ SPELL_EFFECT_KNOCK_BACK
Definition SharedDefines.h:887
@ SPELL_EFFECT_SCHOOL_DAMAGE
Definition SharedDefines.h:791
@ SPELL_EFFECT_GAMEOBJECT_DAMAGE
Definition SharedDefines.h:876
@ SPELL_EFFECT_LEARN_SPELL
Definition SharedDefines.h:825
@ SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
Definition SharedDefines.h:918
@ SPELL_EFFECT_HEAL_PCT
Definition SharedDefines.h:925
@ SPELL_EFFECT_SKILL_STEP
Definition SharedDefines.h:833
@ SPELL_EFFECT_APPLY_AURA
Definition SharedDefines.h:795
@ TARGET_UNIT_CASTER
Definition SharedDefines.h:1421
@ MECHANIC_MOUNT
Definition SharedDefines.h:1357
@ MECHANIC_INVULNERABILITY
Definition SharedDefines.h:1361
@ MECHANIC_BANDAGE
Definition SharedDefines.h:1352
@ MECHANIC_IMMUNE_SHIELD
Definition SharedDefines.h:1365
@ MECHANIC_SHIELD
Definition SharedDefines.h:1355
@ SPELL_ATTR0_AURA_IS_DEBUFF
Definition SharedDefines.h:419
@ SPELL_AURA_PREVENT_RESURRECTION
Definition SpellAuraDefines.h:377
@ SPELL_AURA_MOD_SKILL
Definition SpellAuraDefines.h:93
@ SPELL_AURA_PERIODIC_DAMAGE
Definition SpellAuraDefines.h:66
@ SPELL_AURA_ADD_PCT_MODIFIER
Definition SpellAuraDefines.h:171
@ SPELL_AURA_PROC_TRIGGER_SPELL
Definition SpellAuraDefines.h:105
@ SPELL_AURA_MOD_FEAR
Definition SpellAuraDefines.h:70
@ SPELL_AURA_ADD_FLAT_MODIFIER
Definition SpellAuraDefines.h:170
@ SPELL_AURA_MOD_STALKED
Definition SpellAuraDefines.h:131
@ SPELL_AURA_MOD_SPELL_CRIT_CHANCE
Definition SpellAuraDefines.h:120
@ SPELL_AURA_PERIODIC_DAMAGE_PERCENT
Definition SpellAuraDefines.h:152
@ SPELL_AURA_MOD_DODGE_PERCENT
Definition SpellAuraDefines.h:112
@ SPELL_AURA_MOD_SILENCE
Definition SpellAuraDefines.h:90
@ SPELL_AURA_ADD_TARGET_TRIGGER
Definition SpellAuraDefines.h:172
@ SPELL_AURA_MOD_STAT
Definition SpellAuraDefines.h:92
@ SPELL_AURA_MOD_HEALING_DONE
Definition SpellAuraDefines.h:198
@ SPELL_AURA_MOD_HEALING_PCT
Definition SpellAuraDefines.h:181
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
Definition SpellAuraDefines.h:142
@ SPELL_AURA_GHOST
Definition SpellAuraDefines.h:158
@ SPELL_AURA_MOD_ROOT
Definition SpellAuraDefines.h:89
@ SPELL_AURA_MECHANIC_IMMUNITY
Definition SpellAuraDefines.h:140
@ SPELL_AURA_MOD_DAMAGE_TAKEN
Definition SpellAuraDefines.h:77
@ SPELL_AURA_MOD_CRIT_PCT
Definition SpellAuraDefines.h:353
@ SPELL_AURA_MOD_PACIFY_SILENCE
Definition SpellAuraDefines.h:123
@ SPELL_AURA_MOD_DECREASE_SPEED
Definition SpellAuraDefines.h:96
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE
Definition SpellAuraDefines.h:290
@ SPELL_AURA_PERIODIC_LEECH
Definition SpellAuraDefines.h:116
@ SPELL_AURA_MOD_DAMAGE_DONE
Definition SpellAuraDefines.h:76
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT
Definition SpellAuraDefines.h:111
@ SPELL_AURA_MOD_STEALTH
Definition SpellAuraDefines.h:79
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
Definition SpellAuraDefines.h:86
@ SPELL_AURA_MOD_STUN
Definition SpellAuraDefines.h:75
@ SPELLMOD_COST
Definition SpellDefines.h:90
#define sSpellMgr
Definition SpellMgr.h:825
Definition SpellInfo.h:316
static bool _IsPositiveTarget(uint32 targetA, uint32 targetB)
Definition SpellInfo.cpp:2737
bool _IsPositiveEffect(uint8 effIndex, bool deep) const
Definition SpellInfo.cpp:2520
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_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
2728{
2729 // spells with at least one negative effect are considered negative
2730 // some self-applied spells have negative effects but in self casting case negative check ignored.
2731 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2732 if (!_IsPositiveEffect(i, true))
2733 return false;
2734 return true;
2735}

References _IsPositiveEffect(), and MAX_SPELL_EFFECTS.

Referenced by Spell::HandleThreatSpells().

◆ _IsPositiveTarget()

bool SpellInfo::_IsPositiveTarget ( uint32  targetA,
uint32  targetB 
)
static
2738{
2739 // non-positive targets
2740 switch (targetA)
2741 {
2751 return false;
2752 default:
2753 break;
2754 }
2755 if (targetB)
2756 return _IsPositiveTarget(targetB, 0);
2757 return true;
2758}
@ TARGET_DEST_DYNOBJ_ENEMY
Definition SharedDefines.h:1443
@ TARGET_UNIT_DEST_AREA_ENEMY
Definition SharedDefines.h:1432
@ TARGET_UNIT_CONE_ENEMY_104
Definition SharedDefines.h:1519
@ TARGET_UNIT_SRC_AREA_ENEMY
Definition SharedDefines.h:1431
@ TARGET_DEST_TARGET_ENEMY
Definition SharedDefines.h:1468
@ TARGET_UNIT_TARGET_ENEMY
Definition SharedDefines.h:1426
@ TARGET_UNIT_CONE_ENEMY_54
Definition SharedDefines.h:1469
@ TARGET_UNIT_CONE_ENEMY_24
Definition SharedDefines.h:1439
@ TARGET_UNIT_NEARBY_ENEMY
Definition SharedDefines.h:1422

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 ( )
2761{
2762 // find the same instances of ConditionList and delete them.
2763 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2764 {
2765 ConditionList* cur = Effects[i].ImplicitTargetConditions;
2766 if (!cur)
2767 continue;
2768 for (uint8 j = i; j < MAX_SPELL_EFFECTS; ++j)
2769 {
2770 if (Effects[j].ImplicitTargetConditions == cur)
2771 Effects[j].ImplicitTargetConditions = nullptr;
2772 }
2773 delete cur;
2774 }
2775}
std::list< Condition * > ConditionList
Definition ConditionMgr.h:238

References Effects, and MAX_SPELL_EFFECTS.

Referenced by ~SpellInfo().

◆ CalcCastTime()

uint32 SpellInfo::CalcCastTime ( Unit caster = nullptr,
Spell spell = nullptr 
) const
2247{
2248 // not all spells have cast time index and this is all is pasiive abilities
2249 if (!CastTimeEntry)
2250 return 0;
2251
2252 int32 castTime = CastTimeEntry->CastTime;
2254 castTime += 500;
2255
2256 if (caster)
2257 caster->ModSpellCastTime(this, castTime, spell);
2258
2259 return (castTime > 0) ? uint32(castTime) : 0;
2260}
std::int32_t int32
Definition Define.h:103
@ SPELL_ATTR0_USES_RANGED_SLOT
Definition SharedDefines.h:394
bool IsAutoRepeatRangedSpell() const
Definition SpellInfo.cpp:1283
void ModSpellCastTime(SpellInfo const *spellProto, int32 &castTime, Spell *spell=nullptr)
Definition Unit.cpp:15078
int32 CastTime
Definition DBCStructure.h:1758

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
2298{
2299 // Spell drain all exist power on cast (Only paladin lay of Hands)
2301 {
2302 // If power type - health drain all
2303 if (PowerType == POWER_HEALTH)
2304 return caster->GetHealth();
2305 // Else drain all power
2306 if (PowerType < MAX_POWERS)
2307 return caster->GetPower(Powers(PowerType));
2308 LOG_ERROR("spells", "SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {}", PowerType, Id);
2309 return 0;
2310 }
2311
2312 // Base powerCost
2313 int32 powerCost = ManaCost;
2314 // PCT cost from total amount
2316 {
2317 switch (PowerType)
2318 {
2319 // health as power used
2320 case POWER_HEALTH:
2321 powerCost += int32(CalculatePct(caster->GetCreateHealth(), ManaCostPercentage));
2322 break;
2323 case POWER_MANA:
2324 powerCost += int32(CalculatePct(caster->GetCreateMana(), ManaCostPercentage));
2325 break;
2326 case POWER_RAGE:
2327 case POWER_FOCUS:
2328 case POWER_ENERGY:
2329 case POWER_HAPPINESS:
2330 powerCost += int32(CalculatePct(caster->GetMaxPower(Powers(PowerType)), ManaCostPercentage));
2331 break;
2332 case POWER_RUNE:
2333 case POWER_RUNIC_POWER:
2334 LOG_DEBUG("spells.aura", "CalculateManaCost: Not implemented yet!");
2335 break;
2336 default:
2337 LOG_ERROR("spells", "CalculateManaCost: Unknown power type '{}' in spell {}", PowerType, Id);
2338 return 0;
2339 }
2340 }
2341 SpellSchools school = GetFirstSchoolInMask(schoolMask);
2342 // Flat mod from caster auras by spell school
2343 powerCost += caster->GetInt32Value(static_cast<uint16>(UNIT_FIELD_POWER_COST_MODIFIER) + school);
2344
2345 // Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost)
2347 {
2348 uint32 speed = 0;
2349 if (SpellShapeshiftFormEntry const* ss = sSpellShapeshiftFormStore.LookupEntry(caster->GetShapeshiftForm()))
2350 speed = ss->attackSpeed;
2351 else
2352 {
2355 slot = OFF_ATTACK;
2356
2357 speed = caster->GetAttackTime(slot);
2358 }
2359
2360 powerCost += speed / 100;
2361 }
2362
2363 // Apply cost mod by spell
2364 if (Player* modOwner = caster->GetSpellModOwner())
2365 modOwner->ApplySpellMod(Id, SPELLMOD_COST, powerCost, spell);
2366
2367 if (!caster->IsControlledByPlayer())
2368 {
2370 {
2371 GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(SpellLevel - 1);
2372 GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(caster->GetLevel() - 1);
2373 if (spellScaler && casterScaler)
2374 powerCost *= casterScaler->ratio / spellScaler->ratio;
2375 }
2376 }
2377
2378 // PCT mod from user auras by school
2379 powerCost = int32(powerCost * (1.0f + caster->GetFloatValue(static_cast<uint16>(UNIT_FIELD_POWER_COST_MULTIPLIER) + school)));
2380 if (powerCost < 0)
2381 powerCost = 0;
2382 return powerCost;
2383}
DBCStorage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore(SpellShapeshiftFormEntryfmt)
DBCStorage< GtNPCManaCostScalerEntry > sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt)
std::uint16_t uint16
Definition Define.h:108
#define LOG_ERROR(filterType__,...)
Definition Log.h:158
#define LOG_DEBUG(filterType__,...)
Definition Log.h:170
Powers
Definition SharedDefines.h:279
@ MAX_POWERS
Definition SharedDefines.h:287
@ POWER_RAGE
Definition SharedDefines.h:281
@ POWER_HEALTH
Definition SharedDefines.h:289
@ POWER_RUNIC_POWER
Definition SharedDefines.h:286
@ POWER_HAPPINESS
Definition SharedDefines.h:284
@ POWER_ENERGY
Definition SharedDefines.h:283
@ POWER_MANA
Definition SharedDefines.h:280
@ POWER_RUNE
Definition SharedDefines.h:285
@ POWER_FOCUS
Definition SharedDefines.h:282
SpellSchools
Definition SharedDefines.h:293
@ SPELL_ATTR1_USE_ALL_MANA
Definition SharedDefines.h:431
SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
Definition SharedDefines.h:329
@ SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON
Definition SharedDefines.h:528
@ SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL
Definition SharedDefines.h:412
@ SPELL_ATTR4_WEAPON_SPEED_COST_SCALING
Definition SharedDefines.h:551
WeaponAttackType
Definition Unit.h:215
@ OFF_ATTACK
Definition Unit.h:217
@ BASE_ATTACK
Definition Unit.h:216
@ UNIT_FIELD_POWER_COST_MODIFIER
Definition UpdateFields.h:170
@ UNIT_FIELD_POWER_COST_MULTIPLIER
Definition UpdateFields.h:171
T CalculatePct(T base, U pct)
Definition Util.h:52
Definition Player.h:1071
Player * GetSpellModOwner() const
Definition Unit.cpp:16794
Definition DBCStructure.h:1068
float ratio
Definition DBCStructure.h:1069
Definition DBCStructure.h:1815

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:421

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:493
@ SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS
Definition SharedDefines.h:446
@ MECHANIC_NONE
Definition SharedDefines.h:1336
@ SPELL_ATTR0_NO_IMMUNITIES
Definition SharedDefines.h:422

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

Referenced by AuraEffect::HandleAuraModSchoolImmunity().

◆ 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:1354

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(), Unit::IsImmunedToSchool(), and Unit::IsImmunedToSpell().

◆ CheckExplicitTarget()

SpellCastResult SpellInfo::CheckExplicitTarget ( Unit const *  caster,
WorldObject const *  target,
Item const *  itemTarget = nullptr 
) const
1829{
1830 uint32 neededTargets = GetExplicitTargetMask();
1831 if (!target)
1832 {
1834 if (!(neededTargets & TARGET_FLAG_GAMEOBJECT_ITEM) || !itemTarget)
1836 return SPELL_CAST_OK;
1837 }
1838
1839 if (Unit const* unitTarget = target->ToUnit())
1840 {
1842 {
1843 if (neededTargets & TARGET_FLAG_UNIT_ENEMY)
1844 if (caster->_IsValidAttackTarget(unitTarget, this))
1845 return SPELL_CAST_OK;
1846 if (neededTargets & TARGET_FLAG_UNIT_ALLY
1847 || (neededTargets & TARGET_FLAG_UNIT_PARTY && caster->IsInPartyWith(unitTarget))
1848 || (neededTargets & TARGET_FLAG_UNIT_RAID && caster->IsInRaidWith(unitTarget)))
1849 if (caster->_IsValidAssistTarget(unitTarget, this))
1850 return SPELL_CAST_OK;
1851 if (neededTargets & TARGET_FLAG_UNIT_MINIPET)
1852 if (unitTarget->GetGUID() == caster->GetCritterGUID())
1853 return SPELL_CAST_OK;
1854 if (neededTargets & TARGET_FLAG_UNIT_PASSENGER)
1855 if (unitTarget->IsOnVehicle(caster))
1856 return SPELL_CAST_OK;
1858 }
1859 }
1860 return SPELL_CAST_OK;
1861}
@ SPELL_FAILED_BAD_TARGETS
Definition SharedDefines.h:972
@ SPELL_CAST_OK
Definition SharedDefines.h:1149
@ 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
uint32 GetExplicitTargetMask() const
Definition SpellInfo.cpp:1946
Definition Unit.h:655

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
1552 case 34976: // Netherstorm Flag
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 == AREA_WINTERGRASP || (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}
@ MAP_EYE_OF_THE_STORM
Definition AreaDefines.h:241
@ MAP_WARSONG_GULCH
Definition AreaDefines.h:214
@ AREA_WINTERGRASP
Definition AreaDefines.h:145
@ AREA_FLAG_NO_FLY_ZONE
Definition DBCEnums.h:262
DBCStorage< AreaGroupEntry > sAreaGroupStore(AreaGroupEntryfmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
#define MAX_GROUP_AREA_IDS
Definition DBCStructure.h:546
@ SPELL_FAILED_INCORRECT_AREA
Definition SharedDefines.h:999
@ SPELL_FAILED_NOT_IN_RAID_INSTANCE
Definition SharedDefines.h:1127
@ SPELL_FAILED_REQUIRES_AREA
Definition SharedDefines.h:1061
@ SPELL_ATTR4_ONLY_FLYING_AREAS
Definition SharedDefines.h:567
@ SPELL_ATTR6_NOT_IN_RAID_INSTANCES
Definition SharedDefines.h:626
std::pair< SpellAreaMap::const_iterator, SpellAreaMap::const_iterator > SpellAreaMapBounds
Definition SpellMgr.h:539
bool InBattleground() const
Definition Player.h:2266
bool canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const *bySpell)
Definition Player.cpp:13683
Definition DBCStructure.h:549
uint32 nextGroup
Definition DBCStructure.h:552
uint32 AreaId[MAX_GROUP_AREA_IDS]
Definition DBCStructure.h:551
Definition DBCStructure.h:519
bool IsFlyable() const
Definition DBCStructure.h:540
uint32 flags
Definition DBCStructure.h:524
Definition DBCStructure.h:1323
bool IsBattleground() const
Definition DBCStructure.h:1353
bool IsRaid() const
Definition DBCStructure.h:1352
bool IsBattleArena() const
Definition DBCStructure.h:1354
Definition System.cpp:63

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

Referenced by Spell::CheckCast().

◆ CheckShapeshift()

SpellCastResult SpellInfo::CheckShapeshift ( uint32  form) const
Todo:
: Find a way to disable use of these spells clientside
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 & SHAPESHIFT_FLAG_STANCE); // 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 & SHAPESHIFT_FLAG_CAN_ONLY_CAST_SHAPESHIFT_SPELLS))
1481 {
1482 if (!(stanceMask & Stances))
1484 }
1485
1486 return SPELL_CAST_OK;
1487}
uint32 GetTalentSpellCost(uint32 spellId)
Definition DBCStores.cpp:686
@ SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED
Definition SharedDefines.h:486
@ SPELL_ATTR0_NOT_SHAPESHIFTED
Definition SharedDefines.h:409
@ SPELL_FAILED_ONLY_SHAPESHIFT
Definition SharedDefines.h:1054
@ SPELL_FAILED_NOT_SHAPESHIFT
Definition SharedDefines.h:1028
@ SHAPESHIFT_FLAG_CAN_ONLY_CAST_SHAPESHIFT_SPELLS
Definition UnitDefines.h:114
@ SHAPESHIFT_FLAG_STANCE
Definition UnitDefines.h:104
uint32 flags1
Definition DBCStructure.h:1820

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

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

◆ CheckTarget()

SpellCastResult SpellInfo::CheckTarget ( Unit const *  caster,
WorldObject const *  target,
bool  implicit = true 
) const
1644{
1645 if (AttributesEx & SPELL_ATTR1_EXCLUDE_CASTER && caster == target)
1647
1648 // check visibility - ignore stealth for implicit (area) targets
1649 if (!(AttributesEx6 & SPELL_ATTR6_IGNORE_PHASE_SHIFT) && !caster->CanSeeOrDetect(target, implicit))
1651
1652 Unit const* unitTarget = target->ToUnit();
1653
1654 // creature/player specific target checks
1655 if (unitTarget)
1656 {
1657 // xinef: spells cannot be cast if player is in fake combat also
1658 if (AttributesEx & SPELL_ATTR1_ONLY_PEACEFUL_TARGETS && (unitTarget->IsInCombat() || unitTarget->IsPetInCombat()))
1660
1661 // only spells with SPELL_ATTR3_ONLY_ON_GHOSTS can target ghosts
1663 {
1664 if (!unitTarget->HasGhostAura())
1668 }
1669
1670 if (caster != unitTarget)
1671 {
1672 if (caster->IsPlayer())
1673 {
1674 // Do not allow these spells to target creatures not tapped by us (Banish, Polymorph, many quest spells)
1676 if (Creature const* targetCreature = unitTarget->ToCreature())
1677 if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->ToPlayer()))
1679
1681 {
1682 Creature const* targetCreature = unitTarget->ToCreature();
1683 if (!targetCreature)
1685
1688 }
1689
1690 // Not allow disarm unarmed player
1692 {
1693 bool valid = false;
1694 for (uint8 i = BASE_ATTACK; i < MAX_ATTACK; ++i)
1695 {
1696 AuraType disarmAuraType = SPELL_AURA_MOD_DISARM;
1697 switch (i)
1698 {
1699 case OFF_ATTACK:
1700 disarmAuraType = SPELL_AURA_MOD_DISARM_OFFHAND;
1701 break;
1702 case RANGED_ATTACK:
1703 disarmAuraType = SPELL_AURA_MOD_DISARM_RANGED;
1704 break;
1705 }
1706
1707 if (HasAura(disarmAuraType))
1708 {
1709 if (Player const* player = unitTarget->ToPlayer())
1710 {
1711 if (player->GetWeaponForAttack(WeaponAttackType(i), true))
1712 {
1713 valid = true;
1714 break;
1715 }
1716 }
1717 else if (unitTarget->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + i))
1718 {
1719 valid = true;
1720 break;
1721 }
1722 }
1723 }
1724
1725 if (!valid)
1726 {
1728 }
1729 }
1730 }
1731 }
1732 }
1733 // corpse specific target checks
1734 else if (Corpse const* corpseTarget = target->ToCorpse())
1735 {
1736 // cannot target bare bones
1737 if (corpseTarget->GetType() == CORPSE_BONES)
1739 // we have to use owner for some checks (aura preventing resurrection for example)
1740 if (Player* owner = ObjectAccessor::FindPlayer(corpseTarget->GetOwnerGUID()))
1741 unitTarget = owner;
1742 // we're not interested in corpses without owner
1743 else
1745 }
1746 // other types of objects - always valid
1747 else return SPELL_CAST_OK;
1748
1749 // corpseOwner and unit specific target checks
1750 if (unitTarget->IsPlayer())
1751 {
1754 }
1755 else
1756 {
1759
1762 }
1763
1764 if (!IsAllowingDeadTarget() && !unitTarget->IsAlive())
1766
1767 // check this flag only for implicit targets (chain and area), allow to explicitly target units for spells like Shield of Righteousness
1770
1771 // checked in Unit::IsValidAttack/AssistTarget, shouldn't be checked for ENTRY targets
1772 //if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_UNTARGETABLE) && target->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
1773 // return SPELL_FAILED_BAD_TARGETS;
1774
1775 //if (!(AttributesEx6 & SPELL_ATTR6_NO_AURA_LOG)
1776
1777 if (!CheckTargetCreatureType(unitTarget))
1778 {
1779 if (target->IsPlayer())
1781 else
1783 }
1784
1785 // check GM mode and GM invisibility - only for player casts (npc casts are controlled by AI) and negative spells
1786 if (unitTarget != caster && (caster->IsControlledByPlayer() || !IsPositive()) && unitTarget->IsPlayer())
1787 {
1788 if (!unitTarget->ToPlayer()->IsVisible())
1790
1791 if (unitTarget->ToPlayer()->IsGameMaster())
1793 }
1794
1795 // not allow casting on flying player
1798
1799 /* TARGET_UNIT_MASTER gets blocked here for passengers, because the whole idea of this check is to
1800 not allow passengers to be implicitly hit by spells, however this target type should be an exception,
1801 if this is left it kills spells that award kill credit from vehicle to master (few spells),
1802 the use of these 2 covers passenger target check, logically, if vehicle cast this to master it should always hit
1803 him, because it would be it's passenger, there's no such case where this gets to fail legitimacy, this problem
1804 cannot be solved from within the check in other way since target type cannot be called for the spell currently
1805 Spell examples: [ID - 52864 Devour Water, ID - 52862 Devour Wind, ID - 49370 Wyrmrest Defender: Destabilize Azure Dragonshrine Effect] */
1806 if (!caster->IsVehicle() && caster->GetCharmerOrOwner() != target)
1807 {
1808 if (TargetAuraState && !unitTarget->HasAuraState(AuraStateType(TargetAuraState), this, caster))
1810
1811 if (TargetAuraStateNot && unitTarget->HasAuraState(AuraStateType(TargetAuraStateNot), this, caster))
1813 }
1814
1815 if (TargetAuraSpell && !unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(TargetAuraSpell, caster)))
1817
1818 if (ExcludeTargetAuraSpell && unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(ExcludeTargetAuraSpell, caster)))
1820
1824
1825 return SPELL_CAST_OK;
1826}
@ CORPSE_BONES
Definition Corpse.h:28
LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template", "creature pickpocket lootid", true)
@ SPELL_ATTR7_BYPASS_NO_RESURRECTION_AURA
Definition SharedDefines.h:679
@ SPELL_EFFECT_SELF_RESURRECT
Definition SharedDefines.h:883
@ SPELL_EFFECT_RESURRECT
Definition SharedDefines.h:807
@ SPELL_EFFECT_RESURRECT_NEW
Definition SharedDefines.h:902
@ SPELL_ATTR5_NOT_ON_PLAYER_CONTROLLED_NPC
Definition SharedDefines.h:586
@ SPELL_ATTR5_NOT_ON_PLAYER
Definition SharedDefines.h:585
@ SPELL_ATTR2_CANNOT_CAST_ON_TAPPED
Definition SharedDefines.h:473
@ SPELL_ATTR1_EXCLUDE_CASTER
Definition SharedDefines.h:449
@ SPELL_ATTR1_ONLY_PEACEFUL_TARGETS
Definition SharedDefines.h:438
@ SPELL_ATTR3_ONLY_ON_PLAYER
Definition SharedDefines.h:512
@ MECHANIC_DISARM
Definition SharedDefines.h:1339
AuraStateType
Definition SharedDefines.h:1299
@ SPELL_FAILED_TARGET_NOT_PLAYER
Definition SharedDefines.h:1082
@ SPELL_FAILED_TARGET_NO_POCKETS
Definition SharedDefines.h:1083
@ SPELL_FAILED_TARGET_IS_PLAYER
Definition SharedDefines.h:1077
@ SPELL_FAILED_CANT_CAST_ON_TAPPED
Definition SharedDefines.h:978
@ SPELL_FAILED_TARGET_AURASTATE
Definition SharedDefines.h:1071
@ SPELL_FAILED_BM_OR_INVISGOD
Definition SharedDefines.h:1119
@ SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED
Definition SharedDefines.h:1078
@ SPELL_FAILED_TARGETS_DEAD
Definition SharedDefines.h:1069
@ SPELL_FAILED_TARGET_NOT_GHOST
Definition SharedDefines.h:1103
@ SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED
Definition SharedDefines.h:1146
@ SPELL_FAILED_TARGET_NO_WEAPONS
Definition SharedDefines.h:1084
@ SPELL_FAILED_TARGET_AFFECTING_COMBAT
Definition SharedDefines.h:1070
@ SPELL_ATTR6_DO_NOT_CHAIN_TO_CROWD_CONTROLLED_TARGETS
Definition SharedDefines.h:623
@ SPELL_ATTR6_IGNORE_PHASE_SHIFT
Definition SharedDefines.h:628
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
@ SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET
Definition SpellInfo.h:194
@ SPELL_ATTR0_CU_PICKPOCKET
Definition SpellInfo.h:186
@ UNIT_STATE_CONTROLLED
Definition UnitDefines.h:215
@ MAX_ATTACK
Definition Unit.h:219
@ RANGED_ATTACK
Definition Unit.h:218
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition UpdateFields.h:116
Definition Corpse.h:49
Definition Creature.h:47
CreatureTemplate const * GetCreatureTemplate() const
Definition Creature.h:208
bool HaveLootFor(uint32 loot_id) const
Definition LootMgr.h:224
Corpse * ToCorpse()
Definition Object.h:217
bool IsPlayer() const
Definition Object.h:200
uint32 GetUInt32Value(uint16 index) const
Definition Object.cpp:294
Player * ToPlayer()
Definition Object.h:201
Creature * ToCreature()
Definition Object.h:205
bool IsGameMaster() const
Definition Player.h:1161
bool IsRequiringDeadTarget() const
Definition SpellInfo.cpp:1222
bool IsDeathPersistent() const
Definition SpellInfo.cpp:1217
bool CheckTargetCreatureType(Unit const *target) const
Definition SpellInfo.cpp:1863
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
bool IsAlive() const
Definition Unit.h:1773
bool HasGhostAura() const
Definition Unit.h:1778
bool IsPetInCombat() const
Definition Unit.h:927
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5840
bool HasPreventResurectionAura() const
Definition Unit.h:1787
bool IsInFlight() const
Definition Unit.h:1685
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
Definition Unit.cpp:10751
bool IsVisible() const
Definition Unit.h:1992
bool HasUnitState(const uint32 f) const
Definition Unit.h:726
bool IsControlledByPlayer() const
Definition Unit.h:1292
bool IsInCombat() const
Definition Unit.h:924
Player * FindPlayer(ObjectGuid const guid)
Definition ObjectAccessor.cpp:245
uint32 pickpocketLootId
Definition CreatureData.h:225

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

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

◆ CheckTargetCreatureType()

bool SpellInfo::CheckTargetCreatureType ( Unit const *  target) const
1864{
1865 // Curse of Doom & Exorcism: not find another way to fix spell target check :/
1867 {
1868 // not allow cast at player
1869 if (target->IsPlayer())
1870 return false;
1871 else
1872 return true;
1873 }
1874 uint32 creatureType = target->GetCreatureTypeMask();
1875 return !TargetCreatureType || !creatureType || (creatureType & TargetCreatureType);
1876}
@ SPELLFAMILY_WARLOCK
Definition SharedDefines.h:3799
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:851
@ SPELL_EFFECT_HEALTH_LEECH
Definition SharedDefines.h:798
@ SPELL_EFFECT_WEAPON_DAMAGE
Definition SharedDefines.h:847
@ SPELL_EFFECT_NORMALIZED_WEAPON_DMG
Definition SharedDefines.h:910
@ SPELL_EFFECT_HEAL_MECHANICAL
Definition SharedDefines.h:864
@ SPELL_EFFECT_WEAPON_PERCENT_DAMAGE
Definition SharedDefines.h:820
@ SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL
Definition SharedDefines.h:806

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:854
@ SPELLFAMILY_PALADIN
Definition SharedDefines.h:3804
@ SPELLFAMILY_DRUID
Definition SharedDefines.h:3801
@ 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
2423{
2424 // ignore passive spells
2425 //if (IsPassive())
2426 // return this;
2427
2428 // Client ignores spell with these attributes (sub_53D9D0)
2430 return this;
2431
2432 bool needRankSelection = false;
2433 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2434 {
2435 if (IsPositiveEffect(i) &&
2436 (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA ||
2439 {
2440 needRankSelection = true;
2441 break;
2442 }
2443 }
2444
2445 // not required
2446 if (!needRankSelection)
2447 return this;
2448
2449 SpellInfo const* nextSpellInfo = nullptr;
2450
2451 sScriptMgr->OnBeforeAuraRankForLevel(this, nextSpellInfo, level);
2452
2453 if (nextSpellInfo != nullptr)
2454 return nextSpellInfo;
2455
2456 for (nextSpellInfo = this; nextSpellInfo != nullptr; nextSpellInfo = nextSpellInfo->GetPrevRankSpell())
2457 {
2458 // if found appropriate level
2459 if (uint32(level + 10) >= nextSpellInfo->SpellLevel)
2460 return nextSpellInfo;
2461
2462 // one rank less then
2463 }
2464
2465 // not found
2466 return nullptr;
2467}
#define sScriptMgr
Definition ScriptMgr.h:719
@ SPELL_EFFECT_APPLY_AREA_AURA_PARTY
Definition SharedDefines.h:824
@ SPELL_ATTR2_ALLOW_LOW_LEVEL_BUFF
Definition SharedDefines.h:470
@ SPELL_ATTR3_ONLY_PROC_ON_CASTER
Definition SharedDefines.h:531
@ SPELL_ATTR0_COOLDOWN_ON_EVENT
Definition SharedDefines.h:418
SpellInfo const * GetPrevRankSpell() const
Definition SpellInfo.cpp:2415
bool IsPositiveEffect(uint8 effIndex) const
Definition SpellInfo.cpp:1242

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

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

◆ GetAuraState()

AuraStateType SpellInfo::GetAuraState ( ) const
1952{
1953 return _auraState;
1954}
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
1938{
1939 // If dispel all
1940 if (type == DISPEL_ALL)
1941 return DISPEL_ALL_MASK;
1942 else
1943 return uint32(1 << type);
1944}
#define DISPEL_ALL_MASK
Definition SharedDefines.h:1397
@ DISPEL_ALL
Definition SharedDefines.h:1390

References DISPEL_ALL, and DISPEL_ALL_MASK.

◆ GetDuration()

◆ GetEffect()

◆ GetEffectMechanic()

Mechanics SpellInfo::GetEffectMechanic ( uint8  effIndex) const
1916{
1917 if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
1918 return Mechanics(Effects[effIndex].Mechanic);
1919 if (Mechanic)
1920 return Mechanics(Mechanic);
1921 return MECHANIC_NONE;
1922}
Mechanics
Definition SharedDefines.h:1335

References Effects, Mechanic, and MECHANIC_NONE.

Referenced by Unit::GetMechanicResistChance().

◆ GetEffectMechanicMask()

uint32 SpellInfo::GetEffectMechanicMask ( uint8  effIndex) const
1895{
1896 uint32 mask = 0;
1897 if (Mechanic)
1898 mask |= 1 << Mechanic;
1899 if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
1900 mask |= 1 << Effects[effIndex].Mechanic;
1901 return mask;
1902}

References Effects, and Mechanic.

Referenced by Unit::IsDamageReducedByArmor().

◆ GetEffects()

◆ GetExplicitTargetMask()

◆ GetFirstRankSpell()

◆ GetLastRankSpell()

SpellInfo const * SpellInfo::GetLastRankSpell ( ) const
2404{
2405 if (!ChainEntry)
2406 return nullptr;
2407 return ChainEntry->last;
2408}
SpellInfo const * last
Definition SpellMgr.h:550

References ChainEntry, and SpellChainNode::last.

◆ GetMaxDuration()

◆ GetMaxRange()

◆ GetMaxTicks()

uint32 SpellInfo::GetMaxTicks ( ) const
2263{
2264 int32 DotDuration = GetDuration();
2265 if (DotDuration == 0)
2266 return 1;
2267
2268 // 200% limit
2269 if (DotDuration > 30000)
2270 DotDuration = 30000;
2271
2272 for (uint8 x = 0; x < MAX_SPELL_EFFECTS; x++)
2273 {
2274 if (Effects[x].Effect == SPELL_EFFECT_APPLY_AURA)
2275 switch (Effects[x].ApplyAuraName)
2276 {
2281 if (Effects[x].Amplitude != 0)
2282 return DotDuration / Effects[x].Amplitude;
2283 break;
2284 default:
2285 break;
2286 }
2287 }
2288
2289 return 6;
2290}
@ SPELL_AURA_PERIODIC_HEAL
Definition SpellAuraDefines.h:71
int32 GetDuration() const
Definition SpellInfo.cpp:2232

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
2410{
2411 if (!ChainEntry)
2412 return nullptr;
2413 return ChainEntry->next;
2414}
SpellInfo const * next
Definition SpellMgr.h:548

References ChainEntry, and SpellChainNode::next.

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

◆ GetPrevRankSpell()

SpellInfo const * SpellInfo::GetPrevRankSpell ( ) const
2416{
2417 if (!ChainEntry)
2418 return nullptr;
2419 return ChainEntry->prev;
2420}
SpellInfo const * prev
Definition SpellMgr.h:547

References ChainEntry, and SpellChainNode::prev.

Referenced by GetAuraRankForLevel().

◆ GetRank()

◆ GetRecoveryTime()

uint32 SpellInfo::GetRecoveryTime ( ) const

◆ GetSchoolMask()

SpellSchoolMask SpellInfo::GetSchoolMask ( ) const
1879{
1881}
SpellSchoolMask
Definition SharedDefines.h:306

References SchoolMask.

Referenced by PetAI::_canMeleeAttack(), Unit::CalcArmorReducedDamage(), AuraEffect::CalcPeriodicCritChance(), 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_karazhan_wrath_titans_aura::CheckProc(), spell_gen_adaptive_warding::CheckProc(), spell_gen_obsidian_armor::CheckProc(), spell_hun_lock_and_load::CheckTrapProc(), Unit::DealDamage(), Unit::DealDamageShieldDamage(), Spell::DoAllEffectOnTarget(), Spell::EffectCastButtons(), Spell::EffectEnvironmentalDMG(), Spell::EffectHeal(), Spell::EffectInterruptCast(), Spell::EffectWeaponDmg(), AuraEffect::HandleAuraModSchoolImmunity(), spell_mage_cold_snap::HandleDummy(), Unit::HandleDummyAuraProc(), AuraEffect::HandlePeriodicTriggerSpellAuraTick(), spell_karazhan_wrath_titans_aura::HandleProc(), 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::SpellHitResult(), Unit::SpellPctDamageModsDone(), and HostileRefMgr::threatAssist().

◆ GetSpellMechanicMaskByEffectMask()

uint32 SpellInfo::GetSpellMechanicMaskByEffectMask ( uint32  effectMask) const
1905{
1906 uint32 mask = 0;
1907 if (Mechanic)
1908 mask |= 1 << Mechanic;
1909 for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
1910 if ((effectMask & (1 << i)) && Effects[i].Mechanic)
1911 mask |= 1 << Effects[i].Mechanic;
1912 return mask;
1913}

References Effects, MAX_SPELL_EFFECTS, and Mechanic.

Referenced by Unit::ModSpellDuration().

◆ GetSpellSpecific()

SpellSpecificType SpellInfo::GetSpellSpecific ( ) const
2030{
2031 return _spellSpecific;
2032}
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
1925{
1926 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1927 if (Effects[i].Mechanic)
1928 return true;
1929 return false;
1930}

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 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::DoAllEffectOnLaunchTarget(), Spell::DoAllEffectOnTarget(), Spell::DoSpellHitOnUnit(), Spell::EffectCastButtons(), Spell::EffectCharge(), Spell::EffectEnergize(), Spell::EffectEnergizePct(), Spell::EffectForceDeselect(), Spell::EffectSanctuary(), Spell::EffectSchoolDMG(), Spell::EffectStealBeneficialBuff(), Spell::EffectTriggerSpell(), Spell::EffectWeaponDmg(), UnitAI::FillAISpellInfo(), DynObjAura::FillTargetMap(), Spell::finish(), Creature::FocusTarget(), GetAuraRankForLevel(), Unit::GetDispellableAuraList(), Unit::GetMagicHitRedirectTarget(), Spell::GetSearcherTypeMask(), AuraEffect::GetTotalTicks(), Spell::handle_immediate(), AuraEffect::HandleAuraModSchoolImmunity(), WorldSession::HandleCancelAuraOpcode(), WorldSession::HandleCancelChanneling(), AuraEffect::HandleFeignDeath(), Spell::HandleLaunchPhase(), AuraEffect::HandleModStateImmunityMask(), AuraEffect::HandleModTotalPercentStat(), AuraEffect::HandlePeriodicDamageAurasTick(), AuraEffect::HandlePeriodicEnergizeAuraTick(), WorldSession::HandlePetAction(), Unit::HandleProcTriggerSpell(), AuraEffect::HandleShapeshiftBoosts(), Spell::HandleThreatSpells(), IsActionAllowedChannel(), Spell::IsAutoActionResetSpell(), IsAutocastable(), IsCooldownStartedOnEvent(), Unit::IsDamageReducedByArmor(), Unit::IsImmunedToDamage(), Unit::IsImmunedToDamage(), Unit::IsImmunedToSchool(), 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::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::SpellHealingBonusTaken(), Unit::SpellHitResult(), Unit::SpellHitResult(), Unit::SpellPctDamageModsDone(), Unit::SpellPctHealingModsDone(), Unit::SpellTakenCritChance(), Acore::Hyperlinks::LinkTags::enchant::StoreTo(), Spell::TakeAmmo(), 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 spell_warr_heroic_strike::HandleOnHit(), and 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:576
Definition DBCStructure.h:1596
uint32 MinSkillLineRank
Definition DBCStructure.h:1604
uint32 AcquireMethod
Definition DBCStructure.h:1606

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:578
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:533

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:816
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:467
@ 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
1583{
1584 uint8 matchCount = 0;
1585 uint8 auraCount = 0;
1586 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
1587 {
1588 // xinef: skip non-aura efects
1589 if (!Effects[i].IsAura())
1590 continue;
1591
1592 bool effectFound = false;
1593 for (uint8 j = EFFECT_0; j < MAX_SPELL_EFFECTS; ++j)
1594 {
1595 if (!otherSpellInfo->Effects[j].IsAura())
1596 continue;
1597
1598 if (Effects[i].ApplyAuraName != otherSpellInfo->Effects[j].ApplyAuraName || Effects[i].MiscValue != otherSpellInfo->Effects[j].MiscValue)
1599 continue;
1600
1601 effectFound = true;
1602 break;
1603 }
1604
1605 if (!effectFound)
1606 return false;
1607 ++matchCount;
1608 }
1609
1610 for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
1611 {
1612 if (Effects[i].IsAura())
1613 ++auraCount;
1614 if (otherSpellInfo->Effects[i].IsAura())
1615 ++auraCount;
1616 }
1617
1618 return matchCount * 2 == auraCount;
1619}

References EFFECT_0, Effects, and MAX_SPELL_EFFECTS.

Referenced by Spell::DoAllEffectOnTarget().

◆ 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:2029

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:447
@ SPELL_ATTR0_PASSIVE
Definition SharedDefines.h:399

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:435

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:524

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
2475{
2476 if (Id == spellInfo->Id)
2477 return false;
2478 return IsRankOf(spellInfo);
2479}
bool IsRankOf(SpellInfo const *spellInfo) const
Definition SpellInfo.cpp:2469

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:866
@ SPELL_EFFECT_CREATE_ITEM_2
Definition SharedDefines.h:946
@ SPELL_EFFECT_CREATE_RANDOM_ITEM
Definition SharedDefines.h:848

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
2482{
2483 if (ChainEntry && spellInfo->ChainEntry)
2484 {
2485 if (ChainEntry->first == spellInfo->ChainEntry->first)
2486 if (ChainEntry->rank > spellInfo->ChainEntry->rank)
2487 return true;
2488 }
2489 return false;
2490}

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::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 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:907
bool IsPrimaryProfessionSkill(uint32 skill)
Definition SpellMgr.cpp:33

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:2390
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:610

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:615

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:852
@ SPELL_AURA_DUMMY
Definition SpellAuraDefines.h:67

References Effects, SPELL_AURA_DUMMY, SPELL_EFFECT_APPLY_AURA, and SPELL_EFFECT_THREAT.

◆ IsRangedWeaponSpell()

bool SpellInfo::IsRangedWeaponSpell ( ) const

◆ IsRanked()

bool SpellInfo::IsRanked ( ) const
2386{
2387 return ChainEntry != nullptr;
2388}

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:516

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:583

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

◆ IsTargetingArea()

◆ LoadAuraState()

AuraStateType SpellInfo::LoadAuraState ( ) const
1957{
1958 // Seals
1960 return AURA_STATE_JUDGEMENT;
1961
1962 // Conflagrate aura state on Immolate and Shadowflame
1964 // Immolate
1965 ((SpellFamilyFlags[0] & 4) ||
1966 // Shadowflame
1967 (SpellFamilyFlags[2] & 2)))
1969
1970 // Faerie Fire (druid versions)
1973
1974 // Sting (hunter's pet ability)
1975 if (GetCategory() == 1133)
1977
1978 // Victorious
1979 if (SpellFamilyName == SPELLFAMILY_WARRIOR && SpellFamilyFlags[1] & 0x00040000)
1981
1982 // Swiftmend state on Regrowth & Rejuvenation
1984 return AURA_STATE_SWIFTMEND;
1985
1986 // Deadly poison aura state
1987 if (SpellFamilyName == SPELLFAMILY_ROGUE && SpellFamilyFlags[0] & 0x10000)
1989
1990 // Enrage aura state
1991 if (Dispel == DISPEL_ENRAGE)
1992 return AURA_STATE_ENRAGE;
1993
1994 // Bleeding aura state
1996 return AURA_STATE_BLEEDING;
1997
1999 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2000 if (Effects[i].IsAura() && (Effects[i].ApplyAuraName == SPELL_AURA_MOD_STUN
2001 || Effects[i].ApplyAuraName == SPELL_AURA_MOD_ROOT))
2002 return AURA_STATE_FROZEN;
2003
2004 switch (Id)
2005 {
2006 case 71465: // Divine Surge
2007 case 50241: // Oculus, Drake spell Evasive Maneuvers
2008 return AURA_STATE_UNKNOWN22;
2009 case 9991: // Touch of Zanzil
2010 case 35331: // Black Blood
2011 case 9806: // Phantom Strike
2012 case 35325: // Glowing Blood
2013 case 35328: // Lambent Blood
2014 case 35329: // Vibrant Blood
2015 case 16498: // Faerie Fire
2016 case 6950:
2017 case 20656:
2018 case 25602:
2019 case 32129:
2020 case 49163: // Perpetual Instability (Element 115)
2022 default:
2023 break;
2024 }
2025
2026 return AURA_STATE_NONE;
2027}
@ MECHANIC_BLEED
Definition SharedDefines.h:1351
@ SPELLFAMILY_WARRIOR
Definition SharedDefines.h:3798
@ SPELLFAMILY_ROGUE
Definition SharedDefines.h:3802
@ AURA_STATE_NONE
Definition SharedDefines.h:1302
@ AURA_STATE_FROZEN
Definition SharedDefines.h:1306
@ AURA_STATE_DEADLY_POISON
Definition SharedDefines.h:1319
@ AURA_STATE_BLEEDING
Definition SharedDefines.h:1321
@ AURA_STATE_FAERIE_FIRE
Definition SharedDefines.h:1315
@ AURA_STATE_ENRAGE
Definition SharedDefines.h:1320
@ AURA_STATE_WARRIOR_VICTORY_RUSH
Definition SharedDefines.h:1313
@ AURA_STATE_UNKNOWN22
Definition SharedDefines.h:1325
@ AURA_STATE_JUDGEMENT
Definition SharedDefines.h:1307
@ AURA_STATE_SWIFTMEND
Definition SharedDefines.h:1318
@ AURA_STATE_CONFLAGRATE
Definition SharedDefines.h:1317
@ DISPEL_ENRAGE
Definition SharedDefines.h:1392
@ SPELL_SCHOOL_MASK_FROST
Definition SharedDefines.h:312
SpellSchoolMask GetSchoolMask() const
Definition SpellInfo.cpp:1878
uint32 GetAllEffectsMechanicMask() const
Definition SpellInfo.cpp:1883

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.
2035{
2036 switch (SpellFamilyName)
2037 {
2039 {
2040 // Food / Drinks (mostly)
2042 {
2043 bool food = false;
2044 bool drink = false;
2045 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2046 {
2047 if (!Effects[i].IsAura())
2048 continue;
2049 switch (Effects[i].ApplyAuraName)
2050 {
2051 // Food
2054 food = true;
2055 break;
2056 // Drink
2059 drink = true;
2060 break;
2061 default:
2062 break;
2063 }
2064 }
2065
2066 if (food && drink)
2068 else if (food)
2069 return SPELL_SPECIFIC_FOOD;
2070 else if (drink)
2071 return SPELL_SPECIFIC_DRINK;
2072 }
2073 // scrolls effects
2074 else
2075 {
2076 SpellInfo const* firstRankSpellInfo = GetFirstRankSpell();
2077 switch (firstRankSpellInfo->Id)
2078 {
2079 case 8118: // Strength
2080 case 8099: // Stamina
2081 case 8112: // Spirit
2082 case 8096: // Intellect
2083 case 8115: // Agility
2084 case 8091: // Armor
2085 return SPELL_SPECIFIC_SCROLL;
2086 }
2087 }
2088 break;
2089 }
2090 case SPELLFAMILY_MAGE:
2091 {
2092 // family flags 18(Molten), 25(Frost/Ice), 28(Mage)
2093 if (SpellFamilyFlags[0] & 0x12040000)
2095
2096 // Arcane brillance and Arcane intelect (normal check fails because of flags difference)
2097 if (SpellFamilyFlags[0] & 0x400)
2099
2100 if ((SpellFamilyFlags[0] & 0x1000000) && Effects[0].ApplyAuraName == SPELL_AURA_MOD_CONFUSE)
2102
2103 break;
2104 }
2106 {
2107 // only warlock curses have this
2108 if (Dispel == DISPEL_CURSE)
2109 return SPELL_SPECIFIC_CURSE;
2110
2111 // Warlock (Demon Armor | Demon Skin | Fel Armor)
2112 if (SpellFamilyFlags[1] & 0x20000020 || SpellFamilyFlags[2] & 0x00000010)
2114
2115 //seed of corruption and corruption
2116 if (SpellFamilyFlags[1] & 0x10 || SpellFamilyFlags[0] & 0x2)
2118 break;
2119 }
2120 case SPELLFAMILY_PRIEST:
2121 {
2122 // Divine Spirit and Prayer of Spirit
2123 if (SpellFamilyFlags[0] & 0x20)
2125
2126 break;
2127 }
2128 case SPELLFAMILY_HUNTER:
2129 {
2130 // only hunter stings have this
2131 if (Dispel == DISPEL_POISON)
2132 return SPELL_SPECIFIC_STING;
2133
2134 // only hunter aspects have this (but not all aspects in hunter family)
2135 if (SpellFamilyFlags.HasFlag(0x00380000, 0x00440000, 0x00001010))
2136 return SPELL_SPECIFIC_ASPECT;
2137
2138 break;
2139 }
2141 {
2142 // Collection of all the seal family flags. No other paladin spell has any of those.
2143 if (SpellFamilyFlags[1] & 0x26000C00
2144 || SpellFamilyFlags[0] & 0x0A000000)
2145 return SPELL_SPECIFIC_SEAL;
2146
2147 if (SpellFamilyFlags[0] & 0x00002190)
2148 return SPELL_SPECIFIC_HAND;
2149
2150 // Judgement of Wisdom, Judgement of Light, Judgement of Justice
2151 if (Id == 20184 || Id == 20185 || Id == 20186)
2153
2154 // only paladin auras have this (for palaldin class family)
2155 if (SpellFamilyFlags[2] & 0x00000020)
2156 return SPELL_SPECIFIC_AURA;
2157
2158 // Illidari Council Paladin (Gathios the Shatterer)
2159 if (Id == 41459 || Id == 41469)
2160 return SPELL_SPECIFIC_SEAL;
2161
2162 break;
2163 }
2164 case SPELLFAMILY_SHAMAN:
2165 {
2166 // family flags 10 (Lightning), 42 (Earth), 37 (Water), proc shield from T2 8 pieces bonus
2167 if (SpellFamilyFlags[1] & 0x420
2168 || (SpellFamilyFlags[0] & 0x00000400 && HasAttribute(SPELL_ATTR1_NO_THREAT))
2169 || Id == 23552)
2171
2172 break;
2173 }
2175 if (Id == 48266 || Id == 48263 || Id == 48265)
2177 break;
2178 }
2179
2180 for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
2181 {
2182 if (Effects[i].Effect == SPELL_EFFECT_APPLY_AURA)
2183 {
2184 switch (Effects[i].ApplyAuraName)
2185 {
2190 return SPELL_SPECIFIC_CHARM;
2193 if (Id == 30645) // Gas Cloud Tracking
2194 return SPELL_SPECIFIC_NORMAL;
2195 [[fallthrough]];
2199 default:
2200 break;
2201 }
2202 }
2203 }
2204
2205 return SPELL_SPECIFIC_NORMAL;
2206}
@ SPELL_ATTR1_NO_THREAT
Definition SharedDefines.h:440
@ SPELLFAMILY_PRIEST
Definition SharedDefines.h:3800
@ SPELLFAMILY_MAGE
Definition SharedDefines.h:3797
@ SPELLFAMILY_GENERIC
Definition SharedDefines.h:3794
@ SPELLFAMILY_SHAMAN
Definition SharedDefines.h:3805
@ SPELLFAMILY_DEATHKNIGHT
Definition SharedDefines.h:3809
@ DISPEL_POISON
Definition SharedDefines.h:1387
@ DISPEL_CURSE
Definition SharedDefines.h:1385
@ 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
@ AURA_INTERRUPT_FLAG_NOT_SEATED
Definition SpellDefines.h:61
@ SPELL_SPECIFIC_NORMAL
Definition SpellInfo.h:150
bool HasFlag(uint32 p1=0, uint32 p2=0, uint32 p3=0) const
Definition Util.h:459

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

Referenced by SpellMgr::LoadSpellSpecificAndAuraState().

◆ NeedsComboPoints()

bool SpellInfo::NeedsComboPoints ( ) const
1267{
1269}
@ SPELL_ATTR1_FINISHING_MOVE_DURATION
Definition SharedDefines.h:452
@ SPELL_ATTR1_FINISHING_MOVE_DAMAGE
Definition SharedDefines.h:450

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:1434
@ 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
1622{
1623 // Xinef: no attribute
1625 return true;
1626
1627 // Xinef we have a hook to decide which auras should profit to the spell, by default no profits
1628 // Xinef: Scourge Strike - Trigger
1629 if (Id == 70890 && auraEffect)
1630 {
1631 SpellInfo const* auraInfo = auraEffect->GetSpellInfo();
1632 return auraInfo->SpellIconID == 3086 ||
1633 (auraInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && (auraInfo->SpellFamilyFlags & flag96(8388608, 64, 16) || auraInfo->SpellIconID == 235 || auraInfo->SpellIconID == 154));
1634 }
1635 // Xinef: Necrosis, no profits for done and taken
1636 else if (Id == 51460)
1637 return false;
1638
1639 // Xinef: Do not affect dots and auras obtained from items, only affected by self casted auras
1640 return !isDot && auraEffect && (auraEffect->GetAmount() < 0 || (auraEffect->GetCasterGUID() == caster->GetGUID() && auraEffect->GetSpellInfo()->SpellFamilyName == SpellFamilyName)) && !auraEffect->GetBase()->GetCastItemGUID();
1641}
@ SPELL_ATTR6_IGNORE_CASTER_DAMAGE_MODIFIERS
Definition SharedDefines.h:644
SpellInfo const * GetSpellInfo() const
Definition SpellAuraEffects.h:54
Aura * GetBase() const
Definition SpellAuraEffects.h:49
ObjectGuid GetCasterGUID() const
Definition SpellAuraEffects.h:48
int32 GetAmount() const
Definition SpellAuraEffects.h:64
ObjectGuid GetCastItemGUID() const
Definition SpellAuras.h:103
Definition Util.h:442

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

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

Friends And Related Symbol Documentation

◆ SpellMgr

friend class SpellMgr
friend

Member Data Documentation

◆ _auraState

AuraStateType SpellInfo::_auraState

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

◆ 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(), 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::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(), 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_dk_dancing_rune_weapon::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_summon_or_dismiss::HandleSummon(), spell_item_draenic_pale_ale::HandleSummon(), spell_putricide_mutated_plague_aura::HandleTriggerSpell(), spell_mage_arcane_blast::HandleTriggerSpell(), Player::Has310Flyer(), HasAnyAura(), HasAnyEffectMechanic(), HasAreaAuraEffect(), HasAura(), Unit::HasAuraWithMechanic(), HasEffect(), HasEffectMechanic(), 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(), 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_dru_rejuvenation_moonglade_2_set::OnApply(), spell_valithria_suppression_aura::OnApply(), spell_kologarn_stone_shout_aura::OnPeriodic(), spell_item_fel_mana_potion::OnPeriodic(), spell_deathwhisper_dark_reckoning::OnPeriodic(), spell_putricide_mutated_plague_aura::OnRemove(), spell_valithria_suppression_aura::OnRemove(), spell_dru_rejuvenation_moonglade_2_set::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::SpellHealingBonusTaken(), Unit::SpellHitResult(), Unit::SpellHitResult(), boss_onyxia::SpellHitTarget(), boss_rotface::boss_rotfaceAI::SpellHitTarget(), SpellInfo(), SpellValue::SpellValue(), Acore::Hyperlinks::LinkTags::trade::StoreTo(), go_wind_stone::go_wind_stoneAI::SummonNPC(), Spell::update(), Player::UpdateAttackPowerAndDamage(), Spell::UpdateChanneledTargetList(), spell_deathwhisper_dark_reckoning::Validate(), spell_mage_living_bomb::Validate(), spell_entropius_negative_energy_periodic::Validate(), spell_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(), SpellMgr::AddSameEffectStackRuleSpellGroups(), 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(), 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::DealDamageShieldDamage(), Spell::Delayed(), Spell::DelayedChannel(), Spell::DoAllEffectOnTarget(), Spell::DoCreateItem(), Spell::DoSpellHitOnUnit(), Spell::DoTriggersOnSpellHit(), Spell::EffectActivateObject(), Spell::EffectActivateRune(), Spell::EffectAddFarsight(), Spell::EffectAddHonor(), Spell::EffectCreateItem2(), Spell::EffectCreateRandomItem(), Spell::EffectCreateTamedPet(), Spell::EffectDisEnchant(), Spell::EffectDispel(), Spell::EffectDuel(), Spell::EffectDummy(), Spell::EffectEnchantHeldItem(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemPrismatic(), Spell::EffectEnchantItemTmp(), Spell::EffectEnergize(), Spell::EffectEnergizePct(), Spell::EffectForceCast(), Spell::EffectForceDeselect(), Spell::EffectHeal(), Spell::EffectInstaKill(), Spell::EffectInterruptCast(), Spell::EffectJumpDest(), Spell::EffectKillCredit(), Spell::EffectLearnPetSpell(), Spell::EffectLearnSpell(), Spell::EffectOpenLock(), Spell::EffectPersistentAA(), Spell::EffectPlayMusic(), Spell::EffectPlaySound(), Spell::EffectPowerBurn(), Spell::EffectPowerDrain(), Spell::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_ulduar_stone_grip_cast_target::FilterTargetsInitial(), Spell::finish(), Spell::GetDebugInfo(), GetDiminishingReturnsGroupForSpell(), SpellMgr::GetFirstSpellInChain(), Unit::GetHighestExclusiveSameEffectSpellGroupValue(), AuraEffect::GetId(), Aura::GetId(), GetMaxRange(), Unit::GetPPMProcChance(), SpellMgr::GetSpellForDifficultyFromSpell(), Spell::handle_immediate(), spell_igb_on_gunship_deck_aura::HandleApply(), misc_commandscript::HandleAuraCommand(), AuraEffect::HandleAuraDummy(), AuraEffect::HandleAuraModSchoolImmunity(), Unit::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(), spell_chapter5_return_to_capital::HandleHit(), learn_commandscript::HandleLearnAllMySpellsCommand(), Acore::PlayerCommand::HandleLearnSpellCommand(), lookup_commandscript::HandleLookupSpellIdCommand(), spell_warr_heroic_strike::HandleOnHit(), AuraEffect::HandlePeriodicDummyAuraTick(), AuraEffect::HandlePeriodicTriggerSpellAuraTick(), pet_commandscript::HandlePetLearnCommand(), pet_commandscript::HandlePetUnlearnCommand(), spell_deathbringer_blood_link_aura::HandleProc(), spell_item_blood_draining_enchant::HandleProc(), spell_item_healing_trance::HandleProc(), spell_warr_sweeping_strikes::HandleProc(), Unit::HandleProcTriggerSpell(), ArenaSpectator::HandleResetCommand(), spell_pvp_trinket_wotf_shared_cd::HandleScript(), spell_dreamwalker_summon_portal::HandleScript(), spell_gen_profession_research::HandleScript(), spell_gen_dalaran_disguise::HandleScript(), spell_item_book_of_glyph_mastery::HandleScript(), spell_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::IsImmunedToSchool(), Unit::IsImmunedToSpell(), Totem::IsImmunedToSpellEffect(), SmartAI::IsMainSpellPrevented(), IsMultiSlotAura(), LinkValidator< LinkTags::enchant >::IsTextValid(), Unit::IsTriggeredAtSpellProcEvent(), spell_item_brewfest_hops::Load(), 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::MeleeSpellHitResult(), Unit::ModSpellCastTime(), NeedsToBeTriggeredByCaster(), spell_lurker_below_spout::OnPeriodic(), spell_xt002_gravity_bomb_aura::OnRemove(), SmartAI::OnSpellCastFinished(), 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::RemoveSpellMods(), 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(), 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::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_preparations_for_war_vehicle::SpellHit(), npc_wintergarde_gryphon::SpellHit(), npc_frostbrood_skytalon::npc_frostbrood_skytalonAI::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(), npc_necropolis::SpellHit(), npc_necropolis_health::SpellHit(), npc_necropolis_relay::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(), boss_gal_darah::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::SpellHit(), npc_earthen_ring_flamecaller::SpellHit(), npc_pet_darting_hatchling::SpellHit(), npc_necropolis_proxy::SpellHit(), npc_death_knight_initiate::npc_death_knight_initiateAI::SpellHit(), boss_tenris_mirkblood::SpellHit(), npc_forest_frog::SpellHit(), npc_zulian_prowler::npc_zulian_prowlerAI::SpellHit(), npc_midsummer_ribbon_pole_target::SpellHit(), npc_aged_dying_ancient_kodo::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(), boss_kaelthas::SpellHit(), advisor_baseAI::SpellHit(), npc_deaths_door_fell_cannon_target_bunny::npc_deaths_door_fell_cannon_target_bunnyAI::SpellHit(), npc_nether_drake::npc_nether_drakeAI::SpellHit(), npc_enslaved_netherwing_drake::SpellHit(), npc_dragonmaw_peon::npc_dragonmaw_peonAI::SpellHit(), npc_injured_patient::npc_injured_patientAI::SpellHit(), npc_garments_of_quests::npc_garments_of_questsAI::SpellHit(), npc_necrotic_shard::SpellHit(), npc_dark_iron_attack_generator::SpellHit(), npc_soh_fire_trigger::SpellHit(), npc_hallows_end_train_fire::SpellHit(), boss_headless_horseman_head::SpellHit(), npc_midsummer_bonfire::SpellHit(), npc_cos_stratholme_citizien::npc_cos_stratholme_citizienAI::SpellHit(), boss_viscidus::SpellHit(), boss_magus_telestra::SpellHit(), boss_flame_leviathan::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::SpellHit(), npc_mature_netherwing_drake::npc_mature_netherwing_drakeAI::SpellHit(), npc_imprisoned_beryl_sorcerer::npc_imprisoned_beryl_sorcererAI::SpellHit(), boss_black_knight::boss_black_knightAI::SpellHitTarget(), boss_bronjahm::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(), npc_necropolis_relay::SpellHitTarget(), boss_quartermaster_zigris::SpellHitTarget(), npc_demonic_vapor_trail::SpellHitTarget(), boss_headless_horseman_head::SpellHitTarget(), boss_taldaram::SpellHitTarget(), boss_anub_arak::SpellHitTarget(), boss_moorabi::boss_moorabiAI::SpellHitTarget(), boss_volkhan::SpellHitTarget(), boss_stormcaller_brundir::boss_stormcaller_brundirAI::SpellHitTarget(), boss_ymiron::boss_ymironAI::SpellHitTarget(), npc_necropolis_proxy::SpellHitTarget(), npc_necrotic_shard::SpellHitTarget(), npc_frostwing_vrykul::npc_frostwing_vrykulAI::SpellHitTarget(), boss_felmyst::SpellHitTarget(), boss_malchezaar::SpellHitTarget(), npc_nerubian_burrower::npc_nerubian_burrowerAI::SpellHitTarget(), boss_devourer_of_souls::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_eck::boss_eckAI::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_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_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::SpellHitTarget(), boss_shirrak_the_dead_watcher::SpellHitTarget(), npc_pet_gen_soul_trader_beacon::SpellHitTarget(), npc_pet_gen_fetch_ball::SpellHitTarget(), npc_necropolis_health::SpellHitTarget(), SpellInfo(), Unit::SpellPctHealingModsDone(), Spell::SummonGuardian(), go_wind_stone::go_wind_stoneAI::SummonNPC(), Spell::TakePower(), Spell::TakeRunePower(), Pet::ToggleAutocast(), CharmInfo::ToggleCreatureAutocast(), Spell::TriggerGlobalCooldown(), Spell::update(), PetAI::UpdateAI(), Spell::UpdateChanneledTargetList(), 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

◆ 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 AuraEffect::CalcPeriodicCritChance(), Player::CanNoReagentCast(), SpellMgr::CanSpellTriggerProcOnEvent(), Aura::CanStackWith(), Spell::CheckItems(), spell_dk_dancing_rune_weapon::CheckProc(), spell_gen_black_magic_enchant::CheckProc(), spell_hun_misdirection::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(), spell_warr_heroic_strike::HandleOnHit(), 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::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(), AuraEffect::CalcPeriodicCritChance(), 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(), Unit::GetAuraEffect(), GetDiminishingReturnsGroupForSpell(), GetDiminishingReturnsLimitDuration(), spell_rog_deadly_poison::HandleAfterHit(), AuraEffect::HandleAuraDummy(), AuraEffect::HandleAuraModShapeshift(), Unit::HandleAuraProc(), Unit::HandleAuraRaidProcFromChargeWithValue(), Aura::HandleAuraSpecificMods(), spell_hun_readiness::HandleDummy(), spell_mage_cold_snap::HandleDummy(), spell_rog_preparation::HandleDummy(), Unit::HandleDummyAuraProc(), Spell::HandleLaunchPhase(), learn_commandscript::HandleLearnAllMySpellsCommand(), spell_warr_heroic_strike::HandleOnHit(), 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::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(), Unit::SpellHitResult(), SpellInfo(), Unit::SpellPctDamageModsDone(), Unit::SpellPctHealingModsDone(), Unit::SpellTakenCritChance(), and ValidateAttribute6SpellDamageMods().

◆ SpellIconID

◆ SpellLevel

◆ SpellName

◆ SpellPriority

uint32 SpellInfo::SpellPriority

◆ 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

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