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;
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 IsCooldownStartedOnEventAfterCombat()
const;
505 bool IsDeathPersistent()
const;
506 bool IsRequiringDeadTarget()
const;
507 bool IsAllowingDeadTarget()
const;
508 bool IsGroupBuff()
const;
509 bool CanBeUsedInCombat(
Unit const* caster)
const;
510 bool IsPositive()
const;
511 bool IsPositiveEffect(
uint8 effIndex)
const;
512 bool IsChanneled()
const;
513 bool IsMoveAllowedChannel()
const;
514 bool IsNextMeleeSwingSpell()
const;
515 bool IsAutoShot()
const;
516 bool IsRangedWeaponSpell()
const;
517 bool IsAutoRepeatRangedSpell()
const;
518 bool IsEmpowerSpell()
const;
519 bool HasInitialAggro()
const;
520 bool HasHitDelay()
const;
524 bool IsItemFitToSpellRequirements(
Item const* item)
const;
526 bool IsAffected(
uint32 familyName,
flag128 const& familyFlags)
const;
528 bool IsAffectedBySpellMods()
const;
530 bool IsUpdatingTemporaryAuraValuesBySpellMod()
const;
532 bool CanPierceImmuneAura(
SpellInfo const* auraSpellInfo)
const;
533 bool CanDispelAura(
SpellInfo const* auraSpellInfo)
const;
535 bool IsSingleTarget()
const;
536 bool IsAuraExclusiveBySpecificWith(
SpellInfo const* spellInfo)
const;
537 bool IsAuraExclusiveBySpecificPerCasterWith(
SpellInfo const* spellInfo)
const;
544 bool CheckTargetCreatureType(
Unit const* target)
const;
547 uint64 GetAllEffectsMechanicMask()
const;
549 uint64 GetSpellMechanicMaskByEffectMask(
uint32 effectMask)
const;
551 uint32 GetDispelMask()
const;
553 uint32 GetExplicitTargetMask()
const;
558 float GetMinRange(
bool positive =
false)
const;
559 float GetMaxRange(
bool positive =
false,
WorldObject const* caster =
nullptr,
Spell* spell =
nullptr)
const;
563 int32 GetDuration()
const;
564 int32 GetMaxDuration()
const;
567 uint32 GetRecoveryTime()
const;
573 float CalcProcPPM(
Unit* caster,
int32 itemLevel)
const;
575 bool IsRanked()
const;
576 uint8 GetRank()
const;
577 SpellInfo const* GetFirstRankSpell()
const;
578 SpellInfo const* GetLastRankSpell()
const;
579 SpellInfo const* GetNextRankSpell()
const;
580 SpellInfo const* GetPrevRankSpell()
const;
582 bool IsRankOf(
SpellInfo const* spellInfo)
const;
583 bool IsDifferentRankOf(
SpellInfo const* spellInfo)
const;
584 bool IsHighRankOf(
SpellInfo const* spellInfo)
const;
589 std::vector<SpellEffectInfo>
const&
GetEffects()
const {
return _effects; }
596 int32 GetDiminishingReturnsLimitDuration()
const;
599 void ApplyAllSpellImmunitiesTo(
Unit* target,
SpellEffectInfo const& spellEffectInfo,
bool apply)
const;
600 bool CanSpellProvideImmunityAgainstAura(
SpellInfo const* auraSpellInfo)
const;
602 bool SpellCancelsAuraEffect(
AuraEffect const* aurEff)
const;
604 uint64 GetAllowedMechanicMask()
const;
606 uint64 GetMechanicImmunityMask(
Unit const* caster)
const;
609 bool MeetsFutureSpellPlayerCondition(
Player const* player)
const;
611 bool HasLabel(
uint32 labelId)
const;
615 void _InitializeExplicitTargetMask();
616 void _InitializeSpellPositivity();
617 void _LoadSpellSpecific();
618 void _LoadAuraState();
619 void _LoadSpellDiminishInfo();
620 void _LoadImmunityInfo();
621 void _LoadSqrtTargetLimit(
int32 maxTargets,
int32 numNonDiminishedTargets,
626 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
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)