public static IEnumerator PlaySpellEffect([NotNull] SpellEffect spellEffect, [NotNull] Transform transform, Quaternion rotation, Vector3 scale, float delay, [CanBeNull] FightContext fightContext, [CanBeNull] ITimelineContextProvider contextProvider)
        {
            //IL_0015: Unknown result type (might be due to invalid IL or missing references)
            //IL_0016: Unknown result type (might be due to invalid IL or missing references)
            //IL_001c: Unknown result type (might be due to invalid IL or missing references)
            //IL_001d: Unknown result type (might be due to invalid IL or missing references)
            if (delay > 0f)
            {
                yield return((object)new WaitForTime(delay));
            }
            Component instance = spellEffect.Instantiate(transform, rotation, scale, fightContext, contextProvider);

            if (!(null != instance))
            {
                yield break;
            }
            switch (spellEffect.waitMethod)
            {
            case SpellEffect.WaitMethod.None:
            {
                MonoBehaviour current2 = FightMap.current;
                if (null != current2)
                {
                    current2.StartCoroutine(spellEffect.DestroyWhenFinished(instance));
                }
                break;
            }

            case SpellEffect.WaitMethod.Delay:
                yield return((object)new WaitForTime(spellEffect.waitDelay));

                if (null != instance)
                {
                    MonoBehaviour current = FightMap.current;
                    if (null != current)
                    {
                        current.StartCoroutine(spellEffect.DestroyWhenFinished(instance));
                    }
                }
                break;

            case SpellEffect.WaitMethod.Destruction:
                yield return(spellEffect.DestroyWhenFinished(instance));

                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }