diff options
| author | QAston <none@none> | 2010-08-26 19:07:55 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2010-08-26 19:07:55 +0200 |
| commit | 30d31ca40a8d524d01d6472dff2fb96b53d92507 (patch) | |
| tree | e245bb6e61f67ec91c2766618e41bb7cbefc31d4 /src/server/game/Spells/Spell.cpp | |
| parent | 3c027962ba861076932792c0714d3dbbb37c9c14 (diff) | |
*Fix usage of EffectValueMultiplier in spell code.
*Remove some obsolete code from spell class.
*Rename some spellmod and dbc column names to be more accurate.
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 6e3aa21e258..3a574d3c4ef 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -471,8 +471,6 @@ m_caster(Caster), m_spellValue(new SpellValue(m_spellInfo)) m_spellSchoolMask = SpellSchoolMask(1 << pItem->GetProto()->Damage[0].DamageType); } } - // Set health leech amount to zero - m_healthLeech = 0; if (originalCasterGUID) m_originalCasterGUID = originalCasterGUID; @@ -2421,10 +2419,6 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) if (maxTargets > 1) { - //otherwise, this multiplier is used for something else - m_damageMultipliers[i] = 1.0f; - m_applyMultiplierMask |= 1 << i; - float range; std::list<Unit*> unitList; @@ -3727,10 +3721,6 @@ void Spell::finish(bool ok) if (IsSpellHaveEffect(m_spellInfo, SPELL_EFFECT_ADD_EXTRA_ATTACKS)) m_caster->m_extraAttacks = 0; - // Heal caster for all health leech from all targets - if (m_healthLeech) - m_caster->DealHeal(m_caster, uint32(m_healthLeech), m_spellInfo); - if (IsMeleeAttackResetSpell()) { bool found = false; @@ -6939,18 +6929,11 @@ bool Spell::IsValidSingleTargetSpell(Unit const* target) const void Spell::CalculateDamageDoneForAllTargets() { - float multiplier[3]; - for (uint8 i = 0; i < 3; ++i) + float multiplier[MAX_SPELL_EFFECTS]; + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { - if (m_applyMultiplierMask & (1 << i)) - { - // Get multiplier - multiplier[i] = m_spellInfo->DmgMultiplier[i]; - // Apply multiplier mods - if (m_originalCaster) - if (Player* modOwner = m_originalCaster->GetSpellModOwner()) - modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_EFFECT_PAST_FIRST, multiplier[i], this); - } + // Get multiplier + multiplier[i] = SpellMgr::CalculateSpellEffectDamageMultiplier(m_spellInfo, i, m_originalCaster, this); } bool usesAmmo = true; @@ -7054,11 +7037,6 @@ int32 Spell::CalculateDamageDone(Unit *unit, const uint32 effectMask, float *mul } } } - if (m_applyMultiplierMask & (1 << i)) - { - m_damage = int32(m_damage * m_damageMultipliers[i]); - m_damageMultipliers[i] *= multiplier[i]; - } damageDone += m_damage; } |
