19 #ifndef TRINITY_SPELLAURAEFFECTS_H
20 #define TRINITY_SPELLAURAEFFECTS_H
42 void GetTargetList(std::list<Unit*> & targetList)
const;
43 void GetApplicationList(std::list<AuraApplication*> & applicationList)
const;
56 void SetAmount(
int32 amount) { m_amount = amount; m_canBeRecalculated =
false;}
62 void CalculatePeriodic(
Unit* caster,
bool resetPeriodicTimer =
true,
bool load =
false);
63 void CalculateSpellMod();
64 void ChangeAmount(
int32 newAmount,
bool mark =
true,
bool onStackOrReapply =
false);
65 void RecalculateAmount() {
if (!CanBeRecalculated())
return; ChangeAmount(CalculateAmount(GetCaster()),
false); }
66 void RecalculateAmount(
Unit* caster) {
if (!CanBeRecalculated())
return; ChangeAmount(CalculateAmount(caster),
false); }
71 void ApplySpellMod(
Unit* target,
bool apply);
81 void UpdatePeriodic(
Unit* caster);
85 void ResetPeriodic(
bool resetPeriodicTimer =
false) {
if (resetPeriodicTimer) m_periodicTimer = m_period; m_tickNumber = 0;}
88 void SetPeriodic(
bool isPeriodic) { m_isPeriodic = isPeriodic; }
89 bool IsAffectingSpell(
SpellInfo const* spell)
const;
92 void SendTickImmune(
Unit* target,
Unit* caster)
const;
97 void CleanupTriggeredSpells(
Unit* target);
100 void HandleShapeshiftBoosts(
Unit* target,
bool apply)
const;
104 bool IsEffect()
const {
return _effectInfo->Effect != 0; }
106 bool IsAreaAuraEffect()
const;
130 bool CanPeriodicTickCrit(
Unit const* caster)
const;
310 void HandlePeriodicDummyAuraTick(
Unit* target,
Unit* caster)
const;
311 void HandlePeriodicTriggerSpellAuraTick(
Unit* target,
Unit* caster)
const;
312 void HandlePeriodicTriggerSpellWithValueAuraTick(
Unit* target,
Unit* caster)
const;
313 void HandlePeriodicDamageAurasTick(
Unit* target,
Unit* caster)
const;
314 void HandlePeriodicHealthLeechAuraTick(
Unit* target,
Unit* caster)
const;
315 void HandlePeriodicHealthFunnelAuraTick(
Unit* target,
Unit* caster)
const;
316 void HandlePeriodicHealAurasTick(
Unit* target,
Unit* caster)
const;
317 void HandlePeriodicManaLeechAuraTick(
Unit* target,
Unit* caster)
const;
318 void HandleObsModPowerAuraTick(
Unit* target,
Unit* caster)
const;
319 void HandlePeriodicEnergizeAuraTick(
Unit* target,
Unit* caster)
const;
320 void HandlePeriodicPowerBurnAuraTick(
Unit* target,
Unit* caster)
const;
354 if (spellProtoA->
Id == 58597)
356 if (spellProtoB->
Id == 58597)
360 if (spellProtoA->
Id == 28527)
362 if (spellProtoB->
Id == 28527)
366 if (spellProtoA->
Id == 47753)
368 if (spellProtoB->
Id == 47753)
AuraType
Definition: SpellAuraDefines.h:58
bool IsEffect(SpellEffectName effectName) const
Definition: SpellAuraEffects.h:105
Definition: SpellAuraEffects.h:30
void RecalculateAmount(Unit *caster)
Definition: SpellAuraEffects.h:66
void SetDonePct(float val)
Definition: SpellAuraEffects.h:77
uint32 Id
Definition: SpellInfo.h:329
AbsorbAuraOrderPred()
Definition: SpellAuraEffects.h:337
SpellInfo const * GetSpellInfo() const
Definition: SpellAuraEffects.h:46
int32 GetTotalTicks() const
Definition: SpellAuraEffects.h:84
SpellEffectInfo const * GetSpellEffectInfo() const
Definition: SpellAuraEffects.h:102
uint32 GetCategory() const
Definition: SpellInfo.cpp:1164
uint32 GetTickNumber() const
Definition: SpellAuraEffects.h:83
ObjectGuid GetCasterGUID() const
Definition: SpellAuraEffects.h:40
bool IsEffect() const
Definition: SpellAuraEffects.h:104
bool CanBeRecalculated() const
Definition: SpellAuraEffects.h:67
virtual ~Aura()
Definition: SpellAuras.cpp:420
uint32 GetEffIndex() const
Definition: SpellAuraEffects.h:48
void SetCanBeRecalculated(bool val)
Definition: SpellAuraEffects.h:68
float GetDonePct() const
Definition: SpellAuraEffects.h:78
int32 GetMiscValue() const
Definition: SpellAuraEffects.h:53
SpellModifier * GetSpellModifier() const
Definition: SpellAuraEffects.h:44
void _InitEffects(uint32 effMask, Unit *caster, int32 *baseAmount)
Definition: SpellAuras.cpp:404
void SetPeriodicTimer(int32 periodicTimer)
Definition: SpellAuraEffects.h:59
Definition: SpellInfo.h:326
uint32 GetId() const
Definition: SpellAuraEffects.h:47
bool operator()(AuraEffect *aurEffA, AuraEffect *aurEffB) const
Definition: SpellAuraEffects.h:338
int32 m_amount
Definition: SpellAuraEffects.h:115
void ResetPeriodic(bool resetPeriodicTimer=false)
Definition: SpellAuraEffects.h:85
int32 GetPeriodicTimer() const
Definition: SpellAuraEffects.h:58
Definition: SpellAuras.h:50
SpellEffectName
Definition: SharedDefines.h:1009
SpellModifier * m_spellmod
Definition: SpellAuraEffects.h:120
Aura * GetBase() const
Definition: SpellAuraEffects.h:41
int32 GetPeriod() const
Definition: SpellAuraEffects.h:50
int32 GetMiscValueB() const
Definition: SpellAuraEffects.h:52
int32 m_periodicTimer
Definition: SpellAuraEffects.h:122
bool HasSpellClassMask() const
Definition: SpellAuraEffects.h:90
Unit * GetCaster() const
Definition: SpellAuraEffects.h:39
Definition: SharedDefines.h:4628
Aura * _TryStackingOrRefreshingExistingAura(SpellInfo const *newAura, uint32 effMask, Unit *caster, int32 *baseAmount=NULL, Item *castItem=NULL, ObjectGuid casterGUID=ObjectGuid::Empty, int32 castItemLevel=-1)
Definition: Unit.cpp:3024
void apply(T *val)
Definition: ByteConverter.h:41
SpellEffectInfo const * _effectInfo
Definition: SpellAuraEffects.h:112
AuraType GetAuraType() const
Definition: SpellAuraEffects.h:54
void SetPeriodic(bool isPeriodic)
Definition: SpellAuraEffects.h:88
void(AuraEffect::* pAuraEffectHandler)(AuraApplication const *aurApp, uint8 mode, bool apply) const
Definition: SpellAuraEffects.h:28
bool m_canBeRecalculated
Definition: SpellAuraEffects.h:127
int32 m_damage
Definition: SpellAuraEffects.h:116
void HandleNoImmediateEffect(AuraApplication const *, uint8, bool) const
Definition: SpellAuraEffects.h:142
bool m_isPeriodic
Definition: SpellAuraEffects.h:128
Definition: SharedDefines.h:4626
uint32 m_tickNumber
Definition: SpellAuraEffects.h:124
int32 GetBaseAmount() const
Definition: SpellAuraEffects.h:49
void SetCritChance(float val)
Definition: SpellAuraEffects.h:75
uint32 SpellFamilyName
Definition: SpellInfo.h:396
float m_critChance
Definition: SpellAuraEffects.h:117
int32 m_period
Definition: SpellAuraEffects.h:123
Aura *const m_base
Definition: SpellAuraEffects.h:109
int32 GetDamage() const
Definition: SpellAuraEffects.h:74
int32 GetAmount() const
Definition: SpellAuraEffects.h:55
Definition: SpellInfo.h:238
void RecalculateAmount()
Definition: SpellAuraEffects.h:65
int32_t int32
Definition: Define.h:146
void HandleUnused(AuraApplication const *, uint8, bool) const
Definition: SpellAuraEffects.h:138
uint32_t uint32
Definition: Define.h:150
void HandleNULL(AuraApplication const *, uint8, bool) const
Definition: SpellAuraEffects.h:134
bool IsPeriodic() const
Definition: SpellAuraEffects.h:87
float m_donePct
Definition: SpellAuraEffects.h:118
Definition: SpellAuraEffects.h:334
void SetAmount(int32 amount)
Definition: SpellAuraEffects.h:56
void SetDamage(int32 val)
Definition: SpellAuraEffects.h:73
#define TC_GAME_API
Definition: Define.h:134
uint8 const m_effIndex
Definition: SpellAuraEffects.h:126
SpellInfo const *const m_spellInfo
Definition: SpellAuraEffects.h:111
uint32 SpellIconID
Definition: SpellInfo.h:390
uint8_t uint8
Definition: Define.h:152
Definition: ObjectGuid.h:189
uint32_t uint32
Definition: g3dmath.h:168
Definition: SpellAuras.h:116
int32 const m_baseAmount
Definition: SpellAuraEffects.h:113
void Update(uint32 diff)
Definition: WeatherMgr.cpp:150
float GetCritChance() const
Definition: SpellAuraEffects.h:76