public void SetData(TeamFightProtoData myProtoData, TeamFightProtoData enemyProtoData, List <DropItem> dropItems = null) { //my if (myProtoData.player != null) { PlayerInfo playerInfo = GameProxy.instance.PlayerInfo; //new PlayerInfo((uint)myProtoData.player.id, (uint)myProtoData.player.modelId, (uint)myProtoData.player.hairCutId, (uint)myProtoData.player.hairColorId, (uint)myProtoData.player.faceId, myProtoData.player.skinId, string.Empty); fightPlayerInfo = new FightPlayerInfo(playerInfo, myProtoData.player); } fightHeroInfoList = new List <FightHeroInfo>(); HeroFightProtoData data; int count = myProtoData.heros.Count; for (int i = 0; i < count; i++) { data = myProtoData.heros[i]; HeroInfo heroInfo = HeroProxy.instance.GetHeroInfo((uint)data.id); fightHeroInfoList.Add(new FightHeroInfo(heroInfo, data)); } ourFormation = FormationProxy.instance.GetFormationInfo(myProtoData.lineup.no); //enemy PlayerFightProtoData opponentPlayerData = enemyProtoData.player; PlayerInfo enemyPlayer = opponentPlayerData == null ? null : new PlayerInfo((uint)opponentPlayerData.id, (uint)opponentPlayerData.modelId, (uint)opponentPlayerData.hairCutId, (uint)opponentPlayerData.hairColorId, (uint)opponentPlayerData.faceId, opponentPlayerData.skinId, string.Empty); if (enemyPlayer != null) { enemyPlayer.UpdateSkillTalentByProtocol(opponentPlayerData.talnets, opponentPlayerData.selectedTalnet); enemyFightPlayerInfo = new FightPlayerInfo(enemyPlayer, opponentPlayerData); } enemyFightHeroInfoList = new List <FightHeroInfo>(); count = enemyProtoData.heros.Count; for (int i = 0; i < count; i++) { data = enemyProtoData.heros[i]; HeroInfo enemyHero = new HeroInfo((uint)data.id, data.modelId, 1, 0, data.star, 1); enemyFightHeroInfoList.Add(new FightHeroInfo(enemyHero, data)); } enemyFormation = new FormationInfo(enemyProtoData.lineup.no, enemyProtoData.lineup.lv); enemyFormation.isActiveAdditionAttr = enemyProtoData.lineup.attrIsActive; //drop if (dropItems != null) { this.dropItems = new List <DropItem>(dropItems); } Logic.UI.FightResult.Model.FightResultProxy.instance.SaveLastTeamData(); }
//public string GetImmnueIconPath(BuffType buffType) //{ // if (_immnueBuffIcon.ContainsKey(buffType)) // { // return _immnueBuffIcon[buffType]; // } // return string.Empty; //} public void SetData(TeamFightProtoData myProtoData, List <DropItem> dropItems = null) { if (myProtoData.player != null) { fightPlayerInfo = new FightPlayerInfo(GameProxy.instance.PlayerInfo, myProtoData.player); } fightHeroInfoList = new List <FightHeroInfo>(); HeroFightProtoData data; for (int i = 0, count = myProtoData.heros.Count; i < count; i++) { data = myProtoData.heros[i]; fightHeroInfoList.Add(new FightHeroInfo(HeroProxy.instance.GetHeroInfo((uint)data.id), data)); } ourFormation = FormationProxy.instance.GetFormationInfo(myProtoData.lineup.no); if (dropItems != null) { this.dropItems = new List <DropItem>(dropItems); } Logic.UI.FightResult.Model.FightResultProxy.instance.SaveLastTeamData(); }