示例#1
0
        private void alliancePreBattlePlayers(object payload)
        {
            Hashtable data        = payload as Hashtable;
            Hashtable data1       = data["allianceWarSettlement"] as Hashtable;
            Hashtable winner      = data1["winner"] as Hashtable;
            Hashtable loser       = data1["loser"] as Hashtable;
            Hashtable winAlliance = data1["winAlliance"] as Hashtable;

            ScoreBoardData winnerData = new ScoreBoardData();

            winnerData.Name        = EB.Localizer.GetString(EB.Dot.String("name", winner, string.Empty));
            winnerData.Score       = EB.Dot.Integer("score", winner, 0);
            winnerData.id          = EB.Dot.Long("uid", winner, 0);
            winnerData.buffID      = EB.Dot.Integer("buff.id", winner, 0);
            winnerData.buffLv      = EB.Dot.Integer("buff.lv", winner, 0);
            winnerData.protectTime = EB.Dot.Integer("protectTime", loser, 0);

            ScoreBoardData loserData = new ScoreBoardData();
            string         nameStr   = EB.Dot.String("name", loser, string.Empty);

            loserData.Name        = string.IsNullOrEmpty(nameStr) ? nameStr : EB.Localizer.GetString(nameStr);
            loserData.Score       = EB.Dot.Integer("score", loser, 0);
            loserData.id          = EB.Dot.Long("uid", loser, 0);
            loserData.buffID      = EB.Dot.Integer("buff.id", loser, 0);
            loserData.buffLv      = EB.Dot.Integer("buff.lv", loser, 0);
            loserData.protectTime = EB.Dot.Integer("protectTime", loser, 0);

            LegionRankData winAllianceData = new LegionRankData();

            winAllianceData.id    = EB.Dot.Integer("id", winAlliance, -1);
            winAllianceData.Score = EB.Dot.Integer("score", winAlliance, 0);
            winAllianceData.Name  = EB.Localizer.GetString(EB.Dot.String("name", winAlliance, string.Empty));
        }
示例#2
0
        private ScoreBoardData changeData(LegionRankData temp)
        {
            ScoreBoardData data = new ScoreBoardData();

            data.Name  = temp.Name;
            data.Rank  = temp.Rank;
            data.Score = temp.Score;
            data.id    = temp.id;
            return(data);
        }
示例#3
0
 public void inWarFill(LegionRankData data)
 {
     item = data;
     if (item == null || item.Name == null)
     {
         Filled.CustomSetActive(false);
         Empty.CustomSetActive(true);
     }
     else
     {
         Filled.CustomSetActive(true);
         Empty.CustomSetActive(false);
         Name.text = Name.transform.GetChild(0).GetComponent <UILabel>().text = item.Name;
         SetIcon(item.Icon);
     }
 }
示例#4
0
        public LegionRankData Find(int legionID)
        {
            if (legionID == 1)
            {
                return(null);
            }
            LegionRankData item = null;

            for (int i = 0; i < FinalLegionRankList.Count; i++)
            {
                if (FinalLegionRankList[i] != null && FinalLegionRankList[i].id == legionID)
                {
                    item = FinalLegionRankList[i];
                }
            }
            return(item);
        }
示例#5
0
        public LegionRankData FindBase(int legionID)
        {
            if (legionID == 1)
            {
                return(null);
            }
            LegionRankData item = null;

            for (int i = 0; i < QualifyLegionRankList.Count; i++)
            {
                if (QualifyLegionRankList[i] != null && QualifyLegionRankList[i].id == legionID)
                {
                    item = QualifyLegionRankList[i];
                }
            }
            return(item);
        }
示例#6
0
        private LegionRankData Parse(object value, int id)
        {
            if (value == null)
            {
                return(null);
            }

            LegionRankData item = new LegionRankData();

            item.id    = EB.Dot.Integer("id", value, item.id);
            item.Score = EB.Dot.Integer("score", value, item.Score);
            string name = EB.Dot.String("name", value, item.Name);

            item.Name = string.IsNullOrEmpty(name) ? null : EB.Localizer.GetString(name);
            item.Rank = EB.Dot.Integer("rank", value, item.Rank);
            item.Icon = EB.Dot.String("aIcon", value, null);
            return(item);
        }
示例#7
0
        private LegionRankData Parse1(object value, int id)
        {
            if (value == null)
            {
                return(null);
            }

            LegionRankData item = new LegionRankData();

            item.id = EB.Dot.Integer("id", value, item.id);
            if (item.id == 1)
            {
                return(null);
            }
            item.Score = EB.Dot.Integer("score", value, item.Score);
            item.Name  = EB.Localizer.GetString(EB.Dot.String("name", value, item.Name));
            item.Icon  = EB.Dot.String("aIcon", value, null);
            item.enter = EB.Dot.Bool("isInFinal", value, false);
            return(item);
        }
示例#8
0
        public LegionRankData Find(int legionID)
        {
            LegionRankData item = LegionRankList.Where(m => m.id == legionID).FirstOrDefault();

            return(item);
        }