public DTOBuffMemberView RebuildMembers(Guid managerId, ArenaTeammemberFrame arenaFrame) { const bool homeFlag = true; var buffPack = new DTOBuffPack(); var use = ManagerUtil.GetSkillUseWrap(managerId); var poolView = BuffPoolCore.Instance().GetRawPools(managerId, "", true); FillBuffPack(buffPack, homeFlag, managerId, arenaFrame); TeammemberDataHelper.FillTeammemberData(buffPack, homeFlag); use.OnPids = buffPack.GetOnPids(homeFlag).Keys.ToArray(); BuffUtil.GetManagerSkillList(managerId, use); BuffCache.Instance().FillRankedSkillList(buffPack.GetSBM(homeFlag), use.ManagerSkills); BuffUtil.FillLiveSkillList(use, poolView.LiveSkills); var data = CreateBuffView(managerId, use, buffPack.GetRawMembers(homeFlag)); data.PoolSyncTime = poolView.SyncTime; data.PoolSyncVersion = poolView.SyncVersion; FillBuffView(data, buffPack, homeFlag, false, 0); BuffFlowFacade.ProcManagerBuff(buffPack, homeFlag, data.FirmSkillList, false); BuffFlowFacade.ProcPlayerBuff(buffPack, homeFlag, data.BuffMembers.Values, false); BuffFlowFacade.ProcManagerBuff(buffPack, homeFlag, poolView); FillBuffView(data, buffPack, homeFlag, true, 1); data.TalentType = BuffUtil.GetTalentType(managerId); NbManagerextraMgr.UpdateKpi(managerId, data.Kpi); data.SyncIdleFlag = false; s_memBuffMember.Set(arenaFrame.ArenaType.ToString() + managerId.ToString(), data); return(data); }
internal DTOBuffPoolView ReqRawPools(Guid managerId, string siteId = "", bool syncFlag = true) { int managerHash = ShareUtil.GetTableMod(managerId); byte[] verDb = null; var data = CreateBuffView(); var pools = NbManagerbuffpoolMgr.GetByMid(managerId, managerHash, siteId); var teamPools = CheckTeamBuffPools(managerId, siteId); if (null != teamPools) { pools.AddRange(teamPools); } NbManagerbuffpoolMgr.GetVersionByMid(managerId, managerHash, ref verDb, null, siteId); ulong verNo = 0; if (null != verDb) { verNo = BitConverter.ToUInt64(verDb, 0); } DateTime dtNow = DateTime.Now; DateTime dtSync = DATEInfi; List <string> liveSkills = null; foreach (var item in pools) { if (dtNow < item.ExpiryTime && item.ExpiryTime < dtSync) { dtSync = item.ExpiryTime; } if (item.LiveFlag != 2) { continue; } if (null == liveSkills) { liveSkills = new List <string>(); } liveSkills.Add(BuffCache.Instance().CastSkillKey(item.SkillCode, item.SkillLevel)); } data.BuffPools = pools; data.LiveSkills = liveSkills; data.SyncTime = dtSync; data.SyncVersion = verNo; if (syncFlag) { s_memBuffPool.Set(managerId.ToString(), data); } return(data); }