private bool DoOnlienResetCup() { DateTime newDateTime; if (CheckInputTime(out newDateTime) == false) { return(false); } cmd_legendcup_recv_cuplist_node cupBaseData = LogicDataCenter.legendCupDataManager.GetSingleLegendCupNode(m_dataInfo.nLegendCupID); if (cupBaseData.nLegendCupID == 0) { return(false); } cmd_legendcup_judge_competition_node judgedInfo = new cmd_legendcup_judge_competition_node(); judgedInfo.nLegendCupID = m_dataInfo.nLegendCupID; // 杯赛ID judgedInfo.nRoundID = m_dataInfo.nRoundID; // 轮次ID judgedInfo.nSearchID = m_dataInfo.nSearchID; // 节点ID judgedInfo.byJudgeFlag = (byte)EJudgeNodeWar.JUDGE_Reset; // EJudgeNodeWar // 获取重置比赛的时间 System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); judgedInfo.lResetNewTime = (long)(newDateTime - startTime).TotalSeconds; judgedInfo.nKin1 = m_dataInfo.nKin1ID; // 队伍1 judgedInfo.nKin1Score = Convert.ToInt32(Kin1ScoreInputField.text == string.Empty ? Kin1ScoreInputField.placeholder.GetComponent <Text>().text : Kin1ScoreInputField.text); judgedInfo.nKin2 = m_dataInfo.nKin2ID; // 队伍2 judgedInfo.nKin2Score = Convert.ToInt32(Kin2ScoreInputField.text == string.Empty ? Kin2ScoreInputField.placeholder.GetComponent <Text>().text : Kin2ScoreInputField.text); // 队伍2得分 ViewEventHelper.Instance.SendCommand <cmd_legendcup_judge_competition_node>(GameLogicDef.GVIEWCMD_LEGENDCUP_JUDGE_COMPETITION_NODE, ref judgedInfo); return(true); }
private bool DoJudgeCup(EJudgeNodeWar judgeResult, int nWinID) { cmd_legendcup_judge_competition_node node = new cmd_legendcup_judge_competition_node(); node.nLegendCupID = m_judegeData.nLegendCupID; // 杯赛ID node.nRoundID = m_judegeData.nRoundID; // 轮次ID node.nSearchID = m_judegeData.nSearchID; // 节点ID node.nBoCount = m_judegeData.nBoCount; // 第几场 node.llWarID = m_judegeData.nWarID; // 比赛ID node.byJudgeFlag = (byte)judgeResult; // EJudgeNodeWar node.dwWinnerKinID = nWinID; ViewEventHelper.Instance.SendCommand <cmd_legendcup_judge_competition_node>(GameLogicDef.GVIEWCMD_LEGENDCUP_JUDGE_COMPETITION_NODE, ref node); m_wnd.UnloadView(); return(true); }