Ejemplo n.º 1
0
 public static void ErrorAppQuit()
 {
     Network.RequestResult = Network.RequestResults.InvalidSession;
     Network.RemoveAPI();
     Network.ResetError();
     GlobalEvent.Invoke(PredefinedGlobalEvents.ERROR_APP_QUIT.ToString(), (object)null);
 }
 public override void Failed()
 {
     this.m_Node.ActivateOutputLinks(120);
     Network.RemoveAPI();
     Network.ResetError();
     ((Behaviour)this.m_Node).set_enabled(false);
 }
Ejemplo n.º 3
0
 private void PaidGachaLimitOver()
 {
     ((Behaviour)this).set_enabled(false);
     Network.RemoveAPI();
     Network.ResetError();
     this.ActivateOutputLinks(9);
 }
Ejemplo n.º 4
0
        private void QuestBookmarkUpdateResponseCallback(WWWResult www)
        {
            if (FlowNode_Network.HasCommonError(www))
            {
                return;
            }
            if (Network.IsError)
            {
                switch (Network.ErrCode)
                {
                case Network.EErrCode.QuestBookmark_RequestMax:
                case Network.EErrCode.QuestBookmark_AlreadyLimited:
                    Network.RemoveAPI();
                    Network.ResetError();
                    UIUtility.SystemMessage((string)null, LocalizedText.Get("sys.TXT_QUESTBOOKMARK_BOOKMARK_NOT_FOUND"), (UIUtility.DialogResultEvent)null, (GameObject)null, true, -1);
                    break;

                default:
                    FlowNode_Network.Retry();
                    break;
                }
            }
            else
            {
                this.mBookmarkedPiecesOrigin = this.mBookmarkedPieces.ToList <QuestBookmarkWindow.ItemAndQuests>();
                if (this.mLastSectionName == this.BookmarkSectionName)
                {
                    this.RefreshSection(0);
                }
                this.EndBookmarkEditing();
                Network.RemoveAPI();
            }
        }
Ejemplo n.º 5
0
 private void _Failed()
 {
     Network.RemoveAPI();
     Network.ResetError();
     this.ActivateOutputLinks(20);
     ((Behaviour)this).set_enabled(false);
 }
        public override void OnSuccess(WWWResult www)
        {
            if (Network.IsError)
            {
                switch (Network.ErrCode)
                {
                case Network.EErrCode.QR_OutOfPeriod:
                case Network.EErrCode.QR_InvalidQRSerial:
                case Network.EErrCode.QR_CanNotReward:
                case Network.EErrCode.QR_LockSerialCampaign:
                case Network.EErrCode.QR_AlreadyRewardSkin:
                    Network.RemoveAPI();
                    Network.ResetError();
                    this.Finished(Network.ErrMsg);
                    break;

                default:
                    this.OnRetry();
                    break;
                }
            }
            else
            {
                WebAPI.JSON_BodyResponse <FlowNode_ReqQRCodeAccess.JSON_QRCodeAccess> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <FlowNode_ReqQRCodeAccess.JSON_QRCodeAccess> >(www.text);
                DebugUtility.Assert(jsonObject != null, "res == null");
                Network.RemoveAPI();
                if (jsonObject.body.items != null)
                {
                    MonoSingleton <GameManager> .Instance.Deserialize(jsonObject.body.items);
                }
                this.Finished(jsonObject.body.message);
            }
        }
Ejemplo n.º 7
0
        private void ResponseCallback(WWWResult www)
        {
            if (FlowNode_Network.HasCommonError(www))
            {
                return;
            }
            if (Network.IsError)
            {
                switch (Network.ErrCode)
                {
                case Network.EErrCode.BattleRecordMaintenance:
                case Network.EErrCode.RecordLimitUpload:
                    Network.RemoveAPI();
                    Network.ResetError();
                    this.EnableErrorText(LocalizedText.Get("sys.PARTYEDITOR_RECENT_CLEARED_PARTY_ERROR_UPLOAD_LIMIT_2"));
                    this.DisableUnnecessaryUIOnError();
                    break;

                default:
                    FlowNode_Network.Retry();
                    break;
                }
            }
            else
            {
                WebAPI.JSON_BodyResponse <RecentPartyList.JSON_Body> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <RecentPartyList.JSON_Body> >(www.text);
                this.mLastRecords = jsonObject.body.list;
                this.mMaxPage     = jsonObject.body.option.totalPage;
                Network.RemoveAPI();
                this.Refresh();
            }
        }
        public override void OnSuccess(WWWResult www)
        {
            if (Network.IsError)
            {
                switch (Network.ErrCode)
                {
                case Network.EErrCode.BattleRecordMaintenance:
                    Network.RemoveAPI();
                    Network.ResetError();
                    this.ActivateOutputLinks(102);
                    break;

                case Network.EErrCode.RecordLimitUpload:
                    Network.RemoveAPI();
                    Network.ResetError();
                    this.ActivateOutputLinks(103);
                    break;

                default:
                    this.OnRetry();
                    break;
                }
            }
            else
            {
                GlobalVars.PartyUploadFinished = true;
                Network.RemoveAPI();
                this.Success();
            }
        }
Ejemplo n.º 9
0
        private void QuestBookmarkResponseCallback(WWWResult www)
        {
            if (FlowNode_Network.HasCommonError(www))
            {
                return;
            }
            if (Network.IsError)
            {
                switch (Network.ErrCode)
                {
                case Network.EErrCode.QuestBookmark_RequestMax:
                case Network.EErrCode.QuestBookmark_AlreadyLimited:
                    Network.RemoveAPI();
                    Network.ResetError();
                    UIUtility.SystemMessage((string)null, LocalizedText.Get("sys.TXT_QUESTBOOKMARK_BOOKMARK_NOT_FOUND"), (UIUtility.DialogResultEvent)null, (GameObject)null, true, -1);
                    break;

                default:
                    FlowNode_Network.Retry();
                    break;
                }
            }
            else
            {
                this.Initialize(JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <QuestBookmarkWindow.JSON_Body> >(www.text).body.result);
                Network.RemoveAPI();
            }
        }
Ejemplo n.º 10
0
 public override void OnSuccess(WWWResult www)
 {
     if (Network.IsError)
     {
         if (Network.ErrCode == Network.EErrCode.CountLimitForPlayer)
         {
             Network.RemoveAPI();
             Network.ResetError();
             this.Success();
         }
         else
         {
             this.OnBack();
         }
     }
     else
     {
         WebAPI.JSON_BodyResponse <Json_GoogleReview> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_GoogleReview> >(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;
         }
         this.Success();
     }
 }
Ejemplo n.º 11
0
 public static void Relogin()
 {
     MonoSingleton <GameManager> .Instance.IsRelogin = true;
     Network.RequestResult = Network.RequestResults.InvalidSession;
     Network.RemoveAPI();
     Network.ResetError();
     GlobalEvent.Invoke(PredefinedGlobalEvents.ERROR_NETWORK.ToString(), (object)null);
 }
Ejemplo n.º 12
0
 private void OnPeriod()
 {
     this.Period();
     Network.RemoveAPI();
     Network.ResetError();
     ((Behaviour)this).set_enabled(false);
     this.ActivateOutputLinks(11);
 }
Ejemplo n.º 13
0
 public void OnMismatchVersion()
 {
     ((Behaviour)this).set_enabled(false);
     CriticalSection.Leave(CriticalSections.SceneChange);
     Network.RemoveAPI();
     Network.ResetError();
     this.ActivateOutputLinks(3);
 }
Ejemplo n.º 14
0
        public override void OnSuccess(WWWResult www)
        {
            if (Network.IsError)
            {
                switch (Network.ErrCode)
                {
                case Network.EErrCode.FindNoFriend:
                    Network.RemoveAPI();
                    Network.ResetError();
                    this.Failure();
                    break;

                case Network.EErrCode.FindIsMine:
                    ((Behaviour)this).set_enabled(false);
                    this.OnBack();
                    break;

                case Network.EErrCode.StringTooShort:
                    ((Behaviour)this).set_enabled(false);
                    this.OnBack();
                    break;

                default:
                    this.OnRetry();
                    break;
                }
            }
            else
            {
                DebugMenu.Log("API", "find/friend:" + www.text);
                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
                {
                    Network.RemoveAPI();
                    try
                    {
                        if (jsonObject.body.friends == null || jsonObject.body.friends.Length < 1)
                        {
                            throw new InvalidJSONException();
                        }
                        FriendData friendData = new FriendData();
                        friendData.Deserialize(jsonObject.body.friends[0]);
                        GlobalVars.FoundFriend = friendData;
                        this.Success();
                    }
                    catch (Exception ex)
                    {
                        DebugUtility.LogException(ex);
                        this.Failure();
                    }
                }
            }
        }
Ejemplo n.º 15
0
        public override void OnSuccess(WWWResult www)
        {
            if (Network.IsError)
            {
                switch (Network.ErrCode)
                {
                case Network.EErrCode.MultiMaintenance:
                case Network.EErrCode.VsMaintenance:
                case Network.EErrCode.MultiVersionMaintenance:
                case Network.EErrCode.MultiTowerMaintenance:
                    Network.RemoveAPI();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(1803);
                    return;

                case Network.EErrCode.NoUnitParty:
                    Network.RemoveAPI();
                    Network.ResetError();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(1800);
                    return;

                case Network.EErrCode.IllegalParty:
                    Network.RemoveAPI();
                    Network.ResetError();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(1801);
                    return;

                case Network.EErrCode.MultiVersionMismatch:
                    Network.RemoveAPI();
                    Network.ResetError();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(1802);
                    return;
                }
            }
            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.parties);
            }
            catch (Exception ex)
            {
                this.OnRetry(ex);
                return;
            }
            Network.RemoveAPI();
            this.Success();
        }
Ejemplo n.º 16
0
 public override void Failed()
 {
   Network.RemoveAPI();
   Network.ResetError();
   if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_Node, (UnityEngine.Object) null))
     return;
   this.m_Node.ActivateOutputLinks(120);
   ((Behaviour) this.m_Node).set_enabled(false);
 }
Ejemplo n.º 17
0
 public static void TimeOut()
 {
     Network.RequestResult = Network.RequestResults.Timeout;
     if (Network.IsImmediateMode)
     {
         return;
     }
     Network.RemoveAPI();
     Network.ResetError();
 }
        public override void OnSuccess(WWWResult www)
        {
            if (Network.IsError)
            {
                switch (Network.ErrCode)
                {
                case Network.EErrCode.ChargeAge000:
                    Network.RemoveAPI();
                    Network.ResetError();
                    this.NeedBirthday();
                    break;

                case Network.EErrCode.ChargeVipRemains:
                    Network.RemoveAPI();
                    Network.ResetError();
                    this.VipRemains();
                    break;

                default:
                    this.Failure();
                    break;
                }
            }
            else
            {
                WebAPI.JSON_BodyResponse <JSON_ChargeCheckResponse> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <JSON_ChargeCheckResponse> >(www.text);
                DebugUtility.Assert(jsonObject != null, "res == null");
                Network.RemoveAPI();
                ChargeCheckData chargeCheckData = new ChargeCheckData();
                if (!chargeCheckData.Deserialize(jsonObject.body))
                {
                    this.Failure();
                }
                else
                {
                    PaymentManager instance = MonoSingleton <PaymentManager> .Instance;
                    if (0 < chargeCheckData.RejectIds.Length)
                    {
                        this.LimitOver();
                    }
                    else if (20 > chargeCheckData.Age)
                    {
                        this.NonAge();
                    }
                    else if (!instance.IsAgree())
                    {
                        this.NeedCheck();
                    }
                    else
                    {
                        this.Success();
                    }
                }
            }
        }
Ejemplo n.º 19
0
        public bool Error()
        {
            if (!Network.IsError)
            {
                return(false);
            }
            if (Network.ErrCode == Network.EErrCode.NotExist_tower)
            {
                if (this.mResume)
                {
                    GlobalVars.BtlID.Set(this.btlID);
                    CriticalSection.Leave(CriticalSections.SceneChange);
                    Network.RequestResult = Network.RequestResults.Back;
                    if (Network.IsImmediateMode)
                    {
                        return(true);
                    }
                    Network.RemoveAPI();
                    Network.ResetError();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(7);
                    return(true);
                }
                this.OnFailed();
                return(true);
            }
            Network.EErrCode errCode = Network.ErrCode;
            switch (errCode)
            {
            case Network.EErrCode.UnSelectable:
                this.OnBack();
                return(true);

            case Network.EErrCode.OutOfDateQuest:
                this.OnBack();
                return(true);

            case Network.EErrCode.ChallengeLimit:
                this.OnBack();
                return(true);

            default:
                if (errCode != Network.EErrCode.QuestEnd)
                {
                    if (errCode != Network.EErrCode.NoBtlInfo)
                    {
                        return(TowerErrorHandle.Error((FlowNode_Network)this));
                    }
                    this.OnFailed();
                    return(true);
                }
                this.OnFailed();
                return(true);
            }
        }
Ejemplo n.º 20
0
 public static void Version()
 {
     Network.RequestResult = Network.RequestResults.VersionMismatch;
     if (Network.IsImmediateMode)
     {
         return;
     }
     Network.RemoveAPI();
     Network.ResetError();
     GlobalEvent.Invoke(PredefinedGlobalEvents.VERSION_MISMATCH_NETWORK.ToString(), (object)null);
 }
Ejemplo n.º 21
0
 public static void Maintenance()
 {
     Network.RequestResult = Network.RequestResults.Maintenance;
     if (Network.IsImmediateMode)
     {
         return;
     }
     Network.RemoveAPI();
     Network.ResetError();
     GlobalEvent.Invoke(PredefinedGlobalEvents.MAINTENANCE_NETWORK.ToString(), (object)null);
 }
Ejemplo n.º 22
0
 public static void Back()
 {
     Network.RequestResult = Network.RequestResults.Back;
     if (Network.IsImmediateMode)
     {
         return;
     }
     Network.RemoveAPI();
     GlobalEvent.Invoke(PredefinedGlobalEvents.BACK_NETWORK.ToString(), (object)null);
     Network.ResetError();
 }
        private void ChatMaintenance()
        {
            ((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);
        }
Ejemplo n.º 24
0
 private static void RetryEvent(bool retry)
 {
     if (retry)
     {
         Network.ResetError();
     }
     else
     {
         Network.RemoveAPI();
         Network.ResetError();
         FlowNode_LoadScene.LoadBootScene();
     }
 }
Ejemplo n.º 25
0
 private void OutofPeriod()
 {
     if (this.API == FlowNode_ExecGacha2.ExecType.DECISION)
     {
         this.OnFailed();
     }
     else
     {
         ((Behaviour)this).set_enabled(false);
         Network.RemoveAPI();
         Network.ResetError();
         this.ActivateOutputLinks(12);
     }
 }
 public override void OnSuccess(WWWResult www)
 {
     if (Network.IsError)
     {
         Network.RemoveAPI();
         Network.ResetError();
         ((Behaviour)this).set_enabled(false);
         this.ActivateOutputLinks(1000);
     }
     else
     {
         Network.RemoveAPI();
         this.Success();
     }
 }
Ejemplo n.º 27
0
        public void OnColoRankModify()
        {
            CriticalSection.Leave(CriticalSections.SceneChange);
            string errMsg = Network.ErrMsg;

            Network.RemoveAPI();
            Network.ResetError();
            SRPG_TouchInputModule.LockInput();
            UIUtility.SystemMessage((string)null, errMsg, (UIUtility.DialogResultEvent)(go =>
            {
                SRPG_TouchInputModule.UnlockInput(false);
                ((Behaviour)this).set_enabled(false);
                this.ActivateOutputLinks(6);
            }), (GameObject)null, true, -1);
        }
Ejemplo n.º 28
0
 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);
       }
 }
Ejemplo n.º 29
0
        private void _Failed()
        {
            switch (this.m_RecieveStatus)
            {
            case FlowNode_GpsGift.RecieveStatus.FAILED_RECEIVED:
                this.ActivateOutputLinks(21);
                break;

            case FlowNode_GpsGift.RecieveStatus.FAILED_NOTRECEIVE:
                this.ActivateOutputLinks(22);
                break;
            }
            Network.RemoveAPI();
            Network.ResetError();
            ((Behaviour)this).set_enabled(false);
        }
Ejemplo n.º 30
0
        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();
                }
            }
        }