fix(Scripts/Spells): Fixed Rogue T10 4P bonus. (#15336)
This commit is contained in:
parent
73652d4e65
commit
479c965c4e
1 changed files with 18 additions and 0 deletions
|
|
@ -764,9 +764,27 @@ class spell_gen_proc_not_self : public AuraScript
|
|||
return eventInfo.GetActor() != eventInfo.GetActionTarget();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Unit* target = eventInfo.GetActionTarget())
|
||||
{
|
||||
uint32 spellID = aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell;
|
||||
caster->m_Events.AddEventAtOffset([caster, target, spellID]()
|
||||
{
|
||||
if (target)
|
||||
{
|
||||
caster->CastSpell(target, spellID, true);
|
||||
}
|
||||
}, 100ms);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_gen_proc_not_self::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_gen_proc_not_self::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue