Esempio n. 1
0
        public void UpdateUserFavorability(UserFavorabilityPB vo)
        {
            for (int i = 0; i < UserFavorabilityList.Count; i++)
            {
                if (vo.Player == UserFavorabilityList[i].Player)
                {
                    UserFavorabilityList[i].UserId = vo.UserId;
                    UserFavorabilityList[i].Player = vo.Player;

                    UserFavorabilityList[i].Apparel   = vo.Apparel;
                    UserFavorabilityList[i].Level     = vo.Level;
                    UserFavorabilityList[i].Exp       = GetCurExp(vo.Exp, vo.Level);
                    UserFavorabilityList[i].VoiceKeep = vo.VoiceKeep;
                    UserFavorabilityList[i].ShowExp   = vo.Exp;
                    break;
                }
            }
        }
Esempio n. 2
0
        public MapField <int, int> Apparel;  //用户服饰
        public UserFavorabilityVo(UserFavorabilityPB pb)
        {
            UserId = pb.UserId;
            Player = pb.Player;
            Level  = pb.Level;
            if (pb.Level > 1)
            {
                Exp = GlobalData.FavorabilityMainModel.GetCurExp(pb.Exp, pb.Level);
            }
            else
            {
                Exp = pb.Exp;
            }

            Apparel = pb.Apparel;

            ShowExp   = pb.Exp;
            VoiceKeep = pb.VoiceKeep;
        }
Esempio n. 3
0
        public void UpdataCurrentRoleVo(UserFavorabilityPB vo)
        {
            foreach (var v in UserFavorabilityList)
            {
                if (v.Player == vo.Player)
                {
                    v.Level   = vo.Level;
                    v.Apparel = vo.Apparel;
                    v.Exp     = GetCurExp(vo.Exp, vo.Level);

                    v.VoiceKeep = vo.VoiceKeep;
                    v.ShowExp   = vo.Exp;
                }
            }

            CurrentRoleVo.UserId    = vo.UserId;
            CurrentRoleVo.Player    = vo.Player;
            CurrentRoleVo.Apparel   = vo.Apparel;
            CurrentRoleVo.Level     = vo.Level;
            CurrentRoleVo.Exp       = GetCurExp(vo.Exp, vo.Level);
            CurrentRoleVo.VoiceKeep = vo.VoiceKeep;
            CurrentRoleVo.ShowExp   = vo.Exp;
        }