public void DoRestart()
    {
        if (MonoBehaviourSingleton <InGameProgress> .IsValid() && MonoBehaviourSingleton <QuestManager> .IsValid() && MonoBehaviourSingleton <FieldManager> .IsValid() && MonoBehaviourSingleton <StageObjectManager> .IsValid())
        {
            int exploreStartMapId = MonoBehaviourSingleton <QuestManager> .I.GetExploreStartMapId();

            FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData((uint)exploreStartMapId);

            if (fieldMapData == null || fieldMapData.jumpPortalID == 0)
            {
                Log.Error("RegionMap.OnQuery_SELECT() jumpPortalID is not found.");
            }
            else
            {
                MonoBehaviourSingleton <StageObjectManager> .I.self.RestartExplore();

                if (MonoBehaviourSingleton <QuestManager> .I.IsExploreBossMap() && MonoBehaviourSingleton <CoopManager> .I.isStageHost)
                {
                    Enemy boss = MonoBehaviourSingleton <StageObjectManager> .I.boss;
                    MonoBehaviourSingleton <QuestManager> .I.UpdateExploreBossStatus(boss);

                    MonoBehaviourSingleton <CoopManager> .I.coopRoom.packetSender.SendSyncExploreBoss(MonoBehaviourSingleton <QuestManager> .I.GetExploreStatus(), -1);
                }
                MonoBehaviourSingleton <InGameProgress> .I.PortalNext(fieldMapData.jumpPortalID);

                MonoBehaviourSingleton <FieldManager> .I.useFastTravel = true;
            }
        }
    }
    public bool IsValidHappenQuest(uint questId)
    {
        if (questToItemTable == null)
        {
            return(false);
        }
        UIntKeyTable <QuestToFieldData> uIntKeyTable = questToItemTable.Get(questId);

        if (uIntKeyTable == null)
        {
            return(false);
        }
        Version applicationVersion = NetworkNative.getNativeVersionFromName();
        int     field_count        = 0;

        uIntKeyTable.ForEach(delegate(QuestToFieldData data)
        {
            if (data.mapId != 0 && (data.eventId == 0 || MonoBehaviourSingleton <QuestManager> .I.IsEventPlayableWith((int)data.eventId, applicationVersion)))
            {
                FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(data.mapId);
                if (fieldMapData != null && (!fieldMapData.IsEventData || MonoBehaviourSingleton <QuestManager> .I.IsEventPlayableWith(fieldMapData.eventId, applicationVersion)))
                {
                    field_count++;
                }
            }
        });
        return(field_count > 0);
    }
    public FieldMapTable.FieldMapTableData[] GetFieldMapTableFromQuestId(uint questId, bool hasIncludelockedField = false)
    {
        if (questToItemTable == null)
        {
            return(null);
        }
        UIntKeyTable <QuestToFieldData> uIntKeyTable = questToItemTable.Get(questId);

        if (uIntKeyTable == null)
        {
            return(null);
        }
        List <FieldMapTable.FieldMapTableData> list = new List <FieldMapTable.FieldMapTableData>();

        uIntKeyTable.ForEach(delegate(QuestToFieldData data)
        {
            if (data.mapId != 0)
            {
                FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(data.mapId);
                if (fieldMapData != null && (fieldMapData.IsEventData || hasIncludelockedField || Singleton <ItemToFieldTable> .I.IsOpenMap(fieldMapData)))
                {
                    list.Add(fieldMapData);
                }
            }
        });
        if (list.Count <= 0)
        {
            return(null);
        }
        return(list.ToArray());
    }
    private void JoinField(int fieldMapId)
    {
        if (MonoBehaviourSingleton <InGameProgress> .IsValid())
        {
            if (fieldMapId == MonoBehaviourSingleton <FieldManager> .I.currentMapID)
            {
                GameSection.StopEvent();
            }
            else
            {
                FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData((uint)fieldMapId);

                if (fieldMapData == null || fieldMapData.jumpPortalID == 0)
                {
                    Log.Error("RegionMap.OnQuery_SELECT() jumpPortalID is not found.");
                }
                else if (!MonoBehaviourSingleton <GameSceneManager> .I.CheckPortalAndOpenUpdateAppDialog(fieldMapData.jumpPortalID, false, true))
                {
                    GameSection.StopEvent();
                }
                else if (!MonoBehaviourSingleton <FieldManager> .I.CanJumpToMap(fieldMapData))
                {
                    DispatchEvent("CANT_JUMP", null);
                }
                else
                {
                    MonoBehaviourSingleton <InGameProgress> .I.PortalNext(fieldMapData.jumpPortalID);

                    MonoBehaviourSingleton <FieldManager> .I.useFastTravel = true;
                }
            }
        }
    }
Ejemplo n.º 5
0
    public static bool IsOpenPortalClearOrder(FieldMapTable.PortalTableData portal)
    {
        if (portal.appearQuestId != 0 && !MonoBehaviourSingleton <QuestManager> .I.IsClearQuest(portal.appearQuestId))
        {
            return(false);
        }
        if (portal.appearDeliveryId != 0 && !MonoBehaviourSingleton <DeliveryManager> .I.IsClearDelivery(portal.appearDeliveryId))
        {
            return(false);
        }
        if (portal.appearRegionId != 0)
        {
            FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portal.dstMapID);

            if (fieldMapData == null)
            {
                return(false);
            }
            if (!MonoBehaviourSingleton <WorldMapManager> .I.releasedRegionIds.Contains((int)fieldMapData.regionId))
            {
                return(false);
            }
        }
        else if (portal.travelMapId != 0 && !MonoBehaviourSingleton <WorldMapManager> .I.IsTraveledMap((int)portal.travelMapId))
        {
            return(false);
        }
        return(true);
    }
    private static bool IsDifferentRegion(uint portalID)
    {
        if (!Singleton <FieldMapTable> .IsValid())
        {
            return(false);
        }
        FieldMapTable.PortalTableData portalData = Singleton <FieldMapTable> .I.GetPortalData(portalID);

        if (portalData == null)
        {
            return(false);
        }
        FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portalData.srcMapID);

        FieldMapTable.FieldMapTableData fieldMapData2 = Singleton <FieldMapTable> .I.GetFieldMapData(portalData.dstMapID);

        if (fieldMapData == null || fieldMapData2 == null)
        {
            return(false);
        }
        if (fieldMapData.regionId == fieldMapData2.regionId)
        {
            return(false);
        }
        return(true);
    }
    private void ToExplore()
    {
        //IL_0026: Unknown result type (might be due to invalid IL or missing references)
        //IL_0033: Expected O, but got Unknown
        //IL_005b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0068: Expected O, but got Unknown
        //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
        //IL_00c0: Expected O, but got Unknown
        FieldMapTable.PortalTableData portalData = Singleton <FieldMapTable> .I.GetPortalData(MonoBehaviourSingleton <InGameManager> .I.beforePortalID);

        if (portalData == null)
        {
            MonoBehaviourSingleton <GameSceneManager> .I.ExecuteSceneEvent("InGameProgress", this.get_gameObject(), "INGAME_MAIN", null, null, true);
        }
        else
        {
            FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portalData.dstMapID);

            if (fieldMapData == null)
            {
                MonoBehaviourSingleton <GameSceneManager> .I.ExecuteSceneEvent("InGameProgress", this.get_gameObject(), "INGAME_MAIN", null, null, true);
            }
            else
            {
                ExploreMapOpenNewField.EventData eventData = new ExploreMapOpenNewField.EventData();
                eventData.regionId = fieldMapData.regionId;
                eventData.portalId = MonoBehaviourSingleton <InGameManager> .I.beforePortalID;
                eventData.fromBoss = fromBossExplore;
                eventData.toBoss   = isEncounterBoss;
                MonoBehaviourSingleton <GameSceneManager> .I.ExecuteSceneEvent("InGameProgress", this.get_gameObject(), "NEW_EXPLORE", eventData, null, true);
            }
        }
    }
Ejemplo n.º 8
0
 public ItemDetailToFieldPointData(FieldMapTable.FieldMapTableData map, uint point, FieldMapTable.GatherPointTableData point_table, FieldMapTable.GatherPointViewTableData point_view_table)
 {
     mapData        = map;
     pointID        = point;
     pointTable     = point_table;
     pointViewTable = point_view_table;
 }
Ejemplo n.º 9
0
 private bool _IsOpenMap(FieldMapTable.FieldMapTableData field_table, out FIELD_AVAILABLE_CHOICES available_choices)
 {
     if (field_table.IsEventData)
     {
         List <Network.EventData> list = new List <Network.EventData>(MonoBehaviourSingleton <QuestManager> .I.eventList);
         list.RemoveAll((Network.EventData e) => e.HasEndDate() && e.GetRest() < 0);
         if (list.Find((Network.EventData e) => e.eventId == field_table.eventId) != null)
         {
             available_choices = FIELD_AVAILABLE_CHOICES.AVAILABLE;
             return(true);
         }
         available_choices = FIELD_AVAILABLE_CHOICES.NOT_TRAVELED;
         return(false);
     }
     if (field_table.grade > MonoBehaviourSingleton <UserInfoManager> .I.userStatus.fieldGrade)
     {
         available_choices = FIELD_AVAILABLE_CHOICES.TOO_BIG_GRADE;
         return(false);
     }
     if (!MonoBehaviourSingleton <WorldMapManager> .I.IsTraveledMap((int)field_table.mapID))
     {
         available_choices = FIELD_AVAILABLE_CHOICES.NOT_TRAVELED;
         return(false);
     }
     available_choices = FIELD_AVAILABLE_CHOICES.AVAILABLE;
     return(true);
 }
Ejemplo n.º 10
0
    private IEnumerator InitPortalStatusImpl(Action onComplete)
    {
        LoadingQueue loadQueue = new LoadingQueue(this);
        UIntKeyTable <LoadObject> loadTextures = new UIntKeyTable <LoadObject>();

        for (int k = 0; k < locations.Length; k++)
        {
            FieldMapTable.FieldMapTableData tableData = locations[k].tableData;
            if (tableData != null && tableData.hasChildRegion && loadTextures.Get(tableData.iconId) == null)
            {
                loadTextures.Add(tableData.iconId, loadQueue.Load(RESOURCE_CATEGORY.DUNGEON_ICON, ResourceName.GetDungeonIcon(tableData.iconId), false));
            }
        }
        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        for (int j = 0; j < locations.Length; j++)
        {
            FieldMapTable.FieldMapTableData tableData2 = locations[j].tableData;
            if (tableData2 != null && tableData2.hasChildRegion)
            {
                locations[j].icon = (loadTextures.Get(tableData2.iconId).loadedObject as Texture2D);
            }
        }
        for (int i = 0; i < portals.Length; i++)
        {
            RegionMapPortal portal = portals[i];
            if (portal.IsVisited())
            {
                portal.Open();
            }
        }
        onComplete?.Invoke();
    }
Ejemplo n.º 11
0
    public CandidateField[] GetCandidateField(uint item_id, int trim_count = -1, bool isExcludeNotPlayable = false)
    {
        List <CandidateField>          ret          = new List <CandidateField>();
        List <string>                  enemy_names  = new List <string>();
        UIntKeyTable <ItemToFieldData> uIntKeyTable = itemToFieldTable.Get(item_id);

        if (uIntKeyTable == null)
        {
            return(null);
        }
        uIntKeyTable.ForEach(delegate(ItemToFieldData data)
        {
            FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(data.fieldId);
            if (data.enemyId != null)
            {
                uint[] enemyId = data.enemyId;
                foreach (uint num in enemyId)
                {
                    EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData(num);
                    if (enemyData != null && (!isExcludeNotPlayable || IsPlayableField(fieldMapData)) && !enemy_names.Contains(enemyData.name))
                    {
                        ret.Add(new CandidateField
                        {
                            enemyId = num,
                            mapData = fieldMapData
                        });
                        enemy_names.Add(enemyData.name);
                    }
                }
            }
        });
        return(ret.ToArray());
    }
Ejemplo n.º 12
0
 public static bool IsQuestMap(FieldMapTable.FieldMapTableData map)
 {
     if (map != null)
     {
         return(map.mapID / 10000000u == 3);
     }
     return(false);
 }
Ejemplo n.º 13
0
 public static bool IsInWorldMap(FieldMapTable.FieldMapTableData map)
 {
     if (map != null)
     {
         return(!IsEventMap(map) && !IsQuestMap(map));
     }
     return(false);
 }
    private void SetPlayingStatus(Transform root, int userId)
    {
        SetActive(root, UI.OBJ_LOUNGE, false);
        SetActive(root, UI.OBJ_FIELD, false);
        SetActive(root, UI.OBJ_QUEST, false);
        if (MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeMemberStatus != null)
        {
            LoungeMemberStatus loungeMemberStatus = MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeMemberStatus[userId];
            if (loungeMemberStatus != null)
            {
                switch (loungeMemberStatus.GetStatus())
                {
                case LoungeMemberStatus.MEMBER_STATUS.LOUNGE:
                    SetActive(root, UI.OBJ_LOUNGE, true);
                    break;

                case LoungeMemberStatus.MEMBER_STATUS.QUEST:
                    SetQuestInfo(root, loungeMemberStatus.questId);
                    SetActive(root, UI.BTN_JOIN, !CheckRush(loungeMemberStatus.questId));
                    SetActive(root, UI.LBL_PLAYING_QUEST, true);
                    SetActive(root, UI.LBL_PLAYING_READY, false);
                    break;

                case LoungeMemberStatus.MEMBER_STATUS.QUEST_READY:
                    SetQuestInfo(root, loungeMemberStatus.questId);
                    SetActive(root, UI.LBL_PLAYING_QUEST, false);
                    SetActive(root, UI.LBL_PLAYING_READY, true);
                    break;

                case LoungeMemberStatus.MEMBER_STATUS.FIELD:
                {
                    SetActive(root, UI.OBJ_FIELD, true);
                    FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData((uint)loungeMemberStatus.fieldMapId);

                    if (fieldMapData == null)
                    {
                        SetLabelText(root, UI.LBL_AREA_NAME, string.Empty);
                    }
                    else
                    {
                        RegionTable.Data data = Singleton <RegionTable> .I.GetData(fieldMapData.regionId);

                        if (data == null)
                        {
                            SetLabelText(root, UI.LBL_AREA_NAME, fieldMapData.mapName);
                        }
                        else
                        {
                            SetLabelText(root, UI.LBL_AREA_NAME, data.regionName + " - " + fieldMapData.mapName);
                        }
                    }
                    break;
                }
                }
            }
        }
    }
Ejemplo n.º 15
0
    private void Update()
    {
        //IL_0088: Unknown result type (might be due to invalid IL or missing references)
        //IL_008e: Unknown result type (might be due to invalid IL or missing references)
        if (MonoBehaviourSingleton <StageObjectManager> .IsValid() && MonoBehaviourSingleton <InGameProgress> .IsValid())
        {
            Self self = MonoBehaviourSingleton <StageObjectManager> .I.self;
            if (!(self == null))
            {
                portalReq = null;
                int i = 0;
                for (int count = MonoBehaviourSingleton <InGameProgress> .I.portalObjectList.Count; i < count; i++)
                {
                    PortalObject portalObject = MonoBehaviourSingleton <InGameProgress> .I.portalObjectList[i];
                    if (portalObject.isFull && portalObject.portalData.dstMapID != 0 && Vector3.Distance(portalObject._transform.get_position(), self._position) < 10f)
                    {
                        portalReq = portalObject;
                        break;
                    }
                }
                if (!(portal == portalReq) && !noticeTween.get_isActiveAndEnabled())
                {
                    if (noticeTween.value == 0f)
                    {
                        if (portalReq != null)
                        {
                            if (string.IsNullOrEmpty(portalReq.portalData.placeText))
                            {
                                FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portalReq.portalData.dstMapID);

                                if (fieldMapData == null)
                                {
                                    return;
                                }
                                nameLabel.text = fieldMapData.mapName;
                            }
                            else
                            {
                                nameLabel.text = portalReq.portalData.placeText;
                            }
                            noticeObject.SetActive(true);
                            noticeTween.PlayForward();
                        }
                        else
                        {
                            noticeObject.SetActive(false);
                        }
                        portal = portalReq;
                    }
                    else
                    {
                        noticeTween.PlayReverse();
                    }
                }
            }
        }
    }
Ejemplo n.º 16
0
    public bool CanJumpToMap(uint mapId)
    {
        FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(mapId);

        if (fieldMapData == null)
        {
            return(false);
        }
        return(CanJumpToMap(fieldMapData));
    }
Ejemplo n.º 17
0
    private void CreateVisitedLocationSpot()
    {
        OutGameSettingsManager.QuestMap questMap = MonoBehaviourSingleton <OutGameSettingsManager> .I.questMap;
        MonoBehaviourSingleton <FilterManager> .I.StopBlur(questMap.cameraMoveTime, 0f);

        for (int i = 0; i < regionMapRoot.locations.Length; i++)
        {
            RegionMapLocation regionMapLocation          = regionMapRoot.locations[i];
            FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData((uint)regionMapLocation.mapId);

            if ((fieldMapData != null || regionMapLocation.mapId == 0) && (fieldMapData == null || FieldManager.IsShowPortal(fieldMapData.jumpPortalID)))
            {
                if (fieldMapData != null && !MonoBehaviourSingleton <FieldManager> .I.CanJumpToMap(fieldMapData))
                {
                    CreateLocationSpot(regionMapLocation, SpotManager.ICON_TYPE.NOT_OPENED, false);
                }
                else if (regionMapLocation.mapId == newMapData.mapID && !eventData.IsOnlyCameraMoveEvent() && !eventData.IsEnterDungeon() && !eventData.IsQuestToField())
                {
                    CreateLocationSpot(regionMapLocation, SpotManager.ICON_TYPE.NOT_OPENED, false);
                }
                else
                {
                    SpotManager.ICON_TYPE iCON_TYPE = SpotManager.ICON_TYPE.CLEARED;
                    if (regionMapLocation.portal.Length > 0)
                    {
                        for (int j = 0; j < regionMapLocation.portal.Length; j++)
                        {
                            RegionMapPortal regionMapPortal = regionMapLocation.portal[j];
                            if (!regionMapPortal.IsVisited() && regionMapPortal.IsShow())
                            {
                                iCON_TYPE = SpotManager.ICON_TYPE.NEW;
                                break;
                            }
                        }
                    }
                    if (fieldMapData != null)
                    {
                        if (FieldManager.IsToHardPortal(fieldMapData.jumpPortalID))
                        {
                            iCON_TYPE = SpotManager.ICON_TYPE.HARD;
                            if (iCON_TYPE == SpotManager.ICON_TYPE.NEW)
                            {
                                iCON_TYPE = SpotManager.ICON_TYPE.HARD_NEW;
                            }
                        }
                        if (fieldMapData.hasChildRegion && fieldMapData.childRegionId != regionId)
                        {
                            iCON_TYPE = SpotManager.ICON_TYPE.CHILD_REGION;
                        }
                    }
                    CreateLocationSpot(regionMapLocation, iCON_TYPE, false);
                }
            }
        }
    }
Ejemplo n.º 18
0
    public void OnGetPortalPoint(int add_point)
    {
        //IL_0011: Unknown result type (might be due to invalid IL or missing references)
        //IL_001c: Unknown result type (might be due to invalid IL or missing references)
        EffectManager.OneShot(parameter.pointGetEffectName, _transform.get_position(), _transform.get_rotation(), false);
        nowPoint += add_point;
        if (nowPoint >= maxPoint)
        {
            if (!portalInfo.IsFull())
            {
                Log.Warning(LOG.INGAME, "PortalObject.OnGetPortalPoint() Portal is not full. id : {0}", portalID);
            }
            isFull = true;
            CreateView();
            string text = string.Empty;
            FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portalData.dstMapID);

            if (fieldMapData != null)
            {
                text = fieldMapData.mapName;
            }
            if (MonoBehaviourSingleton <FieldManager> .I.isTutorialField)
            {
                string text2 = StringTable.Format(STRING_CATEGORY.IN_GAME, 6001u, text);
                UIInGamePopupDialog.PushOpen(text2, false, 1.4f);
            }
            else if (QuestManager.IsValidInGameExplore())
            {
                string text3 = StringTable.Format(STRING_CATEGORY.IN_GAME, 6002u, text);
                UIInGamePopupDialog.PushOpen(text3, false, 1.4f);
            }
            else
            {
                int num = parameter.clearCrystalNum;
                if (isToHardMap)
                {
                    num = parameter.clearHardCrystalNum;
                }
                string text4 = StringTable.Format(STRING_CATEGORY.IN_GAME, 6000u, text, num);
                UIInGamePopupDialog.PushOpen(text4, false, 1.8f);
            }
            SoundManager.PlayOneShotUISE(40000069);
            SoundManager.PlayOneshotJingle(40000071, null, null);
        }
        else
        {
            UpdateView();
            SoundManager.PlayOneShotUISE(40000068);
        }
        if (uiGizmo != null)
        {
            uiGizmo.OnGetPortalPoint();
        }
    }
Ejemplo n.º 19
0
    public static bool HasWorldMap(FieldMapTable.FieldMapTableData map)
    {
        if (map != null && Singleton <RegionTable> .IsValid())
        {
            RegionTable.Data[] data = Singleton <RegionTable> .I.GetData();

            RegionTable.Data data2 = Array.Find(data, (RegionTable.Data o) => o.regionId == map.regionId);
            return(null != data2);
        }
        return(false);
    }
    protected IEnumerator StartPredownload()
    {
        List <ResourceInfo> list = new List <ResourceInfo>();
        uint mapId = questData.mapId;

        FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(mapId);

        if (fieldMapData != null)
        {
            string stageName = fieldMapData.stageName;
            if (string.IsNullOrEmpty(stageName))
            {
                stageName = "ST011D_01";
            }
            StageTable.StageData stageData = Singleton <StageTable> .I.GetData(stageName);

            if (stageData != null)
            {
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.STAGE_SCENE, stageData.scene));
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.STAGE_SKY, stageData.sky));
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.cameraLinkEffect));
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.cameraLinkEffectY0));
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.rootEffect));
                for (int i = 0; i < 8; i++)
                {
                    list.Add(new ResourceInfo(RESOURCE_CATEGORY.EFFECT_ACTION, stageData.useEffects[i]));
                }
                EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.enemyID[0]);

                int    bodyId   = enemyData.modelId;
                string bodyName = ResourceName.GetEnemyBody(bodyId);
                string mateName = ResourceName.GetEnemyMaterial(bodyId);
                string animName = ResourceName.GetEnemyAnim(enemyData.animId);
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.ENEMY_MODEL, bodyName));
                if (!string.IsNullOrEmpty(mateName))
                {
                    list.Add(new ResourceInfo(RESOURCE_CATEGORY.ENEMY_MATERIAL, bodyName));
                }
                list.Add(new ResourceInfo(RESOURCE_CATEGORY.ENEMY_ANIM, animName));
                LoadingQueue load_queue = new LoadingQueue(this);
                foreach (ResourceInfo item in list)
                {
                    if (!string.IsNullOrEmpty(item.packageName))
                    {
                        ResourceManager.downloadOnly = true;
                        load_queue.Load(item.category, item.packageName, null, false);
                        ResourceManager.downloadOnly = false;
                        yield return((object)load_queue.Wait());
                    }
                }
            }
        }
    }
Ejemplo n.º 21
0
 private bool IsPlayableField(FieldMapTable.FieldMapTableData field_table)
 {
     if (!field_table.IsEventData)
     {
         return(true);
     }
     if (MonoBehaviourSingleton <QuestManager> .I.IsPlayableVersionEvent(field_table.eventId))
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 22
0
    public static bool IsToHardPortal(FieldMapTable.PortalTableData portal)
    {
        if (portal.dstMapID != 0)
        {
            FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portal.dstMapID);

            if (fieldMapData != null)
            {
                return(fieldMapData.fieldMode == DIFFICULTY_MODE.HARD);
            }
        }
        return(false);
    }
Ejemplo n.º 23
0
    private GameObject CreateLocationSpot(RegionMapLocation location, SpotManager.ICON_TYPE icon = SpotManager.ICON_TYPE.CLEARED, bool isNew = false)
    {
        //IL_0044: Unknown result type (might be due to invalid IL or missing references)
        //IL_0049: Unknown result type (might be due to invalid IL or missing references)
        //IL_0062: Unknown result type (might be due to invalid IL or missing references)
        //IL_0067: Expected O, but got Unknown
        //IL_01bc: Unknown result type (might be due to invalid IL or missing references)
        //IL_01c1: Unknown result type (might be due to invalid IL or missing references)
        //IL_01e9: Unknown result type (might be due to invalid IL or missing references)
        //IL_01ee: Expected O, but got Unknown
        if (location.mapId == 0)
        {
            return(spots.AddSpot(0, MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSectionTextList().Find((GameSceneTables.TextData textData) => textData.key == "STR_HOME").text, location.get_transform().get_position(), SpotManager.ICON_TYPE.HOME, null, false, false, false, null, null, false, SpotManager.HAPPEN_CONDITION.NONE, 0)._transform.get_gameObject());
        }
        FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData((uint)location.mapId);

        if (fieldMapData == null)
        {
            return(null);
        }
        bool canUnlockNewPortal = false;

        if (location.portal.Length > 0 && icon != SpotManager.ICON_TYPE.NOT_OPENED)
        {
            for (int i = 0; i < location.portal.Length; i++)
            {
                string s = location.get_name().Replace("location", string.Empty);
                int.TryParse(s, out int result);
                int[] locationNumbers = GetLocationNumbers(location.portal[i].get_name());
                if (result == locationNumbers[0] && GameSaveData.instance.isNewReleasePortal((uint)location.portal[i].entranceId))
                {
                    if (!location.portal[i].IsVisited())
                    {
                        canUnlockNewPortal = true;
                        break;
                    }
                    GameSaveData.instance.newReleasePortals.Remove((uint)location.portal[i].entranceId);
                }
                if (result == locationNumbers[1] && GameSaveData.instance.isNewReleasePortal((uint)location.portal[i].exitId))
                {
                    if (!location.portal[i].IsVisited())
                    {
                        canUnlockNewPortal = true;
                        break;
                    }
                    GameSaveData.instance.newReleasePortals.Remove((uint)location.portal[i].exitId);
                }
            }
        }
        return(spots.AddSpot((int)fieldMapData.mapID, fieldMapData.mapName, location.get_transform().get_position(), icon, null, isNew, canUnlockNewPortal, false, fieldMapData.mapID, location.icon, false, SpotManager.HAPPEN_CONDITION.NONE, 0)._transform.get_gameObject());
    }
    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);
        }
    }
Ejemplo n.º 25
0
    private void JoinField(int fieldMapId)
    {
        if (fieldMapId == MonoBehaviourSingleton <FieldManager> .I.currentMapID)
        {
            GameSection.StopEvent();
        }
        else
        {
            FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData((uint)fieldMapId);

            if (fieldMapData == null || fieldMapData.jumpPortalID == 0)
            {
                Log.Error("RegionMap.OnQuery_SELECT() jumpPortalID is not found.");
            }
            else if (!MonoBehaviourSingleton <GameSceneManager> .I.CheckPortalAndOpenUpdateAppDialog(fieldMapData.jumpPortalID, false, true))
            {
                GameSection.StopEvent();
            }
            else if (!MonoBehaviourSingleton <FieldManager> .I.CanJumpToMap(fieldMapData))
            {
                DispatchEvent("CANT_JUMP", null);
            }
            else
            {
                GameSection.StayEvent();
                CoopApp.EnterField(fieldMapData.jumpPortalID, 0u, delegate(bool is_matching, bool is_connect, bool is_regist)
                {
                    if (!is_connect)
                    {
                        GameSection.ChangeStayEvent("COOP_SERVER_INVALID", null);
                        GameSection.ResumeEvent(true, null);
                        AppMain i     = MonoBehaviourSingleton <AppMain> .I;
                        i.onDelayCall = (Action)Delegate.Combine(i.onDelayCall, (Action) delegate
                        {
                            DispatchEvent("CLOSE", null);
                        });
                    }
                    else
                    {
                        GameSection.ResumeEvent(is_regist, null);
                        if (is_regist)
                        {
                            MonoBehaviourSingleton <GameSceneManager> .I.ChangeScene("InGame", null, UITransition.TYPE.CLOSE, UITransition.TYPE.OPEN, false);
                        }
                    }
                });
            }
        }
    }
Ejemplo n.º 26
0
    private void Start()
    {
        //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
        //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
        //IL_0122: Unknown result type (might be due to invalid IL or missing references)
        //IL_0127: Unknown result type (might be due to invalid IL or missing references)
        //IL_0143: Unknown result type (might be due to invalid IL or missing references)
        if (!(null == nameLabelU) && !(null == nameLabelD) && !(null == labelRoot) && !(null == tweenCtrl) && !(null == bgLight) && !(null == bgBlack) && !(null == bgLine) && !(null == tweenTop))
        {
            FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(MonoBehaviourSingleton <FieldManager> .I.currentMapID);

            if (fieldMapData == null)
            {
                this.get_gameObject().SetActive(false);
            }
            else if (string.Compare(fieldMapData.stageName, 0, "FI", 0, 2) != 0)
            {
                this.get_gameObject().SetActive(false);
            }
            else if (QuestManager.IsValidInGameWaveMatch())
            {
                this.get_gameObject().SetActive(false);
            }
            else
            {
                nameLabelU.text = fieldMapData.mapName;
                nameLabelD.text = fieldMapData.mapName;
                float   num           = (float)nameLabelU.width;
                Vector3 localPosition = labelRoot.get_localPosition();
                localPosition.x += num * 0.5f;
                labelRoot.set_localPosition(localPosition);
                float num2 = num - 120f;
                float num3 = (float)bgLight.width + num2;
                bgLight.width        = (int)num3;
                num3                 = (float)bgBlack.width + num2;
                bgBlack.width        = (int)num3;
                bgLineWidthMax       = (float)bgLine.width + num2;
                bgLineWidth          = 0f;
                bgLine.width         = (int)bgLineWidth;
                bgLineWidthStep      = bgLineWidthMax / 12f;
                nameLabelU.fontStyle = 2;
                nameLabelD.fontStyle = 2;
                phase                = Phase.StartWait;
                waitSeconds          = 0.8f;
                initialized          = true;
            }
        }
    }
Ejemplo n.º 27
0
    public static void LoadFieldIconTexture(UITexture ui_tex, FieldMapTable.FieldMapTableData fieldData)
    {
        string empty = string.Empty;

        LoadIconTexture(name: (!fieldData.IsExistQuestIconId()) ? ResourceName.GetQuestIcon(fieldData.stageName) : ResourceName.GetQuestIcon((int)fieldData.questIconId), mono_behaviour: ui_tex, category: RESOURCE_CATEGORY.QUEST_ICON, load_start_callback: delegate
        {
            ui_tex.mainTexture = null;
        }, loaded_callback : delegate(Texture tex)
        {
            if (ui_tex != null)
            {
                ui_tex.mainTexture = tex;
            }
        });
    }
Ejemplo n.º 28
0
    private string GetHappenStageName()
    {
        FieldTransitionInfo backTransitionInfo = MonoBehaviourSingleton <InGameManager> .I.backTransitionInfo;

        if (backTransitionInfo == null)
        {
            return(string.Empty);
        }
        FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(backTransitionInfo.mapID);

        if (fieldMapData == null)
        {
            return(string.Empty);
        }
        return(fieldMapData.happenStageName);
    }
 public void InitDependencyData()
 {
     if (Singleton <FieldMapTable> .IsValid())
     {
         questToItemTable.ForEach(delegate(UIntKeyTable <QuestToFieldData> x)
         {
             x.ForEach(delegate(QuestToFieldData data)
             {
                 FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(data.mapId);
                 if (fieldMapData != null)
                 {
                     data.grade = fieldMapData.grade;
                 }
             });
         });
     }
 }
    protected void JumpQuest()
    {
        if (!TutorialStep.HasFirstDeliveryCompleted())
        {
            GameSection.StopEvent();
            DispatchEvent("TUTORIAL_TO_FIELD", null);
        }
        else
        {
            PlayAudio(AUDIO.GO_TO_FIELD, 1f, false);
            if (isQuestEnemy)
            {
                if (!isInGameScene)
                {
                    EventData[] autoEvents = new EventData[3]
                    {
                        new EventData("[BACK]", null),
                        new EventData("TAB_QUEST", (uint)deliveryID),
                        new EventData("SELECT_QUEST", targetQuestID)
                    };
                    MonoBehaviourSingleton <GameSceneManager> .I.SetAutoEvents(autoEvents);
                }
            }
            else
            {
                FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(targetMapID);

                if (fieldMapData == null || fieldMapData.jumpPortalID == 0)
                {
                    Log.Error("QuestDeliveryDetail.JumpQuest() jumpPortalID is not found.");
                }
                else if (MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName() != "InGameScene")
                {
                    MonoBehaviourSingleton <WorldMapManager> .I.SetJumpPortalID(fieldMapData.jumpPortalID);

                    GameSection.StopEvent();
                    DispatchEvent("QUEST_TO_FIELD", null);
                }
                else if (MonoBehaviourSingleton <InGameProgress> .IsValid() && MonoBehaviourSingleton <FieldManager> .I.currentMapID != targetMapID)
                {
                    MonoBehaviourSingleton <InGameProgress> .I.PortalNext(fieldMapData.jumpPortalID);
                }
            }
        }
    }