コード例 #1
0
        static void Postfix()
        {
            Mod.Log.Trace?.Write("CGS:OCGD - entered.");

            ModState.Reset();
            VisibilityCacheGate.Reset();
        }
コード例 #2
0
            public static void Postfix()
            {
                VisibilityCacheGate.ExitGate();

                Utils.CheckExitCounter($"Fewer calls made to ExitGate() when reaches AttackDirector.OnAttackSequenceEnd().\n", _counter);
                RTPFLogger.Debug?.Write($"Exit visibility cache gate in {typeof(H_OnAttackSequenceEnd).FullName}:{nameof(Postfix)}\n");
            }
コード例 #3
0
            public static void Postfix()
            {
                bool error = false;

                if (AbstractActor_HandleDeath.GateActive)
                {
                    error = true;
                    RTPFLogger.Error?.Write($"Something has gone wrong in handling actor death, resetting VisibilityCacheGate.");
                }

                if (H_AuraActorBody.GateActive)
                {
                    error = true;
                    RTPFLogger.Error?.Write(string.Format(ACTIVE_GATE, nameof(H_AuraActorBody)));
                }

                if (H_EffectManager.H_OnRoundEnd.GateActive)
                {
                    error = true;
                    RTPFLogger.Error?.Write(string.Format(ACTIVE_GATE, nameof(H_EffectManager.H_OnRoundEnd)));
                }

                if (error)
                {
                    VisibilityCacheGate.ExitAll();
                }
            }
コード例 #4
0
            public static void Postfix()
            {
                _hasEntered = false;
                VisibilityCacheGate.ExitGate();

                Utils.CheckExitCounter($"Fewer calls made to ExitGate() when reaches ActorMovementSequence.CompleteMove().\n", _counter);
                RTPFLogger.Debug?.Write($"Exit visibility cache gate in {typeof(H_CompleteMove).FullName}: {nameof(Postfix)}\n");
            }
コード例 #5
0
            public static void Prefix()
            {
                VisibilityCacheGate.EnterGate();
                GateActive = true;

                _counter = VisibilityCacheGate.GetCounter;
                RTPFLogger.Debug?.Write($"Enter visibility cache gate in {typeof(H_OnRoundEnd).FullName}:{nameof(Prefix)}\n");
            }
コード例 #6
0
            public static void Postfix()
            {
                VisibilityCacheGate.ExitGate();
                GateActive = false;

                Utils.CheckExitCounter($"Fewer calls made to ExitGate() when reaches {typeof(H_ReapplyAllEffects).FullName}:{nameof(Postfix)}.\n", _counter);
                RTPFLogger.Debug?.Write($"Exit visibility cache gate in {typeof(H_ReapplyAllEffects).FullName}:{nameof(Postfix)}\n");
            }
コード例 #7
0
 public static void Prefix()
 {
     if (!_hasEntered)
     {
         _hasEntered = true;
         VisibilityCacheGate.EnterGate();
         _counter = VisibilityCacheGate.GetCounter;
         RTPFLogger.Debug?.Write($"Enter visibility cache gate in {typeof(H_Update).FullName}:{nameof(Prefix)}\n");
     }
 }
コード例 #8
0
            public static bool Prefix(VisibilityCache __instance)
            {
                if (VisibilityCacheGate.Active)
                {
                    VisibilityCacheGate.AddActorToRefreshReciprocal(GetOwningActor(__instance));
                    return(false);
                }

                return(true);
            }
コード例 #9
0
            public static bool Prefix(VisibilityCache __instance)
            {
                EWState.InBatchProcess = true;
                EWState.EWStateCache.Clear();

                if (VisibilityCacheGate.Active)
                {
                    VisibilityCacheGate.AddActorToRefresh(GetOwningActor(__instance));
                    return(false);
                }

                return(true);
            }
コード例 #10
0
        public static void Postfix()
        {
            if (EWState.InBatchProcess)
            {
                Mod.Log.Error?.Write($"Something has gone wrong in refreshing visibility cache, resetting.");
                EWState.ResetCache();
            }

            if (AbstractActor_HandleDeath.GateActive)
            {
                Mod.Log.Error?.Write($"Something has gone wrong in handling actor death, resetting VisibilityCacheGate.");
                VisibilityCacheGate.ExitAll();
            }
        }
コード例 #11
0
        public static void Postfix(AbstractActor __instance)
        {
            VisibilityCacheGate.ExitGate();
            GateActive = false;

            int exitCounter = VisibilityCacheGate.GetCounter;

            if (exitCounter < counter)
            {
                RTPFLogger.Debug?.Write($"Reset or unsymmetrical larger number of ExitGate() are call.");
            }
            else if (exitCounter > counter)
            {
                RTPFLogger.Error?.Write($"Fewer calls to ExitGate() than EnterGate().");
            }
        }
コード例 #12
0
 public static void Postfix()
 {
     VisibilityCacheGate.EnterGate();
     _counter = VisibilityCacheGate.GetCounter;
     RTPFLogger.Debug?.Write($"Enter visibility cache gate in {typeof(H_OnAttackSequenceBegin).FullName}:{nameof(Postfix)}\n");
 }
コード例 #13
0
 public static void Prefix(AbstractActor __instance)
 {
     VisibilityCacheGate.EnterGate();
     GateActive = true;
     counter    = VisibilityCacheGate.GetCounter;
 }
コード例 #14
0
 public static void Postfix()
 {
     VisibilityCacheGate.Reset();
 }