Exemplo n.º 1
0
        public bool GetHelpURL(out string url, out string title)
        {
            title = (string)null;
            url   = (string)null;
            GameManager instance = MonoSingleton <GameManager> .Instance;

            if (Object.op_Equality((Object)instance, (Object)null))
            {
                return(false);
            }
            VersusRankParam versusRankParam = instance.GetVersusRankParam(instance.RankMatchScheduleId);

            if (versusRankParam == null || string.IsNullOrEmpty(versusRankParam.HelpURL))
            {
                return(false);
            }
            title = versusRankParam.Name;
            url   = versusRankParam.HelpURL;
            return(true);
        }
Exemplo n.º 2
0
        private void RefreshParty()
        {
            int             lastSelectionIndex;
            PartyEditData   loadTeamPreset  = PartyUtility.LoadTeamPresets(PlayerPartyTypes.RankMatch, out lastSelectionIndex, false)[lastSelectionIndex];
            VersusRankParam versusRankParam = MonoSingleton <GameManager> .Instance.GetVersusRankParam(MonoSingleton <GameManager> .Instance.RankMatchScheduleId);

            if (versusRankParam == null)
            {
                return;
            }
            for (int index = 0; index < this.PartyUnitSlots.Length && index < loadTeamPreset.PartyData.VSWAITMEMBER_START; ++index)
            {
                if (index + 1 <= loadTeamPreset.Units.Length && loadTeamPreset.Units[index] != null)
                {
                    UnitData unitData1 = loadTeamPreset.Units[index];
                    if (unitData1.GetJobFor(PlayerPartyTypes.RankMatch) != unitData1.CurrentJob)
                    {
                        UnitData unitData2 = new UnitData();
                        unitData2.TempFlags |= UnitData.TemporaryFlags.TemporaryUnitData;
                        unitData2.Setup(unitData1);
                        unitData2.SetJob(PlayerPartyTypes.RankMatch);
                        unitData1 = unitData2;
                    }
                    unitData1.TempFlags |= UnitData.TemporaryFlags.AllowJobChange;
                    if (index == 0)
                    {
                        DataSource.Bind <UnitData>(this.PartyUnitLeader, unitData1);
                        GameParameter.UpdateAll(this.PartyUnitLeader);
                    }
                    DataSource.Bind <UnitData>(this.PartyUnitSlots[index], unitData1);
                    GameParameter.UpdateAll(this.PartyUnitSlots[index]);
                }
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.PartyInfo, (UnityEngine.Object)null))
            {
                DataSource.Bind <PartyData>(this.PartyInfo, loadTeamPreset.PartyData);
                GameParameter.UpdateAll(this.PartyInfo);
            }
            DataSource.Bind <PlayerPartyTypes>(((Component)this).get_gameObject(), PlayerPartyTypes.RankMatch);
            PlayerData player = MonoSingleton <GameManager> .Instance.Player;

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AwardItem, (UnityEngine.Object)null))
            {
                DataSource.Bind <PlayerData>(this.AwardItem, player);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.StreakWin, (UnityEngine.Object)null))
            {
                if (player.RankMatchStreakWin > 1)
                {
                    this.StreakWin.set_text(player.RankMatchStreakWin.ToString());
                }
                else
                {
                    ((Component)((Component)this.StreakWin).get_transform().get_parent()).get_gameObject().SetActive(false);
                }
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.NextOpenDate, (UnityEngine.Object)null))
            {
                if (MonoSingleton <GameManager> .Instance.RankMatchNextTime == 0L)
                {
                    ((Component)this.NextOpenDate).get_gameObject().SetActive(false);
                }
                else
                {
                    DateTime dateTime = TimeManager.FromUnixTime(MonoSingleton <GameManager> .Instance.RankMatchNextTime);
                    ((Component)this.NextOpenDate).get_gameObject().SetActive(true);
                    this.NextOpenDate.set_text(dateTime.ToString("MM/dd"));
                }
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.NextOpenTime, (UnityEngine.Object)null))
            {
                if (MonoSingleton <GameManager> .Instance.RankMatchNextTime == 0L)
                {
                    this.NextOpenTime.set_text("--");
                }
                else
                {
                    this.NextOpenTime.set_text(TimeManager.FromUnixTime(MonoSingleton <GameManager> .Instance.RankMatchNextTime).ToString("HH:mm"));
                }
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SeasonDateText, (UnityEngine.Object)null))
            {
                this.SeasonDateText.set_text(versusRankParam.EndAt.ToString("MM/dd"));
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SeasonTimeText, (UnityEngine.Object)null))
            {
                this.SeasonTimeText.set_text(versusRankParam.EndAt.ToString("HH:mm"));
            }
            MultiPlayVersusEdit component = (MultiPlayVersusEdit)((Component)this).GetComponent <MultiPlayVersusEdit>();

            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
            {
                return;
            }
            component.Set();
        }