diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index dc8edf88d4d..d6444e84cb9 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -409,9 +409,9 @@ enum SpellAttr1 SPELL_ATTR1_UNAUTOCASTABLE_BY_PET = 0x00020000, // 17 SPELL_ATTR1_UNK18 = 0x00040000, // 18 stun, polymorph, daze, hex SPELL_ATTR1_CANT_TARGET_SELF = 0x00080000, // 19 - SPELL_ATTR1_REQ_COMBO_POINTS1 = 0x00100000, // 20 Req combo points on target + SPELL_ATTR1_FINISHING_MOVE_DAMAGE = 0x00100000, // 20 Finishing Move - Damage SPELL_ATTR1_UNK21 = 0x00200000, // 21 - SPELL_ATTR1_REQ_COMBO_POINTS2 = 0x00400000, // 22 Req combo points on target + SPELL_ATTR1_FINISHING_MOVE_DURATION = 0x00400000, // 22 Finishing Move - Duration SPELL_ATTR1_UNK23 = 0x00800000, // 23 SPELL_ATTR1_IS_FISHING = 0x01000000, // 24 only fishing spells SPELL_ATTR1_UNK25 = 0x02000000, // 25 diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 23a0f22dde8..40307bc2b37 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -528,7 +528,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const if (caster) { // bonus amount from combo points - if (caster->m_playerMovingMe && comboDamage) + if (_spellInfo->HasAttribute(SPELL_ATTR1_FINISHING_MOVE_DAMAGE) && caster->m_playerMovingMe && comboDamage) if (uint8 comboPoints = caster->m_playerMovingMe->GetComboPoints()) value += comboDamage * comboPoints; @@ -1456,7 +1456,7 @@ bool SpellInfo::IsMoveAllowedChannel() const bool SpellInfo::NeedsComboPoints() const { - return HasAttribute(SpellAttr1(SPELL_ATTR1_REQ_COMBO_POINTS1 | SPELL_ATTR1_REQ_COMBO_POINTS2)); + return HasAttribute(SpellAttr1(SPELL_ATTR1_FINISHING_MOVE_DAMAGE | SPELL_ATTR1_FINISHING_MOVE_DURATION)); } bool SpellInfo::IsNextMeleeSwingSpell() const @@ -3367,12 +3367,14 @@ int32 SpellInfo::CalcDuration(Unit* caster, Spell* spell) const if (duration == -1) return -1; - // This is ***not** in client code, but is very much needed for, ie, Slice and Dice. - uint8 comboPoints = caster != nullptr && caster->m_playerMovingMe ? caster->m_playerMovingMe->GetComboPoints() : 0; - if (comboPoints != 0) + // Increase duration based on combo points + if (HasAttribute(SPELL_ATTR1_FINISHING_MOVE_DURATION)) { - if (GetDuration() != GetMaxDuration() && GetDuration() != -1) - duration += int32((GetMaxDuration() - GetDuration()) * comboPoints / 5); + if (uint8 comboPoints = (caster && caster->m_playerMovingMe) ? caster->m_playerMovingMe->GetComboPoints() : 0) + { + if (GetDuration() != GetMaxDuration() && GetDuration() != -1) + duration += int32((GetMaxDuration() - GetDuration()) * comboPoints / 5); + } } if (caster != nullptr)