mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(Core/Spell): Fix crash in Rogue T10 4P Bonus (#18413)
This commit is contained in:
committed by
GitHub
parent
42cde6286f
commit
22f2a8f731
@@ -768,13 +768,12 @@ class spell_gen_proc_not_self : public AuraScript
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Unit* target = eventInfo.GetActionTarget())
|
||||
{
|
||||
ObjectGuid targetGUID = target->GetGUID();
|
||||
uint32 spellID = aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell;
|
||||
caster->m_Events.AddEventAtOffset([caster, target, spellID]()
|
||||
{
|
||||
if (target)
|
||||
caster->m_Events.AddEventAtOffset([caster, targetGUID, spellID]()
|
||||
{
|
||||
if (Unit *target = ObjectAccessor::GetUnit(*caster, targetGUID))
|
||||
caster->CastSpell(target, spellID, true);
|
||||
}
|
||||
}, 100ms);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user