Skip to content

Commit

Permalink
Core/Spells: reverted/changed AuraEffect constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
streetrat committed Nov 17, 2014
1 parent e9f9719 commit 8518232
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/server/game/Spells/Auras/SpellAuraEffects.cpp
Expand Up @@ -431,17 +431,14 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNULL, //370 SPELL_AURA_SET_FAIR_FAR_CLIP
};

AuraEffect::AuraEffect(Aura* base, uint32 effIndex, int32 baseAmount, Unit* caster) :
AuraEffect::AuraEffect(Aura* base, uint32 effIndex, int32 *baseAmount, Unit* caster) :
m_base(base), m_spellInfo(base->GetSpellInfo()),
m_baseAmount(baseAmount),
_effectInfo(base->GetSpellEffectInfo(effIndex)),
m_baseAmount(baseAmount ? *baseAmount : base->GetSpellEffectInfo(effIndex)->BasePoints),
m_damage(0), m_critChance(0.0f), m_donePct(1.0f),
m_spellmod(NULL), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex),
m_canBeRecalculated(true), m_isPeriodic(false)
{
_effectInfo = base->GetSpellEffectInfo(effIndex);

ASSERT(_effectInfo);

CalculatePeriodic(caster, true, false);

m_amount = CalculateAmount(caster);
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Spells/Auras/SpellAuraEffects.h
Expand Up @@ -35,7 +35,7 @@ class AuraEffect

public:
~AuraEffect();
AuraEffect(Aura* base, uint32 effIndex, int32 baseAmount, Unit* caster);
AuraEffect(Aura* base, uint32 effIndex, int32 *baseAmount, Unit* caster);
Unit* GetCaster() const { return GetBase()->GetCaster(); }
ObjectGuid GetCasterGUID() const { return GetBase()->GetCasterGUID(); }
Aura* GetBase() const { return m_base; }
Expand Down

0 comments on commit 8518232

Please sign in to comment.