fix(Core/Spells): Spellmods should not drop charges if not consumed b… (#13498)
This commit is contained in:
parent
8b8b75b5ce
commit
af2d3a7cfc
3 changed files with 144 additions and 141 deletions
|
|
@ -16590,18 +16590,14 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
|||
case SPELL_AURA_ADD_FLAT_MODIFIER:
|
||||
case SPELL_AURA_ADD_PCT_MODIFIER:
|
||||
{
|
||||
if (SpellModifier* mod = triggeredByAura->GetSpellModifier())
|
||||
if (triggeredByAura->GetSpellModifier())
|
||||
{
|
||||
if (mod->op == SPELLMOD_CASTING_TIME && mod->value < 0 && procSpell)
|
||||
// Do proc if mod is consumed by spell
|
||||
if (!procSpell || procSpell->m_appliedMods.find(i->aura) != procSpell->m_appliedMods.end())
|
||||
{
|
||||
// Skip instant spells
|
||||
if (procSpellInfo->CalcCastTime() <= 0 || (procSpell->GetTriggeredCastFlags() & TRIGGERED_CAST_DIRECTLY) != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
takeCharges = true;
|
||||
}
|
||||
}
|
||||
takeCharges = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue