private IEnumerator MatchAtRandom(PartyManager.PartySetting setting, int retryCount, float time)
    {
        yield return((object)new WaitForSeconds(time));

        MonoBehaviourSingleton <PartyManager> .I.SendRandomMatching((int)info.needs[0].questId, retryCount, true, delegate(bool is_success, int maxRetryCount, bool isJoined, float waitTime)
        {
            //IL_005e: Unknown result type (might be due to invalid IL or missing references)
            if (!is_success)
            {
                GameSection.ResumeEvent(false, null);
            }
            else if (maxRetryCount > 0)
            {
                if (((_003CMatchAtRandom_003Ec__Iterator10A) /*Error near IL_0061: stateMachine*/).retryCount >= maxRetryCount)
                {
                    ((_003CMatchAtRandom_003Ec__Iterator10A) /*Error near IL_0061: stateMachine*/)._003C_003Ef__this.OnQuery_AUTO_CREATE_ROOM();
                }
                else
                {
                    ((_003CMatchAtRandom_003Ec__Iterator10A) /*Error near IL_0061: stateMachine*/).retryCount++;
                    ((_003CMatchAtRandom_003Ec__Iterator10A) /*Error near IL_0061: stateMachine*/)._003C_003Ef__this.StartCoroutine(((_003CMatchAtRandom_003Ec__Iterator10A) /*Error near IL_0061: stateMachine*/)._003C_003Ef__this.MatchAtRandom(((_003CMatchAtRandom_003Ec__Iterator10A) /*Error near IL_0061: stateMachine*/).setting, ((_003CMatchAtRandom_003Ec__Iterator10A) /*Error near IL_0061: stateMachine*/).retryCount, waitTime));
                }
            }
            else if (!isJoined)
            {
                ((_003CMatchAtRandom_003Ec__Iterator10A) /*Error near IL_0061: stateMachine*/)._003C_003Ef__this.OnQuery_AUTO_CREATE_ROOM();
            }
            else
            {
                MonoBehaviourSingleton <PartyManager> .I.SetPartySetting(((_003CMatchAtRandom_003Ec__Iterator10A) /*Error near IL_0061: stateMachine*/).setting);
                GameSection.ResumeEvent(true, null);
            }
        });
    }
    public override void Initialize()
    {
        eventData = (GameSection.GetEventData() as object[]);
        questType = (QUEST_TYPE)(int)eventData[0];
        if (MonoBehaviourSingleton <PartyManager> .I.partySetting != null)
        {
            PartyManager.PartySetting partySetting = MonoBehaviourSingleton <PartyManager> .I.partySetting;
            setting = new PartyManager.PartySetting(partySetting.isLock, partySetting.level, partySetting.total, 0, 0);
        }
        else
        {
            setting = new PartyManager.PartySetting(true, 0, 0, 0, 0);
        }
        MonoBehaviourSingleton <PartyManager> .I.SetPartySetting(null);

        if (MonoBehaviourSingleton <LoungeMatchingManager> .I.IsInLounge())
        {
            SetActive((Enum)UI.OBJ_LOCK_LOUNGE, true);
            SetActive((Enum)UI.OBJ_LOCK, false);
        }
        else
        {
            SetActive((Enum)UI.OBJ_LOCK_LOUNGE, false);
            SetActive((Enum)UI.OBJ_LOCK, true);
        }
        base.Initialize();
    }
    private void OnQuery_MATCHING()
    {
        GameSection.SetEventData(new object[1]
        {
            false
        });
        GameSection.StayEvent();
        int retryCount = 0;

        PartyManager.PartySetting setting = new PartyManager.PartySetting(false, 0, 0, 0, 1);
        MonoBehaviourSingleton <PartyManager> .I.SendRandomMatching((int)info.needs[0].questId, retryCount, true, delegate(bool is_success, int maxRetryCount, bool isJoined, float waitTime)
        {
            //IL_0042: Unknown result type (might be due to invalid IL or missing references)
            if (!is_success)
            {
                GameSection.ResumeEvent(false, null);
            }
            else if (maxRetryCount > 0)
            {
                retryCount++;
                this.StartCoroutine(MatchAtRandom(setting, retryCount, waitTime));
            }
            else if (!isJoined)
            {
                OnQuery_AUTO_CREATE_ROOM();
            }
            else
            {
                MonoBehaviourSingleton <PartyManager> .I.SetPartySetting(setting);
                GameSection.ResumeEvent(true, null);
            }
        });
    }
    protected void WaveMatchAuto()
    {
        GameSection.SetEventData(new object[1]
        {
            false
        });
        GameSection.StayEvent();
        int retryCount = 0;

        PartyManager.PartySetting setting = new PartyManager.PartySetting(false, 0, 0, 0, 0);
        MonoBehaviourSingleton <PartyManager> .I.SendRandomMatching((int)info.GetQuestData().questID, retryCount, false, delegate(bool is_success, int maxRetryCount, bool isJoined, float waitTime)
        {
            //IL_0042: Unknown result type (might be due to invalid IL or missing references)
            if (!is_success)
            {
                GameSection.ResumeEvent(false, null);
            }
            else if (maxRetryCount > 0)
            {
                retryCount++;
                this.StartCoroutine(MatchAtRandom(setting, retryCount, waitTime));
            }
            else if (!isJoined)
            {
                WaveMatchCreate();
            }
            else
            {
                MonoBehaviourSingleton <PartyManager> .I.SetPartySetting(setting);
                GameSection.ResumeEvent(true, null);
            }
        });
    }
Ejemplo n.º 5
0
    private static void RandomMatchingQuestField(Action <bool> call_back = null)
    {
        int quest_id = (int)MonoBehaviourSingleton <QuestManager> .I.currentQuestID;

        MonoBehaviourSingleton <PartyManager> .I.SendRandomMatching(quest_id, 0, false, delegate(bool is_success, int maxRetryCount, bool isJoined, float waitTime)
        {
            Logd("Matched:{0}", is_success);
            if (is_success)
            {
                PartyManager.PartySetting setting = new PartyManager.PartySetting(false, 0, 0, 0, 0);
                if (!isJoined)
                {
                    MonoBehaviourSingleton <PartyManager> .I.SendCreate(quest_id, setting, delegate(bool is_success2)
                    {
                        if (is_success2)
                        {
                            MonoBehaviourSingleton <PartyManager> .I.SetPartySetting(setting);
                        }
                        MatchingPartyField(call_back, false);
                    });
                }
                else
                {
                    MonoBehaviourSingleton <PartyManager> .I.SetPartySetting(setting);
                    MatchingPartyField(call_back, false);
                }
            }
            else
            {
                call_back.SafeInvoke(false);
            }
        });
    }
Ejemplo n.º 6
0
 private void CreateRoom()
 {
     GameSection.StayEvent();
     PartyManager.PartySetting setting = new PartyManager.PartySetting(true, 0, 0, 0, 0);
     MonoBehaviourSingleton <PartyManager> .I.SendCreate((int)info.needs[0].questId, setting, delegate(bool is_success)
     {
         if (is_success)
         {
             MonoBehaviourSingleton <PartyManager> .I.SetPartySetting(setting);
         }
         GameSection.ResumeEvent(is_success, null);
     });
 }
    protected void WaveMatchCreate()
    {
        QuestTable.QuestTableData questData = info.GetQuestData();
        MonoBehaviourSingleton <QuestManager> .I.SetCurrentQuestID(questData.questID, true);

        GameSection.SetEventData(new object[1]
        {
            questData.questType
        });
        PartyManager.PartySetting setting = new PartyManager.PartySetting(false, 0, 0, 0, 0);
        MonoBehaviourSingleton <PartyManager> .I.SendCreate((int)questData.questID, setting, delegate(bool is_success)
        {
            if (is_success)
            {
                MonoBehaviourSingleton <PartyManager> .I.SetPartySetting(setting);
            }
            GameSection.ResumeEvent(is_success, null);
        });
    }
Ejemplo n.º 8
0
    private void OnQuery_AUTO_CREATE_ROOM()
    {
        MonoBehaviourSingleton <QuestManager> .I.SetCurrentQuestID(info.GetQuestData().questID, true);

        if (questTableData != null)
        {
            GameSection.SetEventData(new object[1]
            {
                questTableData.questType
            });
        }
        PartyManager.PartySetting setting = new PartyManager.PartySetting(false, 0, 0, 0, 0);
        MonoBehaviourSingleton <PartyManager> .I.SendCreate((int)info.GetQuestData().questID, setting, delegate(bool is_success)
        {
            if (is_success)
            {
                MonoBehaviourSingleton <PartyManager> .I.SetPartySetting(setting);
            }
            GameSection.ResumeEvent(is_success, null);
        });
    }
Ejemplo n.º 9
0
    private void OnQuery_AUTO_MATCH()
    {
        GameSection.StayEvent();
        Action <bool, bool, bool, bool> matching_end_action = delegate(bool is_m, bool is_c, bool is_r, bool is_s)
        {
            //IL_0086: Unknown result type (might be due to invalid IL or missing references)
            if (!is_m)
            {
                QuestResume(false);
            }
            else if (is_s)
            {
                UIModelRenderTexture component = base.GetComponent <UIModelRenderTexture>((Enum)UI.TEX_ENEMY);
                if (component != null && component.enemyAnimCtrl != null)
                {
                    component.enemyAnimCtrl.PlayQuestStartAnim(delegate
                    {
                        //IL_001d: Unknown result type (might be due to invalid IL or missing references)
                        this.StartCoroutine(GoToQuest(delegate
                        {
                            QuestResume(true);
                        }));
                    });
                }
                else
                {
                    this.StartCoroutine(GoToQuest(delegate
                    {
                        QuestResume(true);
                    }));
                }
            }
            else if (!is_c)
            {
                GameSection.ChangeStayEvent("COOP_SERVER_INVALID", null);
                QuestResume(true);
            }
            else
            {
                QuestResume(false);
            }
        };

        if (questInfo.questData.tableData.questType == QUEST_TYPE.ORDER)
        {
            int questID = (int)questInfo.questData.tableData.questID;
            PartyManager.PartySetting party_setting = new PartyManager.PartySetting(false, 0, 0, 0, 0);
            MonoBehaviourSingleton <PartyManager> .I.SendCreate(questID, party_setting, delegate(bool is_success)
            {
                if (is_success)
                {
                    CoopApp.EnterPartyQuest(matching_end_action);
                }
                else
                {
                    QuestResume(false);
                }
            });
        }
        else
        {
            CoopApp.EnterQuest(matching_end_action);
        }
    }