//internal static readonly ObjectPool<List<AuraApplicationInfo>> AuraAppListPool = ObjectPoolMgr.CreatePool(() => new List<AuraApplicationInfo>()); public static void Trigger(WorldObject caster, SpellEffect triggerEffect, Spell spell) { var cast = SpellCastPool.Obtain(); cast.Caster = caster; cast.m_triggerEffect = triggerEffect; caster.ExecuteInContext(() => { cast.Start(spell, true); cast.Dispose(); }); }
public static void Trigger(WorldObject caster, Spell spell, ref Vector3 targetLoc, WorldObject selected, Item casterItem) { var cast = SpellCastPool.Obtain(); cast.Caster = caster; cast.TargetLoc = targetLoc; cast.Selected = selected; cast.CasterItem = casterItem; caster.ExecuteInContext(() => { cast.Start(spell, true); cast.Dispose(); }); }