void FillBuffMemberSkill(DTOBuffMemberView view, NbManagerbuffmemberEntity member, DTOBuffPlayer player) { member.MatchPropList = player.MatchPropList; member.MatchBoostList = player.MatchBoostList; if (null == view.ReadySkillList) { view.ReadySkillList = new List <string>(); } member.LiveSkillList = new List <string>(); member.FirmSkillList = new List <string>(); if (null != player.SBMList) { var rankSkills = BuffCache.Instance().GetRankedSkillList(player.SBMList); view.ReadySkillList.AddRange(rankSkills[0]); member.LiveSkillList.AddRange(rankSkills[1]); member.FirmSkillList.AddRange(rankSkills[2]); } var skill = player.ActionSkill; if (!string.IsNullOrEmpty(skill)) { member.LiveSkillList.Add(skill); } skill = player.StarPlusSkill; if (!string.IsNullOrEmpty(skill)) { member.LiveSkillList.Add(skill); } skill = player.StarSkill; if (!string.IsNullOrEmpty(skill)) { member.LiveSkillList.AddRange(player.AsStarSkill); } }
internal bool SyncMembersCore(Guid managerId, EnumArenaType arenaType, DTOBuffMemberView buffData, string siteId = "") { try { if (null == buffData) { return(false); } if (string.IsNullOrEmpty(siteId)) { int managerHash = ShareUtil.GetTableMod(managerId); //var idles = GetIdleMembers(managerId, buffData); string mSkills = FrameConvert.SkillListToText(buffData.ManagerSkills); int errorCode = 0; byte[] rowVer = BitConverter.GetBytes(buffData.UseSyncVersion); NbManagerbuffmemberMgr.SyncBatch(managerId, buffData.Kpi, string.Empty, mSkills, rowVer, ref rowVer, ref errorCode); if (errorCode != 0) { return(false); } buffData.UseSyncVersion = BitConverter.ToUInt64(rowVer, 0); } buffData.SyncIdleFlag = false; s_memBuffMember.Set(arenaType.ToString() + managerId.ToString(), buffData); return(true); } catch (Exception ex) { SystemlogMgr.Error(string.Format("BuffDataCore:Sync Manager[{0}]", managerId), ex); return(false); } }
Guid[] GetIdleMembers(Guid managerId, DTOBuffMemberView buffData) { if (!buffData.SyncIdleFlag) { return(null); } var members = NbManagerbuffmemberMgr.GetByMid(managerId, ShareUtil.GetTableMod(managerId)); Guid tid = Guid.Empty; var dic = buffData.BuffMembers; const int cnt = 5; int i = 0; var ary = new Guid[cnt]; foreach (var item in members) { if (i >= cnt) { break; } tid = item.Tid; if (!dic.ContainsKey(tid)) { ary[i++] = tid; } } for (; i < cnt; ++i) { ary[i] = Guid.Empty; } return(ary); }
static List <NBSolutionTeammember> GetSolutionTeammembers(Guid managerId, DTOBuffMemberView buffView, bool onlyMain = false, bool withHire = true, string siteId = "", bool isNpc = false) { List <NBSolutionTeammember> list = new List <NBSolutionTeammember>(); if (isNpc) { foreach (var buffMember in buffView.BuffMembers.Values) { if (!onlyMain || buffMember.IsMain) { var entity = new NBSolutionTeammember(); entity.Idx = buffMember.Tid; entity.Kpi = buffMember.Kpi; entity.Level = buffMember.Level; entity.PlayerId = buffMember.Pid; entity.Position = buffMember.PPos; entity.Strength = buffMember.Strength; entity.IsMain = buffMember.IsMain; list.Add(entity); } } } else { var dicMembers = GetDicRawMembers4View(managerId, buffView, siteId); TeammemberEntity member = null; foreach (var buffMember in buffView.BuffMembers.Values) { if (!onlyMain || buffMember.IsMain) { if (dicMembers.TryGetValue(buffMember.Tid, out member)) { if (!withHire && member.IsHirePlayer) { continue; } } var entity = new NBSolutionTeammember(); entity.Idx = buffMember.Tid; entity.Kpi = buffMember.Kpi; entity.Level = buffMember.Level; entity.PlayerId = buffMember.Pid; entity.Position = buffMember.PPos; entity.Strength = buffMember.Strength; entity.IsMain = buffMember.IsMain; if (null != member) { entity.IsCopyed = member.IsCopyed; entity.IsInherited = member.IsInherited; entity.ArousalLv = member.ArousalLv; } list.Add(entity); } } } return(list); }
public static Match_FightManagerinfo GetFightinfo(DicNpcEntity npcEntity, DTOBuffMemberView buffView = null, bool isNpc = false) { if (null == buffView) { buffView = NpcDataHelper.GetMemberView(npcEntity); } return(GetFightinfo(npcEntity.Idx, npcEntity.Name, npcEntity.FormationId, npcEntity.Level, npcEntity.Logo.ToString(), npcEntity.CoachId , buffView, "", isNpc)); }
public static ManagerInput BuildTransferNpc(DicNpcEntity npcEntity, DTOBuffMemberView buffView) { var dstData = new ManagerInput(); dstData.Mid = npcEntity.Idx; dstData.Logo = npcEntity.Logo.ToString(); dstData.Name = npcEntity.Name; dstData.FormId = npcEntity.FormationId; dstData.FormLv = npcEntity.FormationLevel; BuildManagerData(dstData, buffView, 0, npcEntity.Buff); return(dstData); }
DTOBuffMemberView CloneBuffView(DTOBuffMemberView src, bool withPack = false) { var obj = SerializationHelper.FromByte <DTOBuffMemberView>(SerializationHelper.ToByte(src)); if (withPack && null != src.BuffPlayers) { obj.BuffPlayers = new Dictionary <Guid, DTOBuffPlayer>(src.BuffPlayers.Count); foreach (var kvp in src.BuffPlayers) { obj.BuffPlayers[kvp.Key] = kvp.Value.Clone(); } } return(obj); }
public static void BuildManagerData(ManagerInput dstData, DTOBuffMemberView buffView, int vipLevel, int buffScale, bool isGuide = false) { if (null == dstData) { return; } dstData.Players = new List <PlayerInput>(11); var legendCount = 0; foreach (var buffMember in buffView.BuffMembers.Values) { if (buffMember.IsMain) { var cachePlayer = MatchDataUtil.GetDicPlayer(buffMember.Tid, buffMember.Pid); if (cachePlayer.CardLevel == 2 || cachePlayer.CardLevel == 1 || cachePlayer.CardLevel == 7 || cachePlayer.CardLevel == 8) { legendCount++; } } } buffScale += CacheFactory.AppsettingCache.GetSolutionLegendAndVipPlus(legendCount, vipLevel); double buffPlus = buffScale / 100.00; foreach (var buffMember in buffView.BuffMembers.Values) { if (buffMember.IsMain) { var cachePlayer = MatchDataUtil.GetDicPlayer(buffMember.Tid, buffMember.Pid); PlayerInput transferPlayerEntity = new PlayerInput(); transferPlayerEntity.FamilyName = cachePlayer.Name; transferPlayerEntity.Height = (int)cachePlayer.Stature; transferPlayerEntity.Pid = buffMember.Pid; transferPlayerEntity.Plus = (byte)buffMember.Strength; transferPlayerEntity.Position = (byte)buffMember.PPos; BuildTeammemberData(transferPlayerEntity, buffMember, buffPlus, isGuide); dstData.Players.Add(transferPlayerEntity); } } if (isGuide) { var list = CacheFactory.NpcdicCache.GetGuidePlayers(); int count = list.Count; int totalCount = dstData.Players.Count; for (int i = 1; i <= count; i++) { PlayerInputClone(dstData.Players[totalCount - i], list[i - 1]); } } }
DTOBuffMemberView CreateBuffView(Guid managerId, ManagerSkillUseWrap use, Dictionary <Guid, TeammemberEntity> rawMembers) { var mSkills = use.ManagerSkills; var obj = new DTOBuffMemberView(); obj.CreateTime = DateTime.Now; obj.SyncIdleFlag = true; obj.UseSyncVersion = use.VersionNo; obj.ReadySkillList = mSkills[0]; obj.LiveSkillList = mSkills[1]; obj.FirmSkillList = mSkills[2]; obj.SubSkills = use.SetTalents; obj.RawMembers = rawMembers; return(obj); }
/// <summary> /// 序列化球员卡和装备 /// </summary> /// <param name="managerId"></param> /// <returns></returns> public static List <TeammemberEntity> GetTeammembers(Guid managerId, DTOBuffMemberView buffView = null, bool withHire = false, string siteId = "") { if (null == buffView) { buffView = BuffDataCore.Instance().GetMembers(managerId, true, siteId); } var members = GetRawMembers4View(managerId, buffView, withHire, siteId); if (members != null) { foreach (var entity in members) { BuildTeammemberProperty(entity, buffView); } } return(members); }
public void FillBuffView(DTOBuffMemberView buffView, Dictionary <Guid, DTOBuffPlayer> buffPlayers, bool fillProp = true, int fillKpi = 0, int formationId = 0) { if (null == buffPlayers) { return; } var dic = buffView.BuffMembers; if (null == dic) { dic = new Dictionary <Guid, NbManagerbuffmemberEntity>(buffPlayers.Count); buffView.BuffMembers = dic; } Guid tid = Guid.Empty; NbManagerbuffmemberEntity member = null; double kpi = 0; int index = 0; foreach (var kvp in buffPlayers) { tid = kvp.Key; if (!dic.TryGetValue(tid, out member)) { member = CreateBuffMember(tid, kvp.Value); FillBuffMemberSkill(buffView, member, kvp.Value); dic[tid] = member; } if (fillProp) { FillBuffMemberProp(member, kvp.Value); } if (fillKpi > 0) { kpi += member.AsKpi(index, formationId); } index++; } if (fillKpi == 1) { buffView.Kpi = buffView.KpiReady = Convert.ToInt32(kpi); } else if (fillKpi > 1) { buffView.KpiReady = Convert.ToInt32(kpi); } }
void CreateTemplate(List <DicPlayerEntity> list) { var positionList = BuildTemplatePosition(); var conditionList = BuildTemplateCondition(); string s = ""; List <int> ids = new List <int>(11); //for (int i = 0; i < 11; i++) //{ // var items = list.FindAll(d => d.Position == (int)positionList[i].Position // &&d.Kpi>=conditionList[i].MinPower && d.Kpi<=conditionList[i].MaxPower); // var item = items[RandomHelper.GetInt32WithoutMax(0, items.Count)]; // while (ids.Contains(item.Idx)) // { // item = items[RandomHelper.GetInt32WithoutMax(0, items.Count)]; // } // ids.Add(item.Idx); // s += item.Idx + ","; //} //不能有元老卡 DTOBuffMemberView view = new DTOBuffMemberView(); view.BuffMembers = new Dictionary <Guid, NbManagerbuffmemberEntity>(); for (int i = 0; i < 7; i++) { var condition = conditionList[i]; if (condition.MaxPower == 0) { condition.MaxPower = 200; } var position = positionList[i]; var items = list.FindAll(d => d.Position == (int)position.Position && d.CardLevel == condition.CardLevel && d.Capacity >= condition.MinPower && d.Capacity <= condition.MaxPower); var item = items[RandomHelper.GetInt32WithoutMax(0, items.Count)]; while (ids.Contains(item.Idx)) { item = items[RandomHelper.GetInt32WithoutMax(0, items.Count)]; } view.BuffMembers.Add(Guid.NewGuid(), BuildBuffMember(item)); ids.Add(item.Idx); s += item.Idx + ","; } MatchDataHelper.CalKpi(view); s = s.TrimEnd(','); TemplateRegisterMgr.Add(s, view.Kpi); }
public static List <TeammemberEntity> GetRawMembers4View(Guid managerId, DTOBuffMemberView buffView, bool withHire = false, string siteId = "") { var dicMembers = buffView.RawMembers; List <TeammemberEntity> rst = null; if (null == dicMembers || dicMembers.Count == 0) { var members = GetRawMembers(managerId, true, siteId); if (null == members) { return(null); } if (withHire) { return(members); } rst = new List <TeammemberEntity>(members.Count); foreach (var item in members) { if (item.IsHirePlayer) { continue; } rst.Add(item); } return(rst); } if (withHire) { return(dicMembers.Values.ToList()); } rst = new List <TeammemberEntity>(dicMembers.Count); foreach (var item in dicMembers.Values) { if (item.IsHirePlayer) { continue; } rst.Add(item); } return(rst); }
static ManagerInput CreateTransferManagerArena(MatchManagerInfo managerInfo, DTOBuffMemberView buffView, bool isGuide, ArenaTeammemberFrame arenaFrame, string siteId = "") { if (null == buffView) { return(null); } var manager = MatchDataHelper.GetManager(managerInfo.ManagerId, false, false, siteId); var solution = MatchDataHelper.GetArenaSolution(arenaFrame); string name = managerInfo.IsBot ? _botName : manager.Name; managerInfo.Name = name; var dstData = new ManagerInput(); dstData.Mid = managerInfo.ManagerId; dstData.Name = name; dstData.Logo = manager.Logo.ToString(); dstData.FormId = solution.FormationId; dstData.FormLv = solution.FormationLevel; dstData.ClothId = buffView.ClothId; dstData.Skills = buffView.LiveSkillList; dstData.SubSkills = buffView.SubSkills; if (null != buffView.MatchPropList) { dstData.PropList = new List <PropInput>(); foreach (var item in buffView.MatchPropList) { dstData.PropList.Add(new PropInput(item.Point, item.Percent, item.BuffId)); } } if (null != buffView.MatchBoostList) { dstData.BoostList = new List <BoostInput>(); foreach (var item in buffView.MatchBoostList) { dstData.BoostList.Add(new BoostInput(item.BoostType, item.Point, item.Percent, item.BuffId)); } } BuildManagerData(dstData, buffView, manager.VipLevel, managerInfo.BuffScale, isGuide); return(dstData); }
public static DTOBuffMemberView GetMemberView(DicNpcEntity npcEntity) { if (npcEntity.Type == 1 || npcEntity.Type == 2 || npcEntity.Type == 3 || npcEntity.Type == 4 || npcEntity.Type == 5 || npcEntity.Type == 6)//球星启示录计算真实kpi { npcEntity.KpiBuff = npcEntity.Buff; npcEntity.Buff = 100;// npcEntity.Buff; } else { npcEntity.KpiBuff = 100; } var data = new DTOBuffMemberView(); //TODO: CombLevel var managerSBMList = new List <string>(); //套装字典 套装id->数量 var suitDic = new Dictionary <int, List <int> >(); //套装id->套装类型 var suitTypeDic = new Dictionary <int, int>(); var formationDetails = CacheFactory.FormationCache.GetFormationDetail(npcEntity.FormationId); int i = 0; var buffPlayers = new Dictionary <Guid, DTOBuffPlayer>(PLAERCOUNT); buffPlayers.Add(Guid.NewGuid(), BuildPlayer(npcEntity, npcEntity.TP1, npcEntity.TE1, npcEntity.TS1, formationDetails[i++].Position, npcEntity.KpiBuff, ref suitDic, ref suitTypeDic)); buffPlayers.Add(Guid.NewGuid(), BuildPlayer(npcEntity, npcEntity.TP2, npcEntity.TE2, npcEntity.TS2, formationDetails[i++].Position, npcEntity.KpiBuff, ref suitDic, ref suitTypeDic)); buffPlayers.Add(Guid.NewGuid(), BuildPlayer(npcEntity, npcEntity.TP3, npcEntity.TE3, npcEntity.TS3, formationDetails[i++].Position, npcEntity.KpiBuff, ref suitDic, ref suitTypeDic)); buffPlayers.Add(Guid.NewGuid(), BuildPlayer(npcEntity, npcEntity.TP4, npcEntity.TE4, npcEntity.TS4, formationDetails[i++].Position, npcEntity.KpiBuff, ref suitDic, ref suitTypeDic)); buffPlayers.Add(Guid.NewGuid(), BuildPlayer(npcEntity, npcEntity.TP5, npcEntity.TE5, npcEntity.TS5, formationDetails[i++].Position, npcEntity.KpiBuff, ref suitDic, ref suitTypeDic)); buffPlayers.Add(Guid.NewGuid(), BuildPlayer(npcEntity, npcEntity.TP6, npcEntity.TE6, npcEntity.TS6, formationDetails[i++].Position, npcEntity.KpiBuff, ref suitDic, ref suitTypeDic)); buffPlayers.Add(Guid.NewGuid(), BuildPlayer(npcEntity, npcEntity.TP7, npcEntity.TE7, npcEntity.TS7, formationDetails[i++].Position, npcEntity.KpiBuff, ref suitDic, ref suitTypeDic)); //套装 TeammemberDataHelper.FillSuitData(suitDic, suitTypeDic, ref managerSBMList); //阵型加成 TeammemberDataHelper.FillFormationData(npcEntity.FormationId, npcEntity.FormationLevel, ref managerSBMList); //TODO:球员组合 BuffDataCore.Instance().FillBuffView(data, buffPlayers, true, 1, npcEntity.FormationId); data.BuffPlayers = buffPlayers; return(data); }
public static ManagerInput BuildTransferManager(MatchManagerInfo managerInfo, bool isGuide = false, DTOBuffMemberView buffView = null, string siteId = "") { try { if (managerInfo.IsNpc) { return(GetTransferNpc(managerInfo)); } if (null == buffView) { buffView = BuffDataCore.Instance().GetMembers(managerInfo.ManagerId, true, siteId); } return(CreateTransferManager(managerInfo, buffView, isGuide, siteId)); } catch (Exception ex) { SystemlogMgr.Error("BuildTransferManager", ex); throw; } }
public static Dictionary <Guid, TeammemberEntity> GetDicRawMembers4ViewArena(Guid managerId, ArenaTeammemberFrame arenaTeammemberFrame, DTOBuffMemberView buffView, string siteId = "") { Dictionary <Guid, TeammemberEntity> dicMembers = buffView.RawMembers; if (null == dicMembers || dicMembers.Count == 0) { var members = GetRawMembersArena(managerId, arenaTeammemberFrame, true, siteId); if (null == members) { return(null); } dicMembers = members.ToDictionary(i => i.Idx, i => i); } return(dicMembers); }
public static Match_FightManagerinfo GetFightinfo(Guid managerId, bool isBot, DTOBuffMemberView buffView = null, string siteId = "") { var manager = GetManager(managerId, false, false, siteId); if (manager == null) { return(null); } if (buffView == null) { return(null); } manager.Kpi = buffView.Kpi; var solution = GetSolution(manager.Idx, siteId); if (solution == null) { return(null); } string name = isBot ? _botName : manager.Name; // int coachId = GetCoachId(manager.Idx, siteId); return(GetFightinfo(manager.Idx, name, solution.FormationId, manager.Level, manager.Logo, 0, buffView, siteId)); }
void FillBuffView(DTOBuffMemberView buffView, DTOBuffPack buffPack, bool homeFlag, bool fillProp = true, int fillKpi = 0) { var solution = buffPack.GetSolution(homeFlag); FillBuffView(buffView, buffPack.GetBuffPlayers(homeFlag), fillProp, fillKpi, solution.FormationId); }
public static Match_FightManagerinfo GetFightinfoArena(ArenaTeammemberFrame arenaFrame, bool isBot, DTOBuffMemberView buffView = null, string siteId = "") { if (arenaFrame == null) { return(null); } var manager = GetManager(arenaFrame.ManagerId, false, false, siteId); if (manager == null) { return(null); } if (buffView == null) { return(null); } arenaFrame.Kpi = buffView.Kpi; var solution = GetArenaSolution(arenaFrame); if (solution == null) { return(null); } string name = isBot ? _botName : manager.Name; // int coachId = GetCoachId(manager.Idx, siteId); return(GetFightinfoArena(arenaFrame, name, solution.FormationId, manager.Level, manager.Logo, 0, buffView, siteId)); }
static Match_FightManagerinfo GetFightinfoArena(ArenaTeammemberFrame arenaFrame, string name, int formationId, int level, string logo, int coachId, DTOBuffMemberView buffView, string siteId = "", bool isNpc = false) { if (buffView == null || arenaFrame == null) { return(null); } var managerinfo = new Match_FightManagerinfo(); managerinfo.FormationId = formationId; managerinfo.Level = level; managerinfo.Logo = logo; managerinfo.ManagerId = arenaFrame.ManagerId; managerinfo.Name = name; managerinfo.CoachId = coachId; managerinfo.Teammembers = GetArenaSolutionTeammembers(arenaFrame, buffView, true, true, siteId, isNpc); managerinfo.Kpi = buffView.Kpi; managerinfo.KpiReady = buffView.KpiReady; return(managerinfo); }
public void GetMembers(out DTOBuffMemberView homeData, out DTOBuffMemberView awayData, string homeSiteId, Guid homeId, bool isHomeNpc, string awaySiteId, Guid awayId, ArenaTeammemberFrame homeFrame, ArenaTeammemberFrame awayFrame, bool isAwayNpc, bool syncHomeFlag = true, bool syncAwayFlag = false) { var buffPack = new DTOBuffPack(); if (isHomeNpc) { syncHomeFlag = false; homeData = CloneBuffView(NpcdicCache.Instance.GetBuffView(homeId), true); } else { homeData = GetMembersCore(buffPack, true, homeId, homeFrame, syncHomeFlag, homeSiteId); } if (isAwayNpc) { syncAwayFlag = false; awayData = CloneBuffView(NpcdicCache.Instance.GetBuffView(awayId), true); } else { awayData = GetMembersCore(buffPack, false, awayId, awayFrame, syncAwayFlag, awaySiteId); } string antiTalentSkill; if (ManagerSkillCache.Instance().TryGetAntiTanlent(out antiTalentSkill, homeData.TalentType, awayData.TalentType)) { if (null == homeData.ReadySkillList) { homeData.ReadySkillList = new List <string>(2); } homeData.ReadySkillList.Add(antiTalentSkill); } if (ManagerSkillCache.Instance().TryGetAntiTanlent(out antiTalentSkill, awayData.TalentType, homeData.TalentType)) { if (null == awayData.ReadySkillList) { awayData.ReadySkillList = new List <string>(2); } awayData.ReadySkillList.Add(antiTalentSkill); } int cntHome = 0; int cntAway = 0; if (null != homeData.ReadySkillList) { cntHome = homeData.ReadySkillList.Count; } if (null != awayData.ReadySkillList) { cntAway = awayData.ReadySkillList.Count; } if (cntHome == 0 && cntAway == 0) { return; } if (isHomeNpc) { FillBuffPack(buffPack, true, homeData.BuffPlayers); } else { FillBuffPack(buffPack, true, homeId, homeFrame, null, homeSiteId); } if (isAwayNpc) { FillBuffPack(buffPack, false, awayData.BuffPlayers); } else { FillBuffPack(buffPack, false, awayId, awayFrame, null, awaySiteId); } BuffFlowFacade.ProcManagerBuff(buffPack, true, homeData.ReadySkillList, true); BuffFlowFacade.ProcManagerBuff(buffPack, false, awayData.ReadySkillList, true); FillBuffView(homeData, buffPack, true, true, 2); FillBuffView(awayData, buffPack, false, true, 2); }
public void SyncBuffMembers(Guid managerId, DTOBuffMemberView buffData, string siteId = "") { s_tpBuffMember.Add(() => BuffDataCore.Instance().SyncMembersCore(managerId, buffData, siteId)); }
static void BuildTeammemberProperty(TeammemberEntity entity, DTOBuffMemberView buffView) { }
public static void CalKpi(DTOBuffMemberView view) { }
public static DTOBuffMemberView GetMemberView(LocalTransferManagerEntity localManager) { var data = new DTOBuffMemberView(); //TODO: CombLevel var managerSBMList = new List <string>(); //套装字典 套装id->数量 var suitDic = new Dictionary <int, int>(); //套装id->套装类型 var suitTypeDic = new Dictionary <int, int>(); var buffPlayers = new Dictionary <Guid, DTOBuffPlayer>(PLAERCOUNT); foreach (var playerEntity in localManager.Players) { buffPlayers.Add(Guid.NewGuid(), BuildPlayer(playerEntity)); } //套装 //TeammemberDataHelper.FillSuitData(suitDic, suitTypeDic, ref managerSBMList); //阵型加成 TeammemberDataHelper.FillFormationData(localManager.FormationId, localManager.FormationLevel, ref managerSBMList); //天赋意志处理 var skills = new List <string>(); string[] subSkills = new string[2]; //天赋 if (localManager.TalentId > 0) { var localTalent = LocalHelper.TalentList.Talents.Find(d => d.Id == localManager.TalentId); if (localTalent != null) { string talent = string.Empty; LocalTalentEntity talentCfg = null; int len = 0; foreach (var talentdata in localTalent.Talentdatas) { talent = talentdata.Id; talentCfg = LocalHelper.LocalCache.Talents.Find(i => i.Id == talent); if (null == talentCfg) { continue; } if (talentCfg.DriveType == 0 || len >= 2) { skills.Add(talent); } else { subSkills[len++] = talent; } } } } //意志 组合 if (localManager.WillId > 0) { var localWill = LocalHelper.WillList.Wills.Find(d => d.Id == localManager.WillId); if (localWill != null) { foreach (var willdata in localWill.Willdatas) { skills.Add(willdata.Id); } } } //套装效果 if (localManager.SuitId > 0) { var locaSuit = LocalHelper.SuitList.Suits.Find(d => d.Id == localManager.SuitId); if (locaSuit != null) { foreach (var suitdata in locaSuit.Suitdatas) { skills.Add(suitdata.Id.ToString()); } } } var rankSkills = BuffCache.Instance().GetRankedSkillList(skills); foreach (var item in skills) { if (item.Substring(0, 1).ToUpper() == "H") { rankSkills[1].Add(item); } } var buffPack = new DTOBuffPack(); const bool homeFlag = true; buffPack.SetBuffPlayers(homeFlag, buffPlayers); buffPack.SetOnBuffPlayers(homeFlag, buffPlayers.Values.ToList()); BuffFlowFacade.ProcManagerBuff(buffPack, homeFlag, rankSkills[2], false); data.ReadySkillList = rankSkills[0]; data.LiveSkillList = rankSkills[1]; data.SubSkills = subSkills; BuffDataCore.Instance().FillBuffView(data, buffPlayers, true, 1); //TODO:球员组合 //DTOBuffPlayer player = null; //foreach (var member in data.BuffMembers.Values) //{ // if (!buffPlayers.TryGetValue(member.Tid, out player)) // continue; // if (string.IsNullOrEmpty(player.StarSkill)) // continue; // if (null == member.LiveSkillList) // member.LiveSkillList = new List<string>(); // member.LiveSkillList.Add(player.StarSkill); //} return(data); }