static void ProcBuffPool(DTOBuffPack buffPack, bool homeFlag, Guid memberId, List <NbManagerbuffpoolEntity> buffPools) { if (null == buffPack || null == buffPools || buffPools.Count == 0) { return; } var proc = CreateBuffPoolProc(); if (null == proc) { return; } char split = BuffCache.SPLITValues; List <DTOBuffPlayer> buffDest = null; var dicDest = new Dictionary <string, List <DTOBuffPlayer> >(); foreach (var pool in buffPools) { buffDest = GetBuffDest(dicDest, buffPack, homeFlag, memberId, pool.DstMode, pool.DstDir, pool.DstKey); if (null == buffDest || buffDest.Count == 0) { continue; } proc.ProcBuffPool(buffDest, pool.SkillCode, FrameUtil.CastIntArray(pool.BuffMap, split), (double)pool.BuffVal, (double)pool.BuffPer); } dicDest.Clear(); }
public List <NbManagerbuffpoolEntity> CheckTeamBuffPools(Guid mid, string siteId = "") { var form = MemcachedFactory.SolutionClient.Get <NbSolutionEntity>(mid); if (null == form) { form = NbSolutionMgr.GetById(mid, siteId); } if (null == form) { return(null); } var pids = FrameUtil.CastIntList(form.PlayerString, ','); string club = string.Empty; string nation = string.Empty; DicPlayerEntity cfg = null; foreach (int pid in pids) { cfg = PlayersdicCache.Instance.GetPlayer(pid); if (null == cfg) { continue; } if (club == string.Empty) { club = cfg.Club; } if (nation == string.Empty) { nation = cfg.Nationality; } if (null != club && cfg.Club != club) { club = null; } if (null != nation && cfg.Nationality != nation) { nation = null; } } if (null != club || null != nation) { return(BuffCache.Instance().GenManagerPoolList(SKILLTeamBuff)); } return(null); }
public static int[] GetFormPids(NbSolutionEntity form) { string onStr = null == form ? string.Empty : form.PlayerString; return(FrameUtil.CastIntArray(onStr, ',')); }