*Remove m_currentBasePoints from spell class, use m_spellValue instead.
--HG-- branch : trunk
This commit is contained in:
1 parent
bed85f565b
commit
c1ac063ba1
4 files changed
+7
-17
No files matched your search
@@ -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<<i);
|
||||
if (m_currentBasePoints[i] != m_spellInfo->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;
|
||||
|
||||
Reference in new issue
Block a user