コード例 #1
0
        public Match_FightinfoResponse GetFightInfoWithoutNpc(Guid managerId, Guid awayId, bool isHomeBot, bool isAwayBot, bool syncAwayFlag = false, string homeSiteId = "", string awaySiteId = "")
        {
            DTOBuffMemberView homeView, awayView;

            BuffDataCore.Instance().GetMembers(out homeView, out awayView,
                                               homeSiteId, managerId, false, awaySiteId, awayId, false, true, syncAwayFlag);
            Match_FightManagerinfo home = MatchDataHelper.GetFightinfo(managerId, isHomeBot, homeView, homeSiteId);
            Match_FightManagerinfo away = MatchDataHelper.GetFightinfo(awayId, isAwayBot, awayView, awaySiteId);

            if (home == null || away == null)
            {
                return(ResponseHelper.Create <Match_FightinfoResponse>(MessageCode.NbParameterError));
            }

            var response = ResponseHelper.CreateSuccess <Match_FightinfoResponse>();

            response.Data      = new Match_Fightinfo();
            response.Data.Home = home;
            response.Data.Away = away;
            return(response);
        }
コード例 #2
0
ファイル: MatchDataHelper.cs プロジェクト: cool8868/H5Nball
        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);
        }