Пример #1
0
        public override void OnSuccess(WWWResult www)
        {
            DebugUtility.Log(nameof(OnSuccess));
            if (Network.IsError)
            {
                switch (Network.ErrCode)
                {
                case Network.EErrCode.MultiMaintenance:
                case Network.EErrCode.VsMaintenance:
                    Network.RemoveAPI();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(6000);
                    break;

                case Network.EErrCode.MultiVersionMismatch:
                case Network.EErrCode.VS_Version:
                    Network.RemoveAPI();
                    Network.ResetError();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(5000);
                    break;

                case Network.EErrCode.RoomFailedMakeRoom:
                    Network.RemoveAPI();
                    Network.ResetError();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(4800);
                    break;

                case Network.EErrCode.RoomIllegalComment:
                case Network.EErrCode.VS_IllComment:
                    if (this.API == FlowNode_MultiPlayAPI.EAPI.MAKE)
                    {
                        string str = LocalizedText.Get("sys.DEFAULT_ROOM_COMMENT");
                        PlayerPrefs.SetString(PlayerData.ROOM_COMMENT_KEY, str);
                    }
                    Network.RemoveAPI();
                    Network.ResetError();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(4801);
                    break;

                case Network.EErrCode.RoomNoRoom:
                case Network.EErrCode.VS_NoRoom:
                    Network.RemoveAPI();
                    Network.ResetError();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(4900);
                    break;

                case Network.EErrCode.VS_NotLINERoomInfo:
                    Network.RemoveAPI();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(7000);
                    break;

                case Network.EErrCode.VS_FailRoomID:
                    Network.RemoveAPI();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(8000);
                    break;

                case Network.EErrCode.VS_NotPhotonAppID:
                    Network.RemoveAPI();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(9000);
                    break;

                case Network.EErrCode.VS_FaildSeasonGift:
                    Network.RemoveAPI();
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(10000);
                    break;

                default:
                    this.OnFailed();
                    break;
                }
            }
            else
            {
                if (this.API == FlowNode_MultiPlayAPI.EAPI.MAKE)
                {
                    WebAPI.JSON_BodyResponse <ReqMPRoomMake.Response> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <ReqMPRoomMake.Response> >(www.text);
                    DebugUtility.Assert(jsonObject != null, "res == null");
                    if (jsonObject.body == null)
                    {
                        this.OnFailed();
                        return;
                    }
                    GlobalVars.SelectedMultiPlayRoomID      = jsonObject.body.roomid;
                    GlobalVars.SelectedMultiPlayPhotonAppID = jsonObject.body.app_id;
                    GlobalVars.SelectedMultiPlayRoomName    = jsonObject.body.token;
                    DebugUtility.Log("MakeRoom RoomID:" + (object)GlobalVars.SelectedMultiPlayRoomID + " AppID:" + GlobalVars.SelectedMultiPlayPhotonAppID + " Name:" + GlobalVars.SelectedMultiPlayRoomName);
                }
                else if (this.API == FlowNode_MultiPlayAPI.EAPI.ROOM)
                {
                    WebAPI.JSON_BodyResponse <ReqMPRoom.Response> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <ReqMPRoom.Response> >(www.text);
                    DebugUtility.Assert(jsonObject != null, "res == null");
                    if (jsonObject.body == null)
                    {
                        this.OnFailed();
                        return;
                    }
                    FlowNode_MultiPlayAPI.RoomList = jsonObject.body;
                    if (FlowNode_MultiPlayAPI.RoomList == null)
                    {
                        DebugUtility.Log("ListRoom null");
                    }
                    else if (FlowNode_MultiPlayAPI.RoomList.rooms == null)
                    {
                        DebugUtility.Log("ListRoom rooms null");
                    }
                    else
                    {
                        DebugUtility.Log("ListRoom num:" + (object)FlowNode_MultiPlayAPI.RoomList.rooms.Length);
                    }
                }
                else if (this.API == FlowNode_MultiPlayAPI.EAPI.JOIN)
                {
                    WebAPI.JSON_BodyResponse <ReqMPRoomJoin.Response> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <ReqMPRoomJoin.Response> >(www.text);
                    DebugUtility.Assert(jsonObject != null, "res == null");
                    if (jsonObject.body == null)
                    {
                        this.OnFailed();
                        return;
                    }
                    if (jsonObject.body.quest == null || string.IsNullOrEmpty(jsonObject.body.quest.iname))
                    {
                        this.OnFailed();
                        return;
                    }
                    GlobalVars.SelectedQuestID = jsonObject.body.quest.iname;
                    GlobalVars.SelectedMultiPlayPhotonAppID = jsonObject.body.app_id;
                    GlobalVars.SelectedMultiPlayRoomName    = jsonObject.body.token;
                    DebugUtility.Log("JoinRoom  AppID:" + GlobalVars.SelectedMultiPlayPhotonAppID + " Name:" + GlobalVars.SelectedMultiPlayRoomName);
                }
                else if (this.API != FlowNode_MultiPlayAPI.EAPI.UPDATE && this.API != FlowNode_MultiPlayAPI.EAPI.VERSION)
                {
                    if (this.API == FlowNode_MultiPlayAPI.EAPI.VERSUS_START)
                    {
                        WebAPI.JSON_BodyResponse <ReqVersusStart.Response> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <ReqVersusStart.Response> >(www.text);
                        DebugUtility.Assert(jsonObject != null, "res == null");
                        if (jsonObject.body == null)
                        {
                            this.OnFailed();
                            return;
                        }
                        GlobalVars.SelectedMultiPlayPhotonAppID = jsonObject.body.app_id;
                        switch (GlobalVars.SelectedMultiPlayVersusType)
                        {
                        case VERSUS_TYPE.Free:
                            GlobalVars.SelectedQuestID = jsonObject.body.maps.free;
                            break;

                        case VERSUS_TYPE.Friend:
                            GlobalVars.SelectedQuestID = jsonObject.body.maps.friend;
                            break;
                        }
                        DebugUtility.Log("MakeRoom RoomID: AppID:" + GlobalVars.SelectedMultiPlayPhotonAppID + "/ QuestID:" + GlobalVars.SelectedQuestID);
                    }
                    else if (this.API == FlowNode_MultiPlayAPI.EAPI.VERSUS_MAKE)
                    {
                        WebAPI.JSON_BodyResponse <ReqVersusMake.Response> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <ReqVersusMake.Response> >(www.text);
                        DebugUtility.Assert(jsonObject != null, "res == null");
                        if (jsonObject.body == null)
                        {
                            this.OnFailed();
                            return;
                        }
                        GlobalVars.SelectedMultiPlayRoomID   = jsonObject.body.roomid;
                        GlobalVars.SelectedMultiPlayRoomName = jsonObject.body.token;
                        if (GlobalVars.SelectedMultiPlayVersusType == VERSUS_TYPE.Friend)
                        {
                            GlobalVars.EditMultiPlayRoomPassCode = "1";
                        }
                    }
                    else if (this.API == FlowNode_MultiPlayAPI.EAPI.VERSUS_JOIN)
                    {
                        WebAPI.JSON_BodyResponse <ReqVersusRoomJoin.Response> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <ReqVersusRoomJoin.Response> >(www.text);
                        DebugUtility.Assert(jsonObject != null, "res == null");
                        if (jsonObject.body == null)
                        {
                            this.OnFailed();
                            return;
                        }
                        if (jsonObject.body.quest == null || string.IsNullOrEmpty(jsonObject.body.quest.iname))
                        {
                            this.OnFailed();
                            return;
                        }
                        GlobalVars.SelectedQuestID = jsonObject.body.quest.iname;
                        GlobalVars.SelectedMultiPlayPhotonAppID = jsonObject.body.app_id;
                        GlobalVars.SelectedMultiPlayRoomName    = jsonObject.body.token;
                        DebugUtility.Log("JoinRoom  AppID:" + GlobalVars.SelectedMultiPlayPhotonAppID + " Name:" + GlobalVars.SelectedMultiPlayRoomName);
                    }
                    else if (this.API != FlowNode_MultiPlayAPI.EAPI.VERSUS_LINE_REQ && this.API != FlowNode_MultiPlayAPI.EAPI.VERSUS_LINE_MAKE)
                    {
                        if (this.API == FlowNode_MultiPlayAPI.EAPI.VERSUS_STATUS)
                        {
                            WebAPI.JSON_BodyResponse <ReqVersusStatus.Response> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <ReqVersusStatus.Response> >(www.text);
                            if (jsonObject == null)
                            {
                                this.OnFailed();
                                return;
                            }
                            GameManager instance = MonoSingleton <GameManager> .Instance;
                            instance.Player.SetTowerMatchInfo(jsonObject.body.floor, jsonObject.body.key, jsonObject.body.wincnt, jsonObject.body.is_give_season_gift != 0);
                            instance.VersusTowerMatchBegin   = !string.IsNullOrEmpty(jsonObject.body.vstower_id);
                            instance.VersusTowerMatchReceipt = jsonObject.body.is_season_gift != 0;
                            instance.VersusTowerMatchName    = jsonObject.body.tower_iname;
                            instance.VersusTowerMatchEndAt   = jsonObject.body.end_at;
                            GlobalVars.SelectedQuestID       = jsonObject.body.vstower_id;
                        }
                        else if (this.API == FlowNode_MultiPlayAPI.EAPI.VERSUS_SEASON)
                        {
                            WebAPI.JSON_BodyResponse <ReqVersusSeason.Response> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <ReqVersusSeason.Response> >(www.text);
                            if (jsonObject == null)
                            {
                                this.OnFailed();
                                return;
                            }
                            PlayerData player = MonoSingleton <GameManager> .Instance.Player;
                            player.VersusSeazonGiftReceipt = false;
                            player.UnreadMailPeriod       |= jsonObject.body.unreadmail == 1;
                        }
                    }
                }
                Network.RemoveAPI();
                this.Success();
            }
        }
Пример #2
0
        public override void OnActivate(int pinID)
        {
            switch (pinID)
            {
            case 0:
            case 4:
                string empty1 = string.Empty;
                string str1   = !PlayerPrefs.HasKey(PlayerData.ROOM_COMMENT_KEY) ? LocalizedText.Get("sys.DEFAULT_ROOM_COMMENT") : PlayerPrefs.GetString(PlayerData.ROOM_COMMENT_KEY);
                if (string.IsNullOrEmpty(str1))
                {
                    str1 = LocalizedText.Get("sys.DEFAULT_ROOM_COMMENT");
                }
                if (!MyMsgInput.isLegal(str1))
                {
                    DebugUtility.Log("comment is not legal");
                    this.ActivateOutputLinks(4801);
                    break;
                }
                GlobalVars.ResumeMultiplayPlayerID      = 0;
                GlobalVars.ResumeMultiplaySeatID        = 0;
                GlobalVars.SelectedMultiPlayRoomComment = str1;
                DebugUtility.Log("MakeRoom Comment:" + GlobalVars.SelectedMultiPlayRoomComment);
                bool flag = false;
                if (pinID == 4)
                {
                    GlobalVars.SelectedQuestID           = FlowNode_OnUrlSchemeLaunch.LINEParam_decided.iname;
                    GlobalVars.SelectedMultiPlayRoomType = FlowNode_OnUrlSchemeLaunch.LINEParam_decided.type;
                    GlobalVars.EditMultiPlayRoomPassCode = "0";
                    flag = true;
                    DebugUtility.Log("MakeRoom for LINE Quest:" + GlobalVars.SelectedQuestID + " Type:" + (object)GlobalVars.SelectedMultiPlayRoomType + " PassCodeHash:" + GlobalVars.SelectedMultiPlayRoomPassCodeHash);
                }
                bool isPrivate = flag;
                FlowNode_MultiPlayAPI.RoomMakeTime = Time.get_realtimeSinceStartup();
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    GlobalVars.SelectedMultiPlayRoomID      = (int)(DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0)).TotalSeconds;
                    GlobalVars.SelectedMultiPlayPhotonAppID = string.Empty;
                    GlobalVars.SelectedMultiPlayRoomName    = Guid.NewGuid().ToString();
                    DebugUtility.Log("MakeRoom RoomID:" + (object)GlobalVars.SelectedMultiPlayRoomID + " AppID:" + GlobalVars.SelectedMultiPlayPhotonAppID + " Name:" + GlobalVars.SelectedMultiPlayRoomName);
                    this.Success();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.MAKE;
                this.ExecRequest((WebAPI) new ReqMPRoomMake(GlobalVars.SelectedQuestID, str1, GlobalVars.EditMultiPlayRoomPassCode, isPrivate, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 2:
            case 5:
                string fuid = pinID != 2 ? FlowNode_OnUrlSchemeLaunch.LINEParam_decided.creatorFUID : (string)null;
                DebugUtility.Log("ListRoom FUID:" + fuid);
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.StartCoroutine(this.GetPhotonRoomList(fuid));
                    break;
                }
                if (pinID == 2)
                {
                    GlobalVars.SelectedMultiPlayArea = (string)null;
                }
                FlowNode_MultiPlayAPI.RoomList = (ReqMPRoom.Response)null;
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.ROOM;
                this.ExecRequest((WebAPI) new ReqMPRoom(fuid, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 3:
            case 6:
                if (FlowNode_MultiPlayAPI.RoomList == null || FlowNode_MultiPlayAPI.RoomList.rooms == null || FlowNode_MultiPlayAPI.RoomList.rooms.Length <= 0)
                {
                    this.Failure();
                    break;
                }
                bool LockRoom = false;
                if (pinID == 6)
                {
                    if (FlowNode_MultiPlayAPI.RoomList.rooms.Length != 1 || FlowNode_MultiPlayAPI.RoomList.rooms[0] == null)
                    {
                        this.Failure();
                        break;
                    }
                    GlobalVars.SelectedMultiPlayRoomID = FlowNode_MultiPlayAPI.RoomList.rooms[0].roomid;
                    DebugUtility.Log("JoinRoom for LINE RoomID:" + (object)GlobalVars.SelectedMultiPlayRoomID);
                }
                GlobalVars.ResumeMultiplayPlayerID = 0;
                GlobalVars.ResumeMultiplaySeatID   = 0;
                GlobalVars.SelectedQuestID         = (string)null;
                for (int index = 0; index < FlowNode_MultiPlayAPI.RoomList.rooms.Length; ++index)
                {
                    if (FlowNode_MultiPlayAPI.RoomList.rooms[index].quest != null && !string.IsNullOrEmpty(FlowNode_MultiPlayAPI.RoomList.rooms[index].quest.iname) && FlowNode_MultiPlayAPI.RoomList.rooms[index].roomid == GlobalVars.SelectedMultiPlayRoomID)
                    {
                        GlobalVars.SelectedQuestID = FlowNode_MultiPlayAPI.RoomList.rooms[index].quest.iname;
                        break;
                    }
                }
                if (string.IsNullOrEmpty(GlobalVars.SelectedQuestID))
                {
                    this.Failure();
                    break;
                }
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.StartCoroutine(this.GetPhotonRoomName());
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.JOIN;
                this.ExecRequest((WebAPI) new ReqMPRoomJoin(GlobalVars.SelectedMultiPlayRoomID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback), LockRoom));
                break;

            case 7:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                if (!MyMsgInput.isLegal(GlobalVars.EditMultiPlayRoomComment))
                {
                    DebugUtility.Log("comment is not legal");
                    this.ActivateOutputLinks(4801);
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.UPDATE;
                this.ExecRequest((WebAPI) new ReqMPRoomUpdate(GlobalVars.SelectedMultiPlayRoomID, GlobalVars.EditMultiPlayRoomComment, GlobalVars.EditMultiPlayRoomPassCode, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 8:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                if (GlobalVars.SelectedMultiPlayRoomID < FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MIN || GlobalVars.SelectedMultiPlayRoomID > FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MAX)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.JOIN;
                this.ExecRequest((WebAPI) new ReqMPRoomJoin(GlobalVars.SelectedMultiPlayRoomID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback), true));
                break;

            case 9:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSION;
                this.ExecRequest((WebAPI) new ReqMPVersion(new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 10:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                GlobalVars.SelectedMultiPlayRoomName = string.Empty;
                GlobalVars.VersusRoomReuse           = false;
                GlobalVars.ResumeMultiplayPlayerID   = 0;
                GlobalVars.ResumeMultiplaySeatID     = 0;
                GlobalVars.MultiPlayVersusKey        = MonoSingleton <GameManager> .Instance.GetVersusKey(GlobalVars.SelectedMultiPlayVersusType);

                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_START;
                this.ExecRequest((WebAPI) new ReqVersusStart(GlobalVars.SelectedMultiPlayVersusType, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 11:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                string empty2 = string.Empty;
                string str2   = !PlayerPrefs.HasKey(PlayerData.ROOM_COMMENT_KEY) ? LocalizedText.Get("sys.DEFAULT_ROOM_COMMENT") : PlayerPrefs.GetString(PlayerData.ROOM_COMMENT_KEY);
                if (string.IsNullOrEmpty(str2))
                {
                    str2 = LocalizedText.Get("sys.DEFAULT_ROOM_COMMENT");
                }
                if (!MyMsgInput.isLegal(str2))
                {
                    DebugUtility.Log("comment is not legal");
                    this.ActivateOutputLinks(4801);
                    break;
                }
                FlowNode_MultiPlayAPI.RoomMakeTime      = Time.get_realtimeSinceStartup();
                GlobalVars.SelectedMultiPlayRoomComment = str2;
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_MAKE;
                this.ExecRequest((WebAPI) new ReqVersusMake(GlobalVars.SelectedMultiPlayVersusType, str2, GlobalVars.SelectedQuestID, false, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 12:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                if (GlobalVars.SelectedMultiPlayRoomID < FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MIN || GlobalVars.SelectedMultiPlayRoomID > FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MAX)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_JOIN;
                this.ExecRequest((WebAPI) new ReqVersusRoomJoin(GlobalVars.SelectedMultiPlayRoomID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 13:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                if (!MyMsgInput.isLegal(GlobalVars.EditMultiPlayRoomComment))
                {
                    DebugUtility.Log("comment is not legal");
                    this.ActivateOutputLinks(4801);
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.UPDATE;
                this.ExecRequest((WebAPI) new ReqVersusRoomUpdate(GlobalVars.SelectedMultiPlayRoomID, GlobalVars.EditMultiPlayRoomComment, GlobalVars.SelectedQuestID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 14:
                GlobalVars.SelectedMultiPlayRoomName = string.Empty;
                GlobalVars.VersusRoomReuse           = false;
                GlobalVars.ResumeMultiplayPlayerID   = 0;
                GlobalVars.ResumeMultiplaySeatID     = 0;
                GlobalVars.MultiPlayVersusKey        = MonoSingleton <GameManager> .Instance.GetVersusKey(GlobalVars.SelectedMultiPlayVersusType);

                this.Success();
                break;

            case 15:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_LINE_REQ;
                this.ExecRequest((WebAPI) new ReqVersusLine(GlobalVars.SelectedMultiPlayRoomName, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 16:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                GlobalVars.VersusRoomReuse         = false;
                FlowNode_MultiPlayAPI.RoomMakeTime = Time.get_realtimeSinceStartup();
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_LINE_MAKE;
                this.ExecRequest((WebAPI) new ReqVersusLineMake(GlobalVars.SelectedMultiPlayRoomName, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 17:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                GlobalVars.SelectedMultiPlayRoomID = FlowNode_OnUrlSchemeLaunch.LINEParam_decided.roomid;
                if (GlobalVars.SelectedMultiPlayRoomID < FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MIN || GlobalVars.SelectedMultiPlayRoomID > FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MAX)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_JOIN;
                this.ExecRequest((WebAPI) new ReqVersusRoomJoin(GlobalVars.SelectedMultiPlayRoomID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 18:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_STATUS;
                this.ExecRequest((WebAPI) new ReqVersusStatus(new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 19:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_SEASON;
                this.ExecRequest((WebAPI) new ReqVersusSeason(new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;
            }
        }
Пример #3
0
        public override void OnActivate(int pinID)
        {
            switch (pinID)
            {
            case 0:
            case 4:
            case 22:
                this.ResetPlacementParam();
                string empty1 = string.Empty;
                string str1   = !PlayerPrefsUtility.HasKey(PlayerPrefsUtility.ROOM_COMMENT_KEY) ? LocalizedText.Get("sys.DEFAULT_ROOM_COMMENT") : PlayerPrefsUtility.GetString(PlayerPrefsUtility.ROOM_COMMENT_KEY, string.Empty);
                if (string.IsNullOrEmpty(str1))
                {
                    str1 = LocalizedText.Get("sys.DEFAULT_ROOM_COMMENT");
                }
                if (!MyMsgInput.isLegal(str1))
                {
                    DebugUtility.Log("comment is not legal");
                    this.ActivateOutputLinks(4801);
                    break;
                }
                GlobalVars.ResumeMultiplayPlayerID      = 0;
                GlobalVars.ResumeMultiplaySeatID        = 0;
                GlobalVars.SelectedMultiPlayRoomComment = str1;
                DebugUtility.Log("MakeRoom Comment:" + GlobalVars.SelectedMultiPlayRoomComment);
                bool flag = false;
                if (pinID == 4)
                {
                    GlobalVars.SelectedQuestID           = FlowNode_OnUrlSchemeLaunch.LINEParam_decided.iname;
                    GlobalVars.SelectedMultiPlayRoomType = FlowNode_OnUrlSchemeLaunch.LINEParam_decided.type;
                    GlobalVars.EditMultiPlayRoomPassCode = "0";
                    flag = true;
                    DebugUtility.Log("MakeRoom for LINE Quest:" + GlobalVars.SelectedQuestID + " Type:" + (object)GlobalVars.SelectedMultiPlayRoomType + " PassCodeHash:" + GlobalVars.SelectedMultiPlayRoomPassCodeHash);
                }
                GlobalVars.EditMultiPlayRoomPassCode = "0";
                string s = FlowNode_Variable.Get("MultiPlayPasscode");
                if (!string.IsNullOrEmpty(s))
                {
                    int result = 0;
                    if (int.TryParse(s, out result))
                    {
                        GlobalVars.EditMultiPlayRoomPassCode = result.ToString();
                    }
                }
                bool isPrivate = flag;
                FlowNode_MultiPlayAPI.RoomMakeTime = Time.get_realtimeSinceStartup();
                bool limit  = GlobalVars.SelectedMultiPlayLimit & GlobalVars.EditMultiPlayRoomPassCode == "0";
                int  unitlv = isPrivate || !limit ? 0 : GlobalVars.MultiPlayJoinUnitLv;
                bool clear  = !isPrivate && limit && GlobalVars.MultiPlayClearOnly;
                int  selectedMultiTowerFloor1 = GlobalVars.SelectedMultiTowerFloor;
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    GlobalVars.SelectedMultiPlayRoomID      = (int)(DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0)).TotalSeconds;
                    GlobalVars.SelectedMultiPlayPhotonAppID = string.Empty;
                    GlobalVars.SelectedMultiPlayRoomName    = Guid.NewGuid().ToString();
                    DebugUtility.Log("MakeRoom RoomID:" + (object)GlobalVars.SelectedMultiPlayRoomID + " AppID:" + GlobalVars.SelectedMultiPlayPhotonAppID + " Name:" + GlobalVars.SelectedMultiPlayRoomName);
                    this.Success();
                    break;
                }
                MultiInvitationSendWindow.ClearInvited();
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.MAKE;
                if (pinID != 22)
                {
                    this.ExecRequest((WebAPI) new ReqMPRoomMake(GlobalVars.SelectedQuestID, str1, GlobalVars.EditMultiPlayRoomPassCode, isPrivate, limit, unitlv, clear, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                    break;
                }
                this.ExecRequest((WebAPI) new ReqMultiTwRoomMake(GlobalVars.SelectedMultiTowerID, str1, GlobalVars.EditMultiPlayRoomPassCode, selectedMultiTowerFloor1, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 2:
            case 5:
            case 23:
            case 50:
                string fuid = (string)null;
                if (pinID == 5)
                {
                    fuid = FlowNode_OnUrlSchemeLaunch.LINEParam_decided.creatorFUID;
                }
                else if (pinID == 50)
                {
                    fuid = GlobalVars.MultiInvitationRoomOwner;
                }
                DebugUtility.Log("ListRoom FUID:" + fuid);
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.StartCoroutine(this.GetPhotonRoomList(fuid));
                    break;
                }
                FlowNode_MultiPlayAPI.RoomList = (ReqMPRoom.Response)null;
                string iname = string.Empty;
                if (pinID == 2)
                {
                    iname = GlobalVars.SelectedQuestID;
                }
                int selectedMultiTowerFloor2 = GlobalVars.SelectedMultiTowerFloor;
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.ROOM;
                if (pinID != 23)
                {
                    this.ExecRequest((WebAPI) new ReqMPRoom(fuid, iname, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                    break;
                }
                this.ExecRequest((WebAPI) new ReqMultiTwRoom(fuid, iname, selectedMultiTowerFloor2, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 3:
            case 6:
            case 24:
            case 51:
                if (FlowNode_MultiPlayAPI.RoomList == null || FlowNode_MultiPlayAPI.RoomList.rooms == null || FlowNode_MultiPlayAPI.RoomList.rooms.Length <= 0)
                {
                    this.Failure();
                    break;
                }
                this.ResetPlacementParam();
                bool LockRoom = false;
                switch (pinID)
                {
                case 6:
                    if (FlowNode_MultiPlayAPI.RoomList.rooms.Length != 1 || FlowNode_MultiPlayAPI.RoomList.rooms[0] == null)
                    {
                        this.Failure();
                        return;
                    }
                    GlobalVars.SelectedMultiPlayRoomID = FlowNode_MultiPlayAPI.RoomList.rooms[0].roomid;
                    DebugUtility.Log("JoinRoom for LINE RoomID:" + (object)GlobalVars.SelectedMultiPlayRoomID);
                    break;

                case 51:
                    if (FlowNode_MultiPlayAPI.RoomList.rooms.Length != 1 || FlowNode_MultiPlayAPI.RoomList.rooms[0] == null)
                    {
                        this.Failure();
                        return;
                    }
                    LockRoom = GlobalVars.MultiInvitationRoomLocked;
                    GlobalVars.SelectedMultiPlayRoomID = FlowNode_MultiPlayAPI.RoomList.rooms[0].roomid;
                    DebugUtility.Log("JoinRoom for Invitation RoomID:" + (object)GlobalVars.SelectedMultiPlayRoomID);
                    break;
                }
                GlobalVars.ResumeMultiplayPlayerID = 0;
                GlobalVars.ResumeMultiplaySeatID   = 0;
                GlobalVars.SelectedQuestID         = (string)null;
                for (int index = 0; index < FlowNode_MultiPlayAPI.RoomList.rooms.Length; ++index)
                {
                    if (FlowNode_MultiPlayAPI.RoomList.rooms[index].quest != null && !string.IsNullOrEmpty(FlowNode_MultiPlayAPI.RoomList.rooms[index].quest.iname) && FlowNode_MultiPlayAPI.RoomList.rooms[index].roomid == GlobalVars.SelectedMultiPlayRoomID)
                    {
                        GlobalVars.SelectedQuestID = FlowNode_MultiPlayAPI.RoomList.rooms[index].quest.iname;
                        break;
                    }
                }
                if (string.IsNullOrEmpty(GlobalVars.SelectedQuestID))
                {
                    this.Failure();
                    break;
                }
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.StartCoroutine(this.GetPhotonRoomName());
                    break;
                }
                int selectedMultiTowerFloor3 = GlobalVars.SelectedMultiTowerFloor;
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.JOIN;
                if (pinID != 24)
                {
                    this.ExecRequest((WebAPI) new ReqMPRoomJoin(GlobalVars.SelectedMultiPlayRoomID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback), LockRoom));
                    break;
                }
                this.ExecRequest((WebAPI) new ReqMultiTwRoomJoin(GlobalVars.SelectedMultiPlayRoomID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback), LockRoom, selectedMultiTowerFloor3, false));
                break;

            case 7:
            case 26:
            case 55:
            case 56:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                if (!string.IsNullOrEmpty(GlobalVars.EditMultiPlayRoomComment) && !MyMsgInput.isLegal(GlobalVars.EditMultiPlayRoomComment))
                {
                    DebugUtility.Log("comment is not legal");
                    this.ActivateOutputLinks(4801);
                    break;
                }
                switch (pinID)
                {
                case 55:
                    GlobalVars.EditMultiPlayRoomPassCode = "0";
                    GlobalVars.EditMultiPlayRoomComment  = GlobalVars.SelectedMultiPlayRoomComment;
                    break;

                case 56:
                    GlobalVars.EditMultiPlayRoomPassCode = "1";
                    GlobalVars.EditMultiPlayRoomComment  = GlobalVars.SelectedMultiPlayRoomComment;
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.UPDATE;
                if (GlobalVars.SelectedMultiPlayRoomType != JSON_MyPhotonRoomParam.EType.TOWER)
                {
                    this.ExecRequest((WebAPI) new ReqMPRoomUpdate(GlobalVars.SelectedMultiPlayRoomID, GlobalVars.EditMultiPlayRoomComment, GlobalVars.EditMultiPlayRoomPassCode, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                    break;
                }
                string selectedMultiTowerId     = GlobalVars.SelectedMultiTowerID;
                int    selectedMultiTowerFloor4 = GlobalVars.SelectedMultiTowerFloor;
                this.ExecRequest((WebAPI) new ReqMultiTwRoomUpdate(GlobalVars.SelectedMultiPlayRoomID, GlobalVars.EditMultiPlayRoomComment, GlobalVars.EditMultiPlayRoomPassCode, selectedMultiTowerId, selectedMultiTowerFloor4, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 8:
            case 25:
            case 28:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                if (GlobalVars.SelectedMultiPlayRoomID < FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MIN || GlobalVars.SelectedMultiPlayRoomID > FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MAX)
                {
                    this.Failure();
                    break;
                }
                this.ResetPlacementParam();
                GlobalVars.ResumeMultiplayPlayerID = 0;
                GlobalVars.ResumeMultiplaySeatID   = 0;
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.JOIN;
                if (pinID != 25 && pinID != 28)
                {
                    this.ExecRequest((WebAPI) new ReqMPRoomJoin(GlobalVars.SelectedMultiPlayRoomID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback), true));
                    break;
                }
                this.API = FlowNode_MultiPlayAPI.EAPI.MT_JOIN;
                this.ExecRequest((WebAPI) new ReqMultiTwRoomJoin(GlobalVars.SelectedMultiPlayRoomID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback), true, 0, pinID == 28));
                break;

            case 9:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSION;
                this.ExecRequest((WebAPI) new ReqMPVersion(new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 10:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                GlobalVars.SelectedMultiPlayRoomName = string.Empty;
                GlobalVars.VersusRoomReuse           = false;
                GlobalVars.ResumeMultiplayPlayerID   = 0;
                GlobalVars.ResumeMultiplaySeatID     = 0;
                GlobalVars.MultiPlayVersusKey        = MonoSingleton <GameManager> .Instance.GetVersusKey(GlobalVars.SelectedMultiPlayVersusType);

                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_START;
                this.ExecRequest((WebAPI) new ReqVersusStart(GlobalVars.SelectedMultiPlayVersusType, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 11:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                string empty2 = string.Empty;
                string str2   = !PlayerPrefsUtility.HasKey(PlayerPrefsUtility.ROOM_COMMENT_KEY) ? LocalizedText.Get("sys.DEFAULT_ROOM_COMMENT") : PlayerPrefsUtility.GetString(PlayerPrefsUtility.ROOM_COMMENT_KEY, string.Empty);
                if (string.IsNullOrEmpty(str2))
                {
                    str2 = LocalizedText.Get("sys.DEFAULT_ROOM_COMMENT");
                }
                if (!MyMsgInput.isLegal(str2))
                {
                    DebugUtility.Log("comment is not legal");
                    this.ActivateOutputLinks(4801);
                    break;
                }
                FlowNode_MultiPlayAPI.RoomMakeTime      = Time.get_realtimeSinceStartup();
                GlobalVars.SelectedMultiPlayRoomComment = str2;
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_MAKE;
                this.ExecRequest((WebAPI) new ReqVersusMake(GlobalVars.SelectedMultiPlayVersusType, str2, GlobalVars.SelectedQuestID, false, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 12:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                if (GlobalVars.SelectedMultiPlayRoomID < FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MIN || GlobalVars.SelectedMultiPlayRoomID > FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MAX)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_JOIN;
                this.ExecRequest((WebAPI) new ReqVersusRoomJoin(GlobalVars.SelectedMultiPlayRoomID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 13:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                if (!MyMsgInput.isLegal(GlobalVars.EditMultiPlayRoomComment))
                {
                    DebugUtility.Log("comment is not legal");
                    this.ActivateOutputLinks(4801);
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.UPDATE;
                this.ExecRequest((WebAPI) new ReqVersusRoomUpdate(GlobalVars.SelectedMultiPlayRoomID, GlobalVars.EditMultiPlayRoomComment, GlobalVars.SelectedQuestID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 14:
                GlobalVars.SelectedMultiPlayRoomName = string.Empty;
                GlobalVars.VersusRoomReuse           = false;
                GlobalVars.ResumeMultiplayPlayerID   = 0;
                GlobalVars.ResumeMultiplaySeatID     = 0;
                GlobalVars.MultiPlayVersusKey        = MonoSingleton <GameManager> .Instance.GetVersusKey(GlobalVars.SelectedMultiPlayVersusType);

                this.Success();
                break;

            case 15:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_LINE_REQ;
                this.ExecRequest((WebAPI) new ReqVersusLine(GlobalVars.SelectedMultiPlayRoomName, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 16:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Success();
                    break;
                }
                GlobalVars.VersusRoomReuse         = false;
                FlowNode_MultiPlayAPI.RoomMakeTime = Time.get_realtimeSinceStartup();
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_LINE_MAKE;
                this.ExecRequest((WebAPI) new ReqVersusLineMake(GlobalVars.SelectedMultiPlayRoomName, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 17:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                GlobalVars.SelectedMultiPlayRoomID = FlowNode_OnUrlSchemeLaunch.LINEParam_decided.roomid;
                if (GlobalVars.SelectedMultiPlayRoomID < FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MIN || GlobalVars.SelectedMultiPlayRoomID > FlowNode_MultiPlayAPI.ROOMID_VALIDATE_MAX)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_JOIN;
                this.ExecRequest((WebAPI) new ReqVersusRoomJoin(GlobalVars.SelectedMultiPlayRoomID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 18:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_STATUS;
                this.ExecRequest((WebAPI) new ReqVersusStatus(new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 19:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_SEASON;
                this.ExecRequest((WebAPI) new ReqVersusSeason(new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 20:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.VERSUS_FRIEND;
                this.ExecRequest((WebAPI) new ReqVersusFriendScore(new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 21:
                GameManager instance1 = MonoSingleton <GameManager> .Instance;
                MyPhoton    instance2 = PunMonoSingleton <MyPhoton> .Instance;
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)instance2, (UnityEngine.Object)null) && instance2.IsConnectedInRoom())
                {
                    GlobalVars.CreateAutoMultiTower = true;
                    if (instance2.IsCreatedRoom())
                    {
                        instance2.OpenRoom(true, false);
                        MyPhoton.MyRoom currentRoom = instance2.GetCurrentRoom();
                        if (currentRoom != null)
                        {
                            JSON_MyPhotonRoomParam myPhotonRoomParam = JSON_MyPhotonRoomParam.Parse(currentRoom.json);
                            if (myPhotonRoomParam != null)
                            {
                                List <MultiTowerFloorParam> mtAllFloorParam = instance1.GetMTAllFloorParam(GlobalVars.SelectedMultiTowerID);
                                if (mtAllFloorParam != null)
                                {
                                    GlobalVars.SelectedMultiTowerFloor = Mathf.Min(mtAllFloorParam.Count, GlobalVars.SelectedMultiTowerFloor + 1);
                                }
                                myPhotonRoomParam.challegedMTFloor = GlobalVars.SelectedMultiTowerFloor;
                                myPhotonRoomParam.iname            = GlobalVars.SelectedMultiTowerID + "_" + myPhotonRoomParam.challegedMTFloor.ToString();
                                instance2.SetRoomParam(myPhotonRoomParam.Serialize());
                            }
                        }
                    }
                    instance2.AddMyPlayerParam("BattleStart", (object)false);
                    instance2.AddMyPlayerParam("resume", (object)false);
                    MyPhoton.MyPlayer myPlayer = instance2.GetMyPlayer();
                    if (myPlayer != null)
                    {
                        JSON_MyPhotonPlayerParam photonPlayerParam = JSON_MyPhotonPlayerParam.Parse(myPlayer.json);
                        if (photonPlayerParam != null)
                        {
                            photonPlayerParam.mtChallengeFloor = instance1.GetMTChallengeFloor();
                            photonPlayerParam.mtClearedFloor   = instance1.GetMTClearedMaxFloor();
                            instance2.SetMyPlayerParam(photonPlayerParam.Serialize());
                        }
                    }
                    this.Success();
                    break;
                }
                this.Failure();
                break;

            case 27:
                if (Network.Mode != Network.EConnectMode.Online)
                {
                    this.Failure();
                    break;
                }
                ((Behaviour)this).set_enabled(true);
                this.API = FlowNode_MultiPlayAPI.EAPI.MT_STATUS;
                this.ExecRequest((WebAPI) new ReqMultiTwStatus(GlobalVars.SelectedMultiTowerID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                break;

            case 29:
                MyPhoton instance3 = PunMonoSingleton <MyPhoton> .Instance;
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)instance3, (UnityEngine.Object)null) && instance3.IsConnectedInRoom())
                {
                    this.Success();
                    break;
                }
                this.Failure();
                break;
            }
        }