Ejemplo n.º 1
0
        static void Prefix(Quest __instance, ref AsyncTimeComp __state)
        {
            if (Multiplayer.Client == null)
            {
                return;
            }
            if (!Multiplayer.GameComp.asyncTime)
            {
                return;
            }

            __state = MultiplayerAsyncQuest.TryGetCachedQuestMap(__instance);
            __state?.PreContext();
        }
Ejemplo n.º 2
0
        static void Prefix(Quest __instance, ref AsyncTimeComp __state)
        {
            if (Multiplayer.Client == null)
            {
                return;
            }

            //Make sure quest is accepted and async time is enabled and there are parts to this quest
            if (__instance.State != QuestState.NotYetAccepted || !Multiplayer.GameComp.asyncTime || __instance.parts == null)
            {
                return;
            }

            __state = MultiplayerAsyncQuest.CacheQuest(__instance);
            __state?.PreContext();
        }