public override void OnSuccess(WWWResult www) { if (Network.IsError) { switch (Network.ErrCode) { case Network.EErrCode.NoGacha: this.OnFailed(); break; case Network.EErrCode.GachaCostShort: this.OnBack(); break; case Network.EErrCode.GachaItemMax: this.OnBack(); break; default: this.OnRetry(); break; } } else { WebAPI.JSON_BodyResponse <Json_GachaResult> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_GachaResult> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); Network.RemoveAPI(); try { MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body); } catch (Exception ex) { DebugUtility.LogException(ex); this.Failure(); return; } string[] items = new string[jsonObject.body.add.Length]; for (int index = 0; index < jsonObject.body.add.Length; ++index) { items[index] = jsonObject.body.add[index].iname; } this.SetGachaResult(items); this.Success(); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { switch (Network.ErrCode) { case Network.EErrCode.TrophyRewarded: case Network.EErrCode.TrophyOutOfDate: case Network.EErrCode.TrophyRollBack: this.OnBack(); break; case Network.EErrCode.BingoOutofDateReceive: UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.CHALLENGEMISSION_ERROR_OUT_OF_DATE_RECEIVE"), new UIUtility.DialogResultEvent(this.OnErrorDialogClosed), (GameObject)null, false, -1); Network.RemoveAPI(); Network.ResetError(); break; default: this.OnRetry(); break; } } else { WebAPI.JSON_BodyResponse <Json_PlayerDataAll> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_PlayerDataAll> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body == null) { this.OnRetry(); } else { try { MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.player); } catch (Exception ex) { this.OnRetry(ex); return; } Network.RemoveAPI(); this.Success(); } } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { switch (Network.ErrCode) { case Network.EErrCode.NoAbilitySetAbility: case Network.EErrCode.NoJobSetAbility: case Network.EErrCode.UnsetAbility: this.OnFailed(); break; default: this.OnRetry(); break; } } else { WebAPI.JSON_BodyResponse <Json_PlayerDataAll> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_PlayerDataAll> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); try { if (jsonObject.body == null) { throw new InvalidJSONException(); } MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.player); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.units); } catch (Exception ex) { this.OnRetry(ex); return; } Network.RemoveAPI(); if (this.mJobs.Count < 1) { this.Success(); } else { this.UpdateAbilities(); } } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { switch (Network.ErrCode) { case Network.EErrCode.NoJobSetEquip: this.OnFailed(); break; case Network.EErrCode.NoEquipItem: case Network.EErrCode.Equipped: this.OnBack(); break; default: this.OnRetry(); break; } } else { WebAPI.JSON_BodyResponse <Json_PlayerDataAll> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_PlayerDataAll> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); try { if (jsonObject.body == null) { throw new InvalidJSONException(); } MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.player); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.units); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.items); } catch (Exception ex) { this.OnRetry(ex); return; } Network.RemoveAPI(); MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.SelectedUnitUniqueID).SetJobIndex((int)GlobalVars.SelectedUnitJobIndex); this.Success(); } }
public void CheckVersionResponseCallback(WWWResult www) { if (Network.IsNoVersion) { Network.RemoveAPI(); Network.ResetError(); this.ActivateOutputLinks(1000); } else { if (FlowNode_Network.HasCommonError(www)) { return; } this.OnSuccess(www); } }
public override void OnSuccess(WWWResult www) { WebAPI.JSON_BodyResponse <FlowNode_CheckVersion.Json_VersionInfo> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <FlowNode_CheckVersion.Json_VersionInfo> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (Network.IsError) { if (Network.ErrCode == Network.EErrCode.NoVersion) { this.ActivateOutputLinks(13); Network.RemoveAPI(); ((Behaviour)this).set_enabled(false); } else { this.OnRetry(); } } else if (jsonObject.body == null || jsonObject.body.host_ap == null) { this.OnRetry(); } else { Network.SetHost(jsonObject.body.host_ap); Network.SetDLHost(jsonObject.body.host_dl); Network.SetSiteHost(jsonObject.body.host_site); Network.SetNewsHost(jsonObject.body.host_news); Network.RemoveAPI(); if (jsonObject.body.tz != int.MaxValue) { TimeManager.UTC2LOCAL = (long)jsonObject.body.tz; } if (!string.IsNullOrEmpty(jsonObject.body.assets)) { string assets = jsonObject.body.assets; Network.AssetVersion = assets; AssetDownloader.DownloadURL = jsonObject.body.host_dl + "/assets/" + assets + "/"; AssetDownloader.StreamingURL = jsonObject.body.host_dl + "/"; } this.checkNewsDisplay(jsonObject); MonoSingleton <GameManager> .Instance.InitAlterHash(jsonObject.body.digest); this.ActivateOutputLinks(10); ((Behaviour)this).set_enabled(false); } }
private void ResponseCallback(WWWResult www) { this.self.mSyncTrophyInterval = 5f; if (!Network.IsError) { for (int index = 0; index < this.mDirtyList.Count; ++index) { this.mDirtyList[index].IsDirty = false; } Network.RemoveAPI(); this.self.mStateMachine.GotoState <HomeWindow.State_Default>(); } else { FlowNode_Network.Retry(); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { Network.EErrCode errCode = Network.ErrCode; } else { WebAPI.JSON_BodyResponse <JSON_ChatChannelAutoAssign> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <JSON_ChatChannelAutoAssign> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); Network.RemoveAPI(); GlobalVars.CurrentChatChannel.Set(jsonObject.body.channel); GlobalVars.ChatChannelViewNum = jsonObject.body.channel_one_page_num; GlobalVars.ChatChannelMax = jsonObject.body.max_channel_size; this.Success(); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { switch (Network.ErrCode) { case Network.EErrCode.ApprRequestMax: case Network.EErrCode.ApprFriendIsFull: this.OnBack(); break; default: this.OnRetry(); break; } } else { WebAPI.JSON_BodyResponse <Json_ApproveFriend> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_ApproveFriend> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body == null) { this.OnRetry(); } else { try { MonoSingleton <GameManager> .Instance.Player.RemoveFriendFollower(this.req_fuid); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.player); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.friends, FriendStates.Friend); MonoSingleton <GameManager> .Instance.Player.FirstFriendCount = jsonObject.body.first_count; } catch (Exception ex) { this.OnRetry(ex); return; } Network.RemoveAPI(); this.Success(); } } }
private void ChatMaintenance() { if (Object.op_Equality((Object)this, (Object)null)) { return; } ((Behaviour)this).set_enabled(false); BlackList component = (BlackList)((Component)this).get_gameObject().GetComponent <BlackList>(); if (Object.op_Inequality((Object)component, (Object)null)) { component.RefreshMaintenanceMessage(Network.ErrMsg); } Network.RemoveAPI(); Network.ResetError(); this.ActivateOutputLinks(2); }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { Network.EErrCode errCode = Network.ErrCode; this.OnRetry(); } else { WebAPI.JSON_BodyResponse <Json_GachaList> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_GachaList> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); Network.RemoveAPI(); if (jsonObject.body == null) { this.Failure(); } else { GameManager instance = MonoSingleton <GameManager> .Instance; try { if (!instance.Deserialize(jsonObject.body)) { this.Failure(); return; } } catch (Exception ex) { DebugUtility.LogException(ex); this.Failure(); return; } GachaResultData.Reset(); if (FlowNode_Variable.Get("REDRAW_GACHA_PENDING") == "1") { this.ToCheckPending(); } else { this.Success(); } } } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { if (Network.ErrCode == Network.EErrCode.IllegalName) { this.OnBack(); } else { this.OnRetry(); } } else { WebAPI.JSON_BodyResponse <Json_PlayerDataAll> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_PlayerDataAll> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body == null) { this.OnRetry(); } else { try { MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.player); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.units); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.items); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.mails); } catch (Exception ex) { Debug.LogException(ex); this.Failure(); return; } GameParameter.UpdateValuesOfType(GameParameter.ParameterTypes.GLOBAL_PLAYER_NAME); Network.RemoveAPI(); this.Success(); } } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { switch (Network.ErrCode) { case Network.EErrCode.TrophyRewarded: case Network.EErrCode.TrophyOutOfDate: case Network.EErrCode.TrophyRollBack: this.OnBack(); break; default: this.OnRetry(); break; } } else { WebAPI.JSON_BodyResponse <Json_PlayerDataAll> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_PlayerDataAll> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body == null) { this.OnRetry(); } else { try { MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.player); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.items); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.units); } catch (Exception ex) { this.OnRetry(ex); return; } Network.RemoveAPI(); this.Success(); } } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { switch (Network.ErrCode) { case Network.EErrCode.NoDevice: case Network.EErrCode.Authorize: this.OnFailed(); return; } } WebAPI.JSON_BodyResponse <FlowNode_PlayerCheck.JSON_PlayerCheck> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <FlowNode_PlayerCheck.JSON_PlayerCheck> >(www.text); if (jsonObject.body == null) { this.OnFailed(); } else { if (jsonObject.body.result != 1 && jsonObject.body.status != null) { GlobalVars.BanStatus = int.Parse(jsonObject.body.status); GlobalVars.CustomerID = jsonObject.body.cuid; Network.RemoveAPI(); this.ActivateOutputLinks(13); } else { Network.RemoveAPI(); if (jsonObject.body.old_device_id != null) { MonoSingleton <GameManager> .Instance.SaveAuth(jsonObject.body.old_device_id, jsonObject.body.secret_key); MonoSingleton <GameManager> .Instance.InitAuth(); this.ActivateOutputLinks(12); } else { this.ActivateOutputLinks(11); } } ((Behaviour)this).set_enabled(false); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { Network.EErrCode errCode = Network.ErrCode; Network.RemoveAPI(); this.Failure(); } else { WebAPI.JSON_BodyResponse <ReqMultiRank.Json_MultiRank> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <ReqMultiRank.Json_MultiRank> >(www.text); DebugUtility.Assert(jsonObject != null, "res is null"); Network.RemoveAPI(); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body); this.Success(); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { Network.EErrCode errCode = Network.ErrCode; } WebAPI.JSON_BodyResponse <JSON_ChatChannelMaster> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <JSON_ChatChannelMaster> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); Network.RemoveAPI(); if (!MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body)) { this.Failure(); } else { this.Success(); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { Network.EErrCode errCode = Network.ErrCode; this.OnFailed(); } else { WebAPI.JSON_BodyResponse <Json_SupportSet> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_SupportSet> >(www.text); UnitData unitData = new UnitData(); unitData.Deserialize(jsonObject.body.unit); GlobalVars.SelectedSupportUnitUniqueID.Set(unitData.UniqueID); GameParameter.UpdateAll(((Component)this).get_gameObject()); Network.RemoveAPI(); this.ActivateOutputLinks(1); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { Network.EErrCode errCode = Network.ErrCode; } else { WebAPI.JSON_BodyResponse <JSON_ChatBlackListRes> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <JSON_ChatBlackListRes> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); Network.RemoveAPI(); if ((int)jsonObject.body.is_success != 1) { return; } this.Success(); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { if (Network.ErrCode == Network.EErrCode.RmNoFriend) { this.OnBack(); } else { this.OnRetry(); } } else { WebAPI.JSON_BodyResponse <Json_PlayerDataAll> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_PlayerDataAll> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body == null) { this.OnRetry(); } else { try { MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.player); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.friends, FriendStates.Friend); } catch (Exception ex) { DebugUtility.LogException(ex); this.OnRetry(); return; } MonoSingleton <GameManager> .GetInstanceDirect().RequestUpdateBadges(GameManager.BadgeTypes.DailyMission); Network.RemoveAPI(); this.ActivateOutputLinks(20); GameParameter.UpdateValuesOfType(GameParameter.ParameterTypes.PLAYER_FRIENDNUM); ((Behaviour)this).set_enabled(false); } } }
private void ResponseCallback_RequestRankingTopOwn(WWWResult www) { if (FlowNode_Network.HasCommonError(www)) { return; } if (Network.IsError) { switch (Network.ErrCode) { case Network.EErrCode.RankingQuestMaintenance: break; case Network.EErrCode.RankingQuest_NotNewScore: case Network.EErrCode.RankingQuest_AlreadyEntry: this.OnFailed(); return; case Network.EErrCode.RankingQuest_OutOfPeriod: Network.RemoveAPI(); ((Behaviour)this).set_enabled(false); this.ActivateOutputLinks(301); return; default: this.OnRetry(); return; } } DebugUtility.Log(www.text); WebAPI.JSON_BodyResponse <FlowNode_ReqQuestRanking.Json> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <FlowNode_ReqQuestRanking.Json> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body == null) { this.OnRetry(); } else { Network.RemoveAPI(); this.m_TargetWindow.SetData(RankingQuestUserData.CreateRankingUserDataFromJson(jsonObject.body.ranking, GlobalVars.SelectedRankingQuestParam.type), RankingQuestUserData.CreateRankingUserDataFromJson(jsonObject.body.my_info, GlobalVars.SelectedRankingQuestParam.type)); this.Success(); } }
public override void Complete(WWWResult www) { if (Network.IsError) { this.m_Node.OnFailed(); } else { DebugMenu.Log("API", this.url + ":" + www.text); WebAPI.JSON_BodyResponse <FlowNode_ReqWishList.Api_WishListSet.Json> jsonBodyResponse = (WebAPI.JSON_BodyResponse <FlowNode_ReqWishList.Api_WishListSet.Json>)JsonUtility.FromJson <WebAPI.JSON_BodyResponse <FlowNode_ReqWishList.Api_WishListSet.Json> >(www.text); DebugUtility.Assert(jsonBodyResponse != null, "res == null"); if (jsonBodyResponse.body != null && jsonBodyResponse.body.result) { MonoSingleton <GameManager> .Instance.Player.SetWishList(this.m_Id, this.m_Priority); } Network.RemoveAPI(); this.Success(); } }
public override void Complete(WWWResult www) { if (Network.IsError) { this.m_Node.OnFailed(); } else { DebugMenu.Log("API", this.url + ":" + www.text); WebAPI.JSON_BodyResponse <FriendPresentWishList.Json[]> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <FriendPresentWishList.Json[]> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body != null) { MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body); } Network.RemoveAPI(); this.Success(); } }
public override void Complete(WWWResult www) { if (Network.IsError) { this.m_Node.OnBack(); } else { DebugMenu.Log("API", this.url + ":" + www.text); WebAPI.JSON_BodyResponse <FlowNode_ReqFriendSupport.Api_FriendSupport.Json> jsonBodyResponse = (WebAPI.JSON_BodyResponse <FlowNode_ReqFriendSupport.Api_FriendSupport.Json>)JsonUtility.FromJson <WebAPI.JSON_BodyResponse <FlowNode_ReqFriendSupport.Api_FriendSupport.Json> >(www.text); DebugUtility.Assert(jsonBodyResponse != null, "res == null"); if (jsonBodyResponse.body != null && jsonBodyResponse.body.unit != null) { UnitData[] unitDataArray = new UnitData[Enum.GetValues(typeof(EElement)).Length]; if (jsonBodyResponse.body.units != null) { for (int index = 0; index < jsonBodyResponse.body.units.Length; ++index) { Json_Unit unit = jsonBodyResponse.body.units[index]; int elem = unit.elem; if (elem >= unitDataArray.Length || elem < 0) { DebugUtility.LogError(string.Format("不正なインデックスが属性値として指定されています。 elem = {0}", (object)elem)); } else { unitDataArray[elem] = new UnitData(); unitDataArray[elem].Deserialize(unit); } } } if (jsonBodyResponse.body.unit != null) { UnitData unitData = new UnitData(); unitData.Deserialize(jsonBodyResponse.body.unit); unitDataArray[0] = unitData; } this.m_ValueList.SetObject("data_units", (object)unitDataArray); } Network.RemoveAPI(); this.Success(); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { Network.EErrCode errCode = Network.ErrCode; } WebAPI.JSON_BodyResponse <Json_ResSelectAward> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_ResSelectAward> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); Network.RemoveAPI(); if (jsonObject == null) { this.Failure(); } else { MonoSingleton <GameManager> .Instance.Player.SelectedAward = jsonObject.body.selected_award; this.Success(); } }
public override void Complete(WWWResult www) { if (Network.IsError) { this.Failed(); } else { DebugMenu.Log("API", this.url + ":" + www.text); WebAPI.JSON_BodyResponse <FlowNode_ReqOption.Api_OptionSet.Json> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <FlowNode_ReqOption.Api_OptionSet.Json> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body != null) { MonoSingleton <GameManager> .Instance.Player.Deserialize(jsonObject.body.player); } Network.RemoveAPI(); this.Success(); } }
private void ResponseCallback(WWWResult www) { this.self.mSyncTrophyInterval = 5f; if (!Network.IsError) { for (int index = 0; index < this.mDirtyList.Count; ++index) { this.mDirtyList[index].IsDirty = false; } MonoSingleton <GameManager> .Instance.RequestUpdateBadges(GameManager.BadgeTypes.DailyMission); Network.RemoveAPI(); this.self.mStateMachine.GotoState <HomeWindow.State_UpdateChallengeMission>(); } else { FlowNode_Network.Retry(); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { Network.EErrCode errCode = Network.ErrCode; } else { WebAPI.JSON_BodyResponse <Json_GachaHistory> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_GachaHistory> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); Network.RemoveAPI(); GachaHistoryWindow component = (GachaHistoryWindow)((Component)this).GetComponent <GachaHistoryWindow>(); if (Object.op_Inequality((Object)component, (Object)null)) { component.SetGachaHistoryData(jsonObject.body.log); } this.Success(); } }
public override void Complete(WWWResult www) { if (Network.IsError) { this.m_Node.OnFailed(); } else { DebugMenu.Log("API", this.url + ":" + www.text); WebAPI.JSON_BodyResponse <FlowNode_ReqPresentList.Api_PresentListSend.Json> jsonBodyResponse = (WebAPI.JSON_BodyResponse <FlowNode_ReqPresentList.Api_PresentListSend.Json>)JsonUtility.FromJson <WebAPI.JSON_BodyResponse <FlowNode_ReqPresentList.Api_PresentListSend.Json> >(www.text); DebugUtility.Assert(jsonBodyResponse != null, "res == null"); if (jsonBodyResponse.body != null && jsonBodyResponse.body.result && FriendPresentRootWindow.instance != null) { FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.SENDING); } Network.RemoveAPI(); this.Success(); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { if (Network.ErrCode == Network.EErrCode.QuestEnd) { this.OnFailed(); } else { this.OnRetry(); } } else { WebAPI.JSON_BodyResponse <Json_PlayerDataAll> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_PlayerDataAll> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body == null) { this.OnRetry(); } else { try { MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.player); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.units); MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.items); } catch (Exception ex) { DebugUtility.LogException(ex); this.OnRetry(); return; } Network.RemoveAPI(); this.mOnSuccessDelegate(); } } }
public override void Complete(WWWResult www) { if (Network.IsError) { this.m_Node.OnFailed(); } else { DebugMenu.Log("API", this.url + ":" + www.text); WebAPI.JSON_BodyResponse <FlowNode_ReqPresentStatus.Api_PresentListStatus.Json> jsonBodyResponse = (WebAPI.JSON_BodyResponse <FlowNode_ReqPresentStatus.Api_PresentListStatus.Json>)JsonUtility.FromJson <WebAPI.JSON_BodyResponse <FlowNode_ReqPresentStatus.Api_PresentListStatus.Json> >(www.text); DebugUtility.Assert(jsonBodyResponse != null, "res == null"); if (jsonBodyResponse.body != null) { if (string.IsNullOrEmpty(jsonBodyResponse.body.result)) { FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.UNSENT); } else if (jsonBodyResponse.body.result == "0") { FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.SENDING); } else if (jsonBodyResponse.body.result == "1") { FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.SENDED); } else if (jsonBodyResponse.body.result == "9") { FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.SENTFAILED); } else { FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.NONE); } } else { FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.NONE); } Network.RemoveAPI(); this.Success(); } }