191 float CalcDirectionAngle()
const;
194 uint32 GetExplicitTargetMask(
bool& srcSet,
bool& dstSet)
const;
201 SelectionCategory(selectionCategory), SelectionCheckType(checkType), DirectionType(directionType) { }
209 static std::array<StaticData, TOTAL_SPELL_TARGETS>
_data;
259 bool IsEffect() const;
263 bool IsTargetingArea() const;
264 bool IsAreaAuraEffect() const;
265 bool IsUnitOwnedAuraEffect() const;
267 int32 CalcValue(
WorldObject const* caster =
nullptr,
int32 const* basePoints =
nullptr,
Unit const* target =
nullptr,
float* variance =
nullptr,
uint32 castItemId = 0,
int32 itemLevel = -1) const;
269 float CalcValueMultiplier(
WorldObject* caster,
Spell* spell =
nullptr) const;
270 float CalcDamageMultiplier(
WorldObject* caster,
Spell* spell =
nullptr) const;
275 uint32 GetProvidedTargetMask() const;
276 uint32 GetMissingTargetMask(
bool srcSet = false,
bool dstSet = false,
uint32 mask = 0) const;
283 ImmunityInfo const* GetImmunityInfo()
const {
return _immunityInfo.get(); }
289 : ImplicitTargetType(implicitTargetType), UsedTargetObjectType(usedTargetObjectType) { }
294 static std::array<StaticData, TOTAL_SPELL_EFFECTS>
_data;
380 float ProcBasePPM = 0.0f;
386 std::array<SpellPowerEntry const*, MAX_POWERS_PER_SPELL> PowerCosts = {};
389 float LaunchDelay = 0.0f;
391 std::array<int32, MAX_SPELL_TOTEMS>
Totem = {};
393 std::array<int32, MAX_SPELL_REAGENTS> Reagent = {};
394 std::array<int16, MAX_SPELL_REAGENTS> ReagentCount = {};
398 int32 EquippedItemInventoryTypeMask = 0;
402 uint32 ShowFutureSpellPlayerConditionID = 0;
404 float ConeAngle = 0.0f;
431 } SqrtDamageAndHealingDiminishing;
442 uint32 GetCategory() const;
445 bool HasAreaAuraEffect() const;
446 bool HasOnlyDamageEffects() const;
447 bool HasTargetType(::
Targets target) const;
449 bool HasAttribute(
SpellAttr0 attribute)
const {
return !!(Attributes & attribute); }
466 bool CanBeInterrupted(
WorldObject const* interruptCaster,
Unit const* interruptTarget,
bool ignoreImmunity =
false)
const;
468 bool HasAnyAuraInterruptFlag()
const;
475 bool IsExplicitDiscovery()
const;
476 bool IsLootCrafting()
const;
477 bool IsProfession()
const;
478 bool IsPrimaryProfession()
const;
479 bool IsPrimaryProfessionFirstRank()
const;
480 bool IsAbilityOfSkillType(
uint32 skillType)
const;
482 bool IsAffectingArea()
const;
483 bool IsTargetingArea()
const;
484 bool NeedsExplicitUnitTarget()
const;
485 bool NeedsToBeTriggeredByCaster(
SpellInfo const* triggeringSpell)
const;
487 bool IsPassive()
const;
488 bool IsAutocastable()
const;
489 bool IsStackableWithRanks()
const;
490 bool IsPassiveStackableWithRanks()
const;
491 bool IsMultiSlotAura()
const;
492 bool IsStackableOnOneSlotWithDifferentCasters()
const;
493 bool IsCooldownStartedOnEvent()
const;
494 bool IsDeathPersistent()
const;
495 bool IsRequiringDeadTarget()
const;
496 bool IsAllowingDeadTarget()
const;
497 bool IsGroupBuff()
const;
498 bool CanBeUsedInCombat(
Unit const* caster)
const;
499 bool IsPositive()
const;
500 bool IsPositiveEffect(
uint8 effIndex)
const;
501 bool IsChanneled()
const;
502 bool IsMoveAllowedChannel()
const;
503 bool IsNextMeleeSwingSpell()
const;
504 bool IsRangedWeaponSpell()
const;
505 bool IsAutoRepeatRangedSpell()
const;
506 bool HasInitialAggro()
const;
507 bool HasHitDelay()
const;
511 bool IsItemFitToSpellRequirements(
Item const* item)
const;
513 bool IsAffected(
uint32 familyName,
flag128 const& familyFlags)
const;
515 bool IsAffectedBySpellMods()
const;
518 bool CanPierceImmuneAura(
SpellInfo const* auraSpellInfo)
const;
519 bool CanDispelAura(
SpellInfo const* auraSpellInfo)
const;
521 bool IsSingleTarget()
const;
522 bool IsAuraExclusiveBySpecificWith(
SpellInfo const* spellInfo)
const;
523 bool IsAuraExclusiveBySpecificPerCasterWith(
SpellInfo const* spellInfo)
const;
530 bool CheckTargetCreatureType(
Unit const* target)
const;
533 uint64 GetAllEffectsMechanicMask()
const;
535 uint64 GetSpellMechanicMaskByEffectMask(
uint32 effectMask)
const;
537 uint32 GetDispelMask()
const;
539 uint32 GetExplicitTargetMask()
const;
544 float GetMinRange(
bool positive =
false)
const;
545 float GetMaxRange(
bool positive =
false,
WorldObject* caster =
nullptr,
Spell* spell =
nullptr)
const;
548 int32 GetDuration()
const;
549 int32 GetMaxDuration()
const;
551 uint32 GetMaxTicks()
const;
554 uint32 GetRecoveryTime()
const;
560 float CalcProcPPM(
Unit* caster,
int32 itemLevel)
const;
562 bool IsRanked()
const;
563 uint8 GetRank()
const;
564 SpellInfo const* GetFirstRankSpell()
const;
565 SpellInfo const* GetLastRankSpell()
const;
566 SpellInfo const* GetNextRankSpell()
const;
567 SpellInfo const* GetPrevRankSpell()
const;
569 bool IsRankOf(
SpellInfo const* spellInfo)
const;
570 bool IsDifferentRankOf(
SpellInfo const* spellInfo)
const;
571 bool IsHighRankOf(
SpellInfo const* spellInfo)
const;
576 std::vector<SpellEffectInfo>
const&
GetEffects()
const {
return _effects; }
583 int32 GetDiminishingReturnsLimitDuration()
const;
587 bool CanSpellProvideImmunityAgainstAura(
SpellInfo const* auraSpellInfo)
const;
588 bool SpellCancelsAuraEffect(
AuraEffect const* aurEff)
const;
590 uint64 GetAllowedMechanicMask()
const;
592 uint64 GetMechanicImmunityMask(
Unit const* caster)
const;
595 bool MeetsFutureSpellPlayerCondition(
Player const* player)
const;
597 bool HasLabel(
uint32 labelId)
const;
601 void _InitializeExplicitTargetMask();
602 void _InitializeSpellPositivity();
603 void _LoadSpellSpecific();
604 void _LoadAuraState();
605 void _LoadSpellDiminishInfo();
606 void _LoadImmunityInfo();
607 void _LoadSqrtTargetLimit(
int32 maxTargets,
int32 numNonDiminishedTargets,
612 void _UnloadImplicitTargetConditionLists();
std::optional< T > Optional
Optional helper class to wrap optional values within.
@ DIMINISHING_LEVEL_IMMUNE
@ TARGET_CHECK_RAID_CLASS
SpellEffectImplicitTargetTypes
@ EFFECT_IMPLICIT_TARGET_CASTER
@ EFFECT_IMPLICIT_TARGET_NONE
@ EFFECT_IMPLICIT_TARGET_EXPLICIT
SpellTargetSelectionCategories
@ TARGET_SELECT_CATEGORY_CONE
@ TARGET_SELECT_CATEGORY_AREA
@ TARGET_SELECT_CATEGORY_DEFAULT
@ TARGET_SELECT_CATEGORY_NEARBY
@ TARGET_SELECT_CATEGORY_NYI
@ TARGET_SELECT_CATEGORY_LINE
@ TARGET_SELECT_CATEGORY_TRAJ
@ TARGET_SELECT_CATEGORY_CHANNEL
SpellTargetDirectionTypes
std::unordered_map< uint32, SpellVisualVector > SpellVisualMap
@ TARGET_OBJECT_TYPE_UNIT
@ TARGET_OBJECT_TYPE_ITEM
@ TARGET_OBJECT_TYPE_CORPSE
@ TARGET_OBJECT_TYPE_UNIT_AND_DEST
@ TARGET_OBJECT_TYPE_NONE
@ TARGET_OBJECT_TYPE_DEST
@ TARGET_OBJECT_TYPE_GOBJ
@ TARGET_OBJECT_TYPE_CORPSE_ALLY
@ TARGET_OBJECT_TYPE_CORPSE_ENEMY
@ TARGET_OBJECT_TYPE_GOBJ_ITEM
std::vector< AuraEffect * > AuraEffectVector
@ SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF1
@ SPELL_ATTR0_CU_IGNORE_ARMOR
@ SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER
@ SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET
@ SPELL_ATTR0_CU_ENCHANT_PROC
@ SPELL_ATTR0_CU_DIRECT_DAMAGE
@ SPELL_ATTR0_CU_CAN_CRIT
@ SPELL_ATTR0_CU_DONT_BREAK_STEALTH
@ SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET
@ SPELL_ATTR0_CU_CONE_BACK
@ SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF2
@ SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED
@ SPELL_ATTR0_CU_NEEDS_AMMO_DATA
@ SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF0
@ SPELL_ATTR0_CU_BINARY_SPELL
@ SPELL_ATTR0_CU_SHARE_DAMAGE
@ SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC
@ SPELL_ATTR0_CU_DEPRECATED_ROLLING_PERIODIC
@ SPELL_ATTR0_CU_PICKPOCKET
@ SPELL_ATTR0_CU_CONE_LINE
@ SPELL_ATTR0_CU_NO_INITIAL_THREAT
@ SPELL_ATTR0_CU_IS_TALENT
@ SPELL_ATTR0_CU_DEPRECATED_LIQUID_AURA
@ SPELL_SPECIFIC_MAGE_ARMOR
@ SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE
@ SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT
@ SPELL_SPECIFIC_ELEMENTAL_SHIELD
@ SPELL_SPECIFIC_WARLOCK_CORRUPTION
@ SPELL_SPECIFIC_PRESENCE
@ SPELL_SPECIFIC_WARRIOR_ENRAGE
@ SPELL_SPECIFIC_WARLOCK_ARMOR
@ SPELL_SPECIFIC_MAGE_POLYMORPH
@ SPELL_SPECIFIC_FOOD_AND_DRINK
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
SpellTargetReferenceTypes
@ TARGET_REFERENCE_TYPE_SRC
@ TARGET_REFERENCE_TYPE_TARGET
@ TARGET_REFERENCE_TYPE_LAST
@ TARGET_REFERENCE_TYPE_NONE
@ TARGET_REFERENCE_TYPE_CASTER
@ TARGET_REFERENCE_TYPE_DEST
std::vector< SpellXSpellVisualEntry const * > SpellVisualVector
constexpr bool HasFlag(T flag) const
static std::array< StaticData, TOTAL_SPELL_EFFECTS > _data
SpellEffectInfo(SpellEffectInfo &&) noexcept
std::unique_ptr< ImmunityInfo > _immunityInfo
SpellInfo const * _spellInfo
SpellRadiusEntry const * TargetBRadiusEntry
std::shared_ptr< std::vector< Condition > > ImplicitTargetConditions
SpellRadiusEntry const * TargetARadiusEntry
float BonusCoefficientFromAP
SpellEffectInfo(SpellEffectInfo const &)=delete
EnumFlag< SpellEffectAttributes > EffectAttributes
SpellEffIndex EffectIndex
SpellImplicitTargetInfo TargetA
SpellImplicitTargetInfo TargetB
static std::array< StaticData, TOTAL_SPELL_TARGETS > _data
SpellImplicitTargetInfo()
bool HasAttribute(SpellAttr8 attribute) const
bool HasChannelInterruptFlag(SpellAuraInterruptFlags2 flag) const
SpellInfo & operator=(SpellInfo &&) noexcept=delete
bool HasAttribute(SpellAttr9 attribute) const
std::unordered_set< uint32 > Labels
bool HasAttribute(SpellAttr2 attribute) const
bool HasAttribute(SpellAttr7 attribute) const
SpellVisualVector _visuals
bool HasAttribute(SpellAttr14 attribute) const
bool HasAttribute(SpellAttr5 attribute) const
bool HasAttribute(SpellAttr13 attribute) const
std::vector< SpellProcsPerMinuteModEntry const * > ProcPPMMods
std::vector< SpellEffectInfo > _effects
SpellInfo(SpellInfo const &)=delete
bool HasAttribute(SpellAttr12 attribute) const
SpellInfo(SpellInfo &&)=delete
bool HasAuraInterruptFlag(SpellAuraInterruptFlags2 flag) const
bool HasAttribute(SpellAttr6 attribute) const
std::vector< SpellReagentsCurrencyEntry const * > ReagentsCurrency
bool HasAttribute(SpellCustomAttributes customAttribute) const
bool HasAttribute(SpellAttr1 attribute) const
bool HasChannelInterruptFlag(SpellAuraInterruptFlags flag) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
std::vector< SpellEffectInfo > const & GetEffects() const
SpellDiminishInfo _diminishInfo
bool HasAttribute(SpellAttr3 attribute) const
bool HasAttribute(SpellAttr4 attribute) const
bool HasAttribute(SpellAttr11 attribute) const
std::bitset< MAX_SPELL_EFFECTS > NegativeEffects
SpellInfo & operator=(SpellInfo const &)=delete
bool HasAttribute(SpellAttr10 attribute) const
bool HasAuraInterruptFlag(SpellAuraInterruptFlags flag) const
float ResourceCoefficient
StaticData(SpellEffectImplicitTargetTypes implicitTargetType, SpellTargetObjectTypes usedTargetObjectType)
SpellTargetObjectTypes UsedTargetObjectType
SpellEffectImplicitTargetTypes ImplicitTargetType
SpellTargetObjectTypes ObjectType
SpellTargetCheckTypes SelectionCheckType
SpellTargetReferenceTypes ReferenceType
SpellTargetSelectionCategories SelectionCategory
SpellTargetDirectionTypes DirectionType
StaticData(SpellTargetObjectTypes objectType, SpellTargetReferenceTypes referenceType, SpellTargetSelectionCategories selectionCategory, SpellTargetCheckTypes checkType, SpellTargetDirectionTypes directionType)