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

dev_chengFeng
jiaoyangna 2021-07-13 10:38:39 +08:00
commit 9540951a28
2 changed files with 23 additions and 7 deletions

View File

@ -14,6 +14,7 @@ local buyTimes = 0
local storeDataId = 0
local callBack
local screenwidth
local isClick = false
-- local redTrailType = {
-- [1] = RedPointType.PersonTrailHelp,
-- [2] = RedPointType.BuddishTrailHelp,
@ -143,7 +144,6 @@ function MonsterCampNewPanel:BindEvent()
end
--快速战斗
local isClick = false
function this.QuickStartMonsterFightRequest()
if isClick then
return
@ -168,13 +168,13 @@ function this.QuickStartMonsterFightRequest()
isClick = false
else
Timer.New(function ()
isClick = false
end,1):Start()
MonsterCampManager.monsterWave = MonsterCampManager.monsterWave + 1
UIManager.OpenPanel(UIName.BattleWinPopup, nil, false, BATTLE_TYPE.MONSTER_CAMP, result, true, true,function()
-- UIManager.OpenPanel(UIName.RewardItemPopup,msg.enventDrop,1,function()
this.OnShowPanel()--刷新界面
Timer.New(function ()
isClick = false
end,0.5):Start()
-- end)
end)
end
@ -206,6 +206,7 @@ end
--界面打开时调用(用于子类重写)
function MonsterCampNewPanel:OnOpen()
this.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.MonsterCamp })
isClick = false
end
--界面打开时调用(用于子类重写)

View File

@ -433,6 +433,16 @@ end
function RoleInfoLayout:OnSortingOrderChange()
end
function RoleInfoLayout:IsCanUpLv(curLv, targetLv)
if isHeroUpTuPo and curLv == upTuPoRankUpConfig.LimitLevel then
return true
end
if (not curTuPoRankUpConfig and targetLv > 30) or (curTuPoRankUpConfig and targetLv > curTuPoRankUpConfig.OpenLevel) then
return false
end
return true
end
--升级按钮点击事件处理
function RoleInfoLayout:LvUpClick(isSingleLvUp)
--是否为最大等级
@ -475,7 +485,7 @@ function RoleInfoLayout:LvUpClick(isSingleLvUp)
else
if isUpLvMaterials then
if isSingleLvUp then--是否是单次升级
if not curTuPoRankUpConfig or curHeroData.lv >= curTuPoRankUpConfig.OpenLevel then
if not this:IsCanUpLv(curHeroData.lv, curHeroData.lv + 1) then
PopupTipPanel.ShowTip("无法升级")
return
end
@ -507,13 +517,17 @@ function RoleInfoLayout:LvUpClick(isSingleLvUp)
else
if isUpLvMaterials then
if isSingleLvUp then--是否是单次升级
-- 判断是否可以升级
if not this:IsCanUpLv(curHeroData.lv, curHeroData.lv + 1) then
PopupTipPanel.ShowTip("无法升级")
return
end
local curUpLv = curHeroData.lv
if isHeroUpTuPo and curHeroData.lv == upTuPoRankUpConfig.LimitLevel then
curUpLv = curHeroData.lv
else
curUpLv = curHeroData.lv + 1
end
-- --LogGreen("isSingleLvUp "..tostring(isSingleLvUp))
NetManager.HeroLvUpEvent(curHeroData.dynamicId,curUpLv,curHeroData.lv,function (msg)
this:DeleteLvUpMaterials(isSingleLvUp,msg)
end)
@ -534,7 +548,8 @@ function RoleInfoLayout:LvUpClick(isSingleLvUp)
end
--长按升级结束后请求协议
function RoleInfoLayout:LongLvUpClick(oldLv)
if not curTuPoRankUpConfig or curHeroData.lv >= curTuPoRankUpConfig.OpenLevel then
-- 判断是否可以升级
if not this:IsCanUpLv(oldLv, curHeroData.lv) then
PopupTipPanel.ShowTip("无法升级")
return
end