aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp26
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.h4
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.cpp2
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.h2
4 files changed, 17 insertions, 17 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index f1cbd7f79d5..cdbae7009be 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -400,7 +400,7 @@ void AuraEffect::GetTargetList(std::list<Unit *> & targetList) const
}
}
-void AuraEffect::GetApplicationList(std::list<AuraApplication* const> & applicationList) const
+void AuraEffect::GetApplicationList(std::list<AuraApplication*> & applicationList) const
{
Aura::ApplicationMap const & targetMap = GetBase()->GetApplicationMap();
// remove all targets which were not added to new list - they no longer deserve area aura
@@ -951,10 +951,10 @@ void AuraEffect::ChangeAmount(int32 newAmount, bool mark, bool onStackOrReapply)
if (!handleMask)
return;
- std::list<AuraApplication* const> effectApplications;
+ std::list<AuraApplication*> effectApplications;
GetApplicationList(effectApplications);
- for (std::list<AuraApplication* const>::const_iterator apptItr = effectApplications.begin(); apptItr != effectApplications.end(); ++apptItr)
+ for (std::list<AuraApplication*>::const_iterator apptItr = effectApplications.begin(); apptItr != effectApplications.end(); ++apptItr)
if ((*apptItr)->HasEffect(GetEffIndex()))
HandleEffect(*apptItr, handleMask, false);
@@ -967,12 +967,12 @@ void AuraEffect::ChangeAmount(int32 newAmount, bool mark, bool onStackOrReapply)
CalculateSpellMod();
}
- for (std::list<AuraApplication* const>::const_iterator apptItr = effectApplications.begin(); apptItr != effectApplications.end(); ++apptItr)
+ for (std::list<AuraApplication*>::const_iterator apptItr = effectApplications.begin(); apptItr != effectApplications.end(); ++apptItr)
if ((*apptItr)->HasEffect(GetEffIndex()))
HandleEffect(*apptItr, handleMask, true);
}
-void AuraEffect::HandleEffect(AuraApplication const * aurApp, uint8 mode, bool apply)
+void AuraEffect::HandleEffect(AuraApplication * aurApp, uint8 mode, bool apply)
{
// check if call is correct, we really don't want using bitmasks here (with 1 exception)
ASSERT(!mode
@@ -995,15 +995,15 @@ void AuraEffect::HandleEffect(AuraApplication const * aurApp, uint8 mode, bool a
// call scripts helping/replacing effect handlers
bool prevented = false;
if (apply)
- prevented = GetBase()->CallScriptEffectApplyHandlers(const_cast<AuraEffect const *>(this), aurApp, (AuraEffectHandleModes)mode);
+ prevented = GetBase()->CallScriptEffectApplyHandlers(const_cast<AuraEffect const *>(this), const_cast<AuraApplication const *>(aurApp), (AuraEffectHandleModes)mode);
else
- prevented = GetBase()->CallScriptEffectRemoveHandlers(const_cast<AuraEffect const *>(this), aurApp, (AuraEffectHandleModes)mode);
+ prevented = GetBase()->CallScriptEffectRemoveHandlers(const_cast<AuraEffect const *>(this), const_cast<AuraApplication const *>(aurApp), (AuraEffectHandleModes)mode);
// check if script events have removed the aura or if default effect prevention was requested
if ((apply && aurApp->GetRemoveMode()) || prevented)
return;
- (*this.*AuraEffectHandler [GetAuraType()])(aurApp, mode, apply);
+ (*this.*AuraEffectHandler [GetAuraType()])(const_cast<AuraApplication const *>(aurApp), mode, apply);
// check if script events have removed the aura or if default effect prevention was requested
if (apply && aurApp->GetRemoveMode())
@@ -1011,14 +1011,14 @@ void AuraEffect::HandleEffect(AuraApplication const * aurApp, uint8 mode, bool a
// call scripts triggering additional events after apply/remove
if (apply)
- GetBase()->CallScriptAfterEffectApplyHandlers(const_cast<AuraEffect const *>(this), aurApp, (AuraEffectHandleModes)mode);
+ GetBase()->CallScriptAfterEffectApplyHandlers(const_cast<AuraEffect const *>(this), const_cast<AuraApplication const *>(aurApp), (AuraEffectHandleModes)mode);
else
- GetBase()->CallScriptAfterEffectRemoveHandlers(const_cast<AuraEffect const *>(this), aurApp, (AuraEffectHandleModes)mode);
+ GetBase()->CallScriptAfterEffectRemoveHandlers(const_cast<AuraEffect const *>(this), const_cast<AuraApplication const *>(aurApp), (AuraEffectHandleModes)mode);
}
void AuraEffect::HandleEffect(Unit * target, uint8 mode, bool apply)
{
- AuraApplication const * aurApp = GetBase()->GetApplicationOfTarget(target->GetGUID());
+ AuraApplication * aurApp = GetBase()->GetApplicationOfTarget(target->GetGUID());
ASSERT(aurApp);
HandleEffect(aurApp, mode, apply);
}
@@ -1096,10 +1096,10 @@ void AuraEffect::Update(uint32 diff, Unit * caster)
m_periodicTimer += m_amplitude - diff;
UpdatePeriodic(caster);
- std::list<AuraApplication* const> effectApplications;
+ std::list<AuraApplication*> effectApplications;
GetApplicationList(effectApplications);
// tick on targets of effects
- for (std::list<AuraApplication* const>::const_iterator apptItr = effectApplications.begin(); apptItr != effectApplications.end(); ++apptItr)
+ for (std::list<AuraApplication*>::const_iterator apptItr = effectApplications.begin(); apptItr != effectApplications.end(); ++apptItr)
if ((*apptItr)->HasEffect(GetEffIndex()))
PeriodicTick(*apptItr, caster);
}
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h
index 89c6b8bb0fd..0525c00c4e0 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.h
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.h
@@ -24,7 +24,7 @@ class AuraEffect
uint64 GetCasterGUID() const { return GetBase()->GetCasterGUID(); }
Aura * GetBase() const { return m_base; }
void GetTargetList(std::list<Unit*> & targetList) const;
- void GetApplicationList(std::list<AuraApplication* const> & applicationList) const;
+ void GetApplicationList(std::list<AuraApplication*> & applicationList) const;
SpellEntry const * GetSpellProto() const { return m_spellProto; }
uint32 GetId() const { return m_spellProto->Id; }
@@ -49,7 +49,7 @@ class AuraEffect
void RecalculateAmount(Unit * caster) { if (!CanBeRecalculated()) return; ChangeAmount(CalculateAmount(caster), false); }
bool CanBeRecalculated() const { return m_canBeRecalculated; }
void SetCanBeRecalculated(bool val) { m_canBeRecalculated = val; }
- void HandleEffect(AuraApplication const * aurApp, uint8 mode, bool apply);
+ void HandleEffect(AuraApplication * aurApp, uint8 mode, bool apply);
void HandleEffect(Unit * target, uint8 mode, bool apply);
void ApplySpellMod(Unit * target, bool apply);
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index e3371cf5ea3..dd704d693b3 100755
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -876,7 +876,7 @@ void Aura::RecalculateAmountOfEffects()
m_effects[i]->RecalculateAmount(caster);
}
-void Aura::HandleAllEffects(AuraApplication const * aurApp, uint8 mode, bool apply)
+void Aura::HandleAllEffects(AuraApplication * aurApp, uint8 mode, bool apply)
{
ASSERT (!IsRemoved());
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h
index 396cefcf976..29e6af8c27f 100755
--- a/src/server/game/Spells/Auras/SpellAuras.h
+++ b/src/server/game/Spells/Auras/SpellAuras.h
@@ -155,7 +155,7 @@ class Aura
AuraEffect * GetEffect(uint8 effIndex) const { ASSERT (effIndex < MAX_SPELL_EFFECTS); return m_effects[effIndex]; }
uint8 GetEffectMask() const { uint8 effMask = 0; for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) if (m_effects[i]) effMask |= 1<<i; return effMask; }
void RecalculateAmountOfEffects();
- void HandleAllEffects(AuraApplication const * aurApp, uint8 mode, bool apply);
+ void HandleAllEffects(AuraApplication * aurApp, uint8 mode, bool apply);
// Helpers for targets
ApplicationMap const & GetApplicationMap() {return m_applications;}