Ejemplo n.º 1
0
        public FinalStatusData FindFinalStatusData(int Field, LegionWarField type)
        {
            FinalStatusData temp = null;

            for (int i = 0; i < AllFinalStatusDataList.Count; i++)
            {
                if (AllFinalStatusDataList[i].FieldNumber == Field && AllFinalStatusDataList[i].Type == type)
                {
                    temp = AllFinalStatusDataList[i];
                }
            }
            return(temp);
        }
Ejemplo n.º 2
0
        public void OnUpdateFinalStatusData()
        {
            AllFinalStatusDataList.Clear();
            ArrayList battleFieldList;

            DataLookupsCache.Instance.SearchDataByID <ArrayList>("allianceWar.semiOrFinalStatus", out battleFieldList);
            if (battleFieldList != null)
            {
                for (int i = 0; i < battleFieldList.Count; i++)
                {
                    FinalStatusData data = new FinalStatusData();
                    data.Parse(battleFieldList[i]);
                    AllFinalStatusDataList.Add(data);
                }
            }
        }
Ejemplo n.º 3
0
        private IEnumerator InitFieldType()
        {
            ThisFinalStatus = new FinalStatusData();
            var dataList = LTLegionWarManager.Instance.FinalStatusList.AllFinalStatusDataList;

            for (var i = 0; i < dataList.Count; i++)
            {
                var data = dataList[i];
                if (data.FieldNumber == LTLegionWarManager.Instance.SemiFinalField && data.Type == WarFiled)
                {
                    ThisFinalStatus = data;
                    break;
                }
            }
            //0,1,2 开始,结束,准备中
            if (ThisFinalStatus.Status == 2)//准备中
            {
                UsCell.SetCurStatu(false);
                EnemyCell.SetCurStatu(false);
            }
            else if (ThisFinalStatus.Status == 0)//开始
            {
                PlayerLadderRanking.gameObject.CustomSetActive(false);
                TimeLabel.gameObject.CustomSetActive(false);

                //SetAllEnemyInfo(false);
                UsCell.SetCurStatu(false);
                EnemyCell.SetCurStatu(false);
            }
            else//结束
            {
                PlayerLadderRanking.gameObject.CustomSetActive(false);
                TimeLabel.gameObject.CustomSetActive(false);

                //SetAllEnemyInfo(false);
                if (Legions[0] != null)
                {
                    UsCell.SetCurStatu(true, ThisFinalStatus.WinAid == Legions[0].id);
                }
                if (Legions[1] != null)
                {
                    EnemyCell.SetCurStatu(true, ThisFinalStatus.WinAid == Legions[1].id);
                }
            }
            yield break;
        }
Ejemplo n.º 4
0
        private IEnumerator InitWatchLogFieldType()
        {
            ThisFinalStatus = new FinalStatusData();
            var dataList = LTLegionWarManager.Instance.WatchLogList.AllFinalStatusDataList;

            for (var i = 0; i < dataList.Count; i++)
            {
                var data = dataList[i];
                if (data.FieldNumber == LTLegionWarManager.Instance.SemiFinalField && data.Type == WarFiled)
                {
                    ThisFinalStatus = data;
                    break;
                }
            }
            if (Legions[0] != null)
            {
                UsCell.SetCurStatu(true, ThisFinalStatus.WinAid == Legions[0].id);
            }
            if (Legions[1] != null)
            {
                EnemyCell.SetCurStatu(true, ThisFinalStatus.WinAid == Legions[1].id);
            }
            yield break;
        }
Ejemplo n.º 5
0
        private FinalStatusData Parse(object value, int id)
        {
            if (value == null)
            {
                return(new FinalStatusData());
            }
            FinalStatusData item = new FinalStatusData();

            item.Parse(value);

            /*item.FieldNumber = EB.Dot.Integer("fieldNumber", value, item.FieldNumber);
             * int temp= EB.Dot.Integer("type", value, 3);
             * item .Type=(LegionWarField)temp;
             * item.Status = EB.Dot.Integer("status", value, -1);
             * item.Aids = Hotfix_LT.EBCore.Dot.Array<int>("aids", value, item.Aids, delegate (object val) { return int.Parse(val.ToString()); }); ;
             * item.WinAid = EB.Dot.Integer("winAid", value, -1);
             * item.CombatId = EB.Dot.Integer("battleId", value, 0);
             * item.redPaperEventOpen = EB.Dot.Bool("redPaperEventOpen", value, false);
             * if (LTRedPacketHudController.Instance != null&& LTLegionWarManager .Instance .SemiFinalField==item.FieldNumber && LTLegionWarManager.Instance.FieldType == temp)
             * {
             *  LTRedPacketHudController.Instance.redPaperEventOpen = item.redPaperEventOpen;
             * }*/
            return(item);
        }
Ejemplo n.º 6
0
        private void CheckTime()
        {
            if (isWarOver)
            {
                GlobalMenuManager.Instance.ComebackToMianMenu();
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTLegionWarFinalController_4204"));
                return;
            }

            var dataList = LTLegionWarManager.Instance.FinalStatusList.AllFinalStatusDataList;

            for (var i = 0; i < dataList.Count; i++)
            {
                var data = dataList[i];
                if (data.FieldNumber == LTLegionWarManager.Instance.SemiFinalField && data.Type == WarFiled)
                {
                    ThisFinalStatus = data;
                    break;
                }
            }

            if (ThisFinalStatus.Status == 0)
            {
                StatuLabel.text = StatuLabel.transform.GetChild(0).GetComponent <UILabel>().text = EB.Localizer.GetString("ID_codefont_in_LTLegionWarFinalController_4204");
                PlayerLadderRanking.gameObject.CustomSetActive(false);
                TimeLabel.gameObject.CustomSetActive(true);
                SetAllReplaceButton(false);
                //SetAllEnemyInfo(false);
            }
            else
            {
                if (ThisFinalStatus.Status == 2)
                {
                    int ts = 0;
                    if (LTLegionWarTimeLine.Instance != null)
                    {
                        ts = Convert.ToInt32(((_WarType == WarType.Semifinal) ? LTLegionWarTimeLine.Instance.SemiFinalStopTime : LTLegionWarTimeLine.Instance.FinalStopTime) - EB.Time.Now);
                    }
                    if (ts > 0)
                    {
                        string StatuStr = string.Format(EB.Localizer.GetString("ID_LEGION_WAR_FINAL_LOG"), (_WarType == WarType.Semifinal) ? EB.Localizer.GetString("ID_HALF_BATTLE") : EB.Localizer.GetString("ID_ALLIANCE_FINAL"));
                        StatuLabel.text = StatuLabel.transform.GetChild(0).GetComponent <UILabel>().text = StatuStr;
                        PlayerLadderRanking.gameObject.CustomSetActive(true);
                        TimeLabel.gameObject.CustomSetActive(true);
                        SetAllReplaceButton(LTLegionWarManager.Instance.FinalPlayerDataList.MyWarField != WarFiled);
                        //SetAllEnemyInfo(true);
                    }
                    else
                    {
                        StatuLabel.text = StatuLabel.transform.GetChild(0).GetComponent <UILabel>().text = EB.Localizer.GetString("ID_codefont_in_LTLegionWarFinalController_4204");
                        PlayerLadderRanking.gameObject.CustomSetActive(false);
                        TimeLabel.gameObject.CustomSetActive(true);
                        SetAllReplaceButton(false);
                        //SetAllEnemyInfo(false);
                    }
                }
                else
                {
                    EndShowFunc();
                }
            }

            GetCountdown();
        }