mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
fix(Scripts/Spells): Fixed Rogue T10 4P bonus. (#15336)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user