Exemplo n.º 1
0
 public bool Decerialize(int _page, FlowNode_ReqMultiInvitationHistory.Api_MultiInvitationHistory.Json json)
 {
     if (json == null || json.list == null)
     {
         return(false);
     }
     this.page  = _page;
     this.rooms = new MultiInvitationReceiveWindow.LogData.RoomData[json.list.Length];
     for (int index = 0; index < json.list.Length; ++index)
     {
         MultiInvitationReceiveWindow.LogData.RoomData roomData = new MultiInvitationReceiveWindow.LogData.RoomData();
         roomData.id        = json.list[index].id;
         roomData.roomid    = json.list[index].roomid;
         roomData.multiType = !(json.list[index].btype == "multi") ? MultiInvitationReceiveWindow.MultiType.TOWER : MultiInvitationReceiveWindow.MultiType.NORMAL;
         roomData.owner     = new MultiInvitationReceiveWindow.LogData.OwnerData(json.list[index].player);
         roomData.quest     = new MultiInvitationReceiveWindow.LogData.QuestData(json.list[index].iname);
         if (!string.IsNullOrEmpty(json.list[index].created_at))
         {
             DateTime targetTime = DateTime.Parse(json.list[index].created_at);
             roomData.created_at = TimeManager.GetUnixSec(targetTime);
         }
         this.rooms[index] = roomData;
     }
     return(true);
 }
Exemplo n.º 2
0
 public bool DeserializeLogList(int page, FlowNode_ReqMultiInvitationHistory.Api_MultiInvitationHistory.Json json)
 {
     this.m_LogData = new MultiInvitationReceiveWindow.LogData();
     this.m_LogData.Decerialize(page, json);
     return(true);
 }