aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.h
diff options
context:
space:
mode:
authorQAston <none@none>2010-01-16 15:12:21 +0100
committerQAston <none@none>2010-01-16 15:12:21 +0100
commit69b29001370a46028fb6d5badfacaaaadbe1438c (patch)
treefd2ce307944c72fe4c2c24d5cbef84e206d223a1 /src/game/Unit.h
parent72277c583b76a8fcec30588c6d3f56f3619af738 (diff)
*Fix single target auras related crash
*Apply aura stacking rules to m_ownedAuras holder. --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.h')
-rw-r--r--src/game/Unit.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 3c558c225a7..41585bafa9d 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -320,6 +320,7 @@ struct SpellValue;
class AuraApplication;
class Aura;
+class UnitAura;
class AuraEffect;
class Creature;
class Spell;
@@ -1531,14 +1532,16 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
Pet* CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id = 0);
// aura apply/remove helpers - you should better not use these
- void _AddAura(Aura * aura);
+ void _AddAura(UnitAura * aura, Unit * caster);
AuraApplication * __ApplyAura(Aura * aura);
void __UnapplyAura(AuraApplicationMap::iterator &i);
bool _ApplyAuraEffect(Aura * aura, uint8 effIndex);
void _UnapplyAuraEffect(AuraApplication * aurApp, uint8 effIndex, AuraRemoveMode removeMode);
void _UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMode);
void _UnapplyAura(AuraApplication * aurApp, AuraRemoveMode removeMode);
+ void _RemoveNoStackAuraApplicationsDueToAura(Aura * aura);
void _RemoveNoStackAurasDueToAura(Aura * aura);
+ bool _IsNoStackAuraDueToAura(Aura * appliedAura, Aura * existingAura) const;
void _HandleAuraEffect(AuraEffect * aurEff, bool apply);
// m_ownedAuras container management
@@ -1549,7 +1552,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void RemoveOwnedAura(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
void RemoveOwnedAura(Aura * aura, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
- Aura * GetOwnedAura(uint32 spellId, uint64 casterGUID = 0, uint8 reqEffMask = 0) const;
+ Aura * GetOwnedAura(uint32 spellId, uint64 casterGUID = 0, uint8 reqEffMask = 0, Aura * except = NULL) const;
// m_appliedAuras container management
AuraApplicationMap & GetAppliedAuras() { return m_appliedAuras; }
@@ -1583,8 +1586,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void _ApplyAllAuraStatMods();
AuraEffectList const& GetAuraEffectsByType(AuraType type) const { return m_modAuras[type]; }
- AuraApplicationList & GetSingleCastAuras() { return m_scAuras; }
- AuraApplicationList const& GetSingleCastAuras() const { return m_scAuras; }
+ AuraList & GetSingleCastAuras() { return m_scAuras; }
+ AuraList const& GetSingleCastAuras() const { return m_scAuras; }
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const;
AuraEffect * GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const;
@@ -1994,7 +1997,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
uint32 m_removedAurasCount;
AuraEffectList m_modAuras[TOTAL_AURAS];
- AuraApplicationList m_scAuras; // casted singlecast auras
+ AuraList m_scAuras; // casted singlecast auras
AuraApplicationList m_interruptableAuras; // auras which have interrupt mask applied on unit
AuraStateAurasMap m_auraStateAuras; // Used for improve performance of aura state checks on aura apply/remove
uint32 m_interruptMask;