Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
jiaoyangna 2021-11-05 16:20:01 +08:00
commit ad3b903209
4 changed files with 14 additions and 6 deletions

View File

@ -221,8 +221,8 @@ function this.ShowCountTime()
tempLeftTime = leftTime
end
if leftTime < 0 then
PlayerManager.RequestEnergy()
leftTime = 0
PlayerManager.RefreshItemNumBySerTime()
end
this.actCountTime.text = GetTimeMaoHaoStrBySeconds(math.floor(leftTime)).."后恢复1点"
end, 1, -1, true)

View File

@ -381,6 +381,7 @@ function EndLessMapView:OnShow()
EndLessMapManager.openedFormat = false
PlayerManager.RequestEnergy()
this.isPanelClose = false
-- 刷新倒计时显示
this:ShowCountTime()
@ -765,9 +766,9 @@ function EndLessMapView:ShowCountTime()
this:RefreshEnergyShow()
tempLeftTime = leftTime
end
if leftTime < 0 then
if leftTime <= 0 then
PlayerManager.RequestEnergy()
leftTime = 0
PlayerManager.RefreshItemNumBySerTime()
end
if not this.isPanelClose then
this.actCountTime.text = GetTimeMaoHaoStrBySeconds(math.floor(leftTime)).."后恢复1点"

View File

@ -449,7 +449,7 @@ local funcList = {
--事件点触发
function this.EventPointTrigger(eventId)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)
PlayerManager.RefreshItemNumBySerTime()
PlayerManager.RequestEnergy()
MyPCall(function ()
Log("EventPointTrigger中得到的事件ID " .. eventId)
if eventId == 0 or eventId < 0 then

View File

@ -176,10 +176,9 @@ function this.RefreshItemNumBySerTime()
end
end
end
local nextRefreshTime = 0
function this.RefreshItemNumById(itemId)
if not BagManager.bagDatas[itemId] then return end
nextRefreshTime = BagManager.bagDatas[itemId].nextFlushTime
local nextRefreshTime = BagManager.bagDatas[itemId].nextFlushTime
if(nextRefreshTime) then
if this.serverTime >= nextRefreshTime and nextRefreshTime ~= 0 then
if isAddItem[itemId] then
@ -213,6 +212,14 @@ function this.RefreshItemNumById(itemId)
end
end
this.curLevelAndExp = {}
--无尽请求行动力刷新
function this.RequestEnergy()
NetManager.RefreshEnergyRequest({1},function()
-- LogWarn("无尽请求行动力刷新")
end)
end
function this.BcakUpdateUserExp(_msg)
if not UIManager.IsOpen(UIName.FightMopUpEndPanel) then
Log("后端更新玩家等级 和 经验 ".._msg.level.." ".._msg.exp)