【车迟斗法】 我编队为空 或者 对方编队我空 逻辑处理
parent
1b68c9d93b
commit
ff49cae4bb
|
|
@ -134,7 +134,11 @@ function this.SingleInfoDataShow(go,data)
|
||||||
end
|
end
|
||||||
--抢夺点击事件
|
--抢夺点击事件
|
||||||
Util.AddOnceClick(Util.GetGameObject(go, "lootBtn"), function()
|
Util.AddOnceClick(Util.GetGameObject(go, "lootBtn"), function()
|
||||||
GuildCarDelayManager.SetheroDid(data.uid)
|
GuildCarDelayManager.SetheroDid(data)
|
||||||
|
local formationTeamHeros = FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.GUILD_CAR_DELEAY)
|
||||||
|
if LengthOfTable(formationTeamHeros) <= 0 then
|
||||||
|
FormationManager.GetFormationByID(FormationTypeDef.GUILD_CAR_DELEAY)
|
||||||
|
end
|
||||||
if data.teamInfo and #data.teamInfo > 0 then
|
if data.teamInfo and #data.teamInfo > 0 then
|
||||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.GUILD_CAR_DELEAY)
|
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.GUILD_CAR_DELEAY)
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,9 @@ end
|
||||||
--开始战斗
|
--开始战斗
|
||||||
this.score = 0
|
this.score = 0
|
||||||
this.hurt = 0
|
this.hurt = 0
|
||||||
this.heroDid = 0--抢夺是向后端传的id
|
this.heroDidData = 0--抢夺是向后端传的id
|
||||||
function this.SetheroDid(_heroDid)
|
function this.SetheroDid(_heroDidData)
|
||||||
this.heroDid = _heroDid
|
this.heroDidData = _heroDidData
|
||||||
end
|
end
|
||||||
function this.FightBattle( callBack)
|
function this.FightBattle( callBack)
|
||||||
local type = 0
|
local type = 0
|
||||||
|
|
@ -43,7 +43,7 @@ function this.FightBattle( callBack)
|
||||||
type = 1
|
type = 1
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_CHALLENGE, 1)
|
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_CHALLENGE, 1)
|
||||||
elseif this.progress == GuildCarDelayProType.Loot then
|
elseif this.progress == GuildCarDelayProType.Loot then
|
||||||
monsterId = this.heroDid
|
monsterId = this.heroDidData.uid
|
||||||
fightType = 1
|
fightType = 1
|
||||||
type = 2
|
type = 2
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_LOOT, 1)
|
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_LOOT, 1)
|
||||||
|
|
@ -53,7 +53,7 @@ function this.FightBattle( callBack)
|
||||||
this.score = msg.score
|
this.score = msg.score
|
||||||
this.hurt = msg.hurt
|
this.hurt = msg.hurt
|
||||||
local fightData = BattleManager.GetBattleServerData(msg,fightType)
|
local fightData = BattleManager.GetBattleServerData(msg,fightType)
|
||||||
if fightData.fightData.enemyData[1] and LengthOfTable(fightData.fightData.enemyData[1]) > 4 then
|
if this.heroDidData and this.heroDidData.teamInfo and #this.heroDidData.teamInfo > 0 then
|
||||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.GUILD_CAR_DELAY, callBack)
|
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.GUILD_CAR_DELAY, callBack)
|
||||||
else--抢夺目标阵容为空时
|
else--抢夺目标阵容为空时
|
||||||
--车迟抢夺cd计时
|
--车迟抢夺cd计时
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue