fix(Core/Entities): extend combo point system to all Units (#9816)

- Closes #1140
This commit is contained in:
UltraNix
2022-01-07 11:18:03 +01:00
committed by GitHub
parent 2e6213d526
commit 2c6a692000
9 changed files with 217 additions and 182 deletions

View File

@@ -449,10 +449,10 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const
if (caster)
{
// bonus amount from combo points
if (caster->m_movedByPlayer)
if (uint8 comboPoints = caster->m_movedByPlayer->ToPlayer()->GetComboPoints())
if (float comboDamage = PointsPerComboPoint)
value += comboDamage * comboPoints;
if (uint8 comboPoints = caster->GetComboPoints())
{
value += PointsPerComboPoint * comboPoints;
}
value = caster->ApplyEffectModifiers(_spellInfo, _effIndex, value);