예제 #1
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);
                }
            }
        }
    }
예제 #2
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());
    }
예제 #3
0
    private void SetCameraToLocation(RegionMapLocation location)
    {
        //IL_0001: Unknown result type (might be due to invalid IL or missing references)
        //IL_0006: Unknown result type (might be due to invalid IL or missing references)
        //IL_000b: Unknown result type (might be due to invalid IL or missing references)
        //IL_000c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0013: Unknown result type (might be due to invalid IL or missing references)
        //IL_0018: Unknown result type (might be due to invalid IL or missing references)
        //IL_002c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0031: Unknown result type (might be due to invalid IL or missing references)
        //IL_0036: Unknown result type (might be due to invalid IL or missing references)
        //IL_003d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0042: Unknown result type (might be due to invalid IL or missing references)
        Vector3 position = location.get_transform().get_position();

        position -= _camera.get_transform().get_forward() * MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.eventCameraDistance;
        _camera.get_transform().set_position(position);
    }
예제 #4
0
    private void QuestToField()
    {
        //IL_0054: Unknown result type (might be due to invalid IL or missing references)
        //IL_0059: Unknown result type (might be due to invalid IL or missing references)
        //IL_005e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0065: Unknown result type (might be due to invalid IL or missing references)
        //IL_006a: Unknown result type (might be due to invalid IL or missing references)
        //IL_0071: Unknown result type (might be due to invalid IL or missing references)
        //IL_0076: Unknown result type (might be due to invalid IL or missing references)
        //IL_008a: Unknown result type (might be due to invalid IL or missing references)
        //IL_008f: Unknown result type (might be due to invalid IL or missing references)
        //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
        //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
        //IL_00d9: Unknown result type (might be due to invalid IL or missing references)
        //IL_00ea: Unknown result type (might be due to invalid IL or missing references)
        FieldMapTable.PortalTableData portalTableData = Singleton <FieldMapTable> .I.GetPortalData(MonoBehaviourSingleton <FieldManager> .I.currentPortalID);

        if (portalTableData == null)
        {
            RequestEvent("EXIT", null);
        }
        else
        {
            RegionMapLocation regionMapLocation = regionMapRoot.FindLocation((int)portalTableData.dstMapID);
            if (null == regionMapLocation)
            {
                RequestEvent("EXIT", null);
            }
            else
            {
                Vector3 position = regionMapLocation.get_transform().get_position();
                _camera.get_transform().set_position(position - _camera.get_transform().get_forward() * MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.eventCameraDistance);
                playerMarker.SetParent(regionMapLocation.get_transform());
                playerMarker.set_localPosition(MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.playerMarkerOffset);
                playerMarker.set_localScale(new Vector3(0f, 0f, 0f));
                this.StartCoroutine(DoQuestToField());
            }
        }
    }
예제 #5
0
 public void Init(RegionMapLocation fromLoc, RegionMapLocation toLoc)
 {
     //IL_0010: Unknown result type (might be due to invalid IL or missing references)
     //IL_0015: Expected O, but got Unknown
     //IL_0028: Unknown result type (might be due to invalid IL or missing references)
     //IL_002d: Expected O, but got Unknown
     //IL_002f: Unknown result type (might be due to invalid IL or missing references)
     //IL_005a: Unknown result type (might be due to invalid IL or missing references)
     _from      = fromLoc;
     _to        = toLoc;
     _transform = this.get_transform();
     for (int i = 0; i < _transform.get_childCount(); i++)
     {
         Transform val = _transform.GetChild(i);
         if (val.get_gameObject().get_name().StartsWith("road"))
         {
             road = val.GetComponent <MeshRenderer>();
         }
         else if (val.get_gameObject().get_name().StartsWith("effect"))
         {
             effectRoot = val;
         }
     }
 }
예제 #6
0
    private IEnumerator DoFindNewDungeonEvent(RegionMapPortal portal, LoadObject newRegion)
    {
        if (blurFilter != null)
        {
            bool wait3 = true;
            blurFilter.CacheRenderTarget(delegate
            {
                //IL_000b: Unknown result type (might be due to invalid IL or missing references)
                ((_003CDoFindNewDungeonEvent_003Ec__Iterator169) /*Error near IL_005d: stateMachine*/)._003C_003Ef__this.playerMarker.get_gameObject().SetActive(false);
                ((_003CDoFindNewDungeonEvent_003Ec__Iterator169) /*Error near IL_005d: stateMachine*/)._003C_003Ef__this.playerMarker.SetParent(((_003CDoFindNewDungeonEvent_003Ec__Iterator169) /*Error near IL_005d: stateMachine*/)._003C_003Ef__this._transform);
                ((_003CDoFindNewDungeonEvent_003Ec__Iterator169) /*Error near IL_005d: stateMachine*/)._003Cwait_003E__0 = false;
            }, true);
            while (wait3)
            {
                yield return((object)null);
            }
            uiFrontMapSprite.alpha = 1f;
            spots.ClearAllSpot();
            Object.Destroy(regionMapRoot.get_gameObject());
            RegionMapLocation newLocation = null;
            if (newRegion != null)
            {
                regionMapRoot = ResourceUtility.Realizes(newRegion.loadedObject, MonoBehaviourSingleton <AppMain> .I._transform, -1).get_gameObject().GetComponent <RegionMapRoot>();
                if (regionMapRoot != null)
                {
                    wait3 = true;
                    regionMapRoot.InitPortalStatus(delegate
                    {
                        ((_003CDoFindNewDungeonEvent_003Ec__Iterator169) /*Error near IL_0136: stateMachine*/)._003Cwait_003E__0 = false;
                    });
                    while (wait3)
                    {
                        yield return((object)null);
                    }
                    CreateVisitedLocationSpot();
                    newLocation = regionMapRoot.FindLocation(portal.toLocation.mapId);
                    if (newLocation != null)
                    {
                        SetCameraToLocation(newLocation);
                        playerMarker.SetParent(newLocation.get_transform());
                        playerMarker.set_localPosition(MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.playerMarkerOffset);
                    }
                }
            }
            wait3 = true;
            float   blurTime   = 0.25f;
            Vector2 blurCenter = new Vector2(0.5f, 0.5f);
            blurFilter.StartBlurFilter(0.01f, 0.25f, blurTime, blurCenter, delegate
            {
                ((_003CDoFindNewDungeonEvent_003Ec__Iterator169) /*Error near IL_023f: stateMachine*/)._003Cwait_003E__0 = false;
            });
            uiMapSprite.alpha = 0f;
            TweenAlpha.Begin(uiMapSprite.get_gameObject(), blurTime, 1f);
            TweenAlpha.Begin(uiFrontMapSprite.get_gameObject(), blurTime, 0f);
            while (wait3)
            {
                yield return((object)null);
            }
            yield return((object)new WaitForSeconds(1f));

            if (regionMapRoot != null && newLocation != null)
            {
                GameObject obj = CreateLocationSpot(newLocation, SpotManager.ICON_TYPE.NEW, true);
                if (obj != null)
                {
                    obj.get_transform().set_localScale(new Vector3(0.1f, 0.1f, 0.1f));
                    TweenScale.Begin(obj, 0.3f, Vector3.get_one());
                    SoundManager.PlayOneShotUISE(40000033);
                }
                yield return((object)new WaitForSeconds(0.5f));

                playerMarker.get_gameObject().SetActive(true);
                playerMarker.set_localScale(new Vector3(0f, 0f, 0f));
                TweenScale.Begin(playerMarker.get_gameObject(), MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.playerMarkerScaleTime, Vector3.get_one());
            }
            yield return((object)new WaitForSeconds(1.5f));
        }
    }
예제 #7
0
    public void OpenNewLocation()
    {
        //IL_004e: 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_0145: Expected O, but got Unknown
        RegionMapPortal portal;
        bool            reverse = IsPortalReverseAndGetPortalData((int)portalData.portalID, out portal);

        if (portal == null)
        {
            RequestEvent("EXIT", null);
        }
        else
        {
            string text = portal.get_gameObject().get_name();
            if (reverse)
            {
                text += "_R";
            }
            regionMapRoot.animator.Play(text);
            SetCameraToMiddlePoint(portal);
            SetPlayerMakerToStartPosition(portal, reverse);
            GameObject effect = ResourceUtility.Instantiate <Object>(topEffectPrefab) as GameObject;
            rymFX      rym    = effect.GetComponent <rymFX>();
            rym.Cameras = (Camera[])new Camera[1]
            {
                _camera
            };
            rym.ViewShift = 0f;
            float endTime = 1f;
            if (eventData.IsEncounterBossEvent())
            {
                endTime = 0.4f;
            }
            SoundManager.PlayOneShotUISE(40000032);
            portal.Open(effect.get_transform(), regionMapRoot.animator, reverse, endTime, delegate
            {
                //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
                //IL_00f5: Unknown result type (might be due to invalid IL or missing references)
                //IL_0109: Unknown result type (might be due to invalid IL or missing references)
                //IL_0119: Unknown result type (might be due to invalid IL or missing references)
                //IL_0157: Unknown result type (might be due to invalid IL or missing references)
                if (!calledExit)
                {
                    RegionMapLocation location = portal.toLocation;
                    if (eventData.IsEncounterBossEvent())
                    {
                        if (MonoBehaviourSingleton <UIInGameFieldQuestWarning> .IsValid())
                        {
                            MonoBehaviourSingleton <UIInGameFieldQuestWarning> .I.Play(eventData.enemyType, 0, false);
                            MonoBehaviourSingleton <UIInGameFieldQuestWarning> .I.FadeOut(MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.encounterBossCutInTime + 2f, 0.3f, delegate
                            {
                                if (fieldQuestWarningRoot != null)
                                {
                                    Object.Destroy(fieldQuestWarningRoot);
                                }
                            });
                        }
                        if (effect != null)
                        {
                            EffectManager.ReleaseEffect(effect, true, false);
                        }
                        this.StartCoroutine(DoExitEncounterBossEvent());
                    }
                    else
                    {
                        if (reverse)
                        {
                            location = portal.fromLocation;
                        }
                        GameObject val = CreateLocationSpot(location, SpotManager.ICON_TYPE.NEW, true);
                        if (val != null)
                        {
                            val.get_transform().set_localScale(new Vector3(0.1f, 0.1f, 0.1f));
                            TweenScale.Begin(val, 0.3f, Vector3.get_one());
                            SoundManager.PlayOneShotUISE(40000033);
                        }
                        this.StartCoroutine(DoExitEvent(portal, rym, 0f, reverse, false));
                    }
                }
            });
        }
    }