Core/Spells: Fixed flat SPELLMOD_DAMAGE_MULTIPLIER calculation

This commit is contained in:
Shauren
2016-04-30 13:02:39 +02:00
parent d92f529d93
commit 35ab476f16

View File

@@ -528,7 +528,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster /*= nullptr*/, int32 const*
level = int32(_spellInfo->MaxLevel);
else if (level < int32(_spellInfo->BaseLevel))
level = int32(_spellInfo->BaseLevel);
if (!_spellInfo->IsPassive())
if (!_spellInfo->IsPassive())
level -= int32(_spellInfo->SpellLevel);
basePoints += int32(level * basePointsPerLevel);
}
@@ -638,10 +638,10 @@ float SpellEffectInfo::CalcValueMultiplier(Unit* caster, Spell* spell) const
float SpellEffectInfo::CalcDamageMultiplier(Unit* caster, Spell* spell) const
{
float multiplier = ChainAmplitude;
float multiplierPercent = ChainAmplitude * 100.0f;
if (Player* modOwner = (caster ? caster->GetSpellModOwner() : NULL))
modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_DAMAGE_MULTIPLIER, multiplier, spell);
return multiplier;
modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_DAMAGE_MULTIPLIER, multiplierPercent, spell);
return multiplierPercent / 100.0f;
}
bool SpellEffectInfo::HasRadius() const