diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/MonthCardPage.lua b/Assets/ManagedResources/~Lua/Modules/Operating/MonthCardPage.lua index 6181daad45..b974c5c250 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/MonthCardPage.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/MonthCardPage.lua @@ -76,13 +76,21 @@ end --添加事件监听(用于子类重写) function MonthCardPage:AddListener() Game.GlobalEvent:AddEvent(GameEvent.MoneyPay.OnPayResultSuccess, self.BuySuccess) - Game.GlobalEvent:AddEvent(GameEvent.MonthCard.OnMonthCardUpdate, MonthCardPage.RefreshStoneShow) + Game.GlobalEvent:AddEvent(GameEvent.MonthCard.OnMonthCardUpdate, function() + MonthCardManager.RefreshMonthCardEnd() + PlayerPrefs.SetInt(PlayerManager.uid.."monthCard", 1) + self:RefreshStoneShow() + end) end --移除事件监听(用于子类重写) function MonthCardPage:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.MoneyPay.OnPayResultSuccess, self.BuySuccess) - Game.GlobalEvent:RemoveEvent(GameEvent.MonthCard.OnMonthCardUpdate, MonthCardPage.RefreshStoneShow) + Game.GlobalEvent:RemoveEvent(GameEvent.MonthCard.OnMonthCardUpdate, function() + MonthCardManager.RefreshMonthCardEnd() + PlayerPrefs.SetInt(PlayerManager.uid.."monthCard", 1) + self:RefreshStoneShow() + end) end --界面打开时调用(用于子类重写)