Esempio n. 1
0
        public static bool Invoke(CM_PageRundown_New __instance, Il2CppSystem.Collections.Generic.List <CM_ExpeditionIcon_New> tierIcons, CM_RundownTierMarker tierMarker, bool thisTierUnlocked)
        {
            if (tierIcons.Count > 0)
            {
                var tier = tierIcons[0].Tier;
                RundownTierProgressionData progressionReq = null;
                var completionData     = CompletionData.LoadFromCache();
                var currentRundownData = __instance.m_currentRundownData;

                switch (tier)
                {
                case eRundownTier.TierB:
                    progressionReq = currentRundownData?.ReqToReachTierB;
                    break;

                case eRundownTier.TierC:
                    progressionReq = currentRundownData?.ReqToReachTierC;
                    break;

                case eRundownTier.TierD:
                    progressionReq = currentRundownData?.ReqToReachTierD;
                    break;

                case eRundownTier.TierE:
                    progressionReq = currentRundownData?.ReqToReachTierE;
                    break;
                }

                if (progressionReq != null)
                {
                    int high     = completionData.TotalCompletes_High;
                    int extreme  = completionData.TotalCompletes_Extreme;
                    int overload = completionData.TotalCompletes_Overload;
                    int pe       = completionData.TotalCompletes_PE;

                    thisTierUnlocked = high >= progressionReq.MainSectors && extreme >= progressionReq.SecondarySectors && overload >= progressionReq.ThirdSectors && pe >= progressionReq.AllClearedSectors;
                    tierMarker.SetStatus(thisTierUnlocked ? eRundownTierMarkerStatus.Unlocked : eRundownTierMarkerStatus.Locked);
                }


                for (int index = 0; index < tierIcons.Count; ++index)
                {
                    CM_ExpeditionIcon_New tierIcon = tierIcons[index];
                    __instance.SetIconStatus(tierIcon, thisTierUnlocked ? eExpeditionIconStatus.NotPlayed : eExpeditionIconStatus.TierLocked);
                }
            }

            return(false);
        }
Esempio n. 2
0
        public static void Invoke(CM_ExpeditionIcon_New __instance, ref eExpeditionIconStatus status, ref string mainFinishCount, ref string secondFinishCount, ref string thirdFinishCount, ref string allFinishedCount)
        {
            if (status == eExpeditionIconStatus.NotPlayed)
            {
                var allCompletionData = CompletionData.LoadFromCache();
                var completionData    = allCompletionData.GetData(__instance.Tier, __instance.ExpIndex);

                var expDataBlock = __instance.DataBlock;

                if (completionData.highCompletes > 0 || completionData.extremeCompletes > 0 || completionData.overloadCompletes > 0 || completionData.peCompletes > 0)
                {
                    status = eExpeditionIconStatus.PlayedAndFinished;
                }

                mainFinishCount   = completionData.highCompletes.ToString();
                secondFinishCount = RundownManager.HasSecondaryLayer(expDataBlock) ? completionData.extremeCompletes.ToString() : "-";
                thirdFinishCount  = RundownManager.HasThirdLayer(expDataBlock) ? completionData.overloadCompletes.ToString() : "-";
                allFinishedCount  = RundownManager.HasAllCompletetionPossibility(expDataBlock) ? completionData.peCompletes.ToString() : "-";
            }
        }