Core/Spells: allow Victory Rush's damage to crit but keep its healing effect non-critical

This commit is contained in:
Ovahlord
2020-04-28 01:27:47 +02:00
parent 9665da3435
commit 92f8340da3
2 changed files with 3 additions and 7 deletions

View File

@@ -5674,12 +5674,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(2); // 5 yards (combat range)
});
// Victory Rush
ApplySpellFix({ 34428 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_CANT_CRIT;
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];

View File

@@ -746,7 +746,7 @@ class spell_warr_victory_rush : public SpellScript
SetEffectValue(CalculatePct(GetCaster()->GetTotalAttackPowerValue(BASE_ATTACK), GetSpellInfo()->Effects[EFFECT_0].CalcValue()));
}
void HandleImpendingVictoryHeal(SpellEffIndex /*effIndex*/)
void HandleImpendingVictoryHeal(SpellEffIndex effIndex)
{
if (Unit* caster = GetCaster())
{
@@ -761,6 +761,8 @@ class spell_warr_victory_rush : public SpellScript
SetEffectValue(damage);
}
else
SetEffectValue(GetSpellInfo()->Effects[effIndex].CalcValue());
caster->RemoveAurasDueToSpell(SPELL_WARRIOR_VICTORIOUS);
caster->RemoveAurasDueToSpell(SPELL_WARRIOR_VICTORIOUS_IMPENDING_VICTORY);