fix(Core/Spells): correct hunter's Lock and Load procs (#8177)

- Move related code to spell scripts
- Fixes it proc'ing when the target is immune to snares
- Partial port of 746b838870
This commit is contained in:
Skjalf
2021-10-04 10:49:16 -03:00
committed by GitHub
parent 495ca76628
commit a61d7c2bc8
3 changed files with 80 additions and 20 deletions

View File

@@ -7037,15 +7037,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
break;
}
case 3579: // Lock and Load
{
// Proc only from periodic (from trap activation proc another aura of this spell)
if (!(procFlag & PROC_FLAG_DONE_PERIODIC) || !roll_chance_i(triggerAmount))
return false;
triggered_spell_id = 56453;
target = this;
break;
}
}
switch (dummySpell->Id)
@@ -9108,16 +9099,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
return false;
break;
}
// Lock and Load
case 56453:
{
// Proc only from Frost/Freezing trap activation or from Freezing Arrow (the periodic dmg proc handled elsewhere)
if (!(procFlags & PROC_FLAG_DONE_TRAP_ACTIVATION) || !procSpell || !roll_chance_i(triggerAmount))
return false;
if (procSpell->Id != 63487 /*frost trap*/ && !(procSpell->SchoolMask & SPELL_SCHOOL_MASK_FROST))
return false;
break;
}
// Glyph of Death's Embrace
case 58679:
{