fix(Core/Spells): Nature's Swiftness should not be consumed by instan… (#12816)

...t spells.
This commit is contained in:
UltraNix
2022-08-28 01:14:46 +02:00
committed by GitHub
parent a29926d52f
commit db760ee2ed
+6 -2
View File
@@ -16128,9 +16128,13 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
{ {
if (SpellModifier* mod = triggeredByAura->GetSpellModifier()) if (SpellModifier* mod = triggeredByAura->GetSpellModifier())
{ {
if (mod->op == SPELLMOD_CASTING_TIME && procSpell && (procSpell->GetTriggeredCastFlags() & TRIGGERED_CAST_DIRECTLY) != 0) if (mod->op == SPELLMOD_CASTING_TIME && mod->value < 0 && procSpell)
{ {
break; // Skip instant spells
if (procSpellInfo->CalcCastTime() <= 0 || (procSpell->GetTriggeredCastFlags() & TRIGGERED_CAST_DIRECTLY) != 0)
{
break;
}
} }
} }
takeCharges = true; takeCharges = true;