【战斗校验】山河社稷图,跨服战斗,地图战斗添加战斗校验

dev_chengFeng
gaoxin 2021-09-08 18:27:20 +08:00
parent 947a4fa368
commit c4bced89f7
11 changed files with 18 additions and 8 deletions

View File

@ -316,6 +316,7 @@ function this.SetData(root, data, ldata)
if freeTime<=0 and type==2 then
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeData.Id,1,function() end)
end
-- TODO: 没有战斗结果校验
NetManager.DailyChallengeRequest(data.Id,type,function(msg)
local fightData = BattleManager.GetBattleServerData(msg)
if type==1 then --挑战

View File

@ -232,6 +232,7 @@ function this.GetRewardView()
end
--开始战斗
function this.ExecuteFightBattle(id,type,func)
-- TODO: 没有战斗结果校验
NetManager.StartSituationChallengeRequest(id,type,function(msg)
if type == 1 then
local fightData = BattleManager.GetBattleServerData(msg,0)

View File

@ -58,6 +58,7 @@ function XinJiangLaiXi:BindEvent()
Util.AddOnceClick(self.fightBtn,function()
--开始战斗
if self.allData.fightTime > 0 then
-- TODO: 没有战斗结果校验
NetManager.NewGeneralAttackRequest(self.allData.activityId,2012,function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(2012, 1)--更新特权
local fightData = BattleManager.GetBattleServerData(msg,0)

View File

@ -161,14 +161,15 @@ function this.FightLevelFightBattle(_fightLevelData, callBack)
end
NetManager.HardStageFightRequest(_fightLevelData.nodeId, curFormationTypeDef,function (msg)--FIGHT_LEVEL
-- Log("山河社稷图回复战斗 星级 "..msg.stars.." drop "..#msg.drop.itemlist)
HardStageFightResponseMsg = msg
curBattlefightLevelData = _fightLevelData
HardStageFightResponseMsg = msg
curBattlefightLevelData = _fightLevelData
local result = msg.stars > 0 and 1 or 0
if _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then
local fightData = BattleManager.GetBattleServerData(msg,0)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHTLEVEL, callBack)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHTLEVEL, callBack):SetResult(result)
elseif _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevel then
local fightData = BattleManager.GetBattleServerData(msg,0)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL, callBack)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL, callBack):SetResult(result)
elseif _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevelReward then
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
--刷新数据刷新界面

View File

@ -48,7 +48,8 @@ function this.On_Btn2_Click()
PopupTipPanel.ShowTip(Language[10720])
return
end
NetManager.ChallengeDeathPathRequest(curIndex,function(msg)
-- TODO: 没有战斗结果校验
NetManager.ChallengeDeathPathRequest(curIndex,function(msg)
LogBlue("总伤害 "..msg.damage.." 历史最高 "..msg.historyMax)
local fightData = BattleManager.GetBattleServerData(msg)
DeathPosManager.drop=msg.drop

View File

@ -62,6 +62,7 @@ function this.FightBattle( callBack)
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_LOOT, 1)
end
end
-- TODO: 没有战斗结果校验
NetManager.FastFightChallengeRequest(type,monsterId,function (msg)
this.score = msg.score
this.hurt = msg.hurt

View File

@ -55,6 +55,7 @@ function this.GuildChallengeRequest(attackType,callBack)
attackTypeShotTime = attackType
if attackType == 0 then
canSweep = 1
-- TODO: 没有战斗结果校验
NetManager.GuildChallengeRequest(this.GetCurBoss(),attackType,function (msg)
local fightData = BattleManager.GetBattleServerData(msg)
this.damage = msg.damage

View File

@ -168,7 +168,7 @@ function this.StarFightHightLadder(personInfo,skipFight,callBack)
end
-- end)
end
)
):SetResult(msg.fightResult)
else
this.BattleHightLadderData(msg)
local fightData = BattleManager.GetBattleServerData(msg)

View File

@ -76,7 +76,7 @@ function this:BindEvent()
-- 刷新数据
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
end, 0.2):Start()
end)
end):SetResult(msg.result)
self:ClosePanel()
end)
else
@ -113,7 +113,8 @@ function this:BindEvent()
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)--打完刷新血量
end, 0.2):Start()
end)
end):SetResult(msg.result)
self:ClosePanel()
end)
end

View File

@ -37,6 +37,7 @@ function TaSuiLingXiao:BindEvent()
Util.AddClick(self.btnFight,function()
--开始战斗
-- TODO: 没有战斗结果校验
NetManager.TasuilingxiaoRequest(self.actData.activityId,function(msg)
CommonActPageManager.TaSuiLingXiaoMsg = msg
local fightData = BattleManager.GetBattleServerData(msg,0)

View File

@ -296,6 +296,7 @@ function this.GetMonsterDataReMainTimesAndTime()
this.fightBossOldIndex = 0
--开始战斗
function this.ExecuteFightBattle(id,func)
-- TODO: 没有战斗结果校验
NetManager.StartXiaoyaoBossFightRequest(id,function(msg)
local fightData = BattleManager.GetBattleServerData(msg,0)
if func then