private void SendResultMsg(ChallengeInfo info, UserInfo user) { if (user == null) { return; } JsonMessageWithGuid retMsg = new JsonMessageWithGuid(ArkCrossEngine.JsonMessageID.ArenaChallengeResult); retMsg.m_Guid = user.Guid; ArkCrossEngineMessage.Msg_LC_ArenaChallengeResult protoData = new ArkCrossEngineMessage.Msg_LC_ArenaChallengeResult(); protoData.m_ChallengeInfo = ArenaUtil.CreateChallengeInfoData(info); retMsg.m_ProtoData = protoData; JsonMessageDispatcher.SendDcoreMessage(user.NodeName, retMsg); }
internal void HandleArenaQueryHistory(ulong guid, int handle) { LogSys.Log(LOG_TYPE.DEBUG, "--handle arena query history!"); JsonMessageWithGuid resultMsg = new JsonMessageWithGuid(JsonMessageID.ArenaQueryHistoryResult); resultMsg.m_Guid = guid; ArkCrossEngineMessage.Msg_LC_ArenaQueryHistoryResult protoData = new ArkCrossEngineMessage.Msg_LC_ArenaQueryHistoryResult(); UserInfo user = LobbyServer.Instance.DataProcessScheduler.GetUserInfo(guid); List<ChallengeInfo> history = m_ArenaSystem.QueryHistory(guid); if (history != null) { foreach (ChallengeInfo info in history) { ArkCrossEngineMessage.ChallengeInfoData info_data = ArenaUtil.CreateChallengeInfoData(info); protoData.ChallengeHistory.Add(info_data); } } resultMsg.m_ProtoData = protoData; JsonMessageDispatcher.SendDcoreMessage(handle, resultMsg); LogSys.Log(LOG_TYPE.DEBUG, "--send arena query history result!"); }