| | |
| | | } |
| | | } |
| | | |
| | | public int selectTeamPosJob = 0; //布阵界面 筛选职业 |
| | | public int selectTeamPosCountry = 0; //布阵界面 筛选国家 |
| | | public List<int> selectListTeamPos = new List<int>(); //布阵界面 筛选条件 |
| | | |
| | | public const float clickFlyPosTime = 0.5f; //点击列表中的武将图标时, 飞入布阵的时间 |
| | | |
| | |
| | | /// <param name="type"></param> |
| | | /// <param name="isPreview">true 客户端预览阵容,默认false 服务器阵容</param> |
| | | /// <returns></returns> |
| | | public Dictionary<string, int> GetLineupPer(TeamType type, bool isPreview = false) |
| | | { |
| | | Dictionary<string, int> lineUPPer = new Dictionary<string, int>() |
| | | { |
| | | {"lineupInitAddPer", 0}, |
| | | {"lineupLVAddPer", 0}, |
| | | {"lineupBreakLVAddPer", 0}, |
| | | {"lineupStarAddPer", 0}, |
| | | }; |
| | | // public Dictionary<string, int> GetLineupPer(TeamType type, bool isPreview = false) |
| | | // { |
| | | // Dictionary<string, int> lineUPPer = new Dictionary<string, int>() |
| | | // { |
| | | // {"lineupInitAddPer", 0}, |
| | | // {"lineupLVAddPer", 0}, |
| | | // {"lineupBreakLVAddPer", 0}, |
| | | // {"lineupStarAddPer", 0}, |
| | | // }; |
| | | |
| | | var team = TeamManager.Instance.GetTeam(type); |
| | | if (team == null) |
| | | { |
| | | return lineUPPer; |
| | | } |
| | | TeamHero[] teamHeroes = isPreview ? team.tempHeroes : team.serverHeroes; |
| | | // var team = TeamManager.Instance.GetTeam(type); |
| | | // if (team == null) |
| | | // { |
| | | // return lineUPPer; |
| | | // } |
| | | // TeamHero[] teamHeroes = isPreview ? team.tempHeroes : team.serverHeroes; |
| | | |
| | | foreach (var teamHero in teamHeroes) |
| | | { |
| | | if (teamHero == null) |
| | | { |
| | | continue; |
| | | } |
| | | var config = HeroQualityConfig.Get(HeroConfig.Get(teamHero.heroId).Quality); |
| | | lineUPPer["lineupInitAddPer"] += config.InitAddPer; |
| | | // foreach (var teamHero in teamHeroes) |
| | | // { |
| | | // if (teamHero == null) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // var config = HeroQualityConfig.Get(HeroConfig.Get(teamHero.heroId).Quality); |
| | | // lineUPPer["lineupInitAddPer"] += config.InitAddPer; |
| | | |
| | | HeroInfo hero = HeroManager.Instance.GetHero(teamHero.guid); |
| | | if (hero == null) continue; |
| | | lineUPPer["lineupLVAddPer"] += hero.GetLineupLVAddPer(); |
| | | lineUPPer["lineupBreakLVAddPer"] += hero.GetLineupBreakLVAddPer(); |
| | | lineUPPer["lineupStarAddPer"] += hero.GetLineupStarAddPer(); |
| | | // HeroInfo hero = HeroManager.Instance.GetHero(teamHero.guid); |
| | | // if (hero == null) continue; |
| | | // lineUPPer["lineupLVAddPer"] += hero.GetLineupLVAddPer(); |
| | | // lineUPPer["lineupBreakLVAddPer"] += hero.GetLineupBreakLVAddPer(); |
| | | // lineUPPer["lineupStarAddPer"] += hero.GetLineupStarAddPer(); |
| | | |
| | | } |
| | | return lineUPPer; |
| | | } |
| | | // } |
| | | // return lineUPPer; |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 按队伍获得阵型(国家光环)属性 |
| | |
| | | |
| | | public void SortHeroOnTeamList() |
| | | { |
| | | heroOnTeamSortList = HeroManager.Instance.GetHeroGuidList(selectTeamPosJob, selectTeamPosCountry); |
| | | heroOnTeamSortList = HeroManager.Instance.GetHeroGuidList(selectListTeamPos); |
| | | heroOnTeamSortList.Sort(CmpHeroByTeamType); |
| | | } |
| | | |