188 float CalcDirectionAngle()
const;
191 uint32 GetExplicitTargetMask(
bool& srcSet,
bool& dstSet)
const;
198 SelectionCategory(selectionCategory), SelectionCheckType(checkType), DirectionType(directionType) { }
206 static std::array<StaticData, TOTAL_SPELL_TARGETS> _data;
245 float ResourceCoefficient;
256 bool IsEffect() const;
260 bool IsTargetingArea() const;
261 bool IsAreaAuraEffect() const;
262 bool IsUnitOwnedAuraEffect() const;
264 uint32 GetPeriodicTickCount() const;
272 float CalcValueMultiplier(
WorldObject* caster,
Spell* spell =
nullptr) const;
273 float CalcDamageMultiplier(
WorldObject* caster,
Spell* spell =
nullptr) const;
278 uint32 GetProvidedTargetMask() const;
279 uint32 GetMissingTargetMask(
bool srcSet = false,
bool dstSet = false,
uint32 mask = 0) const;
286 ImmunityInfo const* GetImmunityInfo()
const {
return _immunityInfo.get(); }
292 : ImplicitTargetType(implicitTargetType), UsedTargetObjectType(usedTargetObjectType) { }
297 static std::array<StaticData, TOTAL_SPELL_EFFECTS> _data;
385 float ProcBasePPM = 0.0f;
391 std::array<SpellPowerEntry const*, MAX_POWERS_PER_SPELL> PowerCosts = {};
394 float LaunchDelay = 0.0f;
395 float MinDuration = 0.0f;
397 std::array<int32, MAX_SPELL_TOTEMS>
Totem = {};
399 std::array<int32, MAX_SPELL_REAGENTS>
Reagent = {};
400 std::array<int16, MAX_SPELL_REAGENTS> ReagentCount = {};
404 int32 EquippedItemInventoryTypeMask = 0;
408 uint32 ShowFutureSpellPlayerConditionID = 0;
410 float ConeAngle = 0.0f;
438 } SqrtDamageAndHealingDiminishing;
449 uint32 GetCategory() const;
452 bool HasAreaAuraEffect() const;
453 bool HasOnlyDamageEffects() const;
454 bool HasTargetType(::
Targets target) const;
456 bool HasAttribute(
SpellAttr0 attribute)
const {
return !!(Attributes & attribute); }
475 bool CanBeInterrupted(
WorldObject const* interruptCaster,
Unit const* interruptTarget,
bool ignoreImmunity =
false)
const;
477 bool HasAnyAuraInterruptFlag()
const;
484 bool IsExplicitDiscovery()
const;
485 bool IsLootCrafting()
const;
486 bool IsProfession()
const;
487 bool IsPrimaryProfession()
const;
488 bool IsPrimaryProfessionFirstRank()
const;
489 bool IsAbilityOfSkillType(
uint32 skillType)
const;
491 bool IsAffectingArea()
const;
492 bool IsTargetingArea()
const;
493 bool NeedsExplicitUnitTarget()
const;
494 bool NeedsToBeTriggeredByCaster(
SpellInfo const* triggeringSpell)
const;
496 bool IsPassive()
const;
497 bool IsAutocastable()
const;
498 bool IsAutocastEnabledByDefault()
const;
499 bool IsStackableWithRanks()
const;
500 bool IsPassiveStackableWithRanks()
const;
501 bool IsMultiSlotAura()
const;
502 bool IsStackableOnOneSlotWithDifferentCasters()
const;
503 bool IsCooldownStartedOnEvent()
const;
504 bool IsDeathPersistent()
const;
505 bool IsRequiringDeadTarget()
const;
506 bool IsAllowingDeadTarget()
const;
507 bool IsGroupBuff()
const;
508 bool CanBeUsedInCombat(
Unit const* caster)
const;
509 bool IsPositive()
const;
510 bool IsPositiveEffect(
uint8 effIndex)
const;
511 bool IsChanneled()
const;
512 bool IsMoveAllowedChannel()
const;
513 bool IsNextMeleeSwingSpell()
const;
514 bool IsRangedWeaponSpell()
const;
515 bool IsAutoRepeatRangedSpell()
const;
516 bool IsEmpowerSpell()
const;
517 bool HasInitialAggro()
const;
518 bool HasHitDelay()
const;
522 bool IsItemFitToSpellRequirements(
Item const* item)
const;
524 bool IsAffected(
uint32 familyName,
flag128 const& familyFlags)
const;
526 bool IsAffectedBySpellMods()
const;
528 bool IsUpdatingTemporaryAuraValuesBySpellMod()
const;
530 bool CanPierceImmuneAura(
SpellInfo const* auraSpellInfo)
const;
531 bool CanDispelAura(
SpellInfo const* auraSpellInfo)
const;
533 bool IsSingleTarget()
const;
534 bool IsAuraExclusiveBySpecificWith(
SpellInfo const* spellInfo)
const;
535 bool IsAuraExclusiveBySpecificPerCasterWith(
SpellInfo const* spellInfo)
const;
542 bool CheckTargetCreatureType(
Unit const* target)
const;
545 uint64 GetAllEffectsMechanicMask()
const;
547 uint64 GetSpellMechanicMaskByEffectMask(
uint32 effectMask)
const;
549 uint32 GetDispelMask()
const;
551 uint32 GetExplicitTargetMask()
const;
556 float GetMinRange(
bool positive =
false)
const;
557 float GetMaxRange(
bool positive =
false,
WorldObject const* caster =
nullptr,
Spell* spell =
nullptr)
const;
561 int32 GetDuration()
const;
562 int32 GetMaxDuration()
const;
565 uint32 GetRecoveryTime()
const;
571 float CalcProcPPM(
Unit* caster,
int32 itemLevel)
const;
573 bool IsRanked()
const;
574 uint8 GetRank()
const;
575 SpellInfo const* GetFirstRankSpell()
const;
576 SpellInfo const* GetLastRankSpell()
const;
577 SpellInfo const* GetNextRankSpell()
const;
578 SpellInfo const* GetPrevRankSpell()
const;
580 bool IsRankOf(
SpellInfo const* spellInfo)
const;
581 bool IsDifferentRankOf(
SpellInfo const* spellInfo)
const;
582 bool IsHighRankOf(
SpellInfo const* spellInfo)
const;
587 std::vector<SpellEffectInfo>
const&
GetEffects()
const {
return _effects; }
594 int32 GetDiminishingReturnsLimitDuration()
const;
597 void ApplyAllSpellImmunitiesTo(
Unit* target,
SpellEffectInfo const& spellEffectInfo,
bool apply)
const;
598 bool CanSpellProvideImmunityAgainstAura(
SpellInfo const* auraSpellInfo)
const;
600 bool SpellCancelsAuraEffect(
AuraEffect const* aurEff)
const;
602 uint64 GetAllowedMechanicMask()
const;
604 uint64 GetMechanicImmunityMask(
Unit const* caster)
const;
607 bool MeetsFutureSpellPlayerCondition(
Player const* player)
const;
609 bool HasLabel(
uint32 labelId)
const;
613 void _InitializeExplicitTargetMask();
614 void _InitializeSpellPositivity();
615 void _LoadSpellSpecific();
616 void _LoadAuraState();
617 void _LoadSpellDiminishInfo();
618 void _LoadImmunityInfo();
619 void _LoadSqrtTargetLimit(
int32 maxTargets,
int32 numNonDiminishedTargets,
624 void _UnloadImplicitTargetConditionLists();
std::optional< T > Optional
Optional helper class to wrap optional values within.
@ DIMINISHING_LEVEL_IMMUNE
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
@ 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_CAN_TARGET_ANY_PRIVATE_OBJECT
@ 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_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
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
SpellImplicitTargetInfo()
bool HasAttribute(SpellAttr8 attribute) const
bool HasChannelInterruptFlag(SpellAuraInterruptFlags2 flag) const
SpellInfo & operator=(SpellInfo &&) noexcept=delete
bool HasAttribute(SpellAttr9 attribute) const
bool HasAttribute(SpellAttr16 attribute) const
std::unordered_set< uint32 > Labels
bool HasAttribute(SpellAttr2 attribute) const
bool HasAttribute(SpellAttr7 attribute) const
std::vector< Milliseconds > EmpowerStageThresholds
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(SpellAttr15 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
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)