コード例 #1
0
ファイル: BuffFlowImpl.cs プロジェクト: cool8868/H5Nball
        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();
        }
コード例 #2
0
ファイル: BuffPoolCore.cs プロジェクト: cool8868/H5Nball
        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);
        }
コード例 #3
0
        public static int[] GetFormPids(NbSolutionEntity form)
        {
            string onStr = null == form ? string.Empty : form.PlayerString;

            return(FrameUtil.CastIntArray(onStr, ','));
        }