Пример #1
0
        /// <summary>
        /// 战斗校验
        /// </summary>
        /// <param name="cr"></param>
        /// <returns></returns>
        protected TeamCalcResponse TeamVerifyFight(TeamCalcRequest cr, String tag)
        {
            var verifyResult = new TeamCalcResponse();

            try
            {
                var heards = new Dictionary <String, String>
                {
                    { "Tag", tag }
                };

                verifyResult = Verify <TeamCalcResponse>(cr, heards);
                if (verifyResult.ErrorCode != ErrorCode.Success)// todo 要善于记录日志,方便查看报错来源
                {
                    LogUtil.Write($"FightBase.TeamVerifyFight:调用战斗服务器报错ErrorCode={verifyResult.ErrorCode},ErrorMsg={verifyResult.ErrorMsg},{Environment.NewLine},ReqStr={JsonUtil.Serialize(cr)}", LogType.Error);
                }
            }
            catch (Exception ex)
            {
                LogUtil.Write($"FightBase.TeamVerifyFight:调用战斗服务器报错ErrorMsg={ex.Message + Environment.NewLine + ex.StackTrace}", LogType.Error);
            }

            return(verifyResult);
        }
Пример #2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="nodeID">节点ID</param>
 /// <param name="teamCalcResponse">战报集合</param>
 public CopyFightReportImpl(Int32 nodeID, TeamCalcResponse teamCalcResponse)
     : base(teamCalcResponse)
 {
     NodeID = nodeID;
 }
Пример #3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="fightImpl">战斗对象</param>
 protected FightReportBase(TeamCalcResponse fightImpl)
 {
     FightResponseInfo = fightImpl;
 }