diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua index 170ec5be67..732c3604ed 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua @@ -44,8 +44,10 @@ function this.OnLevelChange() -- 首充引导特殊处理到十级开放 if PlayerManager.level == 10 then table.insert(_FuncGuideList, 100200) - StoryMapManager.isShowStory = true + StoryMapManager.isShowStory = 1 this.CheckFuncGuide() + elseif PlayerManager.level == 22 then + StoryMapManager.isShowStory = 3 end end -- diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua index f96067a1e5..a590efa614 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua @@ -474,11 +474,11 @@ function this.ExecuteBehavior(beType, beArgs) end function this.ShowStory(nextId,OnFocus) - if StoryMapManager.isShowStory then - StoryMapManager.isShowStory = false + if StoryMapManager.isShowStory ~= 0 then + StoryMapManager.isShowStory = 0 local isShowStory = 1 - if PlayerPrefs.HasKey("StoryMapPanel1"..PlayerManager.uid) then - isShowStory = PlayerPrefs.GetInt("StoryMapPanel1"..PlayerManager.uid) + if PlayerPrefs.HasKey("StoryMapPanel"..StoryMapManager.isShowStory..PlayerManager.uid) then + isShowStory = PlayerPrefs.GetInt("StoryMapPanel"..StoryMapManager.isShowStory..PlayerManager.uid) end if isShowStory == 1 then LogGreen("this.gameObject:"..this.gameObject.name) @@ -488,8 +488,8 @@ function this.ShowStory(nextId,OnFocus) Game.GlobalEvent:RemoveEvent(GameEvent.GuaJi.CloseStoryMapPanel,onCloseStoryMapPanel) end Game.GlobalEvent:AddEvent(GameEvent.GuaJi.CloseStoryMapPanel,onCloseStoryMapPanel) - PlayerPrefs.SetInt("StoryMapPanel1"..PlayerManager.uid,0) - StoryMapManager.InitData(1) + PlayerPrefs.SetInt("StoryMapPanel"..StoryMapManager.isShowStory..PlayerManager.uid,0) + StoryMapManager.InitData(StoryMapManager.isShowStory) else this.NextGuide(nextId) Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, OnFocus) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua index bdb8c1b9de..f9feff170a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua @@ -181,23 +181,9 @@ function SupremeHeroPopup:OnOpen(_fun) fun = _fun end -function this.ShowStory() - local isShowStory = 1 - if PlayerPrefs.HasKey("StoryMapPanel2"..PlayerManager.uid) then - isShowStory = PlayerPrefs.GetInt("StoryMapPanel2"..PlayerManager.uid) - end - if isShowStory == 1 then - Game.GlobalEvent:AddEvent(GameEvent.GuaJi.CloseStoryMapPanel,this.InitShowPanel) - PlayerPrefs.SetInt("StoryMapPanel2"..PlayerManager.uid,0) - StoryMapManager.InitData(3) - else - this.InitShowPanel() - end -end - function SupremeHeroPopup:OnShow() actIsDone = false - this.ShowStory() + this.InitShowPanel() end function this.InitShowPanel() diff --git a/Assets/ManagedResources/~Lua/Modules/Story/StoryMapManager.lua b/Assets/ManagedResources/~Lua/Modules/Story/StoryMapManager.lua index 5cac837a41..ff59bdc63c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Story/StoryMapManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Story/StoryMapManager.lua @@ -1,7 +1,7 @@ StoryMapManager = {} local this = StoryMapManager this.groupConfigs = {} -this.isShowStory = false +this.isShowStory = 0 local storyMapConfig = ConfigManager.GetConfig(ConfigName.StoryMapConfig) --初始化 function this.Initialize()