예제 #1
0
        private static void ClearPanicEffects(AbstractActor actor, EffectManager effectManager)
        {
            var effects = Traverse.Create(effectManager).Field("effects").GetValue <List <Effect> >();

            for (var i = 0; i < effects.Count; i++)
            {
                if (effects[i].id.StartsWith("PanicSystem") && Traverse.Create(effects[i]).Field("target").GetValue <object>() == actor)
                {
                    effectManager.CancelEffect(effects[i]);
                }
            }
        }