From c1ac063ba129302fe0ef6ab43092304fc29bbd5a Mon Sep 17 00:00:00 2001 From: QAston Date: Fri, 27 Aug 2010 06:40:23 +0200 Subject: *Remove m_currentBasePoints from spell class, use m_spellValue instead. --HG-- branch : trunk --- src/server/game/Spells/Spell.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 3a467069592..f9a39618207 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -435,7 +435,6 @@ m_caster(Caster), m_spellValue(new SpellValue(m_spellInfo)) m_delayStart = 0; m_delayAtDamageCount = 0; - m_applyMultiplierMask = 0; m_effectMask = 0; m_auraScaleMask = 0; @@ -485,9 +484,6 @@ m_caster(Caster), m_spellValue(new SpellValue(m_spellInfo)) if (m_originalCaster && !m_originalCaster->IsInWorld()) m_originalCaster = NULL; } - for (int i=0; i <3; ++i) - m_currentBasePoints[i] = m_spellInfo->EffectBasePoints[i]; - m_spellState = SPELL_STATE_NULL; m_IsTriggeredSpell = triggered; @@ -1514,7 +1510,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool if (m_originalCaster) { m_spellAura = Aura::TryCreate(aurSpellInfo, effectMask, unit, - m_originalCaster,(aurSpellInfo == m_spellInfo)? &m_currentBasePoints[0] : &basePoints[0], m_CastItem); + m_originalCaster,(aurSpellInfo == m_spellInfo)? &m_spellValue->EffectBasePoints[0] : &basePoints[0], m_CastItem); if (m_spellAura) { // Now Reduce spell duration using data received at spell hit @@ -2937,7 +2933,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const * triggere if (IsPositiveEffect(m_spellInfo->Id, i)) { m_auraScaleMask |= (1<EffectBasePoints[i]) + if (m_spellValue->EffectBasePoints[i] != m_spellInfo->EffectBasePoints[i]) { m_auraScaleMask = 0; break; @@ -7113,15 +7109,12 @@ void Spell::SetSpellValue(SpellValueMod mod, int32 value) { case SPELLVALUE_BASE_POINT0: m_spellValue->EffectBasePoints[0] = SpellMgr::CalculateSpellEffectBaseAmount(value, m_spellInfo, 0); - m_currentBasePoints[0] = m_spellValue->EffectBasePoints[0]; //this should be removed in the future break; case SPELLVALUE_BASE_POINT1: m_spellValue->EffectBasePoints[1] = SpellMgr::CalculateSpellEffectBaseAmount(value, m_spellInfo, 1); - m_currentBasePoints[1] = m_spellValue->EffectBasePoints[1]; break; case SPELLVALUE_BASE_POINT2: m_spellValue->EffectBasePoints[2] = SpellMgr::CalculateSpellEffectBaseAmount(value, m_spellInfo, 2); - m_currentBasePoints[2] = m_spellValue->EffectBasePoints[2]; break; case SPELLVALUE_RADIUS_MOD: m_spellValue->RadiusMod = (float)value / 10000; -- cgit v1.2.3