Core/Spells: fixed value calculation for combo points bonus damage
This commit is contained in:
1 parent
198e05d108
commit
283d9cf84f
1 file changed
+4
-4
@@ -462,6 +462,9 @@ int32 SpellEffectInfo::CalcValue(WorldObject const* caster, int32 const* bp, Uni
|
||||
value *= ((((1.0 - _spellInfo->Scaling.NerfFactor) * (level - 1)) / (_spellInfo->Scaling.NerfMaxLevel - 1)) + _spellInfo->Scaling.NerfFactor);
|
||||
}
|
||||
|
||||
if (Scaling.ComboPointsCoefficient)
|
||||
comboDamage = Scaling.ComboPointsCoefficient * value;
|
||||
|
||||
value *= Scaling.Coefficient;
|
||||
if (value >= 0.0f && value < 1.0f)
|
||||
value = 1.0f;
|
||||
@@ -473,9 +476,6 @@ int32 SpellEffectInfo::CalcValue(WorldObject const* caster, int32 const* bp, Uni
|
||||
}
|
||||
|
||||
basePoints = int32(round(value));
|
||||
|
||||
if (Scaling.ComboPointsCoefficient)
|
||||
comboDamage = Scaling.ComboPointsCoefficient * value;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -516,7 +516,7 @@ int32 SpellEffectInfo::CalcValue(WorldObject const* caster, int32 const* bp, Uni
|
||||
if (casterUnit)
|
||||
{
|
||||
// bonus amount from combo points
|
||||
if (_spellInfo->HasAttribute(SPELL_ATTR1_FINISHING_MOVE_DAMAGE) && casterUnit->IsMovedByClient() && comboDamage)
|
||||
if (_spellInfo->HasAttribute(SPELL_ATTR1_FINISHING_MOVE_DAMAGE) && casterUnit->IsMovedByClient() && comboDamage != 0.f)
|
||||
if (uint8 comboPoints = casterUnit->GetGameClientMovingMe()->GetBasePlayer()->GetComboPoints())
|
||||
value += comboDamage * comboPoints;
|
||||
|
||||
|
||||
Reference in new issue
Block a user