TrinityCore
Loading...
Searching...
No Matches
Spell Class Reference

#include <Spell.h>

Classes

struct  CorpseTargetInfo
 
struct  EmpowerData
 
struct  GOTargetInfo
 
struct  HitTriggerSpell
 
struct  ItemTargetInfo
 
struct  TargetInfo
 
struct  TargetInfoBase
 

Public Types

typedef std::unordered_set< Aura * > UsedSpellMods
 

Public Member Functions

void EffectNULL ()
 
void EffectUnused ()
 
void EffectDistract ()
 
void EffectSchoolDMG ()
 
void EffectEnvironmentalDMG ()
 
void EffectInstaKill ()
 
void EffectDummy ()
 
void EffectTeleportUnits ()
 
void EffectTeleportUnitsWithVisualLoadingScreen ()
 
void EffectApplyAura ()
 
void EffectSendEvent ()
 
void EffectPowerBurn ()
 
void EffectPowerDrain ()
 
void EffectHeal ()
 
void EffectBind ()
 
void EffectTeleportToReturnPoint ()
 
void EffectIncreaseCurrencyCap ()
 
void EffectHealthLeech ()
 
void EffectQuestComplete ()
 
void EffectCreateItem ()
 
void EffectCreateItem2 ()
 
void EffectCreateRandomItem ()
 
void EffectPersistentAA ()
 
void EffectEnergize ()
 
void EffectOpenLock ()
 
void EffectSummonChangeItem ()
 
void EffectProficiency ()
 
void EffectSummonType ()
 
void EffectLearnSpell ()
 
void EffectDispel ()
 
void EffectDualWield ()
 
void EffectPickPocket ()
 
void EffectAddFarsight ()
 
void EffectUntrainTalents ()
 
void EffectHealMechanical ()
 
void EffectJump ()
 
void EffectJumpDest ()
 
void EffectLeapBack ()
 
void EffectQuestClear ()
 
void EffectTeleUnitsFaceCaster ()
 
void EffectLearnSkill ()
 
void EffectPlayMovie ()
 
void EffectTradeSkill ()
 
void EffectEnchantItemPerm ()
 
void EffectEnchantItemTmp ()
 
void EffectTameCreature ()
 
void EffectSummonPet ()
 
void EffectLearnPetSpell ()
 
void EffectWeaponDmg ()
 
void EffectForceCast ()
 
void EffectForceCast2 ()
 
void EffectTriggerSpell ()
 
void EffectTriggerMissileSpell ()
 
void EffectThreat ()
 
void EffectHealMaxHealth ()
 
void EffectInterruptCast ()
 
void EffectSummonObjectWild ()
 
void EffectScriptEffect ()
 
void EffectSanctuary ()
 
void EffectDuel ()
 
void EffectStuck ()
 
void EffectSummonPlayer ()
 
void EffectActivateObject ()
 
void EffectApplyGlyph ()
 
void EffectEnchantHeldItem ()
 
void EffectSummonObject ()
 
void EffectChangeRaidMarker ()
 
void EffectResurrect ()
 
void EffectParry ()
 
void EffectBlock ()
 
void EffectLeap ()
 
void EffectTransmitted ()
 
void EffectDisEnchant ()
 
void EffectInebriate ()
 
void EffectFeedPet ()
 
void EffectDismissPet ()
 
void EffectReputation ()
 
void EffectForceDeselect ()
 
void EffectSelfResurrect ()
 
void EffectSkinning ()
 
void EffectCharge ()
 
void EffectChargeDest ()
 
void EffectProspecting ()
 
void EffectMilling ()
 
void EffectRenamePet ()
 
void EffectSendTaxi ()
 
void EffectKnockBack ()
 
void EffectPullTowards ()
 
void EffectPullTowardsDest ()
 
void EffectDispelMechanic ()
 
void EffectResurrectPet ()
 
void EffectDestroyAllTotems ()
 
void EffectDurabilityDamage ()
 
void EffectSkill ()
 
void EffectTaunt ()
 
void EffectDurabilityDamagePCT ()
 
void EffectModifyThreatPercent ()
 
void EffectResurrectNew ()
 
void EffectAddExtraAttacks ()
 
void EffectSpiritHeal ()
 
void EffectSkinPlayerCorpse ()
 
void EffectStealBeneficialBuff ()
 
void EffectUnlearnSpecialization ()
 
void EffectHealPct ()
 
void EffectEnergizePct ()
 
void EffectTriggerRitualOfSummoning ()
 
void EffectSummonRaFFriend ()
 
void EffectUnlockGuildVaultTab ()
 
void EffectKillCreditPersonal ()
 
void EffectKillCredit ()
 
void EffectKillCreditLabel ()
 
void EffectQuestFail ()
 
void EffectQuestStart ()
 
void EffectRedirectThreat ()
 
void EffectGameObjectDamage ()
 
void EffectGameObjectRepair ()
 
void EffectGameObjectSetDestructionState ()
 
void EffectCreateTamedPet ()
 
void EffectDiscoverTaxi ()
 
void EffectTitanGrip ()
 
void EffectEnchantItemPrismatic ()
 
void EffectPlayMusic ()
 
void EffectActivateSpec ()
 
void EffectPlaySound ()
 
void EffectRemoveAura ()
 
void EffectDamageFromMaxHealthPCT ()
 
void EffectCastButtons ()
 
void EffectRechargeItem ()
 
void EffectGiveCurrency ()
 
void EffectSummonPersonalGameObject ()
 
void EffectResurrectWithAura ()
 
void EffectCreateAreaTrigger ()
 
void EffectRemoveTalent ()
 
void EffectDestroyItem ()
 
void EffectLearnGarrisonBuilding ()
 
void EffectRemoveAuraBySpellLabel ()
 
void EffectCreateGarrison ()
 
void EffectCreateConversation ()
 
void EffectCancelConversation ()
 
void EffectAddGarrisonFollower ()
 
void EffectActivateGarrisonBuilding ()
 
void EffectGrantBattlePetLevel ()
 
void EffectGiveExperience ()
 
void EffectGiveRestedExperience ()
 
void EffectHealBattlePetPct ()
 
void EffectEnableBattlePets ()
 
void EffectChangeBattlePetQuality ()
 
void EffectLaunchQuestChoice ()
 
void EffectUncageBattlePet ()
 
void EffectCreateHeirloomItem ()
 
void EffectUpgradeHeirloom ()
 
void EffectApplyEnchantIllusion ()
 
void EffectUpdatePlayerPhase ()
 
void EffectUpdateZoneAurasAndPhases ()
 
void EffectGiveArtifactPower ()
 
void EffectGiveArtifactPowerNoBonus ()
 
void EffectPlaySceneScriptPackage ()
 
void EffectCreateSceneObject ()
 
void EffectCreatePrivateSceneObject ()
 
void EffectPlayScene ()
 
void EffectGiveHonor ()
 
void EffectJumpCharge ()
 
void EffectLearnTransmogSet ()
 
void EffectRespecAzeriteEmpoweredItem ()
 
void EffectLearnAzeriteEssencePower ()
 
void EffectCreatePrivateConversation ()
 
void EffectApplyMountEquipment ()
 
void EffectSkipCampaign ()
 
void EffectSendChatMessage ()
 
void EffectGrantBattlePetExperience ()
 
void EffectLearnTransmogIllusion ()
 
void EffectModifyAuraStacks ()
 
void EffectModifyCooldown ()
 
void EffectModifyCooldowns ()
 
void EffectModifyCooldownsByCategory ()
 
void EffectModifySpellCharges ()
 
void EffectCreateTraitTreeConfig ()
 
void EffectChangeActiveCombatTraitConfig ()
 
void EffectTeleportGraveyard ()
 
void EffectUpdateInteractions ()
 
void EffectSkipQuestLine ()
 
void EffectLearnWarbandScene ()
 
void EffectSetPlayerDataElementAccount ()
 
void EffectSetPlayerDataElementCharacter ()
 
void EffectSetPlayerDataFlagAccount ()
 
void EffectSetPlayerDataFlagCharacter ()
 
void EffectEquipTransmogOutfit ()
 
 Spell (WorldObject *caster, SpellInfo const *info, TriggerCastFlags triggerFlags, ObjectGuid originalCasterGUID=ObjectGuid::Empty, ObjectGuid originalCastId=ObjectGuid::Empty)
 
 ~Spell ()
 
void InitExplicitTargets (SpellCastTargets const &targets)
 
void SelectExplicitTargets ()
 
void SelectSpellTargets ()
 
void SelectEffectImplicitTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, SpellTargetIndex targetIndex, uint32 effectMask)
 
void SelectImplicitChannelTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, uint32 effMask)
 
void SelectImplicitNearbyTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, SpellTargetIndex targetIndex, uint32 effMask)
 
void SelectImplicitConeTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, SpellTargetIndex targetIndex, uint32 effMask)
 
void SelectImplicitAreaTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, SpellTargetIndex targetIndex, uint32 effMask)
 
void SelectImplicitCasterDestTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, SpellTargetIndex targetIndex)
 
void SelectImplicitTargetDestTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, SpellTargetIndex targetIndex)
 
void SelectImplicitDestDestTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, SpellTargetIndex targetIndex)
 
void SelectImplicitCasterObjectTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, uint32 effMask)
 
void SelectImplicitTargetObjectTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, uint32 effMask)
 
void SelectImplicitChainTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, WorldObject *target, uint32 effMask)
 
void SelectImplicitTrajTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType)
 
void SelectImplicitLineTargets (SpellEffectInfo const &spellEffectInfo, SpellImplicitTargetInfo const &targetType, SpellTargetIndex targetIndex, uint32 effMask)
 
void SelectEffectTypeImplicitTargets (SpellEffectInfo const &spellEffectInfo)
 
WorldObject * SearchNearbyTarget (SpellEffectInfo const &spellEffectInfo, float range, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionContainer const *condList=nullptr)
 
void SearchAreaTargets (std::list< WorldObject * > &targets, SpellEffectInfo const &spellEffectInfo, SpellRange range, Position const *position, WorldObject *referer, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionContainer const *condList, Trinity::WorldObjectSpellAreaTargetSearchReason searchReason)
 
void SearchChainTargets (std::list< WorldObject * > &targets, uint32 chainTargets, WorldObject *target, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectType, SpellEffectInfo const &spellEffectInfo, bool isChainHeal)
 
GameObject * SearchSpellFocus ()
 
SpellCastResult prepare (SpellCastTargets const &targets, AuraEffect const *triggeredByAura=nullptr)
 
void cancel (SpellCastResult result=SPELL_FAILED_INTERRUPTED, Optional< SpellCastResult > resultOther={}, ObjectGuid const &failedBy=ObjectGuid::Empty)
 
void update (uint32 difftime)
 
void cast (bool skipCheck=false)
 
void finish (SpellCastResult result=SPELL_CAST_OK)
 
void TakePower ()
 
void RefundPower ()
 
void TakeRunePower (bool didHit)
 
void RefundRunePower ()
 
void TakeReagents ()
 
void TakeCastItem ()
 
SpellCastResult CheckCast (bool strict, int32 *param1=nullptr, int32 *param2=nullptr)
 
SpellCastResult CheckPetCast (Unit *target)
 
void handle_immediate ()
 
uint64 handle_delayed (uint64 t_offset)
 
void _handle_immediate_phase ()
 
void _handle_finish_phase ()
 
SpellCastResult CheckItems (int32 *param1, int32 *param2) const
 
SpellCastResult CheckRange (bool strict) const
 
SpellCastResult CheckPower () const
 
SpellCastResult CheckRuneCost () const
 
SpellCastResult CheckCasterAuras (int32 *param1) const
 
SpellCastResult CheckArenaAndRatedBattlegroundCastRules ()
 
SpellCastResult CheckMovement () const
 
bool CheckSpellCancelsAuraEffect (AuraType auraType, int32 *param1) const
 
bool CheckSpellCancelsCharm (int32 *param1) const
 
bool CheckSpellCancelsStun (int32 *param1) const
 
bool CheckSpellCancelsSilence (int32 *param1) const
 
bool CheckSpellCancelsPacify (int32 *param1) const
 
bool CheckSpellCancelsFear (int32 *param1) const
 
bool CheckSpellCancelsConfuse (int32 *param1) const
 
bool CheckSpellCancelsNoActions (int32 *param1) const
 
SpellEffectValue CalculateDamage (SpellEffectInfo const &spellEffectInfo, Unit const *target, float *var=nullptr) const
 
void Delayed ()
 
void DelayedChannel ()
 
SpellState getState () const
 
void setState (SpellState state)
 
void DoCreateItem (uint32 itemId, ItemContext context=ItemContext::NONE, std::vector< int32 > const *bonusListIDs=nullptr)
 
bool CheckEffectTarget (Unit const *target, SpellEffectInfo const &spellEffectInfo, Position const *losPosition) const
 
bool CheckEffectTarget (GameObject const *target, SpellEffectInfo const &spellEffectInfo) const
 
bool CheckEffectTarget (Item const *target, SpellEffectInfo const &spellEffectInfo) const
 
bool CanAutoCast (Unit *target)
 
void CheckSrc ()
 
void CheckDst ()
 
void SendCastResult (SpellCastResult result, int32 *param1=nullptr, int32 *param2=nullptr, ObjectGuid const &failedBy=ObjectGuid::Empty) const
 
void SendPetCastResult (SpellCastResult result, int32 *param1=nullptr, int32 *param2=nullptr) const
 
void SendMountResult (MountResult result)
 
void SendSpellStart ()
 
void SendSpellGo ()
 
void SendSpellCooldown ()
 
void SendSpellExecuteLog ()
 
SpellLogEffect & GetExecuteLogEffect (SpellEffects effect)
 
template<typename T >
std::vector< T > & GetExecuteLogEffectTargets (SpellEffects effect, Optional< std::vector< T > > SpellLogEffect::*member)
 
void ExecuteLogEffectTakeTargetPower (SpellEffects effect, Unit *target, Powers powerType, uint32 points, float amplitude)
 
void ExecuteLogEffectExtraAttacks (SpellEffects effect, Unit *victim, uint32 numAttacks)
 
void ExecuteLogEffectDurabilityDamage (SpellEffects effect, Unit *victim, int32 itemId, int32 amount)
 
void ExecuteLogEffectOpenLock (SpellEffects effect, Object *obj)
 
void ExecuteLogEffectCreateItem (SpellEffects effect, uint32 entry)
 
void ExecuteLogEffectDestroyItem (SpellEffects effect, uint32 entry)
 
void ExecuteLogEffectSummonObject (SpellEffects effect, WorldObject *obj)
 
void ExecuteLogEffectUnsummonObject (SpellEffects effect, WorldObject *obj)
 
void ExecuteLogEffectResurrect (SpellEffects effect, Unit *target)
 
void SendSpellInterruptLog (Unit *victim, uint32 spellId)
 
void SendInterrupted (SpellCastResult result, Optional< SpellCastResult > resultOther={}, ObjectGuid const &failedBy=ObjectGuid::Empty)
 
void SendChannelUpdate (uint32 time, Optional< SpellCastResult > result={}, ObjectGuid const &failedBy=ObjectGuid::Empty)
 
void SendChannelStart (uint32 duration)
 
void SendResurrectRequest (Player *target)
 
void HandleEffects (Unit *pUnitTarget, Item *pItemTarget, GameObject *pGoTarget, Corpse *pCorpseTarget, SpellEffectInfo const &spellEffectInfo, SpellEffectHandleMode mode)
 
void HandleThreatSpells ()
 
int32 GetCastTime () const
 
int32 GetRemainingCastTime () const
 
int32 GetChannelDuration () const
 
bool IsAutoRepeat () const
 
void SetAutoRepeat (bool rep)
 
void ReSetTimer ()
 
bool IsTriggered () const
 
bool IsIgnoringCooldowns () const
 
bool IsFocusDisabled () const
 
bool IsProcDisabled () const
 
bool IsChannelActive () const
 
bool IsAutoActionResetSpell () const
 
bool IsPositive () const
 
bool IsEmpowerSpell () const
 
void SetEmpowerReleasedByClient (bool release)
 
bool CanReleaseEmpowerSpell () const
 
bool IsTriggeredByAura (SpellInfo const *auraSpellInfo) const
 
int32 GetProcChainLength () const
 
bool IsDeletable () const
 
void SetReferencedFromCurrent (bool yes)
 
bool IsInterruptable () const
 
void SetExecutedCurrently (bool yes)
 
uint64 GetDelayStart () const
 
void SetDelayStart (uint64 m_time)
 
uint64 GetDelayMoment () const
 
uint64 CalculateDelayMomentForDst (float launchDelay) const
 
void RecalculateDelayMomentForDst ()
 
void UpdateDelayMomentForDst (uint64 hitDelay)
 
void UpdateDelayMomentForUnitTarget (Unit *unit, uint64 hitDelay)
 
uint8 GetRuneState () const
 
void SetRuneState (uint8 value)
 
bool IsNeedSendToClient () const
 
CurrentSpellTypes GetCurrentContainer () const
 
WorldObject * GetCaster () const
 
ObjectGuid GetOriginalCasterGUID () const
 
Unit * GetOriginalCaster () const
 
SpellInfo const * GetSpellInfo () const
 
Difficulty GetCastDifficulty () const
 
std::vector< SpellPowerCost > const & GetPowerCost () const
 
bool HasPowerTypeCost (Powers power) const
 
Optional< int32 > GetPowerTypeCostAmount (Powers power) const
 
bool UpdatePointers ()
 
void CleanupTargetList ()
 
void SetSpellValue (CastSpellExtraArgsInit::SpellValueOverride const &value)
 
SpellInfo const * GetTriggeredByAuraSpell () const
 
int32 GetTimer () const
 
int64 GetUnitTargetCountForEffect (SpellEffIndex effect) const
 
int64 GetGameObjectTargetCountForEffect (SpellEffIndex effect) const
 
int64 GetItemTargetCountForEffect (SpellEffIndex effect) const
 
int64 GetCorpseTargetCountForEffect (SpellEffIndex effect) const
 
std::string GetDebugInfo () const
 
Trinity::unique_weak_ptr< Spell > GetWeakPtr () const
 
void CallScriptOnResistAbsorbCalculateHandlers (DamageInfo const &damageInfo, uint32 &resistAmount, int32 &absorbAmount)
 
bool IsWithinLOS (WorldObject const *source, WorldObject const *target, bool targetAsSourceLocation, VMAP::ModelIgnoreFlags ignoreFlags) const
 
bool IsWithinLOS (WorldObject const *source, Position const &target, VMAP::ModelIgnoreFlags ignoreFlags) const
 
void MovePosition (Position &pos, WorldObject const *from, float dist, float angle) const
 
SpellRange GetMinMaxRange (bool strict) const
 
void CallScriptCalcCritChanceHandlers (Unit const *victim, float &chance)
 
void CallScriptCalcDamageHandlers (SpellEffectInfo const &spellEffectInfo, Unit *victim, int32 &damage, int32 &flatMod, float &pctMod)
 
void CallScriptCalcHealingHandlers (SpellEffectInfo const &spellEffectInfo, Unit *victim, int32 &healing, int32 &flatMod, float &pctMod)
 
template<class Script >
Script * GetScript () const
 

Static Public Member Functions

static uint32 GetSearcherTypeMask (SpellInfo const *spellInfo, SpellEffectInfo const &spellEffectInfo, SpellTargetObjectTypes objType, ConditionContainer const *condList)
 
template<class SEARCHER >
static void SearchTargets (SEARCHER &searcher, uint32 containerMask, WorldObject *referer, Position const *pos, float radius)
 
static void SendCastResult (Player const *caster, SpellInfo const *spellInfo, SpellCastVisual spellVisual, ObjectGuid cast_count, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, int32 *param1=nullptr, int32 *param2=nullptr)
 
static Spell const * ExtractSpellFromEvent (BasicEvent *event)
 
static bool CanIncreaseRangeByMovement (Unit const *unit)
 

Public Attributes

SpellInfo const *const m_spellInfo
 
Item * m_CastItem
 
ObjectGuid m_castItemGUID
 
uint32 m_castItemEntry
 
int32 m_castItemLevel
 
ObjectGuid m_castId
 
ObjectGuid m_originalCastId
 
bool m_fromClient
 
uint32 m_castFlagsEx
 
union { 
 
   uint32   TalentId 
 
   uint32   SpellId 
 
   uint32   SpecializationId 
 
   struct { 
 
      uint32   Id 
 
      uint32   AbilityId 
 
   }   GarrFollower 
 
   uint32   GarrMissionId 
 
   uint32   ItemId 
 
   struct { 
 
      uint32   EquipAction 
 
      uint32   TransmogOutfitId 
 
      uint32   SituationTrigger 
 
   }   EquipTransmogOutfit 
 
   struct { 
 
      uint32   Data [3] 
 
   }   Raw 
 
} m_misc 
 
std::any m_customArg
 
SpellCastVisual m_SpellVisual
 
SpellCastTargets m_targets
 
SpellCustomErrors m_customError
 
UsedSpellMods m_appliedMods
 
Scripting::v2::ActionResultSetter< SpellCastResult > m_scriptResult
 
bool m_scriptWaitsForSpellHit = false
 
Spell ** m_selfContainer
 

Protected Types

typedef std::vector< HitTriggerSpell > HitTriggerSpellList
 

Protected Member Functions

bool HasGlobalCooldown () const
 
void TriggerGlobalCooldown ()
 
void CancelGlobalCooldown ()
 
void _cast (bool skipCheck=false)
 
bool IsDelayableNoMore ()
 
int32 GetEffectValueAsInt () const
 
Unit * GetUnitCasterForEffectHandlers () const
 
void prepareDataForTriggerSystem ()
 
std::pair< ProcFlagsInit, ProcFlagsInit > FinalizeDataForTriggerSystem (bool positive) const
 
template<class Container >
void DoProcessTargetContainer (Container &targetContainer)
 
int32 GetUnitTargetIndexForEffect (ObjectGuid const &target, SpellEffIndex effect) const
 
void AddUnitTarget (Unit *target, uint32 effectMask, bool checkIfValid=true, bool implicit=true, Position const *losPosition=nullptr)
 
void AddGOTarget (GameObject *target, uint32 effectMask)
 
void AddItemTarget (Item *item, uint32 effectMask)
 
void AddCorpseTarget (Corpse *target, uint32 effectMask)
 
void AddDestTarget (SpellDestination const &dest, uint32 effIndex)
 
void PreprocessSpellLaunch (TargetInfo &targetInfo)
 
SpellMissInfo PreprocessSpellHit (Unit *unit, TargetInfo &targetInfo)
 
void DoSpellEffectHit (Unit *unit, SpellEffectInfo const &spellEffectInfo, TargetInfo &targetInfo)
 
void DoTriggersOnSpellHit (Unit *unit)
 
bool UpdateChanneledTargetList ()
 
bool IsValidDeadOrAliveTarget (Unit const *target) const
 
void HandleLaunchPhase ()
 
void DoEffectOnLaunchTarget (TargetInfo &targetInfo, float multiplier, SpellEffectInfo const &spellEffectInfo)
 
void ResetCombatTimers ()
 
void PrepareTargetProcessing ()
 
void FinishTargetProcessing ()
 
void LoadScripts ()
 
void CallScriptOnPrecastHandler ()
 
void CallScriptBeforeCastHandlers ()
 
void CallScriptOnCastHandlers ()
 
void CallScriptAfterCastHandlers ()
 
SpellCastResult CallScriptCheckCastHandlers ()
 
int32 CallScriptCalcCastTimeHandlers (int32 originalCastTime)
 
bool CallScriptEffectHandlers (SpellEffIndex effIndex, SpellEffectHandleMode mode)
 
void CallScriptSuccessfulDispel (SpellEffIndex effIndex)
 
void CallScriptBeforeHitHandlers (SpellMissInfo missInfo)
 
void CallScriptOnHitHandlers ()
 
void CallScriptAfterHitHandlers ()
 
void CallScriptObjectAreaTargetSelectHandlers (std::list< WorldObject * > &targets, SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
 
void CallScriptObjectTargetSelectHandlers (WorldObject *&target, SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
 
void CallScriptDestinationTargetSelectHandlers (SpellDestination &target, SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
 
void CallScriptEmpowerStageCompletedHandlers (int32 completedStagesCount)
 
void CallScriptEmpowerCompletedHandlers (int32 completedStagesCount)
 
bool CheckScriptEffectImplicitTargets (uint32 effIndex, uint32 effIndexToCheck)
 
SpellScript * GetScriptByType (std::type_info const &type) const
 
bool CanExecuteTriggersOnHit (Unit *unit, SpellInfo const *triggeredByAura=nullptr) const
 
void PrepareTriggersExecutedOnHit ()
 
void SummonGuardian (SpellEffectInfo const *effect, uint32 entry, SummonPropertiesEntry const *properties, uint32 numSummons, ObjectGuid privateObjectOwner)
 
void UpdateSpellCastDataTargets (WorldPackets::Spells::SpellCastData &data)
 Writes miss and hit targets for a SMSG_SPELL_GO packet.
 
int32 GetSpellCastDataAmmo ()
 
void UpdateSpellHealPrediction (WorldPackets::Spells::SpellHealPrediction &healPrediction, bool withPeriodic)
 
SpellCastResult CanOpenLock (SpellEffectInfo const &effect, uint32 lockid, SkillType &skillid, int32 &reqSkillValue, int32 &skillValue)
 
 Spell (Spell const &right)=delete
 
Spell & operator= (Spell const &right)=delete
 

Protected Attributes

WorldObject *const m_caster
 
SpellValue *const m_spellValue
 
ObjectGuid m_originalCasterGUID
 
Unit * m_originalCaster
 
SpellSchoolMask m_spellSchoolMask
 
WeaponAttackType m_attackType
 
std::vector< SpellPowerCost > m_powerCost
 
int32 m_casttime
 
int32 m_channelDuration
 
bool m_canReflect
 
bool m_autoRepeat
 
uint8 m_runesState
 
uint8 m_delayAtDamageCount
 
std::unique_ptr< EmpowerData > m_empower
 
uint64 m_delayStart
 
uint64 m_delayMoment
 
bool m_launchHandled
 
bool m_immediateHandled
 
bool m_referencedFromCurrentSpell
 
bool m_executedCurrently
 
uint32 m_applyMultiplierMask
 
float m_damageMultipliers [MAX_SPELL_EFFECTS]
 
Unit * unitTarget
 
Item * itemTarget
 
GameObject * gameObjTarget
 
Corpse * m_corpseTarget
 
WorldLocation * destTarget
 
SpellEffectValue effectValue
 
SpellMissInfo targetMissInfo
 
float variance
 
SpellEffectHandleMode effectHandleMode
 
SpellEffectInfo const * effectInfo
 
UnitAura * _spellAura
 
DynObjAura * _dynObjAura
 
ObjectGuid m_focusObjectGUID
 
GameObject * focusObject
 
int32 m_damage
 
int32 m_healing
 
ProcFlagsInit m_procAttacker
 
ProcFlagsInit m_procVictim
 
ProcFlagsHit m_hitMask
 
ProcFlagsSpellType m_procSpellType
 
std::vector< TargetInfo > m_UniqueTargetInfo
 
uint32 m_channelTargetEffectMask
 
std::vector< GOTargetInfo > m_UniqueGOTargetInfo
 
std::vector< ItemTargetInfo > m_UniqueItemInfo
 
std::vector< CorpseTargetInfo > m_UniqueCorpseTargetInfo
 
SpellDestination m_destTargets [MAX_SPELL_EFFECTS]
 
std::vector< SpellScript * > m_loadedScripts
 
HitTriggerSpellList m_hitTriggerSpells
 
SpellState m_spellState
 
int32 m_timer
 
SpellEvent * _spellEvent
 
TriggerCastFlags _triggeredCastFlags
 
SpellInfo const * m_triggeredByAuraSpell
 
int32 m_procChainLength
 
std::unique_ptr< PathGenerator > m_preGeneratedPath
 
std::vector< SpellLogEffect > _executeLogEffects
 

Friends

class SpellScript
 

Detailed Description

Definition at line 276 of file Spell.h.

Member Typedef Documentation

◆ HitTriggerSpellList

typedef std::vector<HitTriggerSpell> Spell::HitTriggerSpellList
protected

Definition at line 976 of file Spell.h.

◆ UsedSpellMods

typedef std::unordered_set<Aura*> Spell::UsedSpellMods

Definition at line 469 of file Spell.h.

Constructor & Destructor Documentation

◆ Spell() [1/2]

Spell::Spell ( WorldObject *  caster,
SpellInfo const *  info,
TriggerCastFlags  triggerFlags,
ObjectGuid  originalCasterGUID = ObjectGuid::Empty,
ObjectGuid  originalCastId = ObjectGuid::Empty 
)

Definition at line 473 of file Spell.cpp.

References _dynObjAura, _spellAura, _triggeredCastFlags, SpellValue::AuraStackAmount, Cast, CAST_FLAG_EX_DONT_CONSUME_CHARGES, CAST_FLAG_EX_IGNORE_COOLDOWN, CAST_FLAG_EX_SUPPRESS_CASTER_ANIM, SpellInfo::ChargeCategoryId, CLASSMASK_WAND_USERS, ObjectGuid::Clear(), destTarget, SpellInfo::DmgClass, Doses, effectHandleMode, effectInfo, effectValue, focusObject, gameObjTarget, Map::GenerateLowGuid(), SpellInfo::GetAttackType(), WorldObject::GetCastSpellXSpellVisualId(), BaseEntity::GetGUID(), WorldObject::GetMap(), WorldLocation::GetMapId(), Unit::GetProcChainLength(), SpellInfo::GetSchoolMask(), WorldObject::GetSpellModOwner(), ObjectAccessor::GetUnit(), SpellInfo::HasAttribute(), SpellInfo::Id, SpellInfo::IsAutoRepeatRangedSpell(), SpellInfo::IsEmpowerSpell(), ObjectGuid::IsEmpty(), IsIgnoringCooldowns(), BaseEntity::IsInWorld(), SpellInfo::IsPassive(), BaseEntity::IsUnit(), itemTarget, m_applyMultiplierMask, m_attackType, m_autoRepeat, m_canReflect, m_caster, m_castFlagsEx, m_castId, m_CastItem, m_castItemEntry, m_castItemGUID, m_castItemLevel, m_casttime, m_channelDuration, m_channelTargetEffectMask, m_corpseTarget, m_customError, m_damage, m_damageMultipliers, m_delayAtDamageCount, m_delayMoment, m_delayStart, m_destTargets, m_empower, m_executedCurrently, m_fromClient, m_healing, m_hitMask, m_immediateHandled, m_launchHandled, m_misc, m_originalCaster, m_originalCasterGUID, m_originalCastId, m_procChainLength, m_procSpellType, m_referencedFromCurrentSpell, m_runesState, m_selfContainer, m_spellInfo, m_spellSchoolMask, m_spellState, m_spellValue, m_SpellVisual, m_timer, m_triggeredByAuraSpell, SpellValue::MaxAffectedTargets, MaxTargets, PROC_HIT_NONE, PROC_SPELL_TYPE_NONE, RANGED_ATTACK, SPELL_ATTR0_IS_ABILITY, SPELL_ATTR0_NO_IMMUNITIES, SPELL_ATTR1_NO_REFLECTION, SPELL_ATTR2_DO_NOT_REPORT_SPELL_FAILURE, SPELL_ATTR4_ALLOW_CAST_WHILE_CASTING, SPELL_ATTR7_ALLOW_SPELL_REFLECTION, SPELL_CAST_SOURCE_NORMAL, SPELL_CUSTOM_ERROR_NONE, SPELL_DAMAGE_CLASS_MAGIC, SPELL_EFFECT_HANDLE_LAUNCH, SPELL_MISS_NONE, SPELL_STATE_NULL, SpellCastVisual::SpellXSpellVisualID, targetMissInfo, Object::ToPlayer(), Object::ToUnit(), TRIGGERED_DONT_REPORT_CAST_ERROR, TRIGGERED_IGNORE_CAST_IN_PROGRESS, TRIGGERED_SUPPRESS_CASTER_ANIM, unitTarget, and variance.

Referenced by Creature::HasSpellFocus(), and Creature::ReleaseSpellFocus().

◆ ~Spell()

◆ Spell() [2/2]

Spell::Spell ( Spell const &  right)
protecteddelete

Member Function Documentation

◆ _cast()

void Spell::_cast ( bool  skipCheck = false)
protected

Not own traded item (in trader trade slot) req. reagents including triggered spell case

Definition at line 3696 of file Spell.cpp.

References _triggeredCastFlags, ActionDelayed, CallScriptAfterCastHandlers(), CallScriptBeforeCastHandlers(), CallScriptOnCastHandlers(), cancel(), CastSpell, WorldObject::CastSpell(), SpellInfo::ChargeCategoryId, CHEAT_COOLDOWN, CheckCast(), DRTYPE_ALL, DRTYPE_PLAYER, FinalizeDataForTriggerSystem(), finish(), Player::GetCommandStatus(), ObjectAccessor::GetCreatureOrPetOrVehicle(), SpellInfo::GetDiminishingReturnsGroupForSpell(), SpellInfo::GetDiminishingReturnsGroupType(), SpellInfo::GetEffects(), Object::GetEntry(), BaseEntity::GetGUID(), SpellCastTargets::GetItemTarget(), SpellCastTargets::GetObjectTarget(), SpellCastTargets::GetObjectTargetGUID(), Unit::GetSpellHistory(), GetSpellInfo(), WorldObject::GetSpellModOwner(), SpellCastTargets::GetTargetMask(), Player::GetTradeData(), ObjectAccessor::GetUnit(), SpellCastTargets::GetUnitTarget(), handle_immediate(), HandleLaunchPhase(), SpellInfo::HasAttribute(), SpellInfo::Id, IsAutoActionResetSpell(), SpellInfo::IsChanneled(), ObjectGuid::IsEmpty(), IsPositive(), SpellInfo::LaunchDelay, m_caster, m_CastItem, m_delayMoment, m_hitMask, m_immediateHandled, m_launchHandled, m_originalCaster, m_procAttacker, m_scriptResult, m_scriptWaitsForSpellHit, m_spellInfo, m_spellState, m_targets, PrepareTriggersExecutedOnHit(), PROC_FLAG_2_CAST_SUCCESSFUL, PROC_FLAG_NONE, PROC_HIT_CRITICAL, PROC_HIT_NORMAL, PROC_SPELL_PHASE_CAST, PROC_SPELL_TYPE_MASK_ALL, Unit::ProcSkillsAndAuras(), Unit::RemoveAurasWithInterruptFlags(), ResetCombatTimers(), SpellHistory::ResetCooldown(), SpellHistory::RestoreCharge(), SelectSpellTargets(), SendCastResult(), SendInterrupted(), SendSpellCooldown(), SendSpellGo(), SetDelayStart(), SetExecutedCurrently(), Scripting::v2::ActionResultSetter< T >::SetResult(), Player::SetSpellModTakingSpell(), CastSpellExtraArgs::SetTriggeringSpell(), SPELL_ATTR12_START_COOLDOWN_ON_CAST_START, SPELL_ATTR1_DISMISS_PET_FIRST, SPELL_ATTR2_NOT_AN_ACTION, SPELL_ATTR7_RESET_SWING_TIMER_AT_SPELL_START, SPELL_ATTR9_ITEM_CAST_GRANTS_SKILL_GAIN, SPELL_CAST_OK, SPELL_DAMAGE_CLASS_NONE, SPELL_FAILED_AURA_BOUNCED, SPELL_FAILED_DONT_REPORT, SPELL_FAILED_INTERRUPTED, SPELL_LINK_CAST, SPELL_STATE_FINISHED, SPELL_STATE_LAUNCHED, sScriptMgr, sSpellMgr, TakeCastItem(), TakePower(), TakeReagents(), TARGET_FLAG_TRADE_ITEM, Object::ToCreature(), Object::ToPlayer(), Object::ToUnit(), TRIGGERED_FULL_MASK, TRIGGERED_IGNORE_CAST_IN_PROGRESS, TRIGGERED_IGNORE_CAST_ITEM, TRIGGERED_IGNORE_POWER_COST, TRIGGERED_IGNORE_REAGENT_COST, UNIT_FLAG_POSSESSED, UNIT_STATE_CASTING, UpdatePointers(), SpellCastTargets::UpdateTradeSlotItem(), and UseItem.

Referenced by cast().

◆ _handle_finish_phase()

◆ _handle_immediate_phase()

void Spell::_handle_immediate_phase ( )

◆ AddCorpseTarget()

◆ AddDestTarget()

void Spell::AddDestTarget ( SpellDestination const &  dest,
uint32  effIndex 
)
protected

Definition at line 2690 of file Spell.cpp.

References m_destTargets.

Referenced by SelectSpellTargets().

◆ AddGOTarget()

◆ AddItemTarget()

◆ AddUnitTarget()

void Spell::AddUnitTarget ( Unit *  target,
uint32  effectMask,
bool  checkIfValid = true,
bool  implicit = true,
Position const *  losPosition = nullptr 
)
protected
Todo:
this is a hack

Definition at line 2438 of file Spell.cpp.

References EventProcessor::AddEvent(), ASSERT_NOTNULL, EventProcessor::CalculateTime(), CheckEffectTarget(), SpellInfo::CheckTarget(), Spell::TargetInfo::Damage, Spell::TargetInfoBase::EffectMask, Unit::GetAuraEffectsByType(), WorldObject::GetDistance(), SpellInfo::GetEffects(), BaseEntity::GetGUID(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), ObjectAccessor::GetWorldObject(), SpellInfo::HasAttribute(), Unit::HasAuraType(), Spell::TargetInfo::Healing, Unit::IsAlive(), Spell::TargetInfo::IsAlive, Spell::TargetInfo::IsCrit, WorldObject::IsFriendlyTo(), Unit::IsImmunedToSpellEffect(), IsPositive(), SpellInfo::LaunchDelay, m_canReflect, m_caster, m_delayMoment, WorldObject::m_Events, m_originalCaster, m_originalCasterGUID, m_spellInfo, m_UniqueTargetInfo, SpellInfo::MinDuration, Spell::TargetInfo::MissCondition, Spell::TargetInfo::ReflectingSpellId, Spell::TargetInfo::ReflectResult, SpellInfo::Speed, SPELL_ATTR4_BOUNCY_CHAIN_MISSILES, SPELL_ATTR9_MISSILE_SPEED_IS_DELAY_IN_SEC, SPELL_AURA_REFLECT_SPELLS, SPELL_CAST_OK, SPELL_FAILED_TARGET_AURASTATE, SPELL_MISS_IMMUNE, SPELL_MISS_MISS, SPELL_MISS_NONE, SPELL_MISS_REFLECT, WorldObject::SpellHitResult(), Spell::TargetInfo::TargetGUID, Spell::TargetInfo::TimeDelay, and Object::ToUnit().

Referenced by SelectEffectTypeImplicitTargets(), SelectImplicitAreaTargets(), SelectImplicitCasterObjectTargets(), SelectImplicitChainTargets(), SelectImplicitChannelTargets(), SelectImplicitConeTargets(), SelectImplicitLineTargets(), SelectImplicitNearbyTargets(), and SelectImplicitTargetObjectTargets().

◆ CalculateDamage()

SpellEffectValue Spell::CalculateDamage ( SpellEffectInfo const &  spellEffectInfo,
Unit const *  target,
float *  var = nullptr 
) const

◆ CalculateDelayMomentForDst()

◆ CallScriptAfterCastHandlers()

void Spell::CallScriptAfterCastHandlers ( )
protected

Definition at line 8822 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_AFTER_CAST.

Referenced by _cast().

◆ CallScriptAfterHitHandlers()

◆ CallScriptBeforeCastHandlers()

void Spell::CallScriptBeforeCastHandlers ( )
protected

Definition at line 8798 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_BEFORE_CAST.

Referenced by _cast().

◆ CallScriptBeforeHitHandlers()

◆ CallScriptCalcCastTimeHandlers()

int32 Spell::CallScriptCalcCastTimeHandlers ( int32  originalCastTime)
protected

Definition at line 8852 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_CALC_CAST_TIME.

Referenced by prepare().

◆ CallScriptCalcCritChanceHandlers()

void Spell::CallScriptCalcCritChanceHandlers ( Unit const *  victim,
float &  chance 
)

Definition at line 8958 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_CALC_CRIT_CHANCE.

Referenced by Unit::SpellCritChanceTaken().

◆ CallScriptCalcDamageHandlers()

void Spell::CallScriptCalcDamageHandlers ( SpellEffectInfo const &  spellEffectInfo,
Unit *  victim,
int32 &  damage,
int32 &  flatMod,
float &  pctMod 
)

◆ CallScriptCalcHealingHandlers()

void Spell::CallScriptCalcHealingHandlers ( SpellEffectInfo const &  spellEffectInfo,
Unit *  victim,
int32 &  healing,
int32 &  flatMod,
float &  pctMod 
)

Definition at line 8982 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_CALC_HEALING.

Referenced by Unit::SpellHealingBonusDone().

◆ CallScriptCheckCastHandlers()

SpellCastResult Spell::CallScriptCheckCastHandlers ( )
protected

Definition at line 8834 of file Spell.cpp.

References m_loadedScripts, SPELL_CAST_OK, and SPELL_SCRIPT_HOOK_CHECK_CAST.

Referenced by CheckCast().

◆ CallScriptDestinationTargetSelectHandlers()

◆ CallScriptEffectHandlers()

◆ CallScriptEmpowerCompletedHandlers()

void Spell::CallScriptEmpowerCompletedHandlers ( int32  completedStagesCount)
protected

Definition at line 9057 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_EMPOWER_COMPLETED.

Referenced by update().

◆ CallScriptEmpowerStageCompletedHandlers()

void Spell::CallScriptEmpowerStageCompletedHandlers ( int32  completedStagesCount)
protected

Definition at line 9045 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_EMPOWER_STAGE_COMPLETED.

Referenced by update().

◆ CallScriptObjectAreaTargetSelectHandlers()

void Spell::CallScriptObjectAreaTargetSelectHandlers ( std::list< WorldObject * > &  targets,
SpellEffIndex  effIndex,
SpellImplicitTargetInfo const &  targetType 
)
protected

◆ CallScriptObjectTargetSelectHandlers()

◆ CallScriptOnCastHandlers()

void Spell::CallScriptOnCastHandlers ( )
protected

Definition at line 8810 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_ON_CAST.

Referenced by _cast().

◆ CallScriptOnHitHandlers()

◆ CallScriptOnPrecastHandler()

void Spell::CallScriptOnPrecastHandler ( )
protected

Definition at line 8788 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_ON_PRECAST.

Referenced by prepare().

◆ CallScriptOnResistAbsorbCalculateHandlers()

void Spell::CallScriptOnResistAbsorbCalculateHandlers ( DamageInfo const &  damageInfo,
uint32 &  resistAmount,
int32 &  absorbAmount 
)

Definition at line 9033 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_ON_RESIST_ABSORB_CALCULATION.

Referenced by Unit::CalcAbsorbResist().

◆ CallScriptSuccessfulDispel()

void Spell::CallScriptSuccessfulDispel ( SpellEffIndex  effIndex)
protected

Definition at line 8909 of file Spell.cpp.

References m_loadedScripts, and SPELL_SCRIPT_HOOK_EFFECT_SUCCESSFUL_DISPEL.

Referenced by EffectDispel(), and EffectDispelMechanic().

◆ CanAutoCast()

◆ cancel()

◆ CancelGlobalCooldown()

◆ CanExecuteTriggersOnHit()

bool Spell::CanExecuteTriggersOnHit ( Unit *  unit,
SpellInfo const *  triggeredByAura = nullptr 
) const
protected

◆ CanIncreaseRangeByMovement()

bool Spell::CanIncreaseRangeByMovement ( Unit const *  unit)
static

◆ CanOpenLock()

◆ CanReleaseEmpowerSpell()

bool Spell::CanReleaseEmpowerSpell ( ) const

Definition at line 8334 of file Spell.cpp.

References m_channelDuration, m_empower, and m_timer.

Referenced by update().

◆ cast()

void Spell::cast ( bool  skipCheck = false)

◆ CheckArenaAndRatedBattlegroundCastRules()

◆ CheckCast()

SpellCastResult Spell::CheckCast ( bool  strict,
int32 *  param1 = nullptr,
int32 *  param2 = nullptr 
)
Todo:
determine if there is some flag to enable/disable the check

Definition at line 5745 of file Spell.cpp.

References _triggeredCastFlags, PetStable::ActivePets, ArtifactEntry::ArtifactCategoryID, ARTIFACTS_ALL_WEAPONS_GENERAL_WEAPON_EQUIPPED_PASSIVE, AsUnderlyingType(), CalculateDamage(), CallScriptCheckCastHandlers(), SpellInfo::CanBeUsedInCombat(), Battlefield::CanFlyIn(), CanOpenLock(), Player::CanTameExoticPets(), CantBattle, CantControlExotic, Player::CanUseBattlegroundObject(), SpellInfo::CasterAuraSpell, SpellInfo::CasterAuraState, SpellInfo::CasterAuraType, WorldObject::CastSpell(), SpellInfo::CategoryId, CheckArenaAndRatedBattlegroundCastRules(), CheckCasterAuras(), SpellInfo::CheckExplicitTarget(), CheckItems(), SpellInfo::CheckLocation(), CheckPower(), CheckRange(), SpellInfo::CheckShapeshift(), SpellInfo::CheckTarget(), SpellInfo::CheckVehicle(), ChrSpecializationEntry::ClassID, CONDITION_SOURCE_TYPE_SPELL, Condition::ConditionTarget, advstd::ranges::contains, SummonPropertiesEntry::Control, VMAP::VMapFactory::createOrGetVMapManager(), Dead, DIFFICULTY_NONE, SpellInfo::DmgClass, SpellValue::EffectBasePoints, Condition::ErrorTextId, Condition::ErrorType, SpellInfo::ExcludeCasterAuraSpell, SpellInfo::ExcludeCasterAuraState, SpellInfo::ExcludeCasterAuraType, ObjectAccessor::FindPlayer(), focusObject, GAMEOBJECT_TYPE_TRAP, WorldSession::GetAccountId(), Player::GetActiveTalentGroup(), ItemTemplate::GetArtifactID(), Unit::getAttackers(), Unit::GetAura(), ItemTemplate::GetBaseItemLevel(), Player::GetBattleground(), WorldSession::GetBattlePetMgr(), Aura::GetCastItemGUID(), Unit::GetCharmedGUID(), Unit::GetCharmerGUID(), Unit::GetCharmInfo(), Unit::GetClass(), WorldSession::GetCollectionMgr(), Unit::GetCombatReach(), CreatureTemplate::GetDifficulty(), SpellCastTargets::GetDstPos(), Unit::GetDynObject(), SpellInfo::GetEffects(), Player::GetGlyphs(), GameObject::GetGOInfo(), SpellCastTargets::GetGOTarget(), BaseEntity::GetGUID(), Player::GetGuild(), Player::GetItemByGuid(), SpellCastTargets::GetItemTarget(), SpellCastTargets::GetItemTargetGUID(), Unit::GetLevel(), Pet::GetLoadPetInfo(), ItemTemplate::GetLockID(), Creature::GetLootForPlayer(), WorldObject::GetMap(), WorldLocation::GetMapId(), SpellInfo::GetMaxRange(), GameObjectTemplate::GetNoDamageImmune(), SpellCastTargets::GetObjectTarget(), Pet::GetOwner(), Player::GetPet(), BattlePets::BattlePetMgr::GetPet(), Unit::GetPetGUID(), Player::GetPetStable(), Pet::getPetType(), Position::GetPosition(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::GetPowerType(), Player::GetPrimarySpecialization(), WorldSession::GetRecruiterId(), Player::GetSelectedPlayer(), Player::GetSession(), TradeData::GetSpell(), Unit::GetSpellHistory(), GetSpellInfo(), Player::GetSummonedBattlePetGUID(), Unit::GetTarget(), SpellCastTargets::GetTargetMask(), Item::GetTemplate(), Player::GetTradeData(), BaseEntity::GetTypeId(), SpellCastTargets::GetUnitTarget(), WorldObject::GetZoneAndAreaId(), WorldObject::GetZoneId(), GlyphPropertiesEntry::GlyphExclusiveCategoryID, GRANT_PET_LEVEL_FAIL, SpellInfo::HasAttribute(), SpellInfo::HasAura(), Unit::HasAura(), Unit::HasAuraTypeWithMiscvalue(), SpellHistory::HasCooldown(), SpellHistory::HasCooldownOnHold(), SpellCastTargets::HasDst(), SpellInfo::HasEffect(), HasGlobalCooldown(), CollectionMgr::HasHeirloom(), BattlePets::BattlePetMgr::HasJournalLock(), Player::HasSpell(), Player::HasSummonPending(), Unit::HasUnitFlag(), Unit::HasUnitFlag2(), Unit::HasUnitState(), Pet::HaveInDiet(), HUNTER_PET, SpellInfo::Id, Player::InBattleground(), Unit::IsAlive(), Unit::isAttackReady(), IsAutoRepeat(), Map::IsBattleground(), SpellInfo::IsCooldownStartedOnEvent(), BaseEntity::IsCreature(), ObjectGuid::IsEmpty(), WorldObject::IsFriendlyTo(), Player::IsGameMaster(), IsIgnoringCooldowns(), Unit::IsInCombat(), Unit::IsInDisallowedMountForm(), Unit::IsInFlight(), Player::IsInSameRaidWith(), Unit::IsInWater(), VMAP::VMapManager::isLineOfSightCalcEnabled(), Item::IsLocked(), Loot::isLooted(), Unit::IsMounted(), SpellInfo::IsNextMeleeSwingSpell(), WorldObject::IsOutdoors(), SpellInfo::IsPassive(), ChrSpecializationEntry::IsPetSpecialization(), BaseEntity::IsPlayer(), SpellHistory::IsReady(), CreatureTemplate::IsTameable(), SpellInfo::IsTargetingArea(), IsTriggered(), BaseEntity::IsUnit(), IsWithinLOS(), LOOT_SKINNING, Loot::loot_type, VMAP::M2, m_caster, m_CastItem, m_castItemEntry, m_castItemLevel, m_customError, m_focusObjectGUID, m_misc, m_originalCaster, M_PI, m_preGeneratedPath, m_spellInfo, m_spellValue, m_targets, m_triggeredByAuraSpell, BattlePets::MAX_BATTLE_PET_LEVEL, BattlePetBreedQualityEntry::MaxQualityRoll, ConditionSourceInfo::mLastFailedCondition, SpellInfo::NeedsExplicitUnitTarget(), None, NoPetAvailable, VMAP::Nothing, PATHFIND_INCOMPLETE, PATHFIND_NOPATH, PATHFIND_SHORT, PET_SUMMONING_DISORIENTATION, BattlePets::Poor, POWER_MANA, RANGED_ATTACK, SpellInfo::RequiresSpellFocus, sArtifactStore, sBattlefieldMgr, sBattlePetBreedQualityStore, sBattlePetSpeciesStore, sChrClassesStore, sChrSpecializationStore, sConditionMgr, sDB2Manager, SearchSpellFocus(), SendMountResult(), Player::SendTameFailure(), CastSpellExtraArgs::SetTriggeringSpell(), sGlyphPropertiesStore, Shapeshifted, sInstanceLockMgr, SKILL_NONE, sObjectMgr, SPELL_ATTR0_ALLOW_CAST_WHILE_DEAD, SPELL_ATTR0_ALLOW_WHILE_MOUNTED, SPELL_ATTR0_COOLDOWN_ON_EVENT, SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET, SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER, SPELL_ATTR0_ONLY_INDOORS, SPELL_ATTR0_ONLY_OUTDOORS, SPELL_ATTR0_ONLY_STEALTHED, SPELL_ATTR0_USES_RANGED_SLOT, SPELL_ATTR12_IGNORE_CASTING_DISABLED, SPELL_ATTR12_START_COOLDOWN_ON_CAST_START, SPELL_ATTR1_DISMISS_PET_FIRST, SPELL_ATTR1_INITIATES_COMBAT_ENABLES_AUTO_ATTACK, SPELL_ATTR2_ENCHANT_OWN_ITEM_ONLY, SPELL_ATTR2_IGNORE_LINE_OF_SIGHT, SPELL_ATTR2_INITIATE_COMBAT_POST_CAST_ENABLES_AUTO_ATTACK, SPELL_ATTR2_NO_ACTIVE_PETS, SPELL_ATTR3_ONLY_BATTLEGROUNDS, SPELL_ATTR4_AURA_BOUNCE_FAILS_SPELL, SPELL_ATTR4_AURA_NEVER_BOUNCES, SPELL_ATTR5_NOT_AVAILABLE_WHILE_CHARMED, SPELL_ATTR7_DEBUG_SPELL, SPELL_ATTR8_ONLY_PLAYERS_CAN_CAST_THIS_SPELL, SPELL_ATTR9_ONLY_WHEN_ILLEGALLY_MOUNTED, SPELL_AURA_AOE_CHARM, SPELL_AURA_DISABLE_ATTACKING_EXCEPT_ABILITIES, SPELL_AURA_DISABLE_CASTING_EXCEPT_ABILITIES, SPELL_AURA_FLY, SPELL_AURA_INTERFERE_ALL_TARGETING, SPELL_AURA_INTERFERE_ENEMY_TARGETING, SPELL_AURA_MOD_CHARM, SPELL_AURA_MOD_IGNORE_SHAPESHIFT, SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED, SPELL_AURA_MOD_POSSESS, SPELL_AURA_MOD_POSSESS_PET, SPELL_AURA_MOUNTED, SPELL_AURA_PERIODIC_MANA_LEECH, SPELL_AURA_PROVIDE_SPELL_FOCUS, SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS, SPELL_CAST_OK, SPELL_CUSTOM_ERROR_GM_ONLY, SPELL_DAMAGE_CLASS_MELEE, SPELL_EFFECT_APPLY_GLYPH, SPELL_EFFECT_ATTACK, SPELL_EFFECT_CHANGE_BATTLEPET_QUALITY, SPELL_EFFECT_CHARGE, SPELL_EFFECT_CREATE_HEIRLOOM_ITEM, SPELL_EFFECT_CREATE_TAMED_PET, SPELL_EFFECT_DISMISS_PET, SPELL_EFFECT_DUMMY, SPELL_EFFECT_FEED_PET, SPELL_EFFECT_GIVE_ARTIFACT_POWER, SPELL_EFFECT_GIVE_ARTIFACT_POWER_NO_BONUS, SPELL_EFFECT_GRANT_BATTLEPET_EXPERIENCE, SPELL_EFFECT_GRANT_BATTLEPET_LEVEL, SPELL_EFFECT_JUMP, SPELL_EFFECT_JUMP_DEST, SPELL_EFFECT_LEAP, SPELL_EFFECT_LEAP_BACK, SPELL_EFFECT_LEARN_PET_SPELL, SPELL_EFFECT_LEARN_SPELL, SPELL_EFFECT_NORMALIZED_WEAPON_DMG, SPELL_EFFECT_OPEN_LOCK, SPELL_EFFECT_REMOVE_TALENT, SPELL_EFFECT_RESURRECT_PET, SPELL_EFFECT_SKINNING, SPELL_EFFECT_STEAL_BENEFICIAL_BUFF, SPELL_EFFECT_SUMMON, SPELL_EFFECT_SUMMON_PET, SPELL_EFFECT_SUMMON_PLAYER, SPELL_EFFECT_SUMMON_RAF_FRIEND, SPELL_EFFECT_TALENT_SPEC_SELECT, SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER, SPELL_EFFECT_UNLOCK_GUILD_VAULT_TAB, SPELL_EFFECT_WEAPON_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE, SPELL_FAILED_AFFECTING_COMBAT, SPELL_FAILED_ALREADY_HAVE_CHARM, SPELL_FAILED_ALREADY_HAVE_PET, SPELL_FAILED_ALREADY_HAVE_SUMMON, SPELL_FAILED_AURA_BOUNCED, SPELL_FAILED_BAD_IMPLICIT_TARGETS, SPELL_FAILED_BAD_TARGETS, SPELL_FAILED_CANT_BE_CHARMED, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW, SPELL_FAILED_CANT_UNTALENT, SPELL_FAILED_CANT_UPGRADE_BATTLE_PET, SPELL_FAILED_CASTER_AURASTATE, SPELL_FAILED_CASTER_DEAD, SPELL_FAILED_CHARMED, SPELL_FAILED_CUSTOM_ERROR, SPELL_FAILED_DONT_REPORT, SPELL_FAILED_FOOD_LOWLEVEL, SPELL_FAILED_GLYPH_EXCLUSIVE_CATEGORY, SPELL_FAILED_GLYPH_INVALID_SPEC, SPELL_FAILED_GLYPH_NO_SPEC, SPELL_FAILED_HIGHLEVEL, SPELL_FAILED_INVALID_GLYPH, SPELL_FAILED_ITEM_ALREADY_ENCHANTED, SPELL_FAILED_ITEM_ENCHANT_TRADE_WINDOW, SPELL_FAILED_LINE_OF_SIGHT, SPELL_FAILED_LOWLEVEL, SPELL_FAILED_NO_ARTIFACT_EQUIPPED, SPELL_FAILED_NO_PET, SPELL_FAILED_NO_SPEC, SPELL_FAILED_NOPATH, SPELL_FAILED_NOT_BEHIND, SPELL_FAILED_NOT_HERE, SPELL_FAILED_NOT_IN_BATTLEGROUND, SPELL_FAILED_NOT_INFRONT, SPELL_FAILED_NOT_KNOWN, SPELL_FAILED_NOT_MOUNTED, SPELL_FAILED_NOT_ON_TAXI, SPELL_FAILED_NOT_READY, SPELL_FAILED_NOT_TRADING, SPELL_FAILED_ONLY_ABOVEWATER, SPELL_FAILED_ONLY_BATTLEGROUNDS, SPELL_FAILED_ONLY_INDOORS, SPELL_FAILED_ONLY_MOUNTED, SPELL_FAILED_ONLY_OUTDOORS, SPELL_FAILED_ONLY_STEALTHED, SPELL_FAILED_REQUIRES_SPELL_FOCUS, SPELL_FAILED_ROOTED, SPELL_FAILED_SUMMON_PENDING, SPELL_FAILED_TARGET_FRIENDLY, SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED, SPELL_FAILED_TARGET_LOCKED_TO_RAID_INSTANCE, SPELL_FAILED_TARGET_NOT_LOOTED, SPELL_FAILED_TARGET_NOT_PLAYER, SPELL_FAILED_TARGET_UNSKINNABLE, SPELL_FAILED_TARGETS_DEAD, SPELL_FAILED_TRY_AGAIN, SPELL_FAILED_UNIQUE_GLYPH, SPELL_FAILED_VISION_OBSCURED, SPELL_FAILED_WRONG_ARTIFACT_EQUIPPED, SPELL_FAILED_WRONG_BATTLE_PET_TYPE, SPELL_FAILED_WRONG_PET_FOOD, SpellInfo::SpellFamilyFlags, TalentEntry::SpellID, SpellInfo::SpellLevel, sSpellMgr, sSummonPropertiesStore, sTalentStore, STATUS_IN_PROGRESS, STATUS_WAIT_LEAVE, SUMMON_CATEGORY_PET, SUMMON_CATEGORY_PUPPET, TARGET_FLAG_ITEM, TARGET_FLAG_TRADE_ITEM, TARGET_GAMEOBJECT_ITEM_TARGET, TARGET_GAMEOBJECT_TARGET, TARGET_UNIT_PET, Object::ToCreature(), Object::ToGameObject(), Map::ToInstanceMap(), Unit::ToPet(), Object::ToPlayer(), Object::ToUnit(), TRADE_SLOT_NONTRADED, ObjectGuid::TradeItem, TRANSFER_ABORT_NONE, TRIGGERED_FULL_MASK, TRIGGERED_IGNORE_CASTER_AURAS, TRIGGERED_IGNORE_CASTER_AURASTATE, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE, TRIGGERED_IGNORE_GCD, TRIGGERED_IGNORE_POWER_COST, TRIGGERED_IGNORE_SHAPESHIFT, GameObjectTemplate::type, TYPEID_GAMEOBJECT, TYPEID_PLAYER, TYPEID_UNIT, UNIT_FLAG2_ALLOW_CHEAT_SPELLS, UNIT_FLAG_IMMUNE, UNIT_FLAG_SKINNABLE, and UNIT_STATE_ROOT.

Referenced by _cast(), CheckPetCast(), WorldSession::HandleAcceptTradeOpcode(), and prepare().

◆ CheckCasterAuras()

◆ CheckDst()

void Spell::CheckDst ( )

◆ CheckEffectTarget() [1/3]

◆ CheckEffectTarget() [2/3]

bool Spell::CheckEffectTarget ( Item const *  target,
SpellEffectInfo const &  spellEffectInfo 
) const

Definition at line 8282 of file Spell.cpp.

◆ CheckEffectTarget() [3/3]

◆ CheckItems()

SpellCastResult Spell::CheckItems ( int32 *  param1,
int32 *  param2 
) const
Todo:
Needs review

Definition at line 7436 of file Spell.cpp.

References _triggeredCastFlags, BASE_ATTACK, SpellEffectInfo::CalcValueAsInt(), Player::CanNoReagentCast(), Player::CanStoreNewItem(), WorldObject::CastSpell(), SpellItemEnchantmentEntry::Effect, EFFECT_1, EQUIP_ERR_INV_FULL, EQUIP_ERR_OK, SpellInfo::EquippedItemClass, ItemTemplate::GetClass(), Item::GetCount(), Item::GetDisenchantSkillRequired(), SpellInfo::GetEffect(), Item::GetEffects(), SpellInfo::GetEffects(), Item::GetEnchantmentId(), Object::GetEntry(), SpellItemEnchantmentEntry::GetFlags(), Player::GetFreeInventorySlotCount(), BaseEntity::GetGUID(), Player::GetItemByEntry(), Item::GetItemLevel(), ItemTemplate::GetItemLimitCategory(), SpellCastTargets::GetItemTarget(), SpellCastTargets::GetItemTargetEntry(), SpellCastTargets::GetItemTargetGUID(), Unit::GetMaxPower(), ItemTemplate::GetMaxStackSize(), Item::GetOwner(), Item::GetOwnerGUID(), Unit::GetPower(), Item::GetRequiredLevel(), ItemTemplate::GetRequiredSkillRank(), AzeriteEmpoweredItem::GetRespecCost(), AzeriteEmpoweredItem::GetSelectedAzeritePower(), Player::GetSkillValue(), Item::GetSocketColor(), Item::GetSpellCharges(), ItemTemplate::GetSubClass(), Item::GetTemplate(), BaseEntity::GetTypeId(), SpellCastTargets::GetUnitTarget(), Player::GetWeaponForAttack(), SpellInfo::HasAttribute(), Player::HasCurrency(), Player::HasEnoughMoney(), ItemTemplate::HasFlag(), Player::HasItemCount(), Player::HasItemFitToSpellRequirements(), Player::HasItemTotemCategory(), LootStore::HaveLootFor(), Inventory, Item::IsBroken(), ObjectGuid::IsEmpty(), Item::IsFitToSpellRequirements(), Unit::IsFullHealth(), IsTriggered(), Item::IsVellum(), ITEM_CLASS_CONSUMABLE, ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET, ITEM_ENCHANTMENT_TYPE_USE_SPELL, ITEM_FLAG_IS_MILLABLE, ITEM_FLAG_IS_PROSPECTABLE, ITEM_FLAG_NO_REAGENT_COST, ITEM_SPELLTRIGGER_ON_USE, ITEM_SUBCLASS_WEAPON_BOW, ITEM_SUBCLASS_WEAPON_CROSSBOW, ITEM_SUBCLASS_WEAPON_GUN, ITEM_SUBCLASS_WEAPON_THROWN, ITEM_SUBCLASS_WEAPON_WAND, LootTemplates_Milling, LootTemplates_Prospecting, m_attackType, m_caster, m_CastItem, m_castItemGUID, m_spellInfo, m_targets, MAX_AZERITE_EMPOWERED_TIER, MAX_ITEM_ENCHANTMENT_EFFECTS, MAX_ITEM_PROTO_SOCKETS, MAX_POWERS, MAX_SPELL_REAGENTS, SpellInfo::MaxLevel, NULL_BAG, NULL_SLOT, OFF_ATTACK, PRISMATIC_ENCHANTMENT_SLOT, RANGED_ATTACK, SpellInfo::Reagent, SpellInfo::ReagentCount, SpellInfo::ReagentsCurrency, Player::SendEquipError(), SKILL_ENCHANTING, SKILL_INSCRIPTION, SKILL_JEWELCRAFTING, sObjectMgr, Soulbound, SPELL_ATTR2_ALLOW_LOW_LEVEL_BUFF, SPELL_ATTR3_REQUIRES_MAIN_HAND_WEAPON, SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON, SPELL_ATTR9_IGNORE_TOTEM_REQUIREMENTS_FOR_CASTING, SPELL_CAST_OK, SPELL_EFFECT_CREATE_ITEM, SPELL_EFFECT_CREATE_LOOT, SPELL_EFFECT_DISENCHANT, SPELL_EFFECT_ENCHANT_HELD_ITEM, SPELL_EFFECT_ENCHANT_ITEM, SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC, SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY, SPELL_EFFECT_ENERGIZE, SPELL_EFFECT_HEAL, SPELL_EFFECT_MILLING, SPELL_EFFECT_PROSPECTING, SPELL_EFFECT_RECHARGE_ITEM, SPELL_EFFECT_RESPEC_AZERITE_EMPOWERED_ITEM, SPELL_EFFECT_WEAPON_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, SPELL_FAILED_ALREADY_AT_FULL_HEALTH, SPELL_FAILED_ALREADY_AT_FULL_POWER, SPELL_FAILED_AZERITE_EMPOWERED_NO_CHOICES_TO_UNDO, SPELL_FAILED_AZERITE_EMPOWERED_ONLY, SPELL_FAILED_CANT_BE_MILLED, SPELL_FAILED_CANT_BE_PROSPECTED, SPELL_FAILED_CANT_BE_SALVAGED, SPELL_FAILED_CANT_BE_SALVAGED_SKILL, SPELL_FAILED_DONT_REPORT, SPELL_FAILED_EQUIPPED_ITEM, SPELL_FAILED_EQUIPPED_ITEM_CLASS, SPELL_FAILED_ERROR, SPELL_FAILED_HIGHLEVEL, SPELL_FAILED_ITEM_AT_MAX_CHARGES, SPELL_FAILED_ITEM_GONE, SPELL_FAILED_ITEM_NOT_FOUND, SPELL_FAILED_ITEM_NOT_READY, SPELL_FAILED_LOW_CASTLEVEL, SPELL_FAILED_LOWLEVEL, SPELL_FAILED_MAX_SOCKETS, SPELL_FAILED_NEED_MORE_ITEMS, SPELL_FAILED_NO_AMMO, SPELL_FAILED_NO_CHARGES_REMAIN, SPELL_FAILED_NOT_TRADEABLE, SPELL_FAILED_ON_USE_ENCHANT, SPELL_FAILED_REAGENTS, SPELL_FAILED_TOO_MANY_OF_ITEM, SPELL_FAILED_TOTEM_CATEGORY, SPELL_FAILED_TOTEMS, SPELLFAMILY_MAGE, SpellInfo::SpellFamilyFlags, SpellInfo::SpellFamilyName, sSpellItemEnchantmentStore, TARGET_UNIT_PET, Item::ToAzeriteEmpoweredItem(), Object::ToPlayer(), SpellInfo::Totem, SpellInfo::TotemCategory, TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT, TRIGGERED_IGNORE_REAGENT_COST, and TYPEID_PLAYER.

Referenced by CheckCast().

◆ CheckMovement()

◆ CheckPetCast()

◆ CheckPower()

◆ CheckRange()

◆ CheckRuneCost()

◆ CheckScriptEffectImplicitTargets()

bool Spell::CheckScriptEffectImplicitTargets ( uint32  effIndex,
uint32  effIndexToCheck 
)
protected

Definition at line 9069 of file Spell.cpp.

References m_loadedScripts, and m_spellInfo.

Referenced by SelectSpellTargets().

◆ CheckSpellCancelsAuraEffect()

◆ CheckSpellCancelsCharm()

bool Spell::CheckSpellCancelsCharm ( int32 *  param1) const

◆ CheckSpellCancelsConfuse()

bool Spell::CheckSpellCancelsConfuse ( int32 *  param1) const

Definition at line 7134 of file Spell.cpp.

References CheckSpellCancelsAuraEffect(), and SPELL_AURA_MOD_CONFUSE.

Referenced by CheckCasterAuras().

◆ CheckSpellCancelsFear()

bool Spell::CheckSpellCancelsFear ( int32 *  param1) const

Definition at line 7129 of file Spell.cpp.

References CheckSpellCancelsAuraEffect(), and SPELL_AURA_MOD_FEAR.

Referenced by CheckCasterAuras().

◆ CheckSpellCancelsNoActions()

bool Spell::CheckSpellCancelsNoActions ( int32 *  param1) const

Definition at line 7139 of file Spell.cpp.

References CheckSpellCancelsAuraEffect(), and SPELL_AURA_MOD_NO_ACTIONS.

Referenced by CheckCasterAuras().

◆ CheckSpellCancelsPacify()

bool Spell::CheckSpellCancelsPacify ( int32 *  param1) const

◆ CheckSpellCancelsSilence()

bool Spell::CheckSpellCancelsSilence ( int32 *  param1) const

◆ CheckSpellCancelsStun()

bool Spell::CheckSpellCancelsStun ( int32 *  param1) const

◆ CheckSrc()

void Spell::CheckSrc ( )

◆ CleanupTargetList()

void Spell::CleanupTargetList ( )

Definition at line 2404 of file Spell.cpp.

References m_delayMoment, m_UniqueGOTargetInfo, m_UniqueItemInfo, and m_UniqueTargetInfo.

◆ Delayed()

◆ DelayedChannel()

◆ DoCreateItem()

◆ DoEffectOnLaunchTarget()

◆ DoProcessTargetContainer()

template<class Container >
void Spell::DoProcessTargetContainer ( Container &  targetContainer)
protected

Definition at line 3983 of file Spell.cpp.

References SpellInfo::GetEffects(), and m_spellInfo.

Referenced by _handle_immediate_phase(), handle_delayed(), and handle_immediate().

◆ DoSpellEffectHit()

void Spell::DoSpellEffectHit ( Unit *  unit,
SpellEffectInfo const &  spellEffectInfo,
TargetInfo &  targetInfo 
)
protected

Definition at line 3222 of file Spell.cpp.

References _spellAura, _triggeredCastFlags, UnitAura::AddStaticApplication(), Spell::TargetInfo::AuraBasePoints, Spell::TargetInfo::AuraDuration, SpellValue::AuraStackAmount, Aura::BuildEffectMaskForOwner(), CalculatePct(), Spell::TargetInfo::DRGroup, SpellValue::Duration, SpellValue::DurationMul, SpellEffectInfo::EffectIndex, Aura::GetAuraEffects(), GetCastDifficulty(), Aura::GetDuration(), Aura::GetEffectMask(), BaseEntity::GetGUID(), Aura::GetMaxDuration(), HandleEffects(), SpellInfo::HasAttribute(), Spell::TargetInfo::HitAura, SpellInfo::IsChanneled(), m_caster, m_castId, m_castItemEntry, m_castItemGUID, m_castItemLevel, m_originalCaster, m_spellInfo, m_spellValue, m_SpellVisual, Unit::m_unitData, MAX_EFFECT_MASK, WorldObject::ModSpellDuration(), WorldObject::ModSpellDurationTime(), Spell::TargetInfo::Positive, AuraCreateInfo::SetBaseAmount(), AuraCreateInfo::SetCasterGUID(), AuraCreateInfo::SetCastItem(), UnitAura::SetDiminishGroup(), Aura::SetDuration(), AuraCreateInfo::SetIsRefresh(), Aura::SetMaxDuration(), AuraCreateInfo::SetOwnerEffectMask(), AuraCreateInfo::SetPeriodicReset(), AuraCreateInfo::SetSpellVisual(), AuraCreateInfo::SetStackAmount(), SPELL_ATTR13_PERIODIC_REFRESH_EXTENDS_DURATION, SPELL_ATTR8_HASTE_AFFECTS_DURATION, SPELL_EFFECT_HANDLE_HIT_TARGET, SpellInfo::StackAmount, Aura::ToUnitAura(), TRIGGERED_DONT_RESET_PERIODIC_TIMER, and Aura::TryRefreshStackOrCreate().

Referenced by Spell::TargetInfo::DoTargetSpellHit().

◆ DoTriggersOnSpellHit()

◆ EffectActivateGarrisonBuilding()

◆ EffectActivateObject()

◆ EffectActivateSpec()

◆ EffectAddExtraAttacks()

◆ EffectAddFarsight()

◆ EffectAddGarrisonFollower()

◆ EffectApplyAura()

◆ EffectApplyEnchantIllusion()

◆ EffectApplyGlyph()

◆ EffectApplyMountEquipment()

◆ EffectBind()

◆ EffectBlock()

◆ EffectCancelConversation()

◆ EffectCastButtons()

◆ EffectChangeActiveCombatTraitConfig()

void Spell::EffectChangeActiveCombatTraitConfig ( )

◆ EffectChangeBattlePetQuality()

◆ EffectChangeRaidMarker()

◆ EffectCharge()

◆ EffectChargeDest()

◆ EffectCreateAreaTrigger()

◆ EffectCreateConversation()

◆ EffectCreateGarrison()

◆ EffectCreateHeirloomItem()

◆ EffectCreateItem()

◆ EffectCreateItem2()

◆ EffectCreatePrivateConversation()

◆ EffectCreatePrivateSceneObject()

◆ EffectCreateRandomItem()

void Spell::EffectCreateRandomItem ( )

◆ EffectCreateSceneObject()

◆ EffectCreateTamedPet()

◆ EffectCreateTraitTreeConfig()

◆ EffectDamageFromMaxHealthPCT()

void Spell::EffectDamageFromMaxHealthPCT ( )

◆ EffectDestroyAllTotems()

◆ EffectDestroyItem()

◆ EffectDiscoverTaxi()

◆ EffectDisEnchant()

◆ EffectDismissPet()

◆ EffectDispel()

void Spell::EffectDispel ( )

◆ EffectDispelMechanic()

◆ EffectDistract()

◆ EffectDualWield()

void Spell::EffectDualWield ( )

◆ EffectDuel()

◆ EffectDummy()

◆ EffectDurabilityDamage()

◆ EffectDurabilityDamagePCT()

◆ EffectEnableBattlePets()

◆ EffectEnchantHeldItem()

◆ EffectEnchantItemPerm()

◆ EffectEnchantItemPrismatic()

◆ EffectEnchantItemTmp()

◆ EffectEnergize()

◆ EffectEnergizePct()

◆ EffectEnvironmentalDMG()

◆ EffectEquipTransmogOutfit()

◆ EffectFeedPet()

◆ EffectForceCast()

◆ EffectForceCast2()

◆ EffectForceDeselect()

◆ EffectGameObjectDamage()

◆ EffectGameObjectRepair()

void Spell::EffectGameObjectRepair ( )

◆ EffectGameObjectSetDestructionState()

void Spell::EffectGameObjectSetDestructionState ( )

◆ EffectGiveArtifactPower()

◆ EffectGiveArtifactPowerNoBonus()

◆ EffectGiveCurrency()

◆ EffectGiveExperience()

◆ EffectGiveHonor()

◆ EffectGiveRestedExperience()

◆ EffectGrantBattlePetExperience()

◆ EffectGrantBattlePetLevel()

◆ EffectHeal()

◆ EffectHealBattlePetPct()

◆ EffectHealMaxHealth()

◆ EffectHealMechanical()

◆ EffectHealPct()

◆ EffectHealthLeech()

◆ EffectIncreaseCurrencyCap()

◆ EffectInebriate()

◆ EffectInstaKill()

◆ EffectInterruptCast()

◆ EffectJump()

◆ EffectJumpCharge()

◆ EffectJumpDest()

◆ EffectKillCredit()

◆ EffectKillCreditLabel()

◆ EffectKillCreditPersonal()

◆ EffectKnockBack()

◆ EffectLaunchQuestChoice()

◆ EffectLeap()

◆ EffectLeapBack()

◆ EffectLearnAzeriteEssencePower()

◆ EffectLearnGarrisonBuilding()

◆ EffectLearnPetSpell()

◆ EffectLearnSkill()

◆ EffectLearnSpell()

◆ EffectLearnTransmogIllusion()

◆ EffectLearnTransmogSet()

◆ EffectLearnWarbandScene()

◆ EffectMilling()

◆ EffectModifyAuraStacks()

◆ EffectModifyCooldown()

◆ EffectModifyCooldowns()

◆ EffectModifyCooldownsByCategory()

◆ EffectModifySpellCharges()

◆ EffectModifyThreatPercent()

◆ EffectNULL()

void Spell::EffectNULL ( )

Definition at line 454 of file SpellEffects.cpp.

References TC_LOG_DEBUG.

◆ EffectOpenLock()

◆ EffectParry()

◆ EffectPersistentAA()

◆ EffectPickPocket()

◆ EffectPlayMovie()

◆ EffectPlayMusic()

◆ EffectPlayScene()

◆ EffectPlaySceneScriptPackage()

◆ EffectPlaySound()

◆ EffectPowerBurn()

◆ EffectPowerDrain()

◆ EffectProficiency()

◆ EffectProspecting()

◆ EffectPullTowards()

◆ EffectPullTowardsDest()

◆ EffectQuestClear()

◆ EffectQuestComplete()

◆ EffectQuestFail()

◆ EffectQuestStart()

◆ EffectRechargeItem()

◆ EffectRedirectThreat()

◆ EffectRemoveAura()

◆ EffectRemoveAuraBySpellLabel()

◆ EffectRemoveTalent()

◆ EffectRenamePet()

◆ EffectReputation()

◆ EffectRespecAzeriteEmpoweredItem()

◆ EffectResurrect()

◆ EffectResurrectNew()

◆ EffectResurrectPet()

◆ EffectResurrectWithAura()

◆ EffectSanctuary()

◆ EffectSchoolDMG()

◆ EffectScriptEffect()

◆ EffectSelfResurrect()

◆ EffectSendChatMessage()

◆ EffectSendEvent()

◆ EffectSendTaxi()

◆ EffectSetPlayerDataElementAccount()

◆ EffectSetPlayerDataElementCharacter()

◆ EffectSetPlayerDataFlagAccount()

◆ EffectSetPlayerDataFlagCharacter()

◆ EffectSkill()

◆ EffectSkinning()

◆ EffectSkinPlayerCorpse()

◆ EffectSkipCampaign()

◆ EffectSkipQuestLine()

◆ EffectSpiritHeal()

◆ EffectStealBeneficialBuff()

void Spell::EffectStealBeneficialBuff ( )

Definition at line 4722 of file SpellEffects.cpp.

References Aura::CalcDispelChance(), WorldPackets::CombatLog::SpellDispellLog::CasterGUID, WorldPackets::Spells::DispelFailed::CasterGUID, WorldPackets::CombatLog::SpellDispellLog::DispellData, WorldPackets::CombatLog::SpellDispellLog::DispelledBySpellID, effectHandleMode, effectInfo, WorldPackets::Spells::DispelFailed::FailedSpells, Aura::GetApplicationOfTarget(), Aura::GetCharges(), SpellInfo::GetDispelMask(), GetEffectValueAsInt(), BaseEntity::GetGUID(), Unit::GetOwnedAuras(), Aura::GetSpellInfo(), Aura::GetStackAmount(), WorldPackets::CombatLog::SpellDispellData::Harmful, SpellInfo::HasAttribute(), SpellInfo::Id, WorldPackets::CombatLog::SpellDispellLog::IsBreak, WorldObject::IsFriendlyTo(), Aura::IsPassive(), AuraApplication::IsPositive(), WorldPackets::CombatLog::SpellDispellLog::IsSteal, m_caster, m_spellInfo, m_UniqueTargetInfo, SpellEffectInfo::MiscValue, PROC_HIT_DISPEL, Unit::RemoveAurasDueToSpellBySteal(), WorldObject::SendMessageToSet(), SPELL_ATTR1_DISPEL_ALL_STACKS, SPELL_ATTR4_CANNOT_BE_STOLEN, SPELL_ATTR7_DISPEL_REMOVES_CHARGES, SPELL_EFFECT_HANDLE_HIT_TARGET, WorldPackets::CombatLog::SpellDispellData::SpellID, WorldPackets::Spells::DispelFailed::SpellID, WorldPackets::CombatLog::SpellDispellLog::TargetGUID, Spell::TargetInfo::TargetGUID, TC_LOG_DEBUG, unitTarget, urand(), WorldPackets::Spells::DispelFailed::VictimGUID, WorldPackets::CombatLog::SpellDispellLog::Write(), and WorldPackets::Spells::DispelFailed::Write().

◆ EffectStuck()

◆ EffectSummonChangeItem()

◆ EffectSummonObject()

◆ EffectSummonObjectWild()

◆ EffectSummonPersonalGameObject()

◆ EffectSummonPet()

◆ EffectSummonPlayer()

◆ EffectSummonRaFFriend()

◆ EffectSummonType()

void Spell::EffectSummonType ( )

Definition at line 1871 of file SpellEffects.cpp.

References CastSpellExtraArgs::AddSpellMod(), SpellInfo::CalcDuration(), SpellEffectInfo::CalcRadius(), SpellEffectInfo::CalcValue(), WorldObject::CastSpell(), Companion, SummonPropertiesEntry::Control, destTarget, SpellEffectInfo::Effect, effectHandleMode, effectInfo, ObjectGuid::Empty, ExecuteLogEffectSummonObject(), GetCastDifficulty(), GetEffectValueAsInt(), SummonPropertiesEntry::GetFlags(), Player::GetGroup(), BaseEntity::GetGUID(), Group::GetGUID(), WorldObject::GetMap(), Position::GetPosition(), WorldObject::GetPrivateObjectOwner(), WorldObject::GetRandomPoint(), GetUnitCasterForEffectHandlers(), Guardian, SpellInfo::HasAura(), Unit::HasUnitTypeMask(), SpellInfo::Id, BaseEntity::IsPlayer(), WorldObject::IsPrivateObject(), Unit::IsTotem(), Unit::IsVehicle(), JoinSummonerSpawnGroup, Lightwell, m_caster, m_originalCaster, m_spellInfo, SpellRange::Max, MAX_VEHICLE_SEATS, SpellRange::Min, Minion, SpellEffectInfo::MiscValue, SpellEffectInfo::MiscValueB, Mount, OnlyVisibleToSummoner, OnlyVisibleToSummonerGroup, Pet, Runeblade, Unit::SetCreatorGUID(), Unit::SetDemonCreatorGUID(), Unit::SetHealth(), Creature::SetImmuneToAll(), Unit::SetMaxHealth(), Unit::SetOwnerGUID(), TempSummon::SetTempSummonType(), CastSpellExtraArgs::SetTriggeringSpell(), SPELL_AURA_CONTROL_VEHICLE, SPELL_EFFECT_HANDLE_LAUNCH, SPELLVALUE_BASE_POINT0, sSpellMgr, sSummonPropertiesStore, SUMMON_CATEGORY_ALLY, SUMMON_CATEGORY_PET, SUMMON_CATEGORY_POSSESSED_VEHICLE, SUMMON_CATEGORY_PUPPET, SUMMON_CATEGORY_VEHICLE, SUMMON_CATEGORY_WILD, Map::SummonCreature(), SummonGuardian(), TC_LOG_ERROR, TEMPSUMMON_DEAD_DESPAWN, TEMPSUMMON_MANUAL_DESPAWN, TEMPSUMMON_TIMED_DESPAWN, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, SummonPropertiesEntry::Title, Object::ToPlayer(), Totem, TRIGGERED_FULL_MASK, UNIT_MASK_MINION, UseDemonTimeout, Vehicle, and VEHICLE_SPELL_RIDE_HARDCODED.

◆ EffectTameCreature()

◆ EffectTaunt()

◆ EffectTeleportGraveyard()

void Spell::EffectTeleportGraveyard ( )

◆ EffectTeleportToReturnPoint()

◆ EffectTeleportUnits()

◆ EffectTeleportUnitsWithVisualLoadingScreen()

◆ EffectTeleUnitsFaceCaster()

◆ EffectThreat()

◆ EffectTitanGrip()

◆ EffectTradeSkill()

void Spell::EffectTradeSkill ( )

◆ EffectTransmitted()

◆ EffectTriggerMissileSpell()

◆ EffectTriggerRitualOfSummoning()

◆ EffectTriggerSpell()

void Spell::EffectTriggerSpell ( )
Todo:
move those to spell scripts

Definition at line 594 of file SpellEffects.cpp.

References EventProcessor::AddEventAtOffset(), CastSpellExtraArgs::AddSpellMod(), CastSpellExtraArgsInit::CastItem, WorldObject::CastSpell(), SpellEffectInfo::Effect, effectHandleMode, SpellEffectInfo::EffectIndex, effectInfo, effectValue, GetCastDifficulty(), SpellInfo::GetEffects(), SpellInfo::GetExplicitTargetMask(), BaseEntity::GetGUID(), SpellEffectInfo::GetProvidedTargetMask(), SpellCastTargets::GetUnitTarget(), GetUnitTargetCountForEffect(), GetUnitTargetIndexForEffect(), SpellInfo::HasAttribute(), SpellCastTargets::HasDst(), SpellInfo::Id, m_caster, m_castId, m_castItemGUID, m_castItemLevel, WorldObject::m_Events, m_originalCasterGUID, m_spellInfo, m_targets, SpellEffectInfo::MiscValue, SpellInfo::NeedsToBeTriggeredByCaster(), CastSpellExtraArgsInit::OriginalCastId, CastSpellExtraArgsInit::OriginalCastItemLevel, Unit::RemoveAurasByType(), Unit::RemoveMovementImpairingAuras(), SpellCastTargets::SetDst(), SpellCastTargets::SetGOTarget(), CastSpellExtraArgs::SetOriginalCaster(), SpellCastTargets::SetUnitTarget(), SPELL_ATTR2_RETAIN_ITEM_CAST, SPELL_AURA_MOD_STALKED, SPELL_AURA_MOD_STUN, SPELL_EFFECT_HANDLE_LAUNCH, SPELL_EFFECT_HANDLE_LAUNCH_TARGET, SPELL_EFFECT_TRIGGER_SPELL, SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE, SPELLVALUE_BASE_POINT0, SPELLVALUE_PARENT_SPELL_TARGET_COUNT, SPELLVALUE_PARENT_SPELL_TARGET_INDEX, sSpellMgr, SpellInfo::StackAmount, TARGET_FLAG_DEST_LOCATION, TARGET_FLAG_UNIT_MASK, TC_LOG_ERROR, TC_LOG_WARN, Object::ToGameObject(), Object::ToPlayer(), Object::ToUnit(), TRIGGERED_FULL_MASK, TRIGGERED_IGNORE_POWER_COST, TRIGGERED_IGNORE_REAGENT_COST, SpellEffectInfo::TriggerSpell, unitTarget, and SpellCastTargets::Update().

◆ EffectUncageBattlePet()

◆ EffectUnlearnSpecialization()

◆ EffectUnlockGuildVaultTab()

void Spell::EffectUnlockGuildVaultTab ( )

◆ EffectUntrainTalents()

◆ EffectUnused()

void Spell::EffectUnused ( )

Definition at line 459 of file SpellEffects.cpp.

◆ EffectUpdateInteractions()

void Spell::EffectUpdateInteractions ( )

◆ EffectUpdatePlayerPhase()

void Spell::EffectUpdatePlayerPhase ( )

◆ EffectUpdateZoneAurasAndPhases()

◆ EffectUpgradeHeirloom()

void Spell::EffectUpgradeHeirloom ( )

◆ EffectWeaponDmg()

◆ ExecuteLogEffectCreateItem()

void Spell::ExecuteLogEffectCreateItem ( SpellEffects  effect,
uint32  entry 
)

◆ ExecuteLogEffectDestroyItem()

void Spell::ExecuteLogEffectDestroyItem ( SpellEffects  effect,
uint32  entry 
)

◆ ExecuteLogEffectDurabilityDamage()

◆ ExecuteLogEffectExtraAttacks()

void Spell::ExecuteLogEffectExtraAttacks ( SpellEffects  effect,
Unit *  victim,
uint32  numAttacks 
)

◆ ExecuteLogEffectOpenLock()

void Spell::ExecuteLogEffectOpenLock ( SpellEffects  effect,
Object *  obj 
)

◆ ExecuteLogEffectResurrect()

void Spell::ExecuteLogEffectResurrect ( SpellEffects  effect,
Unit *  target 
)

◆ ExecuteLogEffectSummonObject()

◆ ExecuteLogEffectTakeTargetPower()

◆ ExecuteLogEffectUnsummonObject()

void Spell::ExecuteLogEffectUnsummonObject ( SpellEffects  effect,
WorldObject *  obj 
)

◆ ExtractSpellFromEvent()

Spell const * Spell::ExtractSpellFromEvent ( BasicEvent *  event)
static

Definition at line 5737 of file Spell.cpp.

Referenced by Unit::CancelSpellMissiles().

◆ FinalizeDataForTriggerSystem()

◆ finish()

void Spell::finish ( SpellCastResult  result = SPELL_CAST_OK)

Definition at line 4359 of file Spell.cpp.

References SpellHistory::AddGlobalCooldown(), Unit::AttackStop(), Unit::ClearUnitState(), CURRENT_AUTOREPEAT_SPELL, DIFFICULTY_NONE, GetCastDifficulty(), Unit::GetCharmed(), Unit::GetCurrentSpell(), Unit::getDeathState(), BaseEntity::GetGUID(), Unit::GetSpellHistory(), BaseEntity::GetTypeId(), SpellInfo::HasAttribute(), SpellInfo::HasEffect(), Unit::HasUnitState(), SpellInfo::IconFileDataId, SpellInfo::Id, IsAutoRepeat(), SpellInfo::IsChanneled(), IsEmpowerSpell(), Unit::IsNonMeleeSpellCast(), BaseEntity::IsPlayer(), Unit::IsSummon(), JUST_DIED, m_caster, m_customArg, m_executedCurrently, m_scriptResult, m_scriptWaitsForSpellHit, m_spellInfo, m_spellState, Unit::m_unitData, PROC_FLAG_CAST_ENDED, PROC_FLAG_NONE, PROC_HIT_NONE, PROC_SPELL_PHASE_NONE, PROC_SPELL_TYPE_MASK_ALL, Unit::ProcSkillsAndAuras(), RefundPower(), SpellHistory::ResetCooldown(), Player::SendDirectMessage(), Unit::setDeathState(), SetExecutedCurrently(), Scripting::v2::ActionResultSetter< T >::SetResult(), SPELL_ATTR0_CANCELS_AUTO_ATTACK_COMBAT, SPELL_CAST_OK, SPELL_EFFECT_CHANGE_ACTIVE_COMBAT_TRAIT_CONFIG, SPELL_EMPOWER_HARDCODED_GCD, SPELL_STATE_FINISHED, SPELL_STATE_IDLE, sSpellMgr, TC_LOG_DEBUG, Object::ToCreature(), Object::ToPlayer(), ObjectGuid::ToString(), Object::ToUnit(), TYPEID_PLAYER, TYPEID_UNIT, UNIT_MASK_PUPPET, UNIT_STATE_CASTING, Unit::UpdateInterruptMask(), and WorldPackets::Traits::TraitConfigCommitFailed::Write().

Referenced by _cast(), cancel(), EffectInstaKill(), EffectTameCreature(), EffectTriggerRitualOfSummoning(), SpellScript::FinishCast(), Unit::FinishSpell(), handle_delayed(), handle_immediate(), WorldSession::HandlePetActionHelper(), WorldSession::HandlePetCastSpellOpcode(), prepare(), SelectImplicitCasterDestTargets(), SelectImplicitNearbyTargets(), SelectSpellTargets(), and update().

◆ FinishTargetProcessing()

void Spell::FinishTargetProcessing ( )
protected

Definition at line 8773 of file Spell.cpp.

References SendSpellExecuteLog().

Referenced by handle_immediate(), and HandleLaunchPhase().

◆ GetCastDifficulty()

◆ GetCaster()

◆ GetCastTime()

◆ GetChannelDuration()

int32 Spell::GetChannelDuration ( ) const
inline

Definition at line 661 of file Spell.h.

Referenced by spell_dh_demonic::TriggerMetamorphosis().

◆ GetCorpseTargetCountForEffect()

int64 Spell::GetCorpseTargetCountForEffect ( SpellEffIndex  effect) const

◆ GetCurrentContainer()

◆ GetDebugInfo()

std::string Spell::GetDebugInfo ( ) const

◆ GetDelayMoment()

uint64 Spell::GetDelayMoment ( ) const
inline

Definition at line 687 of file Spell.h.

Referenced by SpellEvent::Execute().

◆ GetDelayStart()

uint64 Spell::GetDelayStart ( ) const
inline

◆ GetEffectValueAsInt()

◆ GetExecuteLogEffect()

SpellLogEffect & Spell::GetExecuteLogEffect ( SpellEffects  effect)

Definition at line 5073 of file Spell.cpp.

References _executeLogEffects.

◆ GetExecuteLogEffectTargets()

◆ GetGameObjectTargetCountForEffect()

int64 Spell::GetGameObjectTargetCountForEffect ( SpellEffIndex  effect) const

◆ GetItemTargetCountForEffect()

int64 Spell::GetItemTargetCountForEffect ( SpellEffIndex  effect) const

◆ GetMinMaxRange()

◆ GetOriginalCaster()

Unit * Spell::GetOriginalCaster ( ) const
inline

Definition at line 701 of file Spell.h.

Referenced by SpellScript::GetOriginalCaster().

◆ GetOriginalCasterGUID()

ObjectGuid Spell::GetOriginalCasterGUID ( ) const
inline

Definition at line 700 of file Spell.h.

◆ GetPowerCost()

std::vector< SpellPowerCost > const & Spell::GetPowerCost ( ) const
inline

◆ GetPowerTypeCostAmount()

◆ GetProcChainLength()

int32 Spell::GetProcChainLength ( ) const
inline

Definition at line 679 of file Spell.h.

Referenced by Unit::ProcSkillsAndAuras(), and Unit::TriggerAurasProcOnEvent().

◆ GetRemainingCastTime()

int32 Spell::GetRemainingCastTime ( ) const
inline

Definition at line 660 of file Spell.h.

◆ GetRuneState()

uint8 Spell::GetRuneState ( ) const
inline

Definition at line 692 of file Spell.h.

◆ GetScript()

template<class Script >
Script * Spell::GetScript ( ) const
inline

Definition at line 952 of file Spell.h.

References Script.

Referenced by spell_mage_hot_streak_ignite_marker::IsActive().

◆ GetScriptByType()

SpellScript * Spell::GetScriptByType ( std::type_info const &  type) const
protected

Definition at line 9106 of file Spell.cpp.

References m_loadedScripts.

◆ GetSearcherTypeMask()

◆ GetSpellCastDataAmmo()

◆ GetSpellInfo()

◆ getState()

◆ GetTimer()

int32 Spell::GetTimer ( ) const
inline

Definition at line 718 of file Spell.h.

◆ GetTriggeredByAuraSpell()

SpellInfo const * Spell::GetTriggeredByAuraSpell ( ) const
inline

Definition at line 716 of file Spell.h.

◆ GetUnitCasterForEffectHandlers()

◆ GetUnitTargetCountForEffect()

◆ GetUnitTargetIndexForEffect()

int32 Spell::GetUnitTargetIndexForEffect ( ObjectGuid const &  target,
SpellEffIndex  effect 
) const
protected

◆ GetWeakPtr()

Trinity::unique_weak_ptr< Spell > Spell::GetWeakPtr ( ) const

Definition at line 9254 of file Spell.cpp.

References _spellEvent, and SpellEvent::GetSpellWeakPtr().

◆ handle_delayed()

◆ handle_immediate()

◆ HandleEffects()

◆ HandleLaunchPhase()

◆ HandleThreatSpells()

◆ HasGlobalCooldown()

bool Spell::HasGlobalCooldown ( ) const
protected

◆ HasPowerTypeCost()

bool Spell::HasPowerTypeCost ( Powers  power) const

◆ InitExplicitTargets()

◆ IsAutoActionResetSpell()

◆ IsAutoRepeat()

bool Spell::IsAutoRepeat ( ) const
inline

Definition at line 662 of file Spell.h.

Referenced by CheckCast(), finish(), GetCurrentContainer(), prepare(), and SendSpellCooldown().

◆ IsChannelActive()

bool Spell::IsChannelActive ( ) const

◆ IsDelayableNoMore()

bool Spell::IsDelayableNoMore ( )
inlineprotected

Definition at line 765 of file Spell.h.

Referenced by Delayed(), and DelayedChannel().

◆ IsDeletable()

bool Spell::IsDeletable ( ) const
inline

Definition at line 681 of file Spell.h.

Referenced by SpellEvent::Execute(), SpellEvent::IsDeletable(), and SpellEvent::~SpellEvent().

◆ IsEmpowerSpell()

◆ IsFocusDisabled()

◆ IsIgnoringCooldowns()

bool Spell::IsIgnoringCooldowns ( ) const

◆ IsInterruptable()

bool Spell::IsInterruptable ( ) const
inline

Definition at line 683 of file Spell.h.

Referenced by Unit::InterruptSpell().

◆ IsNeedSendToClient()

◆ IsPositive()

◆ IsProcDisabled()

bool Spell::IsProcDisabled ( ) const

Definition at line 8303 of file Spell.cpp.

References _triggeredCastFlags, and TRIGGERED_DISALLOW_PROC_EVENTS.

Referenced by Unit::TriggerAurasProcOnEvent().

◆ IsTriggered()

◆ IsTriggeredByAura()

bool Spell::IsTriggeredByAura ( SpellInfo const *  auraSpellInfo) const
inline

Definition at line 677 of file Spell.h.

Referenced by spell_dk_t20_2p_rune_empowered::HandleProc().

◆ IsValidDeadOrAliveTarget()

bool Spell::IsValidDeadOrAliveTarget ( Unit const *  target) const
protected

◆ IsWithinLOS() [1/2]

◆ IsWithinLOS() [2/2]

◆ LoadScripts()

void Spell::LoadScripts ( )
protected

Definition at line 8778 of file Spell.cpp.

References SpellInfo::Id, m_loadedScripts, m_spellInfo, sScriptMgr, and TC_LOG_DEBUG.

Referenced by prepare().

◆ MovePosition()

◆ operator=()

Spell & Spell::operator= ( Spell const &  right)
protecteddelete

◆ prepare()

SpellCastResult Spell::prepare ( SpellCastTargets const &  targets,
AuraEffect const *  triggeredByAura = nullptr 
)

@todoApply this to all cast spells if needed

m_spellInfo->StartRecoveryTime &&

Definition at line 3432 of file Spell.cpp.

References _spellEvent, _triggeredCastFlags, Action, EventProcessor::AddEvent(), SpellInfo::CalcCastTime(), SpellInfo::CalcPowerCost(), EventProcessor::CalculateTime(), CallScriptCalcCastTimeHandlers(), CallScriptOnPrecastHandler(), CanStopMovementForSpellCasting(), cast(), CheckCast(), CheckMovement(), CURRENT_AUTOREPEAT_SPELL, CURRENT_GENERIC_SPELL, DISABLE_TYPE_SPELL, finish(), AuraEffect::GetBase(), Aura::GetCastItemLevel(), GetCurrentContainer(), MotionMaster::GetCurrentMovementGeneratorType(), Object::GetEntry(), BaseEntity::GetGUID(), Item::GetItemLevel(), SpellInfo::GetMaxDuration(), Unit::GetMotionMaster(), SpellCastTargets::GetObjectTarget(), Item::GetOwner(), Item::GetOwnerGUID(), AuraEffect::GetSpellInfo(), GetSpellInfo(), SpellCastTargets::GetTargetMask(), SpellInfo::HasAttribute(), Unit::HasUnitFlag(), SpellInfo::Id, InitExplicitTargets(), IsAutoActionResetSpell(), IsAutoRepeat(), SpellInfo::IsAutoShot(), SpellInfo::IsChanneled(), Unit::IsControlledByPlayer(), BaseEntity::IsCreature(), DisableMgr::IsDisabledFor(), Unit::isMoving(), SpellInfo::IsNextMeleeSwingSpell(), Unit::IsNonMeleeSpellCast(), Aura::IsPassive(), AuraEffect::IsPeriodic(), BaseEntity::IsUnit(), LoadScripts(), m_caster, m_CastItem, m_castItemEntry, m_castItemGUID, m_castItemLevel, m_casttime, WorldObject::m_Events, m_originalCaster, m_powerCost, m_spellInfo, m_spellSchoolMask, m_spellState, m_targets, m_triggeredByAuraSpell, prepareDataForTriggerSystem(), ResetCombatTimers(), ReSetTimer(), SendCastResult(), SendChannelUpdate(), SendSpellCooldown(), SendSpellStart(), Unit::SetCurrentCastSpell(), Aura::SetDuration(), Creature::SetSpellFocus(), SPELL_ATTR12_START_COOLDOWN_ON_CAST_START, SPELL_ATTR2_NOT_AN_ACTION, SPELL_ATTR7_RESET_SWING_TIMER_AT_SPELL_START, SPELL_CAST_OK, SPELL_FAILED_BAD_TARGETS, SPELL_FAILED_EQUIPPED_ITEM, SPELL_FAILED_SPELL_IN_PROGRESS, SPELL_FAILED_SPELL_UNAVAILABLE, SPELL_STATE_PREPARING, Unit::StopMoving(), TC_LOG_DEBUG, Object::ToCreature(), Object::ToPlayer(), Object::ToUnit(), TRIGGERED_CAST_DIRECTLY, TRIGGERED_IGNORE_CAST_IN_PROGRESS, TRIGGERED_IGNORE_CAST_TIME, TRIGGERED_IGNORE_GCD, TRIGGERED_IGNORE_SET_FACING, TRIGGERED_IGNORE_TARGET_CHECK, TriggerGlobalCooldown(), and UNIT_FLAG_POSSESSED.

Referenced by Unit::_UpdateAutoRepeatSpell(), Player::CastItemUseSpell(), WorldObject::CastSpell(), PlayerAI::DoRangedAttackIfReady(), Player::ExecutePendingSpellCastRequest(), WorldSession::HandleAcceptTradeOpcode(), WorldSession::HandlePetActionHelper(), WorldSession::HandlePetCastSpellOpcode(), WorldSession::HandleUseToy(), spell_dh_demonic::TriggerMetamorphosis(), and PetAI::UpdateAI().

◆ prepareDataForTriggerSystem()

◆ PrepareTargetProcessing()

void Spell::PrepareTargetProcessing ( )
protected

Definition at line 8769 of file Spell.cpp.

Referenced by handle_delayed(), handle_immediate(), and HandleLaunchPhase().

◆ PrepareTriggersExecutedOnHit()

void Spell::PrepareTriggersExecutedOnHit ( )
protected

◆ PreprocessSpellHit()

SpellMissInfo Spell::PreprocessSpellHit ( Unit *  unit,
TargetInfo &  targetInfo 
)
protected

Definition at line 3105 of file Spell.cpp.

References Unit::ApplyDiminishingToDuration(), Spell::TargetInfo::AuraBasePoints, Spell::TargetInfo::AuraDuration, BeSpellTarget, Aura::BuildEffectMaskForOwner(), Aura::CalcMaxDuration(), CallScriptBeforeHitHandlers(), SpellValue::CustomBasePointsMask, DIMINISHING_LEVEL_1, Spell::TargetInfo::DRGroup, DRTYPE_ALL, DRTYPE_PLAYER, SpellValue::Duration, SpellValue::EffectBasePoints, Spell::TargetInfoBase::EffectMask, ThreatManager::ForwardThreatForAssistingMe(), Unit::GetCharmerOrOwnerGUID(), WorldObject::GetCharmerOrOwnerPlayerOrPlayerItself(), Unit::GetCombatManager(), Unit::GetDiminishing(), SpellInfo::GetDiminishingReturnsGroupForSpell(), SpellInfo::GetDiminishingReturnsGroupType(), SpellInfo::GetEffects(), BaseEntity::GetGUID(), Unit::GetThreatManager(), BaseEntity::GetTypeId(), SpellInfo::HasInitialAggro(), Unit::HasUnitFlag(), Unit::HasUnitState(), HostileActionReceived, SpellInfo::Id, Unit::IncrDiminishing(), CombatManager::InheritCombatStatesFrom(), Unit::IsAffectedByDiminishingReturns(), WorldObject::IsFriendlyTo(), Unit::IsImmunedToSpell(), Unit::IsInCombat(), IsPositive(), SpellInfo::IsPositiveEffect(), WorldObject::IsValidAssistTarget(), WorldObject::IsValidAttackTarget(), LandTargetedSpellOnTarget, m_caster, m_castItemEntry, m_castItemLevel, m_originalCaster, m_powerCost, m_spellInfo, m_spellValue, MAX_EFFECT_MASK, Spell::TargetInfo::MissCondition, Spell::TargetInfo::Positive, Unit::RemoveAurasWithInterruptFlags(), SPELL_MISS_EVADE, SPELL_MISS_IMMUNE, SPELL_MISS_NONE, Spell::TargetInfo::TimeDelay, Object::ToCreature(), Object::ToPlayer(), TYPEID_PLAYER, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_PLAYER_CONTROLLED, and UNIT_STATE_ATTACK_PLAYER.

Referenced by Spell::TargetInfo::PreprocessTarget().

◆ PreprocessSpellLaunch()

◆ RecalculateDelayMomentForDst()

void Spell::RecalculateDelayMomentForDst ( )

◆ RefundPower()

◆ RefundRunePower()

◆ ResetCombatTimers()

void Spell::ResetCombatTimers ( )
protected

◆ ReSetTimer()

void Spell::ReSetTimer ( )
inline

Definition at line 664 of file Spell.h.

Referenced by prepare().

◆ SearchAreaTargets()

void Spell::SearchAreaTargets ( std::list< WorldObject * > &  targets,
SpellEffectInfo const &  spellEffectInfo,
SpellRange  range,
Position const *  position,
WorldObject *  referer,
SpellTargetObjectTypes  objectType,
SpellTargetCheckTypes  selectionType,
ConditionContainer const *  condList,
Trinity::WorldObjectSpellAreaTargetSearchReason  searchReason 
)

◆ SearchChainTargets()

◆ SearchNearbyTarget()

WorldObject * Spell::SearchNearbyTarget ( SpellEffectInfo const &  spellEffectInfo,
float  range,
SpellTargetObjectTypes  objectType,
SpellTargetCheckTypes  selectionType,
ConditionContainer const *  condList = nullptr 
)

◆ SearchSpellFocus()

◆ SearchTargets()

◆ SelectEffectImplicitTargets()

◆ SelectEffectTypeImplicitTargets()

◆ SelectExplicitTargets()

◆ SelectImplicitAreaTargets()

void Spell::SelectImplicitAreaTargets ( SpellEffectInfo const &  spellEffectInfo,
SpellImplicitTargetInfo const &  targetType,
SpellTargetIndex  targetIndex,
uint32  effMask 
)

Definition at line 1326 of file Spell.cpp.

References SpellDestination::_position, ABORT_MSG, AddCorpseTarget(), AddGOTarget(), AddUnitTarget(), Trinity::Area, SpellEffectInfo::CalcRadius(), CallScriptDestinationTargetSelectHandlers(), CallScriptObjectAreaTargetSelectHandlers(), SpellEffectInfo::EffectIndex, SpellImplicitTargetInfo::GetCheckType(), SpellCastTargets::GetDstPos(), SpellImplicitTargetInfo::GetObjectType(), ObjectAccessor::GetPlayer(), SpellImplicitTargetInfo::GetReferenceType(), SpellCastTargets::GetSrcPos(), SpellImplicitTargetInfo::GetTarget(), ObjectAccessor::GetUnit(), SpellCastTargets::GetUnitTarget(), Unit::GetVictim(), SpellInfo::HasAttribute(), SpellEffectInfo::ImplicitTargetConditions, Unit::IsInRaidWith(), BaseEntity::IsUnit(), m_caster, m_spellInfo, m_spellValue, m_targets, m_UniqueTargetInfo, MAX_VEHICLE_SEATS, SpellValue::MaxAffectedTargets, SpellCastTargets::ModDst(), SpellEffectInfo::PositionFacing, SpellValue::RadiusMod, Trinity::Containers::RandomResize(), SearchAreaTargets(), Position::SetOrientation(), SPELL_ATTR4_USE_FACING_FROM_SPELL, TARGET_OBJECT_TYPE_UNIT_AND_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_REFERENCE_TYPE_DEST, TARGET_REFERENCE_TYPE_LAST, TARGET_REFERENCE_TYPE_SRC, TARGET_REFERENCE_TYPE_TARGET, TARGET_UNIT_AREA_TAP_LIST, TARGET_UNIT_AREA_THREAT_LIST, TARGET_UNIT_CASTER_AND_PASSENGERS, TARGET_UNIT_CASTER_AND_SUMMONS, TARGET_UNIT_SRC_AREA_FURTHEST_ENEMY, TARGET_UNIT_TARGET_ALLY_OR_RAID, Object::ToCorpse(), Object::ToCreature(), Object::ToGameObject(), and Object::ToUnit().

Referenced by SelectEffectImplicitTargets().

◆ SelectImplicitCasterDestTargets()

void Spell::SelectImplicitCasterDestTargets ( SpellEffectInfo const &  spellEffectInfo,
SpellImplicitTargetInfo const &  targetType,
SpellTargetIndex  targetIndex 
)
Todo:
fix this check

Definition at line 1465 of file Spell.cpp.

References SpellDestination::_position, SpellImplicitTargetInfo::CalcDirectionAngle(), SpellEffectInfo::CalcRadius(), CallScriptDestinationTargetSelectHandlers(), DEFAULT_PLAYER_BOUNDING_RADIUS, SpellEffectInfo::EffectIndex, finish(), frand(), WorldObject::GetClosePoint(), WorldObject::GetCollisionHeight(), WorldObject::GetCombatReach(), Map::GetLiquidStatus(), WorldObject::GetMap(), WorldObject::GetMapHeight(), WorldLocation::GetMapId(), WorldObject::GetMapWaterOrGroundLevel(), SpellInfo::GetMinMaxRange(), MovementInfo::GetMovementFlags(), SpellCastTargets::GetObjectTarget(), Position::GetOrientation(), WorldObject::GetPhaseShift(), Position::GetPosition(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), SpellImplicitTargetInfo::GetTarget(), SpellInfo::HasAttribute(), SpellEffectInfo::HasRadius(), SpellInfo::Id, SpellEffectInfo::IsEffect(), WorldObject::IsInRange3d(), LiquidData::level, m_caster, WorldObject::m_movementInfo, M_PI, Position::m_positionZ, m_spellInfo, m_targets, SpellRange::Max, SpellRange::Min, MOVEMENTFLAG_BACKWARD, MOVEMENTFLAG_FORWARD, MOVEMENTFLAG_NONE, MOVEMENTFLAG_STRAFE_LEFT, MOVEMENTFLAG_STRAFE_RIGHT, MovePosition(), PET_FOLLOW_DIST, SpellEffectInfo::PositionFacing, rand_norm(), SpellDestination::Relocate(), Trinity::Containers::SelectRandomContainerElement(), SendCastResult(), SendChannelUpdate(), SpellCastTargets::SetDst(), Position::SetOrientation(), SPELL_ATTR4_USE_FACING_FROM_SPELL, SPELL_EFFECT_BIND, SPELL_EFFECT_TELEPORT_UNITS, SPELL_EFFECT_TELEPORT_WITH_SPELL_VISUAL_KIT_LOADING_SCREEN, SPELL_FAILED_NO_VALID_TARGETS, SPELL_FAILED_NOT_HERE, SPELL_FAILED_TOO_SHALLOW, sSpellMgr, TARGET_DEST_CASTER, TARGET_DEST_CASTER_BACK_LEFT, TARGET_DEST_CASTER_BACK_RIGHT, TARGET_DEST_CASTER_FISHING, TARGET_DEST_CASTER_FRONT_LEAP, TARGET_DEST_CASTER_FRONT_LEFT, TARGET_DEST_CASTER_FRONT_RIGHT, TARGET_DEST_CASTER_GROUND, TARGET_DEST_CASTER_GROUND_2, TARGET_DEST_CASTER_MOVEMENT_DIRECTION, TARGET_DEST_CASTER_RANDOM, TARGET_DEST_CASTER_SUMMON, TARGET_DEST_DB, TARGET_DEST_HOME, TARGET_DEST_NEARBY_DB, TARGET_DEST_SUMMONER, TC_LOG_DEBUG, Object::ToPlayer(), Unit::ToTempSummon(), Object::ToUnit(), and VMAP_INVALID_HEIGHT_VALUE.

Referenced by SelectEffectImplicitTargets().

◆ SelectImplicitCasterObjectTargets()

◆ SelectImplicitChainTargets()

◆ SelectImplicitChannelTargets()

◆ SelectImplicitConeTargets()

◆ SelectImplicitDestDestTargets()

◆ SelectImplicitLineTargets()

◆ SelectImplicitNearbyTargets()

void Spell::SelectImplicitNearbyTargets ( SpellEffectInfo const &  spellEffectInfo,
SpellImplicitTargetInfo const &  targetType,
SpellTargetIndex  targetIndex,
uint32  effMask 
)

Definition at line 1089 of file Spell.cpp.

References SpellDestination::_position, ABORT_MSG, AddCorpseTarget(), AddGOTarget(), AddUnitTarget(), SpellImplicitTargetInfo::CalcDirectionAngle(), SpellEffectInfo::CalcRadius(), CallScriptDestinationTargetSelectHandlers(), CallScriptObjectTargetSelectHandlers(), SpellEffectInfo::EffectIndex, finish(), focusObject, SpellImplicitTargetInfo::GetCheckType(), BaseEntity::GetGUID(), WorldLocation::GetMapId(), SpellInfo::GetMaxRange(), SpellImplicitTargetInfo::GetObjectType(), SpellImplicitTargetInfo::GetReferenceType(), SpellImplicitTargetInfo::GetTarget(), ObjectGuid::GetTypeName(), SpellInfo::HasAttribute(), SpellInfo::Id, SpellEffectInfo::ImplicitTargetConditions, Position::IsInDist(), IsPositive(), m_caster, m_spellInfo, m_targets, SpellRange::Max, MovePosition(), SpellEffectInfo::PositionFacing, SpellInfo::RequiresSpellFocus, SearchNearbyTarget(), SelectImplicitChainTargets(), SendCastResult(), SpellCastTargets::SetDst(), Position::SetOrientation(), SPELL_ATTR4_USE_FACING_FROM_SPELL, SPELL_FAILED_BAD_IMPLICIT_TARGETS, sSpellMgr, TARGET_CHECK_ALLY, TARGET_CHECK_DEFAULT, TARGET_CHECK_ENEMY, TARGET_CHECK_ENTRY, TARGET_CHECK_PARTY, TARGET_CHECK_RAID, TARGET_CHECK_RAID_CLASS, TARGET_DEST_NEARBY_ENTRY_OR_DB, TARGET_OBJECT_TYPE_CORPSE, TARGET_OBJECT_TYPE_DEST, TARGET_OBJECT_TYPE_GOBJ, TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TC_LOG_DEBUG, Object::ToCorpse(), Object::ToGameObject(), and Object::ToUnit().

Referenced by SelectEffectImplicitTargets().

◆ SelectImplicitTargetDestTargets()

◆ SelectImplicitTargetObjectTargets()

◆ SelectImplicitTrajTargets()

◆ SelectSpellTargets()

void Spell::SelectSpellTargets ( )

Definition at line 720 of file Spell.cpp.

References AddDestTarget(), CalculateDelayMomentForDst(), CheckScriptEffectImplicitTargets(), Spell::TargetInfoBase::EffectMask, finish(), focusObject, SpellCastTargets::GetDst(), SpellCastTargets::GetDstPos(), SpellInfo::GetEffects(), Map::GetLiquidStatus(), WorldObject::GetMap(), WorldObject::GetPhaseShift(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GetSpellInfo(), GetTargetFlagMask(), SpellInfo::HasAttribute(), SpellCastTargets::HasDst(), SpellInfo::IsChanneled(), SpellInfo::LaunchDelay, LIQUID_MAP_IN_WATER, LIQUID_MAP_WATER_WALK, m_caster, m_channelTargetEffectMask, m_delayMoment, m_spellInfo, m_targets, m_UniqueGOTargetInfo, m_UniqueItemInfo, m_UniqueTargetInfo, Spell::TargetInfo::MissCondition, PlayersOnly, SelectEffectImplicitTargets(), SelectEffectTypeImplicitTargets(), SelectExplicitTargets(), SendCastResult(), SpellCastTargets::SetTargetFlag(), SPELL_ATTR1_REQUIRE_ALL_TARGETS, SPELL_ATTR2_FAIL_ON_ALL_TARGETS_IMMUNE, SPELL_ATTR8_REQUIRES_LOCATION_TO_BE_ON_LIQUID_SURFACE, SPELL_FAILED_BAD_IMPLICIT_TARGETS, SPELL_FAILED_IMMUNE, SPELL_FAILED_NO_LIQUID, SPELL_MISS_IMMUNE, SPELL_MISS_IMMUNE2, TARGET_FLAG_GAMEOBJECT, TARGET_FLAG_GAMEOBJECT_ITEM, TARGET_FLAG_UNIT, TARGET_OBJECT_TYPE_UNIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CATEGORY_CONE, TARGET_SELECT_CATEGORY_LINE, TARGET_SELECT_CATEGORY_NEARBY, TargetA, and TargetB.

Referenced by _cast(), and CanAutoCast().

◆ SendCastResult() [1/2]

◆ SendCastResult() [2/2]

◆ SendChannelStart()

void Spell::SendChannelStart ( uint32  duration)

Definition at line 5240 of file Spell.cpp.

References Unit::AddChannelObject(), WorldPackets::Spells::SpellChannelStart::CasterGUID, WorldPackets::Spells::SpellEmpowerStart::CasterGUID, WorldPackets::Spells::SpellEmpowerStart::CastID, WorldPackets::Spells::SpellChannelStart::ChannelDuration, WorldPackets::Spells::SpellEmpowerStart::EmpowerDuration, SpellInfo::GetEffects(), GameTime::GetGameTimeMS(), BaseEntity::GetGUID(), Unit::GetMechanicImmunityMask(), Unit::GetSchoolImmunityMask(), SpellCastTargets::GetUnitTargetGUID(), ObjectAccessor::GetWorldObject(), SpellInfo::HasAttribute(), WorldPackets::Spells::SpellChannelStart::HealPrediction, WorldPackets::Spells::SpellEmpowerStart::HealPrediction, WorldPackets::Spells::SpellEmpowerStart::HoldAtMaxTime, SpellInfo::Id, WorldPackets::Spells::SpellChannelStart::InterruptImmunities, WorldPackets::Spells::SpellEmpowerStart::InterruptImmunities, IsEmpowerSpell(), ObjectGuid::IsEmpty(), BaseEntity::IsUnit(), m_caster, m_castId, m_empower, m_spellInfo, m_SpellVisual, m_targets, m_timer, m_UniqueGOTargetInfo, m_UniqueTargetInfo, Unit::m_unitData, WorldPackets::Spells::SpellEmpowerStart::MinHoldTime, WorldObject::SendMessageToSet(), Unit::SetChannelSpellData(), Unit::SetChannelSpellId(), Unit::SetChannelVisual(), Unit::SetSpellEmpowerStage(), SPELL_ATTR1_IS_CHANNELLED, SPELL_ATTR1_IS_SELF_CHANNELLED, SPELL_ATTR8_HEAL_PREDICTION, SPELL_EFFECT_APPLY_AURA, SPELL_EMPOWER_HOLD_TIME_AT_MAX, WorldPackets::Spells::SpellChannelStart::SpellID, WorldPackets::Spells::SpellEmpowerStart::SpellID, WorldPackets::Spells::SpellEmpowerStart::StageDurations, WorldPackets::Spells::SpellEmpowerStart::Targets, Object::ToCreature(), Object::ToUnit(), UpdateSpellHealPrediction(), WorldPackets::Spells::SpellChannelStart::Visual, WorldPackets::Spells::SpellEmpowerStart::Visual, WorldPackets::Spells::SpellChannelStart::Write(), and WorldPackets::Spells::SpellEmpowerStart::Write().

Referenced by handle_immediate().

◆ SendChannelUpdate()

◆ SendInterrupted()

◆ SendMountResult()

◆ SendPetCastResult()

◆ SendResurrectRequest()

◆ SendSpellCooldown()

◆ SendSpellExecuteLog()

◆ SendSpellGo()

void Spell::SendSpellGo ( )

Definition at line 4776 of file Spell.cpp.

References _triggeredCastFlags, ASSERT_NOTNULL, WorldPackets::Spells::SpellGo::Cast, CAST_FLAG_ADJUST_MISSILE, CAST_FLAG_FROM_CLIENT, CAST_FLAG_PENDING, CAST_FLAG_POWER_LEFT_SELF, CAST_FLAG_PROJECTILE, CAST_FLAG_RUNE_LIST, CAST_FLAG_UNKNOWN_9, WorldPackets::Spells::SpellCastData::CasterGUID, WorldPackets::Spells::SpellCastData::CasterUnit, WorldPackets::Spells::SpellCastData::CastFlags, WorldPackets::Spells::SpellCastData::CastFlagsEx, WorldPackets::Spells::SpellCastData::CastID, WorldPackets::Spells::SpellCastData::CastTime, CLASS_DEATH_KNIGHT, WorldPackets::Spells::SpellPowerData::Cost, Unit::GetClass(), BaseEntity::GetGUID(), Unit::GetMaxPower(), getMSTime(), SpellCastTargets::GetPitch(), Player::GetRuneBaseCooldown(), Player::GetRuneCooldown(), Player::GetRunesState(), BaseEntity::GetTypeId(), SpellInfo::HasAttribute(), HasPowerTypeCost(), SpellCastTargets::HasTraj(), SpellInfo::Id, WorldPackets::Spells::SpellCastLogData::Initialize(), SpellInfo::IsAutoRepeatRangedSpell(), IsNeedSendToClient(), Unit::IsPet(), WorldPackets::CombatLog::CombatLogServerPacket::LogData, m_caster, m_castFlagsEx, m_castId, m_CastItem, m_delayMoment, m_fromClient, m_originalCastId, m_powerCost, m_runesState, m_spellInfo, m_SpellVisual, m_targets, m_triggeredByAuraSpell, WorldPackets::Spells::SpellCastData::MissileTrajectory, WorldPackets::Spells::SpellCastData::OriginalCastID, WorldPackets::Spells::MissileTrajectoryResult::Pitch, SpellPowerCost::Power, POWER_RUNES, WorldPackets::Spells::SpellCastData::RemainingPower, WorldPackets::Spells::SpellCastData::RemainingRunes, WorldObject::SendCombatLogMessage(), SPELL_ATTR0_CU_NEEDS_AMMO_DATA, SPELL_ATTR0_USES_RANGED_SLOT, SPELL_ATTR10_USES_RANGED_SLOT_COSMETIC_ONLY, WorldPackets::Spells::SpellCastData::SpellID, WorldPackets::Spells::SpellCastData::Target, TC_LOG_DEBUG, Object::ToCreature(), Object::ToPlayer(), Object::ToUnit(), WorldPackets::Spells::MissileTrajectoryResult::TravelTime, TRIGGERED_IGNORE_POWER_COST, TRIGGERED_IS_TRIGGERED_MASK, WorldPackets::Spells::SpellPowerData::Type, TYPEID_PLAYER, TYPEID_UNIT, UpdateSpellCastDataTargets(), WorldPackets::Spells::SpellCastData::Visual, and SpellCastTargets::Write().

Referenced by _cast().

◆ SendSpellInterruptLog()

◆ SendSpellStart()

void Spell::SendSpellStart ( )

Definition at line 4669 of file Spell.cpp.

References _triggeredCastFlags, WorldPackets::Spells::SpellCastData::AmmoDisplayID, ASSERT_NOTNULL, WorldPackets::Spells::SpellStart::Cast, CAST_FLAG_FROM_CLIENT, CAST_FLAG_HAS_TRAJECTORY, CAST_FLAG_HEAL_PREDICTION, CAST_FLAG_IMMUNITY, CAST_FLAG_PENDING, CAST_FLAG_POWER_LEFT_SELF, CAST_FLAG_PROJECTILE, CAST_FLAG_RUNE_LIST, WorldPackets::Spells::SpellCastData::CasterGUID, WorldPackets::Spells::SpellCastData::CasterUnit, WorldPackets::Spells::SpellCastData::CastFlags, WorldPackets::Spells::SpellCastData::CastFlagsEx, WorldPackets::Spells::SpellCastData::CastID, WorldPackets::Spells::SpellCastData::CastTime, WorldPackets::Spells::SpellPowerData::Cost, BaseEntity::GetGUID(), SpellInfo::GetMechanicImmunityMask(), GetSpellCastDataAmmo(), BaseEntity::GetTypeId(), SpellInfo::HasAttribute(), SpellInfo::Id, WorldPackets::Spells::SpellCastData::Immunities, SpellInfo::IsAutoRepeatRangedSpell(), IsNeedSendToClient(), Unit::IsPet(), BaseEntity::IsUnit(), m_caster, m_castFlagsEx, m_castId, m_CastItem, m_casttime, m_fromClient, m_originalCastId, m_powerCost, m_runesState, m_spellInfo, m_SpellVisual, m_targets, m_timer, m_triggeredByAuraSpell, WorldPackets::Spells::SpellCastData::OriginalCastID, SpellPowerCost::Power, POWER_RUNES, WorldPackets::Spells::SpellCastData::Predict, WorldPackets::Spells::SpellCastData::RemainingPower, WorldPackets::Spells::SpellCastData::RemainingRunes, WorldPackets::Spells::CreatureImmunities::School, WorldObject::SendMessageToSet(), SPELL_ATTR0_CU_NEEDS_AMMO_DATA, SPELL_ATTR0_USES_RANGED_SLOT, SPELL_ATTR10_USES_RANGED_SLOT_COSMETIC_ONLY, SPELL_ATTR8_HEAL_PREDICTION, WorldPackets::Spells::SpellCastData::SpellID, WorldPackets::Spells::SpellCastData::Target, TC_LOG_DEBUG, Object::ToCreature(), Object::ToPlayer(), Object::ToUnit(), TRIGGERED_IS_TRIGGERED_MASK, WorldPackets::Spells::SpellPowerData::Type, TYPEID_PLAYER, TYPEID_UNIT, UpdateSpellHealPrediction(), WorldPackets::Spells::CreatureImmunities::Value, WorldPackets::Spells::SpellCastData::Visual, WorldPackets::Spells::SpellStart::Write(), and SpellCastTargets::Write().

Referenced by prepare().

◆ SetAutoRepeat()

void Spell::SetAutoRepeat ( bool  rep)
inline

Definition at line 663 of file Spell.h.

◆ SetDelayStart()

void Spell::SetDelayStart ( uint64  m_time)
inline

Definition at line 686 of file Spell.h.

Referenced by _cast(), and SpellEvent::Execute().

◆ SetEmpowerReleasedByClient()

void Spell::SetEmpowerReleasedByClient ( bool  release)

◆ SetExecutedCurrently()

void Spell::SetExecutedCurrently ( bool  yes)
inline

Definition at line 684 of file Spell.h.

Referenced by _cast(), cancel(), and finish().

◆ SetReferencedFromCurrent()

void Spell::SetReferencedFromCurrent ( bool  yes)
inline

Definition at line 682 of file Spell.h.

Referenced by cancel(), Unit::InterruptSpell(), and Unit::SetCurrentCastSpell().

◆ SetRuneState()

void Spell::SetRuneState ( uint8  value)
inline

Definition at line 693 of file Spell.h.

◆ SetSpellValue()

◆ setState()

void Spell::setState ( SpellState  state)
inline

Definition at line 551 of file Spell.h.

◆ SummonGuardian()

◆ TakeCastItem()

◆ TakePower()

◆ TakeReagents()

◆ TakeRunePower()

◆ TriggerGlobalCooldown()

◆ update()

◆ UpdateChanneledTargetList()

◆ UpdateDelayMomentForDst()

void Spell::UpdateDelayMomentForDst ( uint64  hitDelay)

◆ UpdateDelayMomentForUnitTarget()

void Spell::UpdateDelayMomentForUnitTarget ( Unit *  unit,
uint64  hitDelay 
)

◆ UpdatePointers()

◆ UpdateSpellCastDataTargets()

◆ UpdateSpellHealPrediction()

Friends And Related Symbol Documentation

◆ SpellScript

friend class SpellScript
friend

Definition at line 278 of file Spell.h.

Member Data Documentation

◆ _dynObjAura

DynObjAura* Spell::_dynObjAura
protected

◆ _executeLogEffects

std::vector<SpellLogEffect> Spell::_executeLogEffects
protected

Definition at line 1003 of file Spell.h.

Referenced by GetExecuteLogEffect(), and SendSpellExecuteLog().

◆ _spellAura

◆ _spellEvent

SpellEvent* Spell::_spellEvent
protected

◆ _triggeredCastFlags

◆ AbilityId

uint32 Spell::AbilityId

Definition at line 627 of file Spell.h.

◆ Data

◆ destTarget

◆ effectHandleMode

SpellEffectHandleMode Spell::effectHandleMode
protected

Definition at line 806 of file Spell.h.

Referenced by EffectActivateGarrisonBuilding(), EffectActivateObject(), EffectActivateSpec(), EffectAddExtraAttacks(), EffectAddFarsight(), EffectAddGarrisonFollower(), EffectApplyAura(), EffectApplyEnchantIllusion(), EffectApplyGlyph(), EffectApplyMountEquipment(), EffectBind(), EffectBlock(), EffectCancelConversation(), EffectCastButtons(), EffectChangeActiveCombatTraitConfig(), EffectChangeBattlePetQuality(), EffectChangeRaidMarker(), EffectCharge(), EffectChargeDest(), EffectCreateAreaTrigger(), EffectCreateConversation(), EffectCreateGarrison(), EffectCreateHeirloomItem(), EffectCreateItem(), EffectCreateItem2(), EffectCreatePrivateConversation(), EffectCreatePrivateSceneObject(), EffectCreateRandomItem(), EffectCreateSceneObject(), EffectCreateTamedPet(), EffectCreateTraitTreeConfig(), EffectDamageFromMaxHealthPCT(), EffectDestroyAllTotems(), EffectDestroyItem(), EffectDiscoverTaxi(), EffectDisEnchant(), EffectDismissPet(), EffectDispel(), EffectDispelMechanic(), EffectDistract(), EffectDualWield(), EffectDuel(), EffectDummy(), EffectDurabilityDamage(), EffectDurabilityDamagePCT(), EffectEnableBattlePets(), EffectEnchantHeldItem(), EffectEnchantItemPerm(), EffectEnchantItemPrismatic(), EffectEnchantItemTmp(), EffectEnergize(), EffectEnergizePct(), EffectEnvironmentalDMG(), EffectEquipTransmogOutfit(), EffectFeedPet(), EffectForceCast(), EffectForceCast2(), EffectForceDeselect(), EffectGameObjectDamage(), EffectGameObjectRepair(), EffectGameObjectSetDestructionState(), EffectGiveArtifactPower(), EffectGiveArtifactPowerNoBonus(), EffectGiveCurrency(), EffectGiveExperience(), EffectGiveHonor(), EffectGiveRestedExperience(), EffectGrantBattlePetExperience(), EffectGrantBattlePetLevel(), EffectHeal(), EffectHealBattlePetPct(), EffectHealMaxHealth(), EffectHealMechanical(), EffectHealPct(), EffectHealthLeech(), EffectIncreaseCurrencyCap(), EffectInebriate(), EffectInstaKill(), EffectInterruptCast(), EffectJump(), EffectJumpCharge(), EffectJumpDest(), EffectKillCredit(), EffectKillCreditLabel(), EffectKillCreditPersonal(), EffectKnockBack(), EffectLaunchQuestChoice(), EffectLeap(), EffectLeapBack(), EffectLearnAzeriteEssencePower(), EffectLearnGarrisonBuilding(), EffectLearnPetSpell(), EffectLearnSkill(), EffectLearnSpell(), EffectLearnTransmogIllusion(), EffectLearnTransmogSet(), EffectLearnWarbandScene(), EffectMilling(), EffectModifyAuraStacks(), EffectModifyCooldown(), EffectModifyCooldowns(), EffectModifyCooldownsByCategory(), EffectModifySpellCharges(), EffectModifyThreatPercent(), EffectOpenLock(), EffectParry(), EffectPersistentAA(), EffectPickPocket(), EffectPlayMovie(), EffectPlayMusic(), EffectPlayScene(), EffectPlaySceneScriptPackage(), EffectPlaySound(), EffectPowerBurn(), EffectPowerDrain(), EffectProficiency(), EffectProspecting(), EffectPullTowards(), EffectPullTowardsDest(), EffectQuestClear(), EffectQuestComplete(), EffectQuestFail(), EffectQuestStart(), EffectRechargeItem(), EffectRedirectThreat(), EffectRemoveAura(), EffectRemoveAuraBySpellLabel(), EffectRemoveTalent(), EffectRenamePet(), EffectReputation(), EffectRespecAzeriteEmpoweredItem(), EffectResurrect(), EffectResurrectNew(), EffectResurrectPet(), EffectResurrectWithAura(), EffectSanctuary(), EffectSchoolDMG(), EffectScriptEffect(), EffectSelfResurrect(), EffectSendChatMessage(), EffectSendEvent(), EffectSendTaxi(), EffectSetPlayerDataElementAccount(), EffectSetPlayerDataElementCharacter(), EffectSetPlayerDataFlagAccount(), EffectSetPlayerDataFlagCharacter(), EffectSkill(), EffectSkinning(), EffectSkinPlayerCorpse(), EffectSkipCampaign(), EffectSkipQuestLine(), EffectSpiritHeal(), EffectStealBeneficialBuff(), EffectStuck(), EffectSummonChangeItem(), EffectSummonObject(), EffectSummonObjectWild(), EffectSummonPersonalGameObject(), EffectSummonPet(), EffectSummonPlayer(), EffectSummonRaFFriend(), EffectSummonType(), EffectTameCreature(), EffectTaunt(), EffectTeleportGraveyard(), EffectTeleportToReturnPoint(), EffectTeleportUnits(), EffectTeleportUnitsWithVisualLoadingScreen(), EffectTeleUnitsFaceCaster(), EffectThreat(), EffectTitanGrip(), EffectTradeSkill(), EffectTransmitted(), EffectTriggerMissileSpell(), EffectTriggerRitualOfSummoning(), EffectTriggerSpell(), EffectUncageBattlePet(), EffectUnlearnSpecialization(), EffectUnlockGuildVaultTab(), EffectUntrainTalents(), EffectUpdateInteractions(), EffectUpdatePlayerPhase(), EffectUpdateZoneAurasAndPhases(), EffectUpgradeHeirloom(), EffectWeaponDmg(), HandleEffects(), and Spell().

◆ effectInfo

SpellEffectInfo const* Spell::effectInfo
protected

Definition at line 807 of file Spell.h.

Referenced by EffectActivateGarrisonBuilding(), EffectActivateObject(), EffectAddExtraAttacks(), EffectAddFarsight(), EffectAddGarrisonFollower(), EffectApplyAura(), EffectApplyEnchantIllusion(), EffectApplyGlyph(), EffectApplyMountEquipment(), EffectBind(), EffectCancelConversation(), EffectCastButtons(), EffectCharge(), EffectChargeDest(), EffectCreateAreaTrigger(), EffectCreateConversation(), EffectCreateGarrison(), EffectCreateHeirloomItem(), EffectCreateItem(), EffectCreateItem2(), EffectCreatePrivateConversation(), EffectCreatePrivateSceneObject(), EffectCreateSceneObject(), EffectCreateTamedPet(), EffectCreateTraitTreeConfig(), EffectDestroyItem(), EffectDiscoverTaxi(), EffectDismissPet(), EffectDispel(), EffectDispelMechanic(), EffectDuel(), EffectDummy(), EffectDurabilityDamage(), EffectDurabilityDamagePCT(), EffectEnchantHeldItem(), EffectEnchantItemPerm(), EffectEnchantItemPrismatic(), EffectEnchantItemTmp(), EffectEnergize(), EffectEnergizePct(), EffectFeedPet(), EffectForceCast(), EffectForceCast2(), EffectGameObjectSetDestructionState(), EffectGiveArtifactPower(), EffectGiveCurrency(), EffectGiveExperience(), EffectHeal(), EffectHealMechanical(), EffectHealPct(), EffectHealthLeech(), EffectIncreaseCurrencyCap(), EffectInterruptCast(), EffectJump(), EffectJumpCharge(), EffectJumpDest(), EffectKillCredit(), EffectKillCreditLabel(), EffectKillCreditPersonal(), EffectKnockBack(), EffectLaunchQuestChoice(), EffectLeap(), EffectLeapBack(), EffectLearnAzeriteEssencePower(), EffectLearnGarrisonBuilding(), EffectLearnPetSpell(), EffectLearnSkill(), EffectLearnSpell(), EffectLearnTransmogIllusion(), EffectLearnTransmogSet(), EffectLearnWarbandScene(), EffectModifyAuraStacks(), EffectModifyCooldown(), EffectModifyCooldowns(), EffectModifyCooldownsByCategory(), EffectModifySpellCharges(), EffectOpenLock(), EffectPersistentAA(), EffectPlayMovie(), EffectPlayMusic(), EffectPlayScene(), EffectPlaySceneScriptPackage(), EffectPlaySound(), EffectPowerBurn(), EffectPowerDrain(), EffectPullTowards(), EffectPullTowardsDest(), EffectQuestClear(), EffectQuestComplete(), EffectQuestFail(), EffectQuestStart(), EffectRechargeItem(), EffectRemoveAura(), EffectRemoveAuraBySpellLabel(), EffectReputation(), EffectResurrect(), EffectResurrectNew(), EffectResurrectWithAura(), EffectSchoolDMG(), EffectScriptEffect(), EffectSelfResurrect(), EffectSendChatMessage(), EffectSendEvent(), EffectSendTaxi(), EffectSetPlayerDataElementAccount(), EffectSetPlayerDataElementCharacter(), EffectSetPlayerDataFlagAccount(), EffectSetPlayerDataFlagCharacter(), EffectSkill(), EffectSkipCampaign(), EffectSkipQuestLine(), EffectStealBeneficialBuff(), EffectSummonChangeItem(), EffectSummonObject(), EffectSummonObjectWild(), EffectSummonPersonalGameObject(), EffectSummonPet(), EffectSummonRaFFriend(), EffectSummonType(), EffectTeleportToReturnPoint(), EffectTeleportUnits(), EffectTeleportUnitsWithVisualLoadingScreen(), EffectTeleUnitsFaceCaster(), EffectTitanGrip(), EffectTransmitted(), EffectTriggerMissileSpell(), EffectTriggerRitualOfSummoning(), EffectTriggerSpell(), EffectUnlearnSpecialization(), EffectWeaponDmg(), SpellScript::GetEffectInfo(), HandleEffects(), and Spell().

◆ effectValue

◆ EquipAction

uint32 Spell::EquipAction

Definition at line 639 of file Spell.h.

◆ [struct]

struct { ... } Spell::EquipTransmogOutfit

◆ focusObject

◆ gameObjTarget

◆ [struct]

struct { ... } Spell::GarrFollower

◆ GarrMissionId

uint32 Spell::GarrMissionId

Definition at line 631 of file Spell.h.

◆ Id

uint32 Spell::Id

Definition at line 626 of file Spell.h.

Referenced by EffectGameObjectDamage().

◆ ItemId

uint32 Spell::ItemId

Definition at line 634 of file Spell.h.

◆ itemTarget

◆ m_appliedMods

◆ m_applyMultiplierMask

uint32 Spell::m_applyMultiplierMask
protected

◆ m_attackType

◆ m_autoRepeat

bool Spell::m_autoRepeat
protected

Definition at line 761 of file Spell.h.

Referenced by cancel(), and Spell().

◆ m_canReflect

bool Spell::m_canReflect
protected

Definition at line 760 of file Spell.h.

Referenced by AddUnitTarget(), and Spell().

◆ m_caster

WorldObject* const Spell::m_caster
protected

Definition at line 745 of file Spell.h.

Referenced by _cast(), _handle_finish_phase(), AddCorpseTarget(), AddGOTarget(), AddUnitTarget(), CalculateDamage(), CalculateDelayMomentForDst(), CanAutoCast(), cancel(), CancelGlobalCooldown(), CanExecuteTriggersOnHit(), CanOpenLock(), cast(), CheckCast(), CheckCasterAuras(), CheckDst(), CheckEffectTarget(), CheckItems(), CheckMovement(), CheckPetCast(), CheckPower(), CheckRange(), CheckRuneCost(), CheckSpellCancelsAuraEffect(), CheckSrc(), Delayed(), DelayedChannel(), Spell::TargetInfo::DoDamageAndTriggers(), DoEffectOnLaunchTarget(), DoSpellEffectHit(), Spell::TargetInfo::DoTargetSpellHit(), Spell::GOTargetInfo::DoTargetSpellHit(), Spell::CorpseTargetInfo::DoTargetSpellHit(), DoTriggersOnSpellHit(), EffectActivateObject(), EffectAddFarsight(), EffectApplyEnchantIllusion(), EffectApplyGlyph(), EffectBind(), EffectBlock(), EffectCastButtons(), EffectChangeBattlePetQuality(), EffectChangeRaidMarker(), EffectCharge(), EffectChargeDest(), EffectCreateHeirloomItem(), EffectDisEnchant(), EffectDispel(), EffectDispelMechanic(), EffectDuel(), EffectDummy(), EffectEnchantHeldItem(), EffectEnchantItemPerm(), EffectEnchantItemPrismatic(), EffectEnchantItemTmp(), EffectFeedPet(), EffectForceCast(), EffectForceCast2(), EffectForceDeselect(), EffectGameObjectDamage(), EffectGameObjectRepair(), EffectGameObjectSetDestructionState(), EffectGiveArtifactPower(), EffectGrantBattlePetExperience(), EffectGrantBattlePetLevel(), EffectInstaKill(), EffectInterruptCast(), EffectKnockBack(), EffectLeap(), EffectLeapBack(), EffectLearnSpell(), EffectMilling(), EffectOpenLock(), EffectParry(), EffectPickPocket(), EffectPlayScene(), EffectPlaySceneScriptPackage(), EffectProficiency(), EffectProspecting(), EffectPullTowards(), EffectRespecAzeriteEmpoweredItem(), EffectResurrect(), EffectResurrectNew(), EffectResurrectPet(), EffectResurrectWithAura(), EffectScriptEffect(), EffectSelfResurrect(), EffectSendEvent(), EffectSkinning(), EffectSkinPlayerCorpse(), EffectStealBeneficialBuff(), EffectStuck(), EffectSummonChangeItem(), EffectSummonObject(), EffectSummonObjectWild(), EffectSummonPersonalGameObject(), EffectSummonPet(), EffectSummonRaFFriend(), EffectSummonType(), EffectTeleportToReturnPoint(), EffectTeleportUnits(), EffectTeleportUnitsWithVisualLoadingScreen(), EffectTeleUnitsFaceCaster(), EffectTitanGrip(), EffectTradeSkill(), EffectTransmitted(), EffectTriggerMissileSpell(), EffectTriggerRitualOfSummoning(), EffectTriggerSpell(), EffectUncageBattlePet(), EffectUnlearnSpecialization(), EffectUnlockGuildVaultTab(), EffectUntrainTalents(), EffectUpgradeHeirloom(), finish(), GetCastDifficulty(), GetMinMaxRange(), GetSpellCastDataAmmo(), GetUnitCasterForEffectHandlers(), handle_delayed(), handle_immediate(), HandleThreatSpells(), HasGlobalCooldown(), InitExplicitTargets(), IsChannelActive(), prepare(), PrepareTriggersExecutedOnHit(), PreprocessSpellHit(), PreprocessSpellLaunch(), Spell::TargetInfo::PreprocessTarget(), RefundPower(), RefundRunePower(), ResetCombatTimers(), SearchAreaTargets(), SearchChainTargets(), SearchNearbyTarget(), SearchSpellFocus(), SelectEffectImplicitTargets(), SelectEffectTypeImplicitTargets(), SelectExplicitTargets(), SelectImplicitAreaTargets(), SelectImplicitCasterDestTargets(), SelectImplicitCasterObjectTargets(), SelectImplicitChainTargets(), SelectImplicitChannelTargets(), SelectImplicitConeTargets(), SelectImplicitDestDestTargets(), SelectImplicitLineTargets(), SelectImplicitNearbyTargets(), SelectImplicitTrajTargets(), SelectSpellTargets(), SendCastResult(), SendChannelStart(), SendChannelUpdate(), SendInterrupted(), SendMountResult(), SendPetCastResult(), SendResurrectRequest(), SendSpellCooldown(), SendSpellExecuteLog(), SendSpellGo(), SendSpellInterruptLog(), SendSpellStart(), Spell(), SummonGuardian(), TakeCastItem(), TakePower(), TakeReagents(), TakeRunePower(), TriggerGlobalCooldown(), update(), UpdateChanneledTargetList(), UpdateDelayMomentForDst(), UpdateDelayMomentForUnitTarget(), UpdatePointers(), UpdateSpellHealPrediction(), and ~Spell().

◆ m_castFlagsEx

uint32 Spell::m_castFlagsEx

Definition at line 607 of file Spell.h.

Referenced by WorldSession::HandleUseToy(), SendSpellGo(), SendSpellStart(), and Spell().

◆ m_castId

◆ m_CastItem

◆ m_castItemEntry

◆ m_castItemGUID

◆ m_castItemLevel

◆ m_casttime

int32 Spell::m_casttime
protected

◆ m_channelDuration

int32 Spell::m_channelDuration
protected

Definition at line 759 of file Spell.h.

Referenced by CanReleaseEmpowerSpell(), DelayedChannel(), handle_immediate(), Spell(), and update().

◆ m_channelTargetEffectMask

uint32 Spell::m_channelTargetEffectMask
protected

◆ m_corpseTarget

◆ m_customArg

◆ m_customError

SpellCustomErrors Spell::m_customError

Definition at line 652 of file Spell.h.

Referenced by CheckCast(), SendCastResult(), SpellScript::SetCustomCastResultMessage(), and Spell().

◆ m_damage

◆ m_damageMultipliers

float Spell::m_damageMultipliers[MAX_SPELL_EFFECTS]
protected

Definition at line 794 of file Spell.h.

Referenced by DoEffectOnLaunchTarget(), SelectImplicitChainTargets(), and Spell().

◆ m_delayAtDamageCount

uint8 Spell::m_delayAtDamageCount
protected

Definition at line 764 of file Spell.h.

Referenced by Spell().

◆ m_delayMoment

◆ m_delayStart

uint64 Spell::m_delayStart
protected

Definition at line 785 of file Spell.h.

Referenced by Spell().

◆ m_destTargets

◆ m_empower

std::unique_ptr<EmpowerData> Spell::m_empower
protected

◆ m_executedCurrently

bool Spell::m_executedCurrently
protected

Definition at line 792 of file Spell.h.

Referenced by cancel(), finish(), and Spell().

◆ m_focusObjectGUID

ObjectGuid Spell::m_focusObjectGUID
protected

Definition at line 814 of file Spell.h.

Referenced by CheckCast(), and UpdatePointers().

◆ m_fromClient

◆ m_healing

◆ m_hitMask

ProcFlagsHit Spell::m_hitMask
protected

◆ m_hitTriggerSpells

HitTriggerSpellList Spell::m_hitTriggerSpells
protected

Definition at line 977 of file Spell.h.

Referenced by DoTriggersOnSpellHit(), and PrepareTriggersExecutedOnHit().

◆ m_immediateHandled

bool Spell::m_immediateHandled
protected

Definition at line 788 of file Spell.h.

Referenced by _cast(), handle_delayed(), and Spell().

◆ m_launchHandled

bool Spell::m_launchHandled
protected

Definition at line 787 of file Spell.h.

Referenced by _cast(), handle_delayed(), and Spell().

◆ m_loadedScripts

◆ [union]

◆ m_originalCaster

◆ m_originalCasterGUID

◆ m_originalCastId

◆ m_powerCost

◆ m_preGeneratedPath

std::unique_ptr<PathGenerator> Spell::m_preGeneratedPath
protected

Definition at line 1001 of file Spell.h.

Referenced by CheckCast(), and EffectCharge().

◆ m_procAttacker

ProcFlagsInit Spell::m_procAttacker
protected

◆ m_procChainLength

int32 Spell::m_procChainLength
protected

Definition at line 999 of file Spell.h.

Referenced by Spell().

◆ m_procSpellType

ProcFlagsSpellType Spell::m_procSpellType
protected

◆ m_procVictim

ProcFlagsInit Spell::m_procVictim
protected

Definition at line 825 of file Spell.h.

Referenced by Spell::TargetInfo::DoDamageAndTriggers(), and prepareDataForTriggerSystem().

◆ m_referencedFromCurrentSpell

bool Spell::m_referencedFromCurrentSpell
protected

Definition at line 791 of file Spell.h.

Referenced by Spell(), and ~Spell().

◆ m_runesState

uint8 Spell::m_runesState
protected

Definition at line 762 of file Spell.h.

Referenced by RefundRunePower(), SendSpellGo(), SendSpellStart(), Spell(), and TakeRunePower().

◆ m_scriptResult

Definition at line 656 of file Spell.h.

Referenced by _cast(), WorldObject::CastSpell(), and finish().

◆ m_scriptWaitsForSpellHit

bool Spell::m_scriptWaitsForSpellHit = false

Definition at line 657 of file Spell.h.

Referenced by _cast(), WorldObject::CastSpell(), and finish().

◆ m_selfContainer

Spell** Spell::m_selfContainer

Definition at line 714 of file Spell.h.

Referenced by cancel(), Unit::SetCurrentCastSpell(), Spell(), and ~Spell().

◆ m_spellInfo

SpellInfo const* const Spell::m_spellInfo

Definition at line 599 of file Spell.h.

Referenced by _cast(), _handle_finish_phase(), _handle_immediate_phase(), AddCorpseTarget(), AddGOTarget(), AddItemTarget(), AddUnitTarget(), CalculateDelayMomentForDst(), CallScriptDestinationTargetSelectHandlers(), CallScriptEffectHandlers(), CallScriptObjectAreaTargetSelectHandlers(), CallScriptObjectTargetSelectHandlers(), CanAutoCast(), cancel(), CancelGlobalCooldown(), CanOpenLock(), CheckArenaAndRatedBattlegroundCastRules(), CheckCast(), CheckCasterAuras(), CheckEffectTarget(), CheckItems(), CheckMovement(), CheckPetCast(), CheckRange(), CheckScriptEffectImplicitTargets(), CheckSpellCancelsAuraEffect(), Delayed(), DelayedChannel(), DoCreateItem(), Spell::TargetInfo::DoDamageAndTriggers(), DoEffectOnLaunchTarget(), DoProcessTargetContainer(), DoSpellEffectHit(), Spell::TargetInfo::DoTargetSpellHit(), Spell::GOTargetInfo::DoTargetSpellHit(), DoTriggersOnSpellHit(), EffectActivateObject(), EffectAddFarsight(), EffectCharge(), EffectChargeDest(), EffectCreateItem(), EffectCreateItem2(), EffectCreateRandomItem(), EffectCreateTamedPet(), EffectDisEnchant(), EffectDispel(), EffectDuel(), EffectDummy(), EffectEnchantHeldItem(), EffectEnchantItemPerm(), EffectEnchantItemPrismatic(), EffectEnchantItemTmp(), EffectEnergize(), EffectEnergizePct(), EffectEnvironmentalDMG(), EffectForceCast(), EffectForceCast2(), EffectHeal(), EffectHealMechanical(), EffectHealPct(), EffectHealthLeech(), EffectInstaKill(), EffectInterruptCast(), EffectJump(), EffectJumpCharge(), EffectJumpDest(), EffectOpenLock(), EffectPersistentAA(), EffectPlayMusic(), EffectPlaySound(), EffectPowerDrain(), EffectProficiency(), EffectPullTowards(), EffectPullTowardsDest(), EffectRedirectThreat(), EffectSchoolDMG(), EffectScriptEffect(), EffectSendEvent(), EffectSendTaxi(), EffectSkinning(), EffectStealBeneficialBuff(), EffectSummonObject(), EffectSummonObjectWild(), EffectSummonPersonalGameObject(), EffectSummonPet(), EffectSummonType(), EffectTameCreature(), EffectTaunt(), EffectTeleportUnits(), EffectTeleportUnitsWithVisualLoadingScreen(), EffectThreat(), EffectTitanGrip(), EffectTransmitted(), EffectTriggerMissileSpell(), EffectTriggerRitualOfSummoning(), EffectTriggerSpell(), EffectWeaponDmg(), SpellEvent::Execute(), FinalizeDataForTriggerSystem(), finish(), GetCurrentContainer(), GetMinMaxRange(), handle_delayed(), handle_immediate(), HandleLaunchPhase(), HandleThreatSpells(), WorldSession::HandleUpdateMissileTrajectory(), HasGlobalCooldown(), InitExplicitTargets(), IsAutoActionResetSpell(), IsFocusDisabled(), IsNeedSendToClient(), IsPositive(), IsValidDeadOrAliveTarget(), IsWithinLOS(), IsWithinLOS(), LoadScripts(), MovePosition(), prepare(), prepareDataForTriggerSystem(), PrepareTriggersExecutedOnHit(), PreprocessSpellHit(), PreprocessSpellLaunch(), Spell::TargetInfo::PreprocessTarget(), RefundPower(), SearchAreaTargets(), SearchChainTargets(), SearchNearbyTarget(), SearchSpellFocus(), SelectEffectImplicitTargets(), SelectEffectTypeImplicitTargets(), SelectExplicitTargets(), SelectImplicitAreaTargets(), SelectImplicitCasterDestTargets(), SelectImplicitChainTargets(), SelectImplicitChannelTargets(), SelectImplicitConeTargets(), SelectImplicitDestDestTargets(), SelectImplicitLineTargets(), SelectImplicitNearbyTargets(), SelectImplicitTargetDestTargets(), SelectImplicitTrajTargets(), SelectSpellTargets(), SendCastResult(), SendChannelStart(), SendInterrupted(), SendPetCastResult(), SendResurrectRequest(), SendSpellCooldown(), SendSpellExecuteLog(), SendSpellGo(), SendSpellInterruptLog(), SendSpellStart(), Spell(), SummonGuardian(), TakeCastItem(), TakePower(), TakeReagents(), TriggerGlobalCooldown(), update(), UpdateChanneledTargetList(), UpdatePointers(), UpdateSpellCastDataTargets(), UpdateSpellHealPrediction(), ~Spell(), and SpellEvent::~SpellEvent().

◆ m_spellSchoolMask

◆ m_spellState

SpellState Spell::m_spellState
protected

Definition at line 989 of file Spell.h.

Referenced by _cast(), cancel(), DelayedChannel(), finish(), handle_immediate(), prepare(), Spell(), and update().

◆ m_spellValue

◆ m_SpellVisual

◆ m_targets

SpellCastTargets Spell::m_targets

Definition at line 651 of file Spell.h.

Referenced by _cast(), CalculateDelayMomentForDst(), CheckCast(), CheckDst(), CheckEffectTarget(), CheckItems(), CheckPetCast(), spell_warr_ashen_juggernaut::CheckProc(), spell_mage_hot_streak::CheckProc(), CheckRange(), CheckSrc(), EffectBind(), EffectChangeRaidMarker(), EffectCreateAreaTrigger(), EffectCreateConversation(), EffectCreatePrivateSceneObject(), EffectCreateSceneObject(), EffectEnchantItemPerm(), EffectJump(), EffectJumpCharge(), EffectJumpDest(), EffectKnockBack(), EffectLeap(), EffectPullTowardsDest(), EffectScriptEffect(), EffectSummonChangeItem(), EffectSummonObject(), EffectSummonObjectWild(), EffectSummonPersonalGameObject(), EffectTeleportUnits(), EffectTeleportUnitsWithVisualLoadingScreen(), EffectTeleUnitsFaceCaster(), EffectTransmitted(), EffectTriggerMissileSpell(), EffectTriggerSpell(), SpellScript::GetExplTargetDest(), SpellScript::GetExplTargetGObj(), SpellScript::GetExplTargetItem(), SpellScript::GetExplTargetUnit(), SpellScript::GetExplTargetWorldObject(), GetMinMaxRange(), handle_delayed(), WorldSession::HandleAcceptTradeOpcode(), WorldSession::HandleMissileTrajectoryCollision(), WorldSession::HandlePetActionHelper(), spell_torghast_poisonous_spores::HandleProc(), spell_mage_ethereal_blink::HandleProc(), spell_pri_divine_word::HandleProc(), spell_vehicle_throw_passenger::spell_vehicle_throw_passenger_SpellScript::HandleScript(), WorldSession::HandleUpdateMissileTrajectory(), InitExplicitTargets(), spell_baleroc_torment_target_search::OnHit(), prepare(), SelectEffectImplicitTargets(), SelectEffectTypeImplicitTargets(), SelectExplicitTargets(), SelectImplicitAreaTargets(), SelectImplicitCasterDestTargets(), SelectImplicitChannelTargets(), SelectImplicitDestDestTargets(), SelectImplicitLineTargets(), SelectImplicitNearbyTargets(), SelectImplicitTargetDestTargets(), SelectImplicitTargetObjectTargets(), SelectImplicitTrajTargets(), SelectSpellTargets(), SendCastResult(), SendChannelStart(), SendSpellGo(), SendSpellStart(), SpellScript::SetExplTargetDest(), SummonGuardian(), TakeCastItem(), TakePower(), TakeReagents(), DivineImageHelpers::Trigger(), update(), UpdatePointers(), and UpdateSpellHealPrediction().

◆ m_timer

int32 Spell::m_timer
protected

◆ m_triggeredByAuraSpell

SpellInfo const* Spell::m_triggeredByAuraSpell
protected

◆ m_UniqueCorpseTargetInfo

std::vector<CorpseTargetInfo> Spell::m_UniqueCorpseTargetInfo
protected

◆ m_UniqueGOTargetInfo

◆ m_UniqueItemInfo

std::vector<ItemTargetInfo> Spell::m_UniqueItemInfo
protected

◆ m_UniqueTargetInfo

◆ [struct]

◆ SituationTrigger

uint32 Spell::SituationTrigger

Definition at line 641 of file Spell.h.

◆ SpecializationId

uint32 Spell::SpecializationId

Definition at line 617 of file Spell.h.

◆ SpellId

uint32 Spell::SpellId

Definition at line 614 of file Spell.h.

◆ TalentId

uint32 Spell::TalentId

Definition at line 611 of file Spell.h.

◆ targetMissInfo

SpellMissInfo Spell::targetMissInfo
protected

Definition at line 804 of file Spell.h.

Referenced by Spell::TargetInfo::DoTargetSpellHit(), EffectDispel(), and Spell().

◆ TransmogOutfitId

uint32 Spell::TransmogOutfitId

Definition at line 640 of file Spell.h.

◆ unitTarget

Unit* Spell::unitTarget
protected

Definition at line 797 of file Spell.h.

Referenced by DoCreateItem(), Spell::TargetInfo::DoDamageAndTriggers(), Spell::TargetInfo::DoTargetSpellHit(), EffectActivateGarrisonBuilding(), EffectActivateSpec(), EffectAddExtraAttacks(), EffectAddGarrisonFollower(), EffectApplyAura(), EffectApplyMountEquipment(), EffectBind(), EffectCancelConversation(), EffectChangeActiveCombatTraitConfig(), EffectChangeBattlePetQuality(), EffectCharge(), EffectCreateGarrison(), EffectCreateItem2(), EffectCreatePrivateConversation(), EffectCreateRandomItem(), EffectCreateTamedPet(), EffectCreateTraitTreeConfig(), EffectDamageFromMaxHealthPCT(), EffectDestroyItem(), EffectDiscoverTaxi(), EffectDismissPet(), EffectDispel(), EffectDispelMechanic(), EffectDistract(), EffectDualWield(), EffectDuel(), EffectDummy(), EffectDurabilityDamage(), EffectDurabilityDamagePCT(), EffectEnableBattlePets(), EffectEnchantHeldItem(), EffectEnchantItemPerm(), EffectEnergize(), EffectEnergizePct(), EffectEnvironmentalDMG(), EffectEquipTransmogOutfit(), EffectForceCast(), EffectForceCast2(), EffectGiveArtifactPowerNoBonus(), EffectGiveCurrency(), EffectGiveExperience(), EffectGiveHonor(), EffectGiveRestedExperience(), EffectGrantBattlePetExperience(), EffectGrantBattlePetLevel(), EffectHeal(), EffectHealBattlePetPct(), EffectHealMaxHealth(), EffectHealMechanical(), EffectHealPct(), EffectHealthLeech(), EffectIncreaseCurrencyCap(), EffectInebriate(), EffectInstaKill(), EffectInterruptCast(), EffectJump(), EffectJumpCharge(), EffectKillCredit(), EffectKillCreditLabel(), EffectKillCreditPersonal(), EffectKnockBack(), EffectLaunchQuestChoice(), EffectLeap(), EffectLeapBack(), EffectLearnAzeriteEssencePower(), EffectLearnGarrisonBuilding(), EffectLearnPetSpell(), EffectLearnSkill(), EffectLearnSpell(), EffectLearnTransmogIllusion(), EffectLearnTransmogSet(), EffectLearnWarbandScene(), EffectModifyAuraStacks(), EffectModifyCooldown(), EffectModifyCooldowns(), EffectModifyCooldownsByCategory(), EffectModifySpellCharges(), EffectModifyThreatPercent(), EffectPickPocket(), EffectPlayMovie(), EffectPlayMusic(), EffectPlaySound(), EffectPowerBurn(), EffectPowerDrain(), EffectPullTowards(), EffectPullTowardsDest(), EffectQuestClear(), EffectQuestComplete(), EffectQuestFail(), EffectQuestStart(), EffectRechargeItem(), EffectRedirectThreat(), EffectRemoveAura(), EffectRemoveAuraBySpellLabel(), EffectRemoveTalent(), EffectRenamePet(), EffectReputation(), EffectResurrect(), EffectResurrectNew(), EffectResurrectWithAura(), EffectSanctuary(), EffectSchoolDMG(), EffectScriptEffect(), EffectSendChatMessage(), EffectSendEvent(), EffectSendTaxi(), EffectSetPlayerDataElementAccount(), EffectSetPlayerDataElementCharacter(), EffectSetPlayerDataFlagAccount(), EffectSetPlayerDataFlagCharacter(), EffectSkinning(), EffectSkinPlayerCorpse(), EffectSkipCampaign(), EffectSkipQuestLine(), EffectSpiritHeal(), EffectStealBeneficialBuff(), EffectSummonPlayer(), EffectSummonRaFFriend(), EffectTameCreature(), EffectTaunt(), EffectTeleportGraveyard(), EffectTeleportToReturnPoint(), EffectTeleportUnits(), EffectTeleportUnitsWithVisualLoadingScreen(), EffectTeleUnitsFaceCaster(), EffectThreat(), EffectTriggerMissileSpell(), EffectTriggerSpell(), EffectUnlearnSpecialization(), EffectUntrainTalents(), EffectUpdateInteractions(), EffectUpdatePlayerPhase(), EffectUpdateZoneAurasAndPhases(), EffectWeaponDmg(), SpellScript::GetHitCreature(), SpellScript::GetHitPlayer(), SpellScript::GetHitUnit(), HandleEffects(), Spell::TargetInfo::PreprocessTarget(), and Spell().

◆ variance


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