//更新可挑战玩家列表 public void UpdateChallengerList(List <PHeroes> newChallengerList) { Log.info(this, "清除可挑战玩家信息"); _challengerList.Clear(); foreach (PHeroes hero in newChallengerList) { ChallengerVo challenger = new ChallengerVo(); challenger.roleId = hero.userid; challenger.rank = hero.pos; challenger.name = hero.name; challenger.level = hero.lvl; challenger.fightNum = hero.fightpoint; challenger.job = hero.job; challenger.sex = hero.sex; _challengerList.Add(challenger); } Log.info(this, "更新可挑战玩家列表"); _challengerList.Sort(new ICChallengerVo()); for (int i = 0; i < _challengerList.Count; ++i) { Log.info(this, "rank:" + _challengerList[i].rank.ToString()); Log.info(this, "job:" + _challengerList[i].job.ToString()); } DataUpdate(UPDATE_CHALLENGERLIST); }
//更新被挑战者玩家信息 public void UpdateVserAttr(List <uint> skills, PBaseAttr recRoleBaseAttr) { Log.info(this, "更新被挑战者玩家基础信息"); ChallengerVo challengerInfo = Singleton <ArenaMode> .Instance.challengerList [Singleton <ArenaMode> .Instance.selectHeroSub]; _vsPlayerAttr = new PlayerVo(); //需要重新new一个,否则_SysRoleBaseInfoVo不会被置为null,在战斗场景时加载战斗对手时会出问题----add by lixi _vsPlayerAttr.job = challengerInfo.job; // _vsPlayerAttr.Id = recRoleAttr.id; _vsPlayerAttr.Name = challengerInfo.name; _vsPlayerAttr.sex = challengerInfo.sex; _vsPlayerAttr.Level = (int)challengerInfo.level; // _vsPlayerAttr.exp = recRoleAttr.exp; // _vsPlayerAttr.expFull = recRoleAttr.expFull; // _vsPlayerAttr.vip = recRoleAttr.vip; // _vsPlayerAttr.nation = recRoleAttr.nation; // _vsPlayerAttr.vigour = recRoleAttr.vigour; // _vsPlayerAttr.vigourFull = recRoleAttr.vigourFull; // _vsPlayerAttr.hasCombine = recRoleAttr.hasCombine; // _vsPlayerAttr.customFace = recRoleAttr.customFace; // _vsPlayerAttr.titleList = recRoleAttr.titleList; _vsPlayerAttr.fightPoint = challengerInfo.fightNum; // PBaseAttr recRoleBaseAttr = recRoleAttr.attr; _vsPlayerAttr.Str = recRoleBaseAttr.str; _vsPlayerAttr.Agi = recRoleBaseAttr.agi; _vsPlayerAttr.Phy = recRoleBaseAttr.phy; _vsPlayerAttr.Wit = recRoleBaseAttr.wit; _vsPlayerAttr.CurHp = recRoleBaseAttr.hpCur; _vsPlayerAttr.Hp = recRoleBaseAttr.hpFull; _vsPlayerAttr.CurMp = recRoleBaseAttr.mpCur; _vsPlayerAttr.Mp = recRoleBaseAttr.mpFull; _vsPlayerAttr.AttPMin = recRoleBaseAttr.attPMin; _vsPlayerAttr.AttPMax = recRoleBaseAttr.attPMax; _vsPlayerAttr.AttMMin = recRoleBaseAttr.attMMin; _vsPlayerAttr.AttMMax = recRoleBaseAttr.attMMax; _vsPlayerAttr.DefP = recRoleBaseAttr.defP; _vsPlayerAttr.DefM = recRoleBaseAttr.defM; _vsPlayerAttr.Hit = recRoleBaseAttr.hit; _vsPlayerAttr.Dodge = (int)recRoleBaseAttr.dodge; _vsPlayerAttr.Crit = recRoleBaseAttr.crit; _vsPlayerAttr.CritRatio = recRoleBaseAttr.critRatio; _vsPlayerAttr.Flex = recRoleBaseAttr.flex; _vsPlayerAttr.HurtRe = recRoleBaseAttr.hurtRe; _vsPlayerAttr.Speed = recRoleBaseAttr.speed; _vsPlayerAttr.Luck = recRoleBaseAttr.luck; _vsPlayerAttr.skills = skills; }
private void ShowArenaVsView() { if (myModel != null) { GameObject.Destroy(myModel); } if (vserModel != null) { GameObject.Destroy(vserModel); } challengerInfo = Singleton <ArenaMode> .Instance.challengerList [Singleton <ArenaMode> .Instance.selectHeroSub]; myName.text = MeVo.instance.Name; myLevel.text = MeVo.instance.Level.ToString(); myRank.text = Singleton <ArenaMode> .Instance.myRank.ToString(); myFight.text = MeVo.instance.fightPoint.ToString(); new RoleDisplay().CreateRole(MeVo.instance.job, LoadMyModelCallBack); vsName.text = challengerInfo.name; vsLevel.text = challengerInfo.level.ToString(); vsRank.text = challengerInfo.rank.ToString(); vsFight.text = challengerInfo.fightNum.ToString(); }