protected void JumpMap()
    {
        if (FieldManager.HasWorldMap(targetMapID))
        {
            FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(targetMapID);

            if (Array.IndexOf(MonoBehaviourSingleton <WorldMapManager> .I.GetOpenRegionIdList(), fieldMapData.regionId) < 0)
            {
                RegionTable.Data data = Singleton <RegionTable> .I.GetData(fieldMapData.regionId);

                GameSection.ChangeEvent("NOT_OPEN", new object[1]
                {
                    data.regionName
                });
                return;
            }
        }
        MonoBehaviourSingleton <WorldMapManager> .I.PushDisplayQuestTarget((int)targetMapID, targetPortalID);

        MonoBehaviourSingleton <WorldMapManager> .I.ignoreTutorial = true;
        bool flag = true;

        if (Singleton <TutorialMessageTable> .IsValid())
        {
            TutorialReadData readData = Singleton <TutorialMessageTable> .I.ReadData;
            flag = readData.HasRead(10003);
        }
        bool flag2 = false;

        DeliveryTable.DeliveryData deliveryTableData = Singleton <DeliveryTable> .I.GetDeliveryTableData((uint)deliveryID);

        if (deliveryTableData != null && deliveryTableData.type == DELIVERY_TYPE.STORY && 10100011 >= deliveryID && !flag)
        {
            flag2 = true;
            if (Singleton <TutorialMessageTable> .IsValid())
            {
                TutorialReadData readData2 = Singleton <TutorialMessageTable> .I.ReadData;
                readData2.SetReadId(10003, true);
                readData2.Save();
            }
        }
        if (flag2)
        {
            RequestEvent("DIRECT_REGION_TUTORIAL", null);
        }
        else
        {
            RequestEvent("DIRECT_REGION_QUEST", null);
        }
    }
Esempio n. 2
0
    public TutorialMessageData GetEnableExecTutorial(string section_name, bool is_force, bool is_new_section, string event_name = null)
    {
        TutorialReadData           save_data = Singleton <TutorialMessageTable> .I.ReadData;
        List <TutorialMessageData> list      = new List <TutorialMessageData>();

        tutorialSectionMessages.ForEach(delegate(TutorialMessageData o)
        {
            if (!(o.sectionName != section_name))
            {
                if (!TutorialStep.HasAllTutorialCompleted() && o.completedTutorialStep != -1)
                {
                    if (o.completedTutorialStep == 0 || (MonoBehaviourSingleton <UserInfoManager> .IsValid() && MonoBehaviourSingleton <UserInfoManager> .I.userStatus.tutorialStep >= o.completedTutorialStep) || (o.sceneName == "StatusScene" && o.sectionName == "StatusTop" && o.messageId == 1 && TutorialStep.isChangeLocalEquip))
                    {
                        return;
                    }
                }
                else if ((o.completedTutorialStep != 0 && o.completedTutorialStep != -1) || (!is_force && !o.GetFinishTutorialBit().HasValue&& o.completedTutorialStep >= 0 && save_data.HasRead(o.tutorialId)) || (o.appearId > 0 && !save_data.HasRead(o.appearId)) || (o.appearId < 0 && save_data.LastRead() != -o.appearId))
                {
                    return;
                }
                if (o.GetFinishTutorialBit().HasValue)
                {
                    TUTORIAL_MENU_BIT value = o.GetFinishTutorialBit().Value;
                    if (MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(value))
                    {
                        return;
                    }
                }
                if (o.GetAppearTutorialBit().HasValue)
                {
                    TUTORIAL_MENU_BIT value2 = o.GetAppearTutorialBit().Value;
                    if (!MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(value2))
                    {
                        return;
                    }
                }
                if ((o.appearDeliveryId == 0 || (MonoBehaviourSingleton <DeliveryManager> .IsValid() && MonoBehaviourSingleton <DeliveryManager> .I.IsClearDelivery((uint)o.appearDeliveryId))) && (!o.isNewSectionOnly || is_new_section))
                {
                    if (!string.IsNullOrEmpty(event_name))
                    {
                        if (o.triggerEventName != event_name)
                        {
                            return;
                        }
                    }
                    else if (!string.IsNullOrEmpty(o.triggerEventName))
                    {
                        return;
                    }
                    if ((!(o.sectionName == "WorldMap") && !(o.sectionName == "RegionMap")) || !string.IsNullOrEmpty(event_name) || !MonoBehaviourSingleton <WorldMapManager> .IsValid() || (!MonoBehaviourSingleton <WorldMapManager> .I.isDisplayQuestTargetMode() && !MonoBehaviourSingleton <WorldMapManager> .I.ignoreTutorial))
                    {
                        if (o.sectionName == "EquipSetDetailAttachSkillDialog" && !string.IsNullOrEmpty(o.checkKeyword))
                        {
                            uint target_id = uint.Parse(o.checkKeyword);
                            bool find_non_equip_attack_skill = false;
                            MonoBehaviourSingleton <InventoryManager> .I.ForAllSkillItemInventory(delegate(SkillItemInfo data)
                            {
                                if (!find_non_equip_attack_skill && data != null && data.tableData.type == SKILL_SLOT_TYPE.ATTACK && !data.isAttached && target_id != data.tableID)
                                {
                                    find_non_equip_attack_skill = true;
                                }
                            });
                            if (!find_non_equip_attack_skill)
                            {
                                return;
                            }
                            bool is_equip_first_slot = false;
                            if (MonoBehaviourSingleton <StatusManager> .I.GetLocalEquipSet() == null)
                            {
                                MonoBehaviourSingleton <StatusManager> .I.CreateLocalEquipSetData();
                            }
                            int eSetNo = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.eSetNo;
                            EquipItemInfo main_weapon = MonoBehaviourSingleton <StatusManager> .I.GetLocalEquipSet()[eSetNo].item[0];
                            if (main_weapon != null)
                            {
                                MonoBehaviourSingleton <InventoryManager> .I.ForAllSkillItemInventory(delegate(SkillItemInfo data)
                                {
                                    if (!is_equip_first_slot && data != null)
                                    {
                                        EquipSetSkillData equipSetSkillData = data.equipSetSkill.Find((EquipSetSkillData x) => x.equipSetNo == MonoBehaviourSingleton <StatusManager> .I.GetCurrentEquipSetNo());
                                        if (equipSetSkillData != null && equipSetSkillData.equipItemUniqId == main_weapon.uniqueID && equipSetSkillData.equipSlotNo == 0)
                                        {
                                            is_equip_first_slot = true;
                                        }
                                    }
                                });
                            }
                            if (!is_equip_first_slot)
                            {
                                int index = o.messageData.Count - 1;
                                o.messageData[index].waitEventName = o.messageData[index].waitEventName.Replace("_DETAIL", string.Empty);
                                Debug.LogWarning((object)("replace : " + o.messageData[index].waitEventName));
                            }
                        }
                        list.Add(o);
                    }
                }
            }
        });
        if (list.Count == 0)
        {
            return(null);
        }
        list.Sort((TutorialMessageData l, TutorialMessageData r) => l.messageId - r.messageId);
        return(list[0]);
    }