private static ModifierInfo CreateLockFrameInfo(Params p)
        {
            LockFrameModifierConfig  lfmc   = (LockFrameModifierConfig)p.baseModifierConfig;
            FrameAndSecondsConverter _30fps = FrameAndSecondsConverter._30Fps;

            return(new LockFrameInfo(
                       Target.Target, lfmc.successRate, p.delayToApply,
                       _30fps.FramesToSeconds(lfmc.delayInFramesForCaster),
                       _30fps.FramesToSeconds(lfmc.delayInFramesForTarget),
                       _30fps.FloatFramesToSeconds(lfmc.durationInFramesForCaster),
                       _30fps.FloatFramesToSeconds(lfmc.durationInFramesForTarget), lfmc.lockGlobally,
                       _30fps.FramesToSeconds(lfmc.delayInFramesForGlobal),
                       _30fps.FramesToSeconds(lfmc.durationInFramesForGlobal), p.baseModifierConfig.ListEnabledVfx(),
                       p.baseModifierConfig.lifetimes
                       ));
        }
Exemple #2
0
        protected override void OnDelayedAttachAsMain(Character target)
        {
            // DLog.Log("debug RecastModifier:OnDelayedAttachAsMain()");
            FrameAndSecondsConverter fasc         = FrameAndSecondsConverter._30Fps;
            AcceptWindow             recastWindow = new AcceptWindow(
                fasc.FloatFramesToSeconds(info.Rmc.@from), fasc.FloatFramesToSeconds(info.Rmc.to)
                );

            recastLifetime.EnableChecking();
            SetRecastWindow(recastWindow);
            SetMaxRecastCountWindow(info.Rmc.max);

            if (recastLifetime.IsEnd())
            {
                target.RemoveModifier(this);
            }
        }