TrinityCore
Loading...
Searching...
No Matches
Aura Class Referenceabstract

#include <SpellAuras.h>

+ Inheritance diagram for Aura:

Classes

struct  NoopAuraDeleter
 

Public Types

typedef std::unordered_map< ObjectGuid, AuraApplication * > ApplicationMap
 

Public Member Functions

 Aura (AuraCreateInfo const &createInfo)
 
void _InitEffects (uint8 effMask, Unit *caster, int32 const *baseAmount)
 
void SaveCasterInfo (Unit *caster)
 
virtual ~Aura ()
 
SpellInfo const * GetSpellInfo () const
 
uint32 GetId () const
 
ObjectGuid GetCastItemGUID () const
 
ObjectGuid GetCasterGUID () const
 
Unit * GetCaster () const
 
WorldObject * GetOwner () const
 
Unit * GetUnitOwner () const
 
DynamicObject * GetDynobjOwner () const
 
AuraObjectType GetType () const
 
virtual void _ApplyForTarget (Unit *target, Unit *caster, AuraApplication *auraApp)
 
virtual void _UnapplyForTarget (Unit *target, Unit *caster, AuraApplication *auraApp)
 
void _Remove (AuraRemoveMode removeMode)
 
virtual void Remove (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)=0
 
virtual void FillTargetMap (std::unordered_map< Unit *, uint8 > &targets, Unit *caster)=0
 
void UpdateTargetMap (Unit *caster, bool apply=true)
 
void _RegisterForTargets ()
 
void ApplyForTargets ()
 
void _ApplyEffectForTargets (uint8 effIndex)
 
void UpdateOwner (uint32 diff, WorldObject *owner)
 
void Update (uint32 diff, Unit *caster)
 
time_t GetApplyTime () const
 
int32 GetMaxDuration () const
 
void SetMaxDuration (int32 duration)
 
int32 CalcMaxDuration () const
 
int32 CalcMaxDuration (Unit *caster) const
 
int32 GetDuration () const
 
void SetDuration (int32 duration, bool withMods=false)
 
void RefreshDuration (bool withMods=false)
 
void RefreshTimers (bool resetPeriodicTimer)
 
bool IsExpired () const
 
bool IsPermanent () const
 
uint8 GetCharges () const
 
void SetCharges (uint8 charges)
 
uint8 CalcMaxCharges (Unit *caster) const
 
uint8 CalcMaxCharges () const
 
bool ModCharges (int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool DropCharge (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
void ModChargesDelayed (int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
void DropChargeDelayed (uint32 delay, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
uint8 GetStackAmount () const
 
void SetStackAmount (uint8 num)
 
bool ModStackAmount (int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, bool resetPeriodicTimer=true)
 
bool CanApplyResilience () const
 
void SetCanApplyResilience (bool val)
 
uint8 GetCasterLevel () const
 
float GetCritChance () const
 
void SetCritChance (float val)
 
float GetDonePct () const
 
void SetDonePct (float val)
 
bool HasMoreThanOneEffectForType (AuraType auraType) const
 
bool IsArea () const
 
bool IsPassive () const
 
bool IsDeathPersistent () const
 
bool IsRemovedOnShapeLost (Unit *target) const
 
bool CanBeSaved () const
 
bool IsRemoved () const
 
bool CanBeSentToClient () const
 
bool IsSingleTarget () const
 
bool IsSingleTargetWith (Aura const *aura) const
 
void SetIsSingleTarget (bool val)
 
void UnregisterSingleTarget ()
 
int32 CalcDispelChance (Unit const *auraTarget, bool offensive) const
 
void SetLoadedState (int32 maxDuration, int32 duration, int32 charges, uint8 stackAmount, uint8 recalculateMask, float critChance, bool applyResilience, int32 *amount)
 
bool CanPeriodicTickCrit (Unit const *caster) const
 
float CalcPeriodicCritChance (Unit const *caster) const
 
bool HasEffect (uint8 effIndex) const
 
bool HasEffectType (AuraType type) const
 
AuraEffect * GetEffect (uint8 effIndex) const
 
uint8 GetEffectMask () const
 
void RecalculateAmountOfEffects ()
 
void HandleAllEffects (AuraApplication *aurApp, uint8 mode, bool apply)
 
ApplicationMap const & GetApplicationMap ()
 
void GetApplicationVector (std::vector< AuraApplication * > &applicationVector) const
 
AuraApplication const * GetApplicationOfTarget (ObjectGuid guid) const
 
AuraApplication * GetApplicationOfTarget (ObjectGuid guid)
 
bool IsAppliedOnTarget (ObjectGuid guid) const
 
void SetNeedClientUpdateForTargets () const
 
void HandleAuraSpecificMods (AuraApplication const *aurApp, Unit *caster, bool apply, bool onReapply)
 
bool CanBeAppliedOn (Unit *target)
 
bool CheckAreaTarget (Unit *target)
 
bool CanStackWith (Aura const *existingAura) const
 
bool IsProcOnCooldown (TimePoint now) const
 
void AddProcCooldown (TimePoint cooldownEnd)
 
void ResetProcCooldown ()
 
bool IsUsingCharges () const
 
void SetUsingCharges (bool val)
 
void PrepareProcToTrigger (AuraApplication *aurApp, ProcEventInfo &eventInfo, TimePoint now)
 
uint8 GetProcEffectMask (AuraApplication *aurApp, ProcEventInfo &eventInfo, TimePoint now) const
 
float CalcProcChance (SpellProcEntry const &procEntry, ProcEventInfo &eventInfo) const
 
void TriggerProcOnEvent (uint8 procEffectMask, AuraApplication *aurApp, ProcEventInfo &eventInfo)
 
void LoadScripts ()
 
bool CallScriptCheckAreaTargetHandlers (Unit *target)
 
void CallScriptDispel (DispelInfo *dispelInfo)
 
void CallScriptAfterDispel (DispelInfo *dispelInfo)
 
bool CallScriptEffectApplyHandlers (AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
 
bool CallScriptEffectRemoveHandlers (AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
 
void CallScriptAfterEffectApplyHandlers (AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
 
void CallScriptAfterEffectRemoveHandlers (AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
 
bool CallScriptEffectPeriodicHandlers (AuraEffect const *aurEff, AuraApplication const *aurApp)
 
void CallScriptEffectUpdatePeriodicHandlers (AuraEffect *aurEff)
 
void CallScriptEffectCalcAmountHandlers (AuraEffect const *aurEff, int32 &amount, bool &canBeRecalculated)
 
void CallScriptEffectCalcPeriodicHandlers (AuraEffect const *aurEff, bool &isPeriodic, int32 &amplitude)
 
void CallScriptEffectCalcSpellModHandlers (AuraEffect const *aurEff, SpellModifier *&spellMod)
 
void CallScriptEffectAbsorbHandlers (AuraEffect *aurEff, AuraApplication const *aurApp, DamageInfo &dmgInfo, uint32 &absorbAmount, bool &defaultPrevented)
 
void CallScriptEffectAfterAbsorbHandlers (AuraEffect *aurEff, AuraApplication const *aurApp, DamageInfo &dmgInfo, uint32 &absorbAmount)
 
void CallScriptEffectManaShieldHandlers (AuraEffect *aurEff, AuraApplication const *aurApp, DamageInfo &dmgInfo, uint32 &absorbAmount, bool &defaultPrevented)
 
void CallScriptEffectAfterManaShieldHandlers (AuraEffect *aurEff, AuraApplication const *aurApp, DamageInfo &dmgInfo, uint32 &absorbAmount)
 
void CallScriptEffectSplitHandlers (AuraEffect *aurEff, AuraApplication const *aurApp, DamageInfo &dmgInfo, uint32 &splitAmount)
 
bool CallScriptCheckProcHandlers (AuraApplication const *aurApp, ProcEventInfo &eventInfo)
 
bool CallScriptCheckEffectProcHandlers (AuraEffect const *aurEff, AuraApplication const *aurApp, ProcEventInfo &eventInfo)
 
bool CallScriptPrepareProcHandlers (AuraApplication const *aurApp, ProcEventInfo &eventInfo)
 
bool CallScriptProcHandlers (AuraApplication const *aurApp, ProcEventInfo &eventInfo)
 
void CallScriptAfterProcHandlers (AuraApplication const *aurApp, ProcEventInfo &eventInfo)
 
bool CallScriptEffectProcHandlers (AuraEffect const *aurEff, AuraApplication const *aurApp, ProcEventInfo &eventInfo)
 
void CallScriptAfterEffectProcHandlers (AuraEffect const *aurEff, AuraApplication const *aurApp, ProcEventInfo &eventInfo)
 
UnitAura * ToUnitAura ()
 
UnitAura const * ToUnitAura () const
 
DynObjAura * ToDynObjAura ()
 
DynObjAura const * ToDynObjAura () const
 
template<class Script >
Script * GetScript (std::string const &scriptName) const
 
virtual std::string GetDebugInfo () const
 
Trinity::unique_weak_ptr< Aura > GetWeakPtr () const
 
 Aura (Aura const &)=delete
 
 Aura (Aura &&)=delete
 
Aura & operator= (Aura const &)=delete
 
Aura & operator= (Aura &&)=delete
 

Static Public Member Functions

static uint8 BuildEffectMaskForOwner (SpellInfo const *spellProto, uint8 availableEffectMask, WorldObject *owner)
 
static Aura * TryRefreshStackOrCreate (AuraCreateInfo &createInfo, bool updateEffectMask=true)
 
static Aura * TryCreate (AuraCreateInfo &createInfo)
 
static Aura * Create (AuraCreateInfo &createInfo)
 
static int32 CalcMaxDuration (SpellInfo const *spellInfo, WorldObject *caster)
 

Public Attributes

std::vector< AuraScript * > m_loadedScripts
 

Protected Attributes

SpellInfo const *const m_spellInfo
 
ObjectGuid const m_casterGuid
 
ObjectGuid const m_castItemGuid
 
time_t const m_applyTime
 
WorldObject *const m_owner
 
int32 m_maxDuration
 
int32 m_duration
 
int32 m_timeCla
 
int32 m_updateTargetMapInterval
 
CasterInfo _casterInfo
 
uint8 m_procCharges
 
uint8 m_stackAmount
 
AuraEffect * m_effects [MAX_SPELL_EFFECTS]
 
ApplicationMap m_applications
 
bool m_isRemoved
 
bool m_isSingleTarget
 
bool m_isUsingCharges
 
ChargeDropEvent * m_dropEvent
 
TimePoint m_procCooldown
 

Private Member Functions

AuraScript * GetScriptByName (std::string const &scriptName) const
 
void _DeleteRemovedApplications ()
 

Private Attributes

std::vector< AuraApplication * > _removedApplications
 
Trinity::unique_trackable_ptr< Aura > m_scriptRef
 

Friends

class Unit
 

Detailed Description

Definition at line 124 of file SpellAuras.h.

Member Typedef Documentation

◆ ApplicationMap

typedef std::unordered_map<ObjectGuid, AuraApplication*> Aura::ApplicationMap

Definition at line 129 of file SpellAuras.h.

Constructor & Destructor Documentation

◆ Aura() [1/3]

◆ ~Aura()

Aura::~Aura ( )
virtual

◆ Aura() [2/3]

Aura::Aura ( Aura const &  )
delete

◆ Aura() [3/3]

Aura::Aura ( Aura &&  )
delete

Member Function Documentation

◆ _ApplyEffectForTargets()

void Aura::_ApplyEffectForTargets ( uint8  effIndex)

Definition at line 762 of file SpellAuras.cpp.

References ASSERT, GetApplicationOfTarget(), GetOwner(), and m_applications.

Referenced by Spell::EffectPersistentAA().

◆ _ApplyForTarget()

◆ _DeleteRemovedApplications()

void Aura::_DeleteRemovedApplications ( )
private

Definition at line 2171 of file SpellAuras.cpp.

References _removedApplications.

Referenced by UpdateOwner(), and ~Aura().

◆ _InitEffects()

void Aura::_InitEffects ( uint8  effMask,
Unit *  caster,
int32 const *  baseAmount 
)

Definition at line 460 of file SpellAuras.cpp.

References SpellInfo::GetEffects(), GetSpellInfo(), and m_effects.

Referenced by DynObjAura::DynObjAura(), and UnitAura::UnitAura().

◆ _RegisterForTargets()

void Aura::_RegisterForTargets ( )
inline

Definition at line 160 of file SpellAuras.h.

Referenced by Spell::EffectPersistentAA().

◆ _Remove()

◆ _UnapplyForTarget()

◆ AddProcCooldown()

void Aura::AddProcCooldown ( TimePoint  cooldownEnd)

Definition at line 1971 of file SpellAuras.cpp.

References m_procCooldown.

Referenced by PrepareProcToTrigger().

◆ ApplyForTargets()

void Aura::ApplyForTargets ( )
inline

Definition at line 161 of file SpellAuras.h.

◆ BuildEffectMaskForOwner()

uint8 Aura::BuildEffectMaskForOwner ( SpellInfo const *  spellProto,
uint8  availableEffectMask,
WorldObject *  owner 
)
static

◆ CalcDispelChance()

◆ CalcMaxCharges() [1/2]

uint8 Aura::CalcMaxCharges ( ) const
inline

Definition at line 183 of file SpellAuras.h.

References CalcMaxCharges().

Referenced by Aura(), CalcMaxCharges(), ModCharges(), and ModStackAmount().

◆ CalcMaxCharges() [2/2]

uint8 Aura::CalcMaxCharges ( Unit *  caster) const

◆ CalcMaxDuration() [1/3]

int32 Aura::CalcMaxDuration ( ) const
inline

◆ CalcMaxDuration() [2/3]

◆ CalcMaxDuration() [3/3]

int32 Aura::CalcMaxDuration ( Unit *  caster) const

Definition at line 859 of file SpellAuras.cpp.

References CalcMaxDuration(), and GetSpellInfo().

◆ CalcPeriodicCritChance()

float Aura::CalcPeriodicCritChance ( Unit const *  caster) const

◆ CalcProcChance()

◆ CallScriptAfterDispel()

void Aura::CallScriptAfterDispel ( DispelInfo *  dispelInfo)

Definition at line 2217 of file SpellAuras.cpp.

References AURA_SCRIPT_HOOK_AFTER_DISPEL, and m_loadedScripts.

Referenced by Unit::RemoveAurasDueToSpellByDispel().

◆ CallScriptAfterEffectApplyHandlers()

void Aura::CallScriptAfterEffectApplyHandlers ( AuraEffect const *  aurEff,
AuraApplication const *  aurApp,
AuraEffectHandleModes  mode 
)

◆ CallScriptAfterEffectProcHandlers()

void Aura::CallScriptAfterEffectProcHandlers ( AuraEffect const *  aurEff,
AuraApplication const *  aurApp,
ProcEventInfo &  eventInfo 
)

◆ CallScriptAfterEffectRemoveHandlers()

void Aura::CallScriptAfterEffectRemoveHandlers ( AuraEffect const *  aurEff,
AuraApplication const *  aurApp,
AuraEffectHandleModes  mode 
)

◆ CallScriptAfterProcHandlers()

void Aura::CallScriptAfterProcHandlers ( AuraApplication const *  aurApp,
ProcEventInfo &  eventInfo 
)

Definition at line 2499 of file SpellAuras.cpp.

References AURA_SCRIPT_HOOK_AFTER_PROC, and m_loadedScripts.

Referenced by TriggerProcOnEvent().

◆ CallScriptCheckAreaTargetHandlers()

bool Aura::CallScriptCheckAreaTargetHandlers ( Unit *  target)

Definition at line 2189 of file SpellAuras.cpp.

References AURA_SCRIPT_HOOK_CHECK_AREA_TARGET, and m_loadedScripts.

Referenced by CheckAreaTarget().

◆ CallScriptCheckEffectProcHandlers()

bool Aura::CallScriptCheckEffectProcHandlers ( AuraEffect const *  aurEff,
AuraApplication const *  aurApp,
ProcEventInfo &  eventInfo 
)

◆ CallScriptCheckProcHandlers()

bool Aura::CallScriptCheckProcHandlers ( AuraApplication const *  aurApp,
ProcEventInfo &  eventInfo 
)

Definition at line 2447 of file SpellAuras.cpp.

References AURA_SCRIPT_HOOK_CHECK_PROC, and m_loadedScripts.

Referenced by GetProcEffectMask().

◆ CallScriptDispel()

void Aura::CallScriptDispel ( DispelInfo *  dispelInfo)

Definition at line 2204 of file SpellAuras.cpp.

References AURA_SCRIPT_HOOK_DISPEL, and m_loadedScripts.

Referenced by Unit::RemoveAurasDueToSpellByDispel().

◆ CallScriptEffectAbsorbHandlers()

void Aura::CallScriptEffectAbsorbHandlers ( AuraEffect *  aurEff,
AuraApplication const *  aurApp,
DamageInfo &  dmgInfo,
uint32 &  absorbAmount,
bool &  defaultPrevented 
)

◆ CallScriptEffectAfterAbsorbHandlers()

void Aura::CallScriptEffectAfterAbsorbHandlers ( AuraEffect *  aurEff,
AuraApplication const *  aurApp,
DamageInfo &  dmgInfo,
uint32 &  absorbAmount 
)

◆ CallScriptEffectAfterManaShieldHandlers()

void Aura::CallScriptEffectAfterManaShieldHandlers ( AuraEffect *  aurEff,
AuraApplication const *  aurApp,
DamageInfo &  dmgInfo,
uint32 &  absorbAmount 
)

◆ CallScriptEffectApplyHandlers()

bool Aura::CallScriptEffectApplyHandlers ( AuraEffect const *  aurEff,
AuraApplication const *  aurApp,
AuraEffectHandleModes  mode 
)

◆ CallScriptEffectCalcAmountHandlers()

void Aura::CallScriptEffectCalcAmountHandlers ( AuraEffect const *  aurEff,
int32 &  amount,
bool &  canBeRecalculated 
)

◆ CallScriptEffectCalcPeriodicHandlers()

void Aura::CallScriptEffectCalcPeriodicHandlers ( AuraEffect const *  aurEff,
bool &  isPeriodic,
int32 &  amplitude 
)

◆ CallScriptEffectCalcSpellModHandlers()

void Aura::CallScriptEffectCalcSpellModHandlers ( AuraEffect const *  aurEff,
SpellModifier *&  spellMod 
)

◆ CallScriptEffectManaShieldHandlers()

void Aura::CallScriptEffectManaShieldHandlers ( AuraEffect *  aurEff,
AuraApplication const *  aurApp,
DamageInfo &  dmgInfo,
uint32 &  absorbAmount,
bool &  defaultPrevented 
)

◆ CallScriptEffectPeriodicHandlers()

bool Aura::CallScriptEffectPeriodicHandlers ( AuraEffect const *  aurEff,
AuraApplication const *  aurApp 
)

◆ CallScriptEffectProcHandlers()

bool Aura::CallScriptEffectProcHandlers ( AuraEffect const *  aurEff,
AuraApplication const *  aurApp,
ProcEventInfo &  eventInfo 
)

◆ CallScriptEffectRemoveHandlers()

bool Aura::CallScriptEffectRemoveHandlers ( AuraEffect const *  aurEff,
AuraApplication const *  aurApp,
AuraEffectHandleModes  mode 
)

◆ CallScriptEffectSplitHandlers()

void Aura::CallScriptEffectSplitHandlers ( AuraEffect *  aurEff,
AuraApplication const *  aurApp,
DamageInfo &  dmgInfo,
uint32 &  splitAmount 
)

◆ CallScriptEffectUpdatePeriodicHandlers()

void Aura::CallScriptEffectUpdatePeriodicHandlers ( AuraEffect *  aurEff)

◆ CallScriptPrepareProcHandlers()

bool Aura::CallScriptPrepareProcHandlers ( AuraApplication const *  aurApp,
ProcEventInfo &  eventInfo 
)

Definition at line 2463 of file SpellAuras.cpp.

References AURA_SCRIPT_HOOK_PREPARE_PROC, and m_loadedScripts.

Referenced by PrepareProcToTrigger().

◆ CallScriptProcHandlers()

bool Aura::CallScriptProcHandlers ( AuraApplication const *  aurApp,
ProcEventInfo &  eventInfo 
)

Definition at line 2482 of file SpellAuras.cpp.

References AURA_SCRIPT_HOOK_PROC, and m_loadedScripts.

Referenced by TriggerProcOnEvent().

◆ CanApplyResilience()

bool Aura::CanApplyResilience ( ) const
inline

Definition at line 193 of file SpellAuras.h.

Referenced by Unit::RemoveAurasDueToSpellBySteal().

◆ CanBeAppliedOn()

bool Aura::CanBeAppliedOn ( Unit *  target)

◆ CanBeSaved()

◆ CanBeSentToClient()

bool Aura::CanBeSentToClient ( ) const

◆ CanPeriodicTickCrit()

bool Aura::CanPeriodicTickCrit ( Unit const *  caster) const

◆ CanStackWith()

bool Aura::CanStackWith ( Aura const *  existingAura) const

◆ CheckAreaTarget()

bool Aura::CheckAreaTarget ( Unit *  target)

Definition at line 1819 of file SpellAuras.cpp.

References CallScriptCheckAreaTargetHandlers().

Referenced by CanBeAppliedOn().

◆ Create()

◆ DropCharge()

bool Aura::DropCharge ( AuraRemoveMode  removeMode = AURA_REMOVE_BY_DEFAULT)
inline

◆ DropChargeDelayed()

void Aura::DropChargeDelayed ( uint32  delay,
AuraRemoveMode  removeMode = AURA_REMOVE_BY_DEFAULT 
)

◆ FillTargetMap()

virtual void Aura::FillTargetMap ( std::unordered_map< Unit *, uint8 > &  targets,
Unit *  caster 
)
pure virtual

Implemented in UnitAura, and DynObjAura.

Referenced by UpdateTargetMap().

◆ GetApplicationMap()

ApplicationMap const & Aura::GetApplicationMap ( )
inline

◆ GetApplicationOfTarget() [1/2]

AuraApplication * Aura::GetApplicationOfTarget ( ObjectGuid  guid)
inline

Definition at line 235 of file SpellAuras.h.

◆ GetApplicationOfTarget() [2/2]

◆ GetApplicationVector()

void Aura::GetApplicationVector ( std::vector< AuraApplication * > &  applicationVector) const

Definition at line 1242 of file SpellAuras.cpp.

References m_applications.

Referenced by SetStackAmount().

◆ GetApplyTime()

time_t Aura::GetApplyTime ( ) const
inline

Definition at line 167 of file SpellAuras.h.

Referenced by Player::DuelComplete(), and AuraScript::GetApplyTime().

◆ GetCaster()

◆ GetCasterGUID()

◆ GetCasterLevel()

uint8 Aura::GetCasterLevel ( ) const
inline

Definition at line 195 of file SpellAuras.h.

Referenced by AuraApplication::BuildUpdatePacket().

◆ GetCastItemGUID()

ObjectGuid Aura::GetCastItemGUID ( ) const
inline

◆ GetCharges()

◆ GetCritChance()

float Aura::GetCritChance ( ) const
inline

Definition at line 196 of file SpellAuras.h.

Referenced by Unit::RemoveAurasDueToSpellBySteal().

◆ GetDebugInfo()

◆ GetDonePct()

float Aura::GetDonePct ( ) const
inline

Definition at line 198 of file SpellAuras.h.

◆ GetDuration()

◆ GetDynobjOwner()

DynamicObject * Aura::GetDynobjOwner ( ) const
inline

◆ GetEffect()

◆ GetEffectMask()

◆ GetId()

◆ GetMaxDuration()

◆ GetOwner()

◆ GetProcEffectMask()

uint8 Aura::GetProcEffectMask ( AuraApplication *  aurApp,
ProcEventInfo &  eventInfo,
TimePoint  now 
) const

◆ GetScript()

template<class Script >
Script * Aura::GetScript ( std::string const &  scriptName) const
inline

Definition at line 289 of file SpellAuras.h.

References Script.

◆ GetScriptByName()

AuraScript * Aura::GetScriptByName ( std::string const &  scriptName) const
private

Definition at line 452 of file SpellAuras.cpp.

References m_loadedScripts.

◆ GetSpellInfo()

SpellInfo const * Aura::GetSpellInfo ( ) const
inline

Definition at line 140 of file SpellAuras.h.

Referenced by Unit::_AddAura(), Unit::_ApplyAura(), Unit::_CreateAuraApplication(), _InitEffects(), AuraApplication::_InitFlags(), Battleground::_ProcessJoin(), Unit::_RemoveNoStackAurasDueToAura(), Unit::_UnapplyAura(), _UnapplyForTarget(), UnitAura::AddStaticApplication(), SpellInfo::ApplyAllSpellImmunitiesTo(), Player::ApplySpellMod(), AuraEffect::ApplySpellMod(), AuraApplication::BuildUpdatePacket(), CalcMaxDuration(), CalcPeriodicCritChance(), CalcProcChance(), CanBeAppliedOn(), CanBeSaved(), CanBeSentToClient(), PlayerAI::CancelAllShapeshifts(), CanPeriodicTickCrit(), CanStackWith(), Spell::CheckCast(), spell_hun_glyph_of_arcane_shot::CheckProc(), Spell::EffectDispelMechanic(), Spell::EffectStealBeneficialBuff(), UnitAura::FillTargetMap(), DynObjAura::FillTargetMap(), GetDebugInfo(), Unit::GetDispellableAuraList(), AuraScript::GetEffectInfo(), GetProcEffectMask(), AuraScript::GetSpellInfo(), AuraEffect::HandleAuraDummy(), HandleAuraSpecificMods(), spell_warl_drain_soul::HandleProc(), spell_gen_clear_debuffs::HandleScript(), spell_dru_glyph_of_starfire::HandleScriptEffect(), spell_hun_chimera_shot::HandleScriptEffect(), HasMoreThanOneEffectForType(), IsArea(), IsDeathPersistent(), Unit::IsHighestExclusiveAura(), IsPassive(), IsSingleTargetWith(), list_commandscript::ListAurasCommand(), SmartAI::OnAuraApplied(), SmartAI::OnAuraRemoved(), Unit::RemoveAllAurasExceptType(), Unit::RemoveAllAurasExceptType(), Unit::RemoveAllAurasRequiringDeadTarget(), Unit::RemoveAllGroupBuffsFromCaster(), Unit::RemoveArenaAuras(), Unit::RemoveAurasByShapeShift(), Unit::RemoveAurasDueToSpellByDispel(), Unit::RemoveAurasDueToSpellBySteal(), Unit::RemoveAurasWithFamily(), Unit::RemoveAurasWithInterruptFlags(), Unit::RemoveAurasWithMechanic(), Player::RemoveItemDependentAurasAndCasts(), SaveCasterInfo(), Unit::SpellDamagePctDone(), Unit::SpellHealingPctDone(), Unit::TriggerAurasProcOnEvent(), and UpdateTargetMap().

◆ GetStackAmount()

uint8 Aura::GetStackAmount ( ) const
inline

Definition at line 189 of file SpellAuras.h.

Referenced by AuraApplication::BuildUpdatePacket(), AuraEffect::CalculateAmount(), Spell::EffectStealBeneficialBuff(), Unit::GetDispellableAuraList(), AuraScript::GetStackAmount(), AuraEffect::HandleAuraLinked(), HandleAuraSpecificMods(), spell_borean_tundra_nerubar_web_random_unit_not_on_quest_dummy::HandleDummy(), spell_borean_tundra_nerubar_web_random_unit_on_quest_dummy::HandleDummy(), spell_sindragosa_frost_breath::HandleInfusion(), AuraEffect::HandlePeriodicDamageAurasTick(), AuraEffect::HandlePeriodicHealAurasTick(), AuraEffect::HandlePeriodicHealthLeechAuraTick(), spell_intense_cold::HandlePeriodicTick(), spell_item_anger_capacitor< StackAmount >::spell_item_anger_capacitor_AuraScript< Stacks >::HandleProc(), spell_item_trinket_stack::spell_item_trinket_stack_AuraScript::HandleProc(), spell_pilgrims_bounty_well_fed::HandleScript(), spell_festergut_gastric_bloat::HandleScript(), spell_gen_bonked::HandleScript(), spell_gen_landmine_knockback_achievement::HandleScript(), spell_pal_seal_of_vengeance< DoTSpellId, DamageSpellId >::spell_pal_seal_of_vengeance_AuraScript< DoTSpell, DamageSpell >::HandleSeal(), npc_underbog_mushroom::InitializeAI(), npc_slad_ran_constrictor::JustEngagedWith(), list_commandscript::ListAurasCommand(), ModStackAmount(), spell_halion_marks::OnRemove(), spell_gen_defend::RefreshVisualShields(), Unit::SpellDamagePctDone(), Unit::SpellHealingPctDone(), boss_trollgore::UpdateAI(), and npc_tournament_training_dummy::UpdateAI().

◆ GetType()

◆ GetUnitOwner()

◆ GetWeakPtr()

Trinity::unique_weak_ptr< Aura > Aura::GetWeakPtr ( ) const
inline

Definition at line 298 of file SpellAuras.h.

◆ HandleAllEffects()

void Aura::HandleAllEffects ( AuraApplication *  aurApp,
uint8  mode,
bool  apply 
)

◆ HandleAuraSpecificMods()

void Aura::HandleAuraSpecificMods ( AuraApplication const *  aurApp,
Unit *  caster,
bool  apply,
bool  onReapply 
)
Todo:
This should be moved to similar function in spell::hit

Definition at line 1260 of file SpellAuras.cpp.

References Unit::AddAura(), SpellHistory::AddCooldown(), CastSpellExtraArgs::AddSpellBP0(), CastSpellExtraArgs::AddSpellMod(), Unit::ApplySpellImmune(), AURA_REMOVE_BY_DEATH, AURA_REMOVE_BY_DEFAULT, AURA_REMOVE_BY_ENEMY_SPELL, AURA_REMOVE_BY_EXPIRE, SpellHistory::BuildCooldownPacket(), CalculatePct(), WorldObject::CastSpell(), CLASS_DEATH_KNIGHT, DOT, EFFECT_0, AuraEffect::GetAmount(), Unit::GetAura(), Unit::GetAuraEffect(), Unit::GetAuraEffectOfRankedSpell(), Unit::GetAuraEffectsByType(), Unit::GetAuraOfRankedSpell(), GetCasterGUID(), Unit::GetClass(), Unit::GetCreateMana(), Unit::GetDummyAuraEffect(), GetEffect(), Object::GetGUID(), AuraEffect::GetId(), GetId(), Unit::GetMaxPower(), WorldObject::GetOwner(), Unit::GetPartyMembers(), Unit::GetPowerType(), SpellHistory::GetRemainingCooldown(), AuraApplication::GetRemoveMode(), Unit::GetSpellHistory(), GetSpellInfo(), GetStackAmount(), AuraApplication::GetTarget(), AuraEffect::GetTotalTicks(), Object::GetTypeId(), GetUnitOwner(), WorldObject::GetZoneAndAreaId(), Unit::HasAura(), SpellHistory::HasCooldown(), IMMUNITY_ID, IN_MILLISECONDS, m_spellInfo, POWER_ENERGY, POWER_MANA, POWER_RAGE, POWER_RUNIC_POWER, Unit::RemoveAura(), Unit::RemoveAurasDueToSpell(), Unit::RemoveAurasWithFamily(), Player::RemoveRunesByAuraEffect(), SpellHistory::ResetCooldown(), roll_chance_i(), Player::SendDirectMessage(), SetDuration(), SPELL_AURA_DUMMY, SPELL_AURA_OVERRIDE_CLASS_SCRIPTS, SPELL_AURA_PERIODIC_DUMMY, SPELL_COOLDOWN_FLAG_NONE, SPELL_LINK_AURA, Unit::SpellDamageBonusTaken(), SPELLFAMILY_DEATHKNIGHT, SPELLFAMILY_DRUID, SPELLFAMILY_GENERIC, SPELLFAMILY_HUNTER, SPELLFAMILY_MAGE, SPELLFAMILY_PALADIN, SPELLFAMILY_PRIEST, SPELLFAMILY_ROGUE, SPELLFAMILY_WARLOCK, SPELLFAMILY_WARRIOR, SpellInfo::SpellFamilyFlags, SpellInfo::SpellFamilyName, SPELLVALUE_AURA_STACK, SPELLVALUE_BASE_POINT0, sSpellMgr, TC_LOG_ERROR, Object::ToCreature(), Object::ToPlayer(), TRIGGERED_FULL_MASK, and TYPEID_PLAYER.

Referenced by Unit::_ApplyAura(), Unit::_UnapplyAura(), and SetStackAmount().

◆ HasEffect()

◆ HasEffectType()

bool Aura::HasEffectType ( AuraType  type) const

◆ HasMoreThanOneEffectForType()

bool Aura::HasMoreThanOneEffectForType ( AuraType  auraType) const

Definition at line 1060 of file SpellAuras.cpp.

References SpellInfo::GetEffects(), GetSpellInfo(), and HasEffect().

Referenced by Unit::IsHighestExclusiveAuraEffect().

◆ IsAppliedOnTarget()

bool Aura::IsAppliedOnTarget ( ObjectGuid  guid) const
inline

Definition at line 236 of file SpellAuras.h.

Referenced by _ApplyForTarget(), and Unit::_CreateAuraApplication().

◆ IsArea()

bool Aura::IsArea ( ) const

◆ IsDeathPersistent()

bool Aura::IsDeathPersistent ( ) const

◆ IsExpired()

bool Aura::IsExpired ( ) const
inline

Definition at line 177 of file SpellAuras.h.

Referenced by AuraScript::IsExpired(), and DynamicObject::Update().

◆ IsPassive()

◆ IsPermanent()

bool Aura::IsPermanent ( ) const
inline

◆ IsProcOnCooldown()

bool Aura::IsProcOnCooldown ( TimePoint  now) const

Definition at line 1966 of file SpellAuras.cpp.

References m_procCooldown.

Referenced by GetProcEffectMask().

◆ IsRemoved()

◆ IsRemovedOnShapeLost()

bool Aura::IsRemovedOnShapeLost ( Unit *  target) const

◆ IsSingleTarget()

bool Aura::IsSingleTarget ( ) const
inline

◆ IsSingleTargetWith()

bool Aura::IsSingleTargetWith ( Aura const *  aura) const

◆ IsUsingCharges()

bool Aura::IsUsingCharges ( ) const
inline

◆ LoadScripts()

void Aura::LoadScripts ( )

◆ ModCharges()

◆ ModChargesDelayed()

void Aura::ModChargesDelayed ( int32  num,
AuraRemoveMode  removeMode = AURA_REMOVE_BY_DEFAULT 
)

Definition at line 980 of file SpellAuras.cpp.

References m_dropEvent, and ModCharges().

Referenced by ChargeDropEvent::Execute().

◆ ModStackAmount()

◆ operator=() [1/2]

Aura & Aura::operator= ( Aura &&  )
delete

◆ operator=() [2/2]

Aura & Aura::operator= ( Aura const &  )
delete

◆ PrepareProcToTrigger()

◆ RecalculateAmountOfEffects()

void Aura::RecalculateAmountOfEffects ( )

◆ RefreshDuration()

◆ RefreshTimers()

void Aura::RefreshTimers ( bool  resetPeriodicTimer)

◆ Remove()

◆ ResetProcCooldown()

void Aura::ResetProcCooldown ( )

Definition at line 1976 of file SpellAuras.cpp.

References m_procCooldown.

◆ SaveCasterInfo()

◆ SetCanApplyResilience()

void Aura::SetCanApplyResilience ( bool  val)
inline

Definition at line 194 of file SpellAuras.h.

Referenced by SetLoadedState().

◆ SetCharges()

◆ SetCritChance()

void Aura::SetCritChance ( float  val)
inline

Definition at line 197 of file SpellAuras.h.

Referenced by SetLoadedState().

◆ SetDonePct()

void Aura::SetDonePct ( float  val)
inline

Definition at line 199 of file SpellAuras.h.

◆ SetDuration()

◆ SetIsSingleTarget()

void Aura::SetIsSingleTarget ( bool  val)
inline

◆ SetLoadedState()

void Aura::SetLoadedState ( int32  maxDuration,
int32  duration,
int32  charges,
uint8  stackAmount,
uint8  recalculateMask,
float  critChance,
bool  applyResilience,
int32 *  amount 
)

◆ SetMaxDuration()

◆ SetNeedClientUpdateForTargets()

void Aura::SetNeedClientUpdateForTargets ( ) const

◆ SetStackAmount()

◆ SetUsingCharges()

void Aura::SetUsingCharges ( bool  val)
inline

◆ ToDynObjAura() [1/2]

DynObjAura * Aura::ToDynObjAura ( )
inline

Definition at line 285 of file SpellAuras.h.

References DYNOBJ_AURA_TYPE.

Referenced by Spell::EffectPersistentAA().

◆ ToDynObjAura() [2/2]

DynObjAura const * Aura::ToDynObjAura ( ) const
inline

Definition at line 286 of file SpellAuras.h.

References DYNOBJ_AURA_TYPE.

◆ ToUnitAura() [1/2]

UnitAura * Aura::ToUnitAura ( )
inline

Definition at line 282 of file SpellAuras.h.

References UNIT_AURA_TYPE.

Referenced by Create(), and Spell::DoSpellEffectHit().

◆ ToUnitAura() [2/2]

UnitAura const * Aura::ToUnitAura ( ) const
inline

Definition at line 283 of file SpellAuras.h.

References UNIT_AURA_TYPE.

◆ TriggerProcOnEvent()

◆ TryCreate()

◆ TryRefreshStackOrCreate()

◆ UnregisterSingleTarget()

void Aura::UnregisterSingleTarget ( )

◆ Update()

◆ UpdateOwner()

◆ UpdateTargetMap()

Friends And Related Symbol Documentation

◆ Unit

friend class Unit
friend

Definition at line 126 of file SpellAuras.h.

Member Data Documentation

◆ _casterInfo

CasterInfo Aura::_casterInfo
protected

Definition at line 322 of file SpellAuras.h.

Referenced by Aura(), and SaveCasterInfo().

◆ _removedApplications

std::vector<AuraApplication*> Aura::_removedApplications
private

Definition at line 338 of file SpellAuras.h.

Referenced by _DeleteRemovedApplications(), and _UnapplyForTarget().

◆ m_applications

◆ m_applyTime

time_t const Aura::m_applyTime
protected

Definition at line 314 of file SpellAuras.h.

◆ m_casterGuid

ObjectGuid const Aura::m_casterGuid
protected

Definition at line 312 of file SpellAuras.h.

◆ m_castItemGuid

ObjectGuid const Aura::m_castItemGuid
protected

Definition at line 313 of file SpellAuras.h.

Referenced by _ApplyForTarget(), and CanStackWith().

◆ m_dropEvent

ChargeDropEvent* Aura::m_dropEvent
protected

Definition at line 333 of file SpellAuras.h.

Referenced by _Remove(), DropChargeDelayed(), and ModChargesDelayed().

◆ m_duration

int32 Aura::m_duration
protected

Definition at line 318 of file SpellAuras.h.

Referenced by Aura(), SetDuration(), SetLoadedState(), and Update().

◆ m_effects

◆ m_isRemoved

bool Aura::m_isRemoved
protected

Definition at line 329 of file SpellAuras.h.

Referenced by _Remove().

◆ m_isSingleTarget

bool Aura::m_isSingleTarget
protected

Definition at line 330 of file SpellAuras.h.

Referenced by UnregisterSingleTarget().

◆ m_isUsingCharges

bool Aura::m_isUsingCharges
protected

Definition at line 331 of file SpellAuras.h.

Referenced by Aura(), SetCharges(), and SetLoadedState().

◆ m_loadedScripts

◆ m_maxDuration

int32 Aura::m_maxDuration
protected

Definition at line 317 of file SpellAuras.h.

Referenced by Aura(), RefreshTimers(), and SetLoadedState().

◆ m_owner

WorldObject* const Aura::m_owner
protected

Definition at line 315 of file SpellAuras.h.

Referenced by DropChargeDelayed(), GetType(), and UpdateOwner().

◆ m_procCharges

uint8 Aura::m_procCharges
protected

Definition at line 323 of file SpellAuras.h.

Referenced by Aura(), ModCharges(), PrepareProcToTrigger(), SetCharges(), and SetLoadedState().

◆ m_procCooldown

TimePoint Aura::m_procCooldown
protected

Definition at line 335 of file SpellAuras.h.

Referenced by AddProcCooldown(), IsProcOnCooldown(), and ResetProcCooldown().

◆ m_scriptRef

Trinity::unique_trackable_ptr<Aura> Aura::m_scriptRef
private

Definition at line 341 of file SpellAuras.h.

Referenced by _Remove().

◆ m_spellInfo

◆ m_stackAmount

uint8 Aura::m_stackAmount
protected

Definition at line 324 of file SpellAuras.h.

Referenced by ModStackAmount(), SetLoadedState(), and SetStackAmount().

◆ m_timeCla

int32 Aura::m_timeCla
protected

Definition at line 319 of file SpellAuras.h.

Referenced by Aura(), RefreshDuration(), and Update().

◆ m_updateTargetMapInterval

int32 Aura::m_updateTargetMapInterval
protected

Definition at line 320 of file SpellAuras.h.

Referenced by UpdateOwner(), and UpdateTargetMap().


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