[11192] Make some more use of 'const' in SpellAuraHolder.

This commit is contained in:
Lynx3d 2011-02-21 16:56:00 +01:00
parent 3b6b6078d1
commit 60b2e2c8ba
3 changed files with 7 additions and 7 deletions

View file

@ -8616,7 +8616,7 @@ Unit* SpellAuraHolder::GetCaster() const
return ObjectAccessor::GetUnit(*m_target, m_casterGuid);// player will search at any maps return ObjectAccessor::GetUnit(*m_target, m_casterGuid);// player will search at any maps
} }
bool SpellAuraHolder::IsWeaponBuffCoexistableWith(SpellAuraHolder* ref) bool SpellAuraHolder::IsWeaponBuffCoexistableWith(SpellAuraHolder const* ref) const
{ {
// only item casted spells // only item casted spells
if (GetCastItemGuid().IsEmpty()) if (GetCastItemGuid().IsEmpty())
@ -8668,7 +8668,7 @@ bool SpellAuraHolder::IsNeedVisibleSlot(Unit const* caster) const
return !m_isPassive || totemAura || HasAreaAuraEffect(m_spellProto); return !m_isPassive || totemAura || HasAreaAuraEffect(m_spellProto);
} }
void SpellAuraHolder::SendAuraUpdate(bool remove) void SpellAuraHolder::SendAuraUpdate(bool remove) const
{ {
WorldPacket data(SMSG_AURA_UPDATE); WorldPacket data(SMSG_AURA_UPDATE);
data << m_target->GetPackGUID(); data << m_target->GetPackGUID();

View file

@ -52,14 +52,14 @@ class MANGOS_DLL_SPEC SpellAuraHolder
void ApplyAuraModifiers(bool apply, bool real = false); void ApplyAuraModifiers(bool apply, bool real = false);
void _AddSpellAuraHolder(); void _AddSpellAuraHolder();
void _RemoveSpellAuraHolder(); void _RemoveSpellAuraHolder();
void SendAuraUpdate(bool remove); void SendAuraUpdate(bool remove) const;
void HandleSpellSpecificBoosts(bool apply); void HandleSpellSpecificBoosts(bool apply);
void CleanupTriggeredSpells(); void CleanupTriggeredSpells();
void setDiminishGroup(DiminishingGroup group) { m_AuraDRGroup = group; } void setDiminishGroup(DiminishingGroup group) { m_AuraDRGroup = group; }
DiminishingGroup getDiminishGroup() const { return m_AuraDRGroup; } DiminishingGroup getDiminishGroup() const { return m_AuraDRGroup; }
uint32 GetStackAmount() { return m_stackAmount; } uint32 GetStackAmount() const { return m_stackAmount; }
void SetStackAmount(uint32 stackAmount); void SetStackAmount(uint32 stackAmount);
bool ModStackAmount(int32 num); // return true if last charge dropped bool ModStackAmount(int32 num); // return true if last charge dropped
@ -83,7 +83,7 @@ class MANGOS_DLL_SPEC SpellAuraHolder
bool IsPersistent() const; bool IsPersistent() const;
bool IsPositive() const; bool IsPositive() const;
bool IsAreaAura() const; // if one from auras of holder applied as area aura bool IsAreaAura() const; // if one from auras of holder applied as area aura
bool IsWeaponBuffCoexistableWith(SpellAuraHolder* ref); bool IsWeaponBuffCoexistableWith(SpellAuraHolder const* ref) const;
bool IsNeedVisibleSlot(Unit const* caster) const; bool IsNeedVisibleSlot(Unit const* caster) const;
bool IsRemovedOnShapeLost() const { return m_isRemovedOnShapeLost; } bool IsRemovedOnShapeLost() const { return m_isRemovedOnShapeLost; }
bool IsInUse() const { return m_in_use;} bool IsInUse() const { return m_in_use;}
@ -107,7 +107,7 @@ class MANGOS_DLL_SPEC SpellAuraHolder
void Update(uint32 diff); void Update(uint32 diff);
void RefreshHolder(); void RefreshHolder();
bool IsSingleTarget() {return m_isSingleTarget; } bool IsSingleTarget() const {return m_isSingleTarget; }
void SetIsSingleTarget(bool val) { m_isSingleTarget = val; } void SetIsSingleTarget(bool val) { m_isSingleTarget = val; }
void UnregisterSingleCastHolder(); void UnregisterSingleCastHolder();

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11191" #define REVISION_NR "11192"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__