From b44c4af2172841b364a1c85229569ba1f1ba702b Mon Sep 17 00:00:00 2001
From: jiaoyangna <3046463818@qq.com>
Date: Wed, 29 Sep 2021 18:23:13 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A5=BD=E6=84=9F=E5=BA=A60=E7=82=B9=E6=AC=A1?=
=?UTF-8?q?=E6=95=B0=E5=88=B7=E6=96=B0=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../~Lua/Modules/Likability/HeroLikeAbilityPanel.lua | 6 +++++-
.../ManagedResources/~Lua/Modules/Net/IndicationManager.lua | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Assets/ManagedResources/~Lua/Modules/Likability/HeroLikeAbilityPanel.lua b/Assets/ManagedResources/~Lua/Modules/Likability/HeroLikeAbilityPanel.lua
index 2c2cfaef70..2c9e280c47 100644
--- a/Assets/ManagedResources/~Lua/Modules/Likability/HeroLikeAbilityPanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Likability/HeroLikeAbilityPanel.lua
@@ -223,12 +223,16 @@ function HeroLikeAbilityPanel:BindEvent()
end
--添加事件监听(用于子类重写)
function HeroLikeAbilityPanel:AddListener()
-
+ Game.GlobalEvent.AddEvent(GameEvent.LikeAbility.RefreshRemainTimes,self.RefreshTimes,self)
end
--移除事件监听(用于子类重写)
function HeroLikeAbilityPanel:RemoveListener()
+ Game.GlobalEvent.RemoveEvent(GameEvent.LikeAbility.RefreshRemainTimes,self.RefreshTimes,self)
+end
+function HeroLikeAbilityPanel:RefreshTimes()
+ self.remainTimes.text = string.format("今日剩余次数:%s次",LikabilityManager.GetRemainTimes())
end
function HeroLikeAbilityPanel:OnSortingOrderChange()
diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua
index dbc9f0e62a..951b195a28 100644
--- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua
@@ -316,6 +316,7 @@ function this.RefreshUpdateIndication(buffer)
Game.GlobalEvent:DispatchEvent(GameEvent.Activity.OnPatFaceRedRefresh)
LikabilityManager.SetRemainTimes(msg.likableRemainTime,0)
+ Game.GlobalEvent:DispatchEvent(GameEvent.LikeAbility.RefreshRemainTimes)
CheckRedPointStatus(RedPointType.LikeabilityRed)
CheckRedPointStatus(RedPointType.SecretTer_HaveFreeTime)
CheckRedPointStatus(RedPointType.DailyGift)