Ejemplo n.º 1
0
        private void OnDisable()
        {
            Singleton <GarrisonWrapper> .Instance.UseEquipmentResultAction -= this.HandleUseEquipmentResult;
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.FollowerToInspectChangedAction = (Action <int>)Delegate.Remove(instance.FollowerToInspectChangedAction, new Action <int>(this.HandleFollowerToInspectChanged));
        }
Ejemplo n.º 2
0
        private void OnEnable()
        {
            if (Main.instance == null)
            {
                return;
            }
            if (this.m_followerID > 0)
            {
                if (!PersistentFollowerData.followerDictionary.ContainsKey(this.m_followerID))
                {
                    base.transform.SetParent(Main.instance.transform);
                    base.gameObject.SetActive(false);
                    return;
                }
                this.SetAvailabilityStatus(PersistentFollowerData.followerDictionary[this.m_followerID]);
            }
            Main instance = Main.instance;

            instance.FollowerDataChangedAction = (Action)Delegate.Combine(instance.FollowerDataChangedAction, new Action(this.FollowerDataChanged));
            Main instance2 = Main.instance;

            instance2.UseArmamentResultAction = (Action <int, WrapperGarrisonFollower, WrapperGarrisonFollower>)Delegate.Combine(instance2.UseArmamentResultAction, new Action <int, WrapperGarrisonFollower, WrapperGarrisonFollower>(this.HandleUseArmamentResult));
            if (AdventureMapPanel.instance != null)
            {
                AdventureMapPanel instance3 = AdventureMapPanel.instance;
                instance3.OnMissionFollowerSlotChanged = (Action <int, bool>)Delegate.Combine(instance3.OnMissionFollowerSlotChanged, new Action <int, bool>(this.OnMissionFollowerSlotChanged));
                AdventureMapPanel instance4 = AdventureMapPanel.instance;
                instance4.DeselectAllFollowerListItemsAction = (Action)Delegate.Combine(instance4.DeselectAllFollowerListItemsAction, new Action(this.DeselectMe));
            }
            if (this.m_followerDetailView != null && OrderHallFollowersPanel.instance != null)
            {
                OrderHallFollowersPanel instance5 = OrderHallFollowersPanel.instance;
                instance5.FollowerDetailListItemSelectedAction = (Action <int>)Delegate.Combine(instance5.FollowerDetailListItemSelectedAction, new Action <int>(this.DetailFollowerListItem_ManageFollowerDetailViewSize));
            }
        }
Ejemplo n.º 3
0
 private void Start()
 {
     if (this.m_missionListPanel != null && this.m_missionListPanel.gameObject.activeSelf)
     {
         this.m_currentPanel = this.m_missionListPanel.gameObject;
     }
     else if (this.m_mapPanel != null && this.m_mapPanel.gameObject.activeSelf)
     {
         this.m_currentPanel = this.m_mapPanel.gameObject;
     }
     else if (this.m_followersPanel != null && this.m_followersPanel.gameObject.activeSelf)
     {
         this.m_currentPanel = this.m_followersPanel.gameObject;
     }
     else if (this.m_troopsPanel != null && this.m_troopsPanel.gameObject.activeSelf)
     {
         this.m_currentPanel = this.m_troopsPanel.gameObject;
     }
     else if (this.m_talentTreePanel != null && this.m_talentTreePanel.gameObject.activeSelf)
     {
         this.m_currentPanel = this.m_troopsPanel.gameObject;
     }
     if (this.m_birdEagleThings != null)
     {
         this.m_birdEagleThings.SetActive(!Main.instance.IsNarrowScreen());
     }
     if (this.m_mapPanel != null)
     {
         AdventureMapPanel component = this.m_mapPanel.GetComponent <AdventureMapPanel>();
         if (component != null)
         {
             component.SetStartingMapByFaction();
         }
     }
 }
Ejemplo n.º 4
0
        private void OnDisable()
        {
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.OnZoomOutMap = (Action)Delegate.Remove(instance.OnZoomOutMap, new Action(this.OnZoomOutMap));
            if (this.m_usedForMissionList)
            {
                AdventureMapPanel instance2 = AdventureMapPanel.instance;
                instance2.MissionSelectedFromListAction = (Action <int>)Delegate.Remove(instance2.MissionSelectedFromListAction, new Action <int>(this.HandleMissionChanged));
            }
            else
            {
                AdventureMapPanel instance3 = AdventureMapPanel.instance;
                instance3.MissionMapSelectionChangedAction = (Action <int>)Delegate.Remove(instance3.MissionMapSelectionChangedAction, new Action <int>(this.HandleMissionChanged));
            }
            AdventureMapPanel instance4 = AdventureMapPanel.instance;

            instance4.OnShowMissionRewardPanel = (Action <bool>)Delegate.Remove(instance4.OnShowMissionRewardPanel, new Action <bool>(this.OnShowMissionRewardPanel));
            SliderPanel sliderPanel = this.m_sliderPanel;

            sliderPanel.SliderPanelMaximizedAction = (Action)Delegate.Remove(sliderPanel.SliderPanelMaximizedAction, new Action(this.OnSliderPanelMaximized));
            SliderPanel sliderPanel2 = this.m_sliderPanel;

            sliderPanel2.SliderPanelBeginMinimizeAction = (Action)Delegate.Remove(sliderPanel2.SliderPanelBeginMinimizeAction, new Action(this.RevealMap));
            SliderPanel sliderPanel3 = this.m_sliderPanel;

            sliderPanel3.SliderPanelBeginDragAction = (Action)Delegate.Remove(sliderPanel3.SliderPanelBeginDragAction, new Action(this.RevealMap));
            SliderPanel sliderPanel4 = this.m_sliderPanel;

            sliderPanel4.SliderPanelBeginShrinkToPreviewPositionAction = (Action)Delegate.Remove(sliderPanel4.SliderPanelBeginShrinkToPreviewPositionAction, new Action(this.RevealMap));
            SliderPanel sliderPanel5 = this.m_sliderPanel;

            sliderPanel5.SliderPanelFinishMinimizeAction = (Action)Delegate.Remove(sliderPanel5.SliderPanelFinishMinimizeAction, new Action(this.HandleSliderPanelFinishMinimize));
            Main.instance.m_backButtonManager.PopBackAction();
        }
        private void OnEnable()
        {
            this.ShowIconArea(false);
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.SelectedIconContainerChanged = (Action <StackableMapIconContainer>)Delegate.Combine(instance.SelectedIconContainerChanged, new Action <StackableMapIconContainer>(this.HandleSelectedIconContainerChanged));
        }
        public void JustZoomToMission()
        {
            UiAnimMgr.instance.PlayAnim("MinimapPulseAnim", base.transform, Vector3.zero, 3f, 0f);
            Main.instance.m_UISound.Play_SelectMission();
            if (StaticDB.garrMissionDB.GetRecord(this.m_garrMissionID) == null)
            {
                return;
            }
            AdventureMapPanel         instance  = AdventureMapPanel.instance;
            StackableMapIcon          component = base.GetComponent <StackableMapIcon>();
            StackableMapIconContainer stackableMapIconContainer = null;

            if (component != null)
            {
                stackableMapIconContainer = component.GetContainer();
                AdventureMapPanel.instance.SetSelectedIconContainer(stackableMapIconContainer);
            }
            Vector2 tapPos;

            if (stackableMapIconContainer != null)
            {
                tapPos..ctor(stackableMapIconContainer.transform.position.x, stackableMapIconContainer.transform.position.y);
            }
            else
            {
                tapPos..ctor(base.transform.position.x, base.transform.position.y);
            }
            instance.CenterAndZoom(tapPos, null, true);
        }
Ejemplo n.º 7
0
        private void OnDisable()
        {
            Main instance = Main.instance;

            instance.UseEquipmentResultAction = (Action <WrapperGarrisonFollower, WrapperGarrisonFollower>)Delegate.Remove(instance.UseEquipmentResultAction, new Action <WrapperGarrisonFollower, WrapperGarrisonFollower>(this.HandleUseEquipmentResult));
            AdventureMapPanel instance2 = AdventureMapPanel.instance;

            instance2.FollowerToInspectChangedAction = (Action <int>)Delegate.Remove(instance2.FollowerToInspectChangedAction, new Action <int>(this.HandleFollowerToInspectChanged));
        }
Ejemplo n.º 8
0
        private void OnDisable()
        {
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.TestIconSizeChanged = (Action <float>)Delegate.Remove(instance.TestIconSizeChanged, new Action <float>(this.OnTestIconSizeChanged));
            PinchZoomContentManager pinchZoomContentManager = AdventureMapPanel.instance.m_pinchZoomContentManager;

            pinchZoomContentManager.ZoomFactorChanged = (Action <bool>)Delegate.Remove(pinchZoomContentManager.ZoomFactorChanged, new Action <bool>(this.HandleZoomChanged));
        }
 private void OnDisable()
 {
     Singleton <GarrisonWrapper> .Instance.MissionSuccessChanceChangedAction -= this.OnMissionSuccessChanceChanged;
     Singleton <GarrisonWrapper> .Instance.FollowerDataChangedAction         -= this.HandleFollowerDataChanged;
     if (AdventureMapPanel.instance != null)
     {
         AdventureMapPanel instance = AdventureMapPanel.instance;
         instance.ShowMissionResultAction = (Action <int, int, bool>)Delegate.Remove(instance.ShowMissionResultAction, new Action <int, int, bool>(this.ShowMissionResults));
     }
 }
Ejemplo n.º 10
0
        private void OnDestroy()
        {
            Singleton <GarrisonWrapper> .Instance.InvasionPOIChangedAction -= this.HandleInvasionPOIChanged;
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.OnZoomOutMap = (Action)Delegate.Remove(instance.OnZoomOutMap, new Action(this.OnZoomOut));
            AdventureMapPanel instance2 = AdventureMapPanel.instance;

            instance2.OnZoomInMap = (Action)Delegate.Remove(instance2.OnZoomInMap, new Action(this.OnZoomIn));
        }
Ejemplo n.º 11
0
        private void OnEnable()
        {
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.TestIconSizeChanged = (Action <float>)Delegate.Combine(instance.TestIconSizeChanged, new Action <float>(this.OnTestIconSizeChanged));
            PinchZoomContentManager pinchZoomContentManager = AdventureMapPanel.instance.m_pinchZoomContentManager;

            pinchZoomContentManager.ZoomFactorChanged = (Action <bool>)Delegate.Combine(pinchZoomContentManager.ZoomFactorChanged, new Action <bool>(this.HandleZoomChanged));
            this.m_showLootIconInsteadOfMain          = true;
        }
        private void OnEnable()
        {
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.TestIconSizeChanged = (Action <float>)Delegate.Combine(instance.TestIconSizeChanged, new Action <float>(this.OnTestIconSizeChanged));
            PinchZoomContentManager pinchZoomContentManager = AdventureMapPanel.instance.m_pinchZoomContentManager;

            pinchZoomContentManager.ZoomFactorChanged = (Action <bool>)Delegate.Combine(pinchZoomContentManager.ZoomFactorChanged, new Action <bool>(this.HandleZoomChanged));
            AdventureMapPanel instance2 = AdventureMapPanel.instance;

            instance2.MissionMapSelectionChangedAction = (Action <int>)Delegate.Combine(instance2.MissionMapSelectionChangedAction, new Action <int>(this.HandleMissionChanged));
        }
        private void SetupWorldQuestIcon(WrapperWorldQuest worldQuest, GameObject worldQuestObj, float mapOffsetX, float mapOffsetY, float mapScale)
        {
            float startLocationY = (float)worldQuest.StartLocationY * -mapScale;
            float startLocationX = (float)worldQuest.StartLocationX * mapScale;

            startLocationY += mapOffsetX;
            startLocationX += mapOffsetY;
            Vector2       vector3   = new Vector3(startLocationY / (float)AdventureMapPanel.GetImageWByMapID(worldQuest.StartLocationMapID), startLocationX / 1334f);
            RectTransform component = worldQuestObj.GetComponent <RectTransform>();

            component.anchorMin        = vector3;
            component.anchorMax        = vector3;
            component.anchoredPosition = Vector2.zero;
        }
Ejemplo n.º 14
0
        private void Start()
        {
            this.m_allianceBG.SetActive(false);
            this.m_hordeBG.SetActive(false);
            this.HandleInvasionPOIChanged();
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.OnZoomOutMap = (Action)Delegate.Combine(instance.OnZoomOutMap, new Action(this.OnZoomOut));
            AdventureMapPanel instance2 = AdventureMapPanel.instance;

            instance2.OnZoomInMap = (Action)Delegate.Combine(instance2.OnZoomInMap, new Action(this.OnZoomIn));
            Singleton <GarrisonWrapper> .Instance.InvasionPOIChangedAction += this.HandleInvasionPOIChanged;
            this.OnZoomOut();
        }
Ejemplo n.º 15
0
 private void OnEnable()
 {
     this.m_missionSuccessMessage.SetActive(false);
     this.m_missionFailMessage.SetActive(false);
     this.m_missionInProgressMessage.SetActive(false);
     this.m_bonusMissionRewardDisplay.m_rewardIcon.transform.localPosition = this.m_bonusLootInitialLocalPosition;
     if (AdventureMapPanel.instance != null)
     {
         AdventureMapPanel instance = AdventureMapPanel.instance;
         instance.ShowMissionResultAction = (Action <int, int, bool>)Delegate.Combine(instance.ShowMissionResultAction, new Action <int, int, bool>(this.ShowMissionResults));
     }
     this.m_okButtonText.text   = StaticDB.GetString("OK", null);
     this.m_inProgressText.text = StaticDB.GetString("IN_PROGRESS", null);
     this.m_successText.text    = StaticDB.GetString("MISSION_SUCCESS", null);
     this.m_failureText.text    = StaticDB.GetString("MISSION_FAILED", null);
 }
 private void Awake()
 {
     AdventureMapPanel.instance = this;
     this.m_zoneID = AdventureMapPanel.eZone.None;
     this.m_testMissionIconScale = 1f;
     this.m_mapFilters           = new bool[18];
     for (int i = 0; i < (int)this.m_mapFilters.Length; i++)
     {
         this.m_mapFilters[i] = false;
     }
     this.EnableMapFilter(MapFilterType.All, true);
     if (this.m_missionResultsPanel)
     {
         this.m_missionResultsPanel.gameObject.SetActive(true);
     }
 }
Ejemplo n.º 17
0
        private void SetupWorldQuestIcon(WrapperWorldQuest worldQuest, GameObject worldQuestObj, float mapOffsetX, float mapOffsetY, float mapScale)
        {
            float num  = (float)worldQuest.StartLocationY * -mapScale;
            float num2 = (float)worldQuest.StartLocationX * mapScale;

            num  += mapOffsetX;
            num2 += mapOffsetY;
            float         num3      = (float)AdventureMapPanel.GetImageWByMapID(worldQuest.StartLocationMapID);
            float         num4      = (float)AdventureMapPanel.GetImageHByMapID(worldQuest.StartLocationMapID);
            Vector2       vector    = new Vector3(num / num3, num2 / num4);
            RectTransform component = worldQuestObj.GetComponent <RectTransform>();

            component.anchorMin        = vector;
            component.anchorMax        = vector;
            component.anchoredPosition = Vector2.zero;
        }
Ejemplo n.º 18
0
        private void Awake()
        {
            this.m_sliderPanel = base.GetComponent <SliderPanel>();
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.OnZoomOutMap = (Action)Delegate.Combine(instance.OnZoomOutMap, new Action(this.OnZoomOutMap));
            AdventureMapPanel instance2 = AdventureMapPanel.instance;

            instance2.MissionMapSelectionChangedAction = (Action <int>)Delegate.Combine(instance2.MissionMapSelectionChangedAction, new Action <int>(this.HandleMissionChanged));
            AdventureMapPanel instance3 = AdventureMapPanel.instance;

            instance3.OnShowMissionRewardPanel = (Action <bool>)Delegate.Combine(instance3.OnShowMissionRewardPanel, new Action <bool>(this.OnShowMissionRewardPanel));
            AdventureMapPanel instance4 = AdventureMapPanel.instance;

            instance4.WorldQuestChangedAction = (Action <int>)Delegate.Combine(instance4.WorldQuestChangedAction, new Action <int>(this.HandleWorldQuestChanged));
        }
Ejemplo n.º 19
0
 private void OnDisable()
 {
     if (this.m_usedForMissionList)
     {
         if (AdventureMapPanel.instance != null)
         {
             AdventureMapPanel instance = AdventureMapPanel.instance;
             instance.MissionSelectedFromListAction = (Action <int>)Delegate.Remove(instance.MissionSelectedFromListAction, new Action <int>(this.HandleMissionChanged));
         }
     }
     else if (AdventureMapPanel.instance != null)
     {
         AdventureMapPanel instance2 = AdventureMapPanel.instance;
         instance2.MissionMapSelectionChangedAction = (Action <int>)Delegate.Remove(instance2.MissionMapSelectionChangedAction, new Action <int>(this.HandleMissionChanged));
     }
 }
Ejemplo n.º 20
0
 private void OnDisable()
 {
     if (Main.instance != null && this.m_mainCallbackInitialized)
     {
         Main instance = Main.instance;
         instance.MissionSuccessChanceChangedAction = (Action <int>)Delegate.Remove(instance.MissionSuccessChanceChangedAction, new Action <int>(this.OnMissionSuccessChanceChanged));
         Main instance2 = Main.instance;
         instance2.FollowerDataChangedAction = (Action)Delegate.Remove(instance2.FollowerDataChangedAction, new Action(this.HandleFollowerDataChanged));
         this.m_mainCallbackInitialized      = false;
     }
     if (AdventureMapPanel.instance != null)
     {
         AdventureMapPanel instance3 = AdventureMapPanel.instance;
         instance3.ShowMissionResultAction = (Action <int, int, bool>)Delegate.Remove(instance3.ShowMissionResultAction, new Action <int, int, bool>(this.ShowMissionResults));
     }
 }
Ejemplo n.º 21
0
        private GameObject SetupWorldQuestObject(WrapperWorldQuest worldQuest, Dictionary <int, float> mapScaleTweaks = null, Dictionary <int, Vector2> mapOffsetTweaks = null)
        {
            AdventureMapPanel.eZone zoneForMapID = AdventureMapPanel.GetZoneForMapID(worldQuest.StartLocationMapID);
            if (zoneForMapID == AdventureMapPanel.eZone.None)
            {
                Debug.LogError(string.Concat(new object[]
                {
                    "Unknown start zone ID ",
                    worldQuest.StartLocationMapID,
                    " for world quest ",
                    worldQuest.QuestID
                }));
                return(null);
            }
            MapInfo mapInfo = MapInfo.GetMapInfo(zoneForMapID);

            if (mapInfo == null)
            {
                Debug.LogError("No map info present for world quest " + worldQuest.QuestID);
                return(null);
            }
            GameObject worldQuestArea = mapInfo.GetWorldQuestArea();

            if (worldQuestArea == null)
            {
                Debug.LogError("No world quest area object on map for world quest " + worldQuest.QuestID);
                return(null);
            }
            float num  = mapInfo.m_worldQuestOffset.x;
            float num2 = mapInfo.m_worldQuestOffset.y;
            float num3 = mapInfo.m_worldQuestScale;

            if (mapScaleTweaks != null && mapScaleTweaks.ContainsKey(worldQuest.WorldMapAreaID))
            {
                num3 += mapScaleTweaks[worldQuest.WorldMapAreaID];
            }
            if (mapOffsetTweaks != null && mapOffsetTweaks.ContainsKey(worldQuest.WorldMapAreaID))
            {
                num  += mapOffsetTweaks[worldQuest.WorldMapAreaID].x;
                num2 += mapOffsetTweaks[worldQuest.WorldMapAreaID].y;
            }
            GameObject gameObject = Object.Instantiate <GameObject>(this.m_AdvMapWorldQuestPrefab);

            gameObject.transform.SetParent(worldQuestArea.transform, false);
            this.SetupWorldQuestIcon(worldQuest, gameObject, num, num2, num3);
            return(gameObject);
        }
Ejemplo n.º 22
0
 private void OnDisable()
 {
     Singleton <GarrisonWrapper> .Instance.FollowerDataChangedAction -= this.FollowerDataChanged;
     Singleton <GarrisonWrapper> .Instance.UseArmamentResultAction   -= this.HandleUseArmamentResult;
     if (AdventureMapPanel.instance != null)
     {
         AdventureMapPanel instance = AdventureMapPanel.instance;
         instance.OnMissionFollowerSlotChanged = (Action <int, bool>)Delegate.Remove(instance.OnMissionFollowerSlotChanged, new Action <int, bool>(this.OnMissionFollowerSlotChanged));
         AdventureMapPanel instance2 = AdventureMapPanel.instance;
         instance2.DeselectAllFollowerListItemsAction = (Action)Delegate.Remove(instance2.DeselectAllFollowerListItemsAction, new Action(this.DeselectMe));
     }
     if (this.m_followerDetailView != null && OrderHallFollowersPanel.instance != null)
     {
         OrderHallFollowersPanel instance3 = OrderHallFollowersPanel.instance;
         instance3.FollowerDetailListItemSelectedAction = (Action <int>)Delegate.Remove(instance3.FollowerDetailListItemSelectedAction, new Action <int>(this.DetailFollowerListItem_ManageFollowerDetailViewSize));
     }
 }
Ejemplo n.º 23
0
 private void OnDisable()
 {
     if (this.m_usedForMissionList)
     {
         if (AdventureMapPanel.instance != null)
         {
             AdventureMapPanel instance = AdventureMapPanel.instance;
             instance.MissionSelectedFromListAction = (Action <int>)Delegate.Remove(instance.MissionSelectedFromListAction, new Action <int>(this.HandleMissionChanged));
         }
     }
     else if (AdventureMapPanel.instance != null)
     {
         AdventureMapPanel instance2 = AdventureMapPanel.instance;
         instance2.MissionMapSelectionChangedAction = (Action <int>)Delegate.Remove(instance2.MissionMapSelectionChangedAction, new Action <int>(this.HandleMissionChanged));
     }
     Singleton <GarrisonWrapper> .Instance.GarrisonDataResetFinishedAction -= this.InitFollowerList;
 }
Ejemplo n.º 24
0
 private void Start()
 {
     if (this.m_missionListPanel != null && this.m_missionListPanel.gameObject.activeSelf)
     {
         this.m_currentPanel = this.m_missionListPanel.gameObject;
     }
     else if (this.m_mapPanel != null && this.m_mapPanel.gameObject.activeSelf)
     {
         this.m_currentPanel = this.m_mapPanel.gameObject;
     }
     else if (this.m_followersPanel != null && this.m_followersPanel.gameObject.activeSelf)
     {
         this.m_currentPanel = this.m_followersPanel.gameObject;
     }
     else if (this.m_troopsPanel != null && this.m_troopsPanel.gameObject.activeSelf)
     {
         this.m_currentPanel = this.m_troopsPanel.gameObject;
     }
     else if (this.m_talentTreePanel != null && this.m_talentTreePanel.gameObject.activeSelf)
     {
         this.m_currentPanel = this.m_troopsPanel.gameObject;
     }
     if (Main.instance.HasNotch() && this.m_navBarLayout != null)
     {
         HorizontalLayoutGroup component = this.m_navBarLayout.GetComponent <HorizontalLayoutGroup>();
         if (component != null)
         {
             component.padding.bottom += 15;
         }
     }
     if (this.m_birdEagleThings != null)
     {
         this.m_birdEagleThings.SetActive(!Main.instance.IsNarrowScreen());
     }
     if (this.m_mapPanel != null)
     {
         AdventureMapPanel component2 = this.m_mapPanel.GetComponent <AdventureMapPanel>();
         if (component2 != null)
         {
             component2.SetStartingMapByFaction();
         }
     }
 }
        public void JustZoomToMission()
        {
            Vector2 vector2;

            UiAnimMgr.instance.PlayAnim("MinimapPulseAnim", base.transform, Vector3.zero, 3f, 0f);
            Main.instance.m_UISound.Play_SelectMission();
            if (StaticDB.garrMissionDB.GetRecord(this.m_garrMissionID) == null)
            {
                return;
            }
            AdventureMapPanel         adventureMapPanel = AdventureMapPanel.instance;
            StackableMapIcon          component         = base.GetComponent <StackableMapIcon>();
            StackableMapIconContainer container         = null;

            if (component != null)
            {
                container = component.GetContainer();
                AdventureMapPanel.instance.SetSelectedIconContainer(container);
            }
            vector2 = (container == null ? new Vector2(base.transform.position.x, base.transform.position.y) : new Vector2(container.transform.position.x, container.transform.position.y));
            adventureMapPanel.CenterAndZoom(vector2, null, true);
        }
Ejemplo n.º 26
0
        private void OnEnable()
        {
            this.m_sliderPanel = base.GetComponent <SliderPanel>();
            this.m_sliderPanel.m_masterCanvasGroup.alpha = 0f;
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.OnZoomOutMap = (Action)Delegate.Combine(instance.OnZoomOutMap, new Action(this.OnZoomOutMap));
            if (this.m_usedForMissionList)
            {
                AdventureMapPanel instance2 = AdventureMapPanel.instance;
                instance2.MissionSelectedFromListAction = (Action <int>)Delegate.Combine(instance2.MissionSelectedFromListAction, new Action <int>(this.HandleMissionChanged));
            }
            else
            {
                AdventureMapPanel instance3 = AdventureMapPanel.instance;
                instance3.MissionMapSelectionChangedAction = (Action <int>)Delegate.Combine(instance3.MissionMapSelectionChangedAction, new Action <int>(this.HandleMissionChanged));
            }
            AdventureMapPanel instance4 = AdventureMapPanel.instance;

            instance4.OnShowMissionRewardPanel = (Action <bool>)Delegate.Combine(instance4.OnShowMissionRewardPanel, new Action <bool>(this.OnShowMissionRewardPanel));
            SliderPanel sliderPanel = this.m_sliderPanel;

            sliderPanel.SliderPanelMaximizedAction = (Action)Delegate.Combine(sliderPanel.SliderPanelMaximizedAction, new Action(this.OnSliderPanelMaximized));
            SliderPanel sliderPanel2 = this.m_sliderPanel;

            sliderPanel2.SliderPanelBeginMinimizeAction = (Action)Delegate.Combine(sliderPanel2.SliderPanelBeginMinimizeAction, new Action(this.RevealMap));
            SliderPanel sliderPanel3 = this.m_sliderPanel;

            sliderPanel3.SliderPanelBeginDragAction = (Action)Delegate.Combine(sliderPanel3.SliderPanelBeginDragAction, new Action(this.RevealMap));
            SliderPanel sliderPanel4 = this.m_sliderPanel;

            sliderPanel4.SliderPanelBeginShrinkToPreviewPositionAction = (Action)Delegate.Combine(sliderPanel4.SliderPanelBeginShrinkToPreviewPositionAction, new Action(this.RevealMap));
            SliderPanel sliderPanel5 = this.m_sliderPanel;

            sliderPanel5.SliderPanelFinishMinimizeAction = (Action)Delegate.Combine(sliderPanel5.SliderPanelFinishMinimizeAction, new Action(this.HandleSliderPanelFinishMinimize));
            Main.instance.m_backButtonManager.PushBackAction(BackActionType.hideSliderPanel, this.m_sliderPanel.gameObject);
        }
Ejemplo n.º 27
0
 public void ShowIconArea(bool show)
 {
     if (!show && this.GetIconCount() <= 1)
     {
         return;
     }
     this.m_iconAreaCanvasGroup.gameObject.SetActive(show);
     if (show)
     {
         RectTransform component = this.m_iconAreaCanvas.GetComponent <RectTransform>();
         component.rect.Set(0f, 0f, 120f, 192f);
         if (this.m_closeButton != null)
         {
             RectTransform     rectTransform     = this.m_closeButton.transform as RectTransform;
             AdventureMapPanel componentInParent = base.gameObject.GetComponentInParent <AdventureMapPanel>();
             if (componentInParent != null)
             {
                 RectTransform rectTransform2 = base.gameObject.GetComponentInParent <AdventureMapPanel>().transform as RectTransform;
                 rectTransform.position = rectTransform2.position;
                 rectTransform.SetSizeWithCurrentAnchors(0, rectTransform2.rect.width);
                 rectTransform.SetSizeWithCurrentAnchors(1, rectTransform2.rect.height);
             }
         }
     }
     if (show && this.GetIconCount() > 1)
     {
         this.m_iconAreaCanvas.sortingOrder = 2;
     }
     else
     {
         this.m_iconAreaCanvas.sortingOrder = 1;
     }
     if (this.m_closeButton != null)
     {
         this.m_closeButton.gameObject.SetActive(show && this.GetIconCount() > 1);
     }
 }
        public void UpdateWorldQuests()
        {
            bool flag;
            bool flag1;
            bool flag2;
            bool flag3;
            bool flag4;
            bool flag5;
            bool flag6;
            bool flag7;
            bool flag8;
            bool flag9;

            AdventureMapPanel.ClearWorldQuestArea(this.m_missionAndWorldQuestArea_KulTiras);
            AdventureMapPanel.ClearWorldQuestArea(this.m_missionAndWorldQuestArea_Zandalar);
            foreach (WrapperWorldQuest value in WorldQuestData.WorldQuestDictionary.Values)
            {
                if (value.StartLocationMapID != 1220 && value.StartLocationMapID != 1669)
                {
                    if (!this.IsFilterEnabled(MapFilterType.All))
                    {
                        bool questInfoID = false;
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Azerite))
                        {
                            questInfoID = questInfoID | value.Currencies.Any <WrapperWorldQuestReward>((WrapperWorldQuestReward reward) => reward.RecordID == 1553);
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.OrderResources))
                        {
                            questInfoID = questInfoID | value.Currencies.Any <WrapperWorldQuestReward>((WrapperWorldQuestReward reward) => reward.RecordID == 1560);
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Gold) && value.Money > 0)
                        {
                            questInfoID = true;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Gear))
                        {
                            questInfoID = questInfoID | value.Items.Any <WrapperWorldQuestReward>((WrapperWorldQuestReward reward) => {
                                ItemRec record = StaticDB.itemDB.GetRecord(reward.RecordID);
                                return(record == null ? false : (record.ClassID == 2 || record.ClassID == 3 || record.ClassID == 4 ? true : record.ClassID == 6));
                            });
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.ProfessionMats))
                        {
                            questInfoID = questInfoID | value.Items.Any <WrapperWorldQuestReward>((WrapperWorldQuestReward reward) => {
                                ItemRec record = StaticDB.itemDB.GetRecord(reward.RecordID);
                                return(record == null ? false : record.ClassID == 7);
                            });
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.PetBattles))
                        {
                            questInfoID = questInfoID | value.QuestInfoID == 115;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Reputation))
                        {
                            questInfoID = questInfoID | value.Currencies.Any <WrapperWorldQuestReward>((WrapperWorldQuestReward reward) => {
                                CurrencyTypesRec record = StaticDB.currencyTypesDB.GetRecord(reward.RecordID);
                                return(record == null ? false : record.FactionID != 0);
                            });
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Bounty_ChampionsOfAzeroth))
                        {
                            bool flag10 = questInfoID;
                            if (!PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(value.QuestID))
                            {
                                flag9 = false;
                            }
                            else
                            {
                                WrapperBountiesByWorldQuest item = PersistentBountyData.bountiesByWorldQuestDictionary[value.QuestID];
                                flag9 = item.BountyQuestIDs.Any <int>((int questID) => questID == 50562);
                            }
                            questInfoID = flag10 | flag9;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Bounty_ZandalariEmpire))
                        {
                            bool flag11 = questInfoID;
                            if (!PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(value.QuestID))
                            {
                                flag8 = false;
                            }
                            else
                            {
                                WrapperBountiesByWorldQuest wrapperBountiesByWorldQuest = PersistentBountyData.bountiesByWorldQuestDictionary[value.QuestID];
                                flag8 = wrapperBountiesByWorldQuest.BountyQuestIDs.Any <int>((int questID) => questID == 50598);
                            }
                            questInfoID = flag11 | flag8;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Bounty_ProudmooreAdmiralty))
                        {
                            bool flag12 = questInfoID;
                            if (!PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(value.QuestID))
                            {
                                flag7 = false;
                            }
                            else
                            {
                                WrapperBountiesByWorldQuest item1 = PersistentBountyData.bountiesByWorldQuestDictionary[value.QuestID];
                                flag7 = item1.BountyQuestIDs.Any <int>((int questID) => questID == 50599);
                            }
                            questInfoID = flag12 | flag7;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Bounty_OrderOfEmbers))
                        {
                            bool flag13 = questInfoID;
                            if (!PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(value.QuestID))
                            {
                                flag6 = false;
                            }
                            else
                            {
                                WrapperBountiesByWorldQuest wrapperBountiesByWorldQuest1 = PersistentBountyData.bountiesByWorldQuestDictionary[value.QuestID];
                                flag6 = wrapperBountiesByWorldQuest1.BountyQuestIDs.Any <int>((int questID) => questID == 50600);
                            }
                            questInfoID = flag13 | flag6;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Bounty_StormsWake))
                        {
                            bool flag14 = questInfoID;
                            if (!PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(value.QuestID))
                            {
                                flag5 = false;
                            }
                            else
                            {
                                WrapperBountiesByWorldQuest item2 = PersistentBountyData.bountiesByWorldQuestDictionary[value.QuestID];
                                flag5 = item2.BountyQuestIDs.Any <int>((int questID) => questID == 50601);
                            }
                            questInfoID = flag14 | flag5;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Bounty_TalanjisExpedition))
                        {
                            bool flag15 = questInfoID;
                            if (!PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(value.QuestID))
                            {
                                flag4 = false;
                            }
                            else
                            {
                                WrapperBountiesByWorldQuest wrapperBountiesByWorldQuest2 = PersistentBountyData.bountiesByWorldQuestDictionary[value.QuestID];
                                flag4 = wrapperBountiesByWorldQuest2.BountyQuestIDs.Any <int>((int questID) => questID == 50602);
                            }
                            questInfoID = flag15 | flag4;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Bounty_Voldunai))
                        {
                            bool flag16 = questInfoID;
                            if (!PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(value.QuestID))
                            {
                                flag3 = false;
                            }
                            else
                            {
                                WrapperBountiesByWorldQuest item3 = PersistentBountyData.bountiesByWorldQuestDictionary[value.QuestID];
                                flag3 = item3.BountyQuestIDs.Any <int>((int questID) => questID == 50603);
                            }
                            questInfoID = flag16 | flag3;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Bounty_TortollanSeekers))
                        {
                            bool flag17 = questInfoID;
                            if (!PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(value.QuestID))
                            {
                                flag2 = false;
                            }
                            else
                            {
                                WrapperBountiesByWorldQuest wrapperBountiesByWorldQuest3 = PersistentBountyData.bountiesByWorldQuestDictionary[value.QuestID];
                                flag2 = wrapperBountiesByWorldQuest3.BountyQuestIDs.Any <int>((int questID) => questID == 50604);
                            }
                            questInfoID = flag17 | flag2;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Bounty_AllianceWarEffort))
                        {
                            bool flag18 = questInfoID;
                            if (!PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(value.QuestID))
                            {
                                flag1 = false;
                            }
                            else
                            {
                                WrapperBountiesByWorldQuest item4 = PersistentBountyData.bountiesByWorldQuestDictionary[value.QuestID];
                                flag1 = item4.BountyQuestIDs.Any <int>((int questID) => questID == 50605);
                            }
                            questInfoID = flag18 | flag1;
                        }
                        if (!questInfoID && this.IsFilterEnabled(MapFilterType.Bounty_HordeWarEffort))
                        {
                            bool flag19 = questInfoID;
                            if (!PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(value.QuestID))
                            {
                                flag = false;
                            }
                            else
                            {
                                WrapperBountiesByWorldQuest wrapperBountiesByWorldQuest4 = PersistentBountyData.bountiesByWorldQuestDictionary[value.QuestID];
                                flag = wrapperBountiesByWorldQuest4.BountyQuestIDs.Any <int>((int questID) => questID == 50606);
                            }
                            questInfoID = flag19 | flag;
                        }
                        if (!questInfoID)
                        {
                            continue;
                        }
                    }
                    GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(AdventureMapPanel.instance.m_AdvMapWorldQuestPrefab);
                    if (value.StartLocationMapID == 1642)
                    {
                        gameObject.transform.SetParent(this.m_missionAndWorldQuestArea_Zandalar.transform, false);
                        float single  = 0.152715057f;
                        float single1 = 1250.88025f;
                        float single2 = 697.2115f;
                        if (value.WorldMapAreaID == 863)
                        {
                            single -= 0.02f;
                        }
                        else if (value.WorldMapAreaID == 864)
                        {
                            single1 += 60f;
                            single2 -= 20f;
                        }
                        this.SetupWorldQuestIcon(value, gameObject, single1, single2, single);
                    }
                    else if (value.StartLocationMapID == 1643)
                    {
                        gameObject.transform.SetParent(this.m_missionAndWorldQuestArea_KulTiras.transform, false);
                        this.SetupWorldQuestIcon(value, gameObject, 1150.88025f, 497.2115f, 0.152715057f);
                    }
                    gameObject.GetComponent <AdventureMapWorldQuest>().SetQuestID(value.QuestID);
                    StackableMapIcon component = gameObject.GetComponent <StackableMapIcon>();
                    if (component == null)
                    {
                        continue;
                    }
                    component.RegisterWithManager(value.StartLocationMapID);
                }
            }
            this.m_pinchZoomContentManager.ForceZoomFactorChanged();
        }
 private void OnEnable()
 {
     AdventureMapPanel.instance = this;
     this.MapFiltersChanged    += new Action(this.UpdateWorldQuests);
 }
Ejemplo n.º 30
0
        private void OnEnable()
        {
            AdventureMapPanel instance = AdventureMapPanel.instance;

            instance.MissionSelectedFromListAction = (Action <int>)Delegate.Combine(instance.MissionSelectedFromListAction, new Action <int>(this.HandleMissionSelected));
        }