Пример #1
0
 internal static ArkCrossEngineMessage.ChallengeInfoData CreateChallengeInfoData(ChallengeInfo info)
 {
     ArkCrossEngineMessage.ChallengeInfoData msg = new ArkCrossEngineMessage.ChallengeInfoData();
     msg.Challenger         = CreateChallengeEntityData(info.Challenger);
     msg.Target             = CreateChallengeEntityData(info.Target);
     msg.IsChallengeSuccess = info.IsChallengerSuccess;
     msg.EndTime            = info.ChallengeEndTime.Ticks;
     return(msg);
 }
Пример #2
0
 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!");
 }