Skip to content

Commit

Permalink
fix(Core/Spell): Fix crash in Rogue T10 4P Bonus (azerothcore#18413)
Browse files Browse the repository at this point in the history
  • Loading branch information
walkline authored Feb 25, 2024
1 parent 42cde62 commit 22f2a8f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/server/scripts/Spells/spell_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]()
caster->m_Events.AddEventAtOffset([caster, targetGUID, spellID]()
{
if (target)
{
if (Unit *target = ObjectAccessor::GetUnit(*caster, targetGUID))
caster->CastSpell(target, spellID, true);
}
}, 100ms);
}
}
Expand Down

0 comments on commit 22f2a8f

Please sign in to comment.