Example #1
0
        private FinalPlayerData Parse(object value, int id)
        {
            if (value == null)
            {
                return(new FinalPlayerData());
            }
            FinalPlayerData item = new FinalPlayerData();

            item.Parse(value);
            return(item);
        }
Example #2
0
        private FinalPlayerData Parse(object value, int id)
        {
            if (value == null)
            {
                return(new FinalPlayerData());
            }
            FinalPlayerData item = new FinalPlayerData();

            item.Parse(value);

            /*item.uid = EB.Dot.Long("uid", value, item.uid);
             * item.LadderRank = EB.Dot.Integer("rank", value, -1)+1;
             * item.Name = EB.Localizer.GetString(EB.Dot.String("name", value, item.Name));
             * string IconID = EB.Dot.String("portrait", value, "10010");
             * IconID = (IconID == "") ? "10010" : IconID;
             * Hotfix_LT.Data.HeroInfoTemplate heroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(IconID);
             * item.IconName = (heroInfo != null) ? heroInfo.icon : "Partner_Head_Sugeladi";*/
            if (item.uid != 0)
            {
                switch (parseState)
                {
                case LegionWarField.Wind:
                {
                    if (item.uid == LoginManager.Instance.LocalUserId.Value)
                    {
                        MyWarField = LegionWarField.Wind;
                    }
                }; break;

                case LegionWarField.Water:
                {
                    if (item.uid == LoginManager.Instance.LocalUserId.Value)
                    {
                        MyWarField = LegionWarField.Water;
                    }
                }; break;

                case LegionWarField.Fire:
                {
                    if (item.uid == LoginManager.Instance.LocalUserId.Value)
                    {
                        MyWarField = LegionWarField.Fire;
                    }
                }; break;
                }
            }
            return(item);
        }