当车迟抢夺编队为空时前端直接弹结果

dev_chengFeng
zhangqiang 2020-09-03 15:58:00 +08:00
parent 71851d1662
commit b6c47a3762
3 changed files with 25 additions and 5 deletions

View File

@ -514,9 +514,9 @@ RectTransform:
m_Father: {fileID: 7723528773779627565}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 568, y: 1084}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 28, y: 124}
m_SizeDelta: {x: 692.1, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4185124015842772771

View File

@ -112,6 +112,7 @@ function this.SingleInfoDataShow(go,data)
Util.GetGameObject(curHeroGoList[i], "hero"):SetActive(false)
Util.GetGameObject(curHeroGoList[i], "frame"):GetComponent("Image").sprite = Util.LoadSprite("r_characterbg_gray")
end
-- LogGreen(" #data.teamInfo ".. #data.teamInfo)
for i = 1, #data.teamInfo do
local heroGo = Util.GetGameObject(curHeroGoList[data.teamInfo[i].position], "hero")
heroGo:SetActive(true)
@ -133,8 +134,15 @@ function this.SingleInfoDataShow(go,data)
--抢夺点击事件
Util.AddOnceClick(Util.GetGameObject(go, "lootBtn"), function()
GuildCarDelayManager.SetheroDid(data.uid)
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.GUILD_CAR_DELEAY)
this:ClosePanel()
if data.teamInfo and #data.teamInfo > 0 then
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.GUILD_CAR_DELEAY)
this:ClosePanel()
else
GuildCarDelayManager.FightBattle(function()
this:ClosePanel()
UIManager.OpenPanel(UIName.GuildCarDelayMainPanel)
end)
end
end)
end
--界面关闭时调用(用于子类重写)

View File

@ -48,11 +48,23 @@ function this.FightBattle( callBack)
type = 2
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_LOOT, 1)
end
-- LogGreen("type "..type.." monsterId "..monsterId)
NetManager.FastFightChallengeRequest(type,monsterId,function (msg)
this.score = msg.score
this.hurt = msg.hurt
local fightData = BattleManager.GetBattleServerData(msg,fightType)
if fightData.fightData.enemyData[1] and LengthOfTable(fightData.fightData.enemyData[1]) > 4 then
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.GUILD_CAR_DELAY, callBack)
else--抢夺目标阵容为空时
--车迟抢夺cd计时
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
-- "抢夺成功获得XXXX积分"Language[10027]
PopupTipPanel.ShowTip(string.format(Language[12391], this.score))
if callBack then
callBack()
callBack = nil
end
end
end)
end
function this.SetCdTime(progress)