【战斗校验】山河社稷图,跨服战斗,地图战斗添加战斗校验
parent
947a4fa368
commit
c4bced89f7
|
@ -316,6 +316,7 @@ function this.SetData(root, data, ldata)
|
||||||
if freeTime<=0 and type==2 then
|
if freeTime<=0 and type==2 then
|
||||||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeData.Id,1,function() end)
|
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeData.Id,1,function() end)
|
||||||
end
|
end
|
||||||
|
-- TODO: 没有战斗结果校验
|
||||||
NetManager.DailyChallengeRequest(data.Id,type,function(msg)
|
NetManager.DailyChallengeRequest(data.Id,type,function(msg)
|
||||||
local fightData = BattleManager.GetBattleServerData(msg)
|
local fightData = BattleManager.GetBattleServerData(msg)
|
||||||
if type==1 then --挑战
|
if type==1 then --挑战
|
||||||
|
|
|
@ -232,6 +232,7 @@ function this.GetRewardView()
|
||||||
end
|
end
|
||||||
--开始战斗
|
--开始战斗
|
||||||
function this.ExecuteFightBattle(id,type,func)
|
function this.ExecuteFightBattle(id,type,func)
|
||||||
|
-- TODO: 没有战斗结果校验
|
||||||
NetManager.StartSituationChallengeRequest(id,type,function(msg)
|
NetManager.StartSituationChallengeRequest(id,type,function(msg)
|
||||||
if type == 1 then
|
if type == 1 then
|
||||||
local fightData = BattleManager.GetBattleServerData(msg,0)
|
local fightData = BattleManager.GetBattleServerData(msg,0)
|
||||||
|
|
|
@ -58,6 +58,7 @@ function XinJiangLaiXi:BindEvent()
|
||||||
Util.AddOnceClick(self.fightBtn,function()
|
Util.AddOnceClick(self.fightBtn,function()
|
||||||
--开始战斗
|
--开始战斗
|
||||||
if self.allData.fightTime > 0 then
|
if self.allData.fightTime > 0 then
|
||||||
|
-- TODO: 没有战斗结果校验
|
||||||
NetManager.NewGeneralAttackRequest(self.allData.activityId,2012,function(msg)
|
NetManager.NewGeneralAttackRequest(self.allData.activityId,2012,function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(2012, 1)--更新特权
|
PrivilegeManager.RefreshPrivilegeUsedTimes(2012, 1)--更新特权
|
||||||
local fightData = BattleManager.GetBattleServerData(msg,0)
|
local fightData = BattleManager.GetBattleServerData(msg,0)
|
||||||
|
|
|
@ -161,14 +161,15 @@ function this.FightLevelFightBattle(_fightLevelData, callBack)
|
||||||
end
|
end
|
||||||
NetManager.HardStageFightRequest(_fightLevelData.nodeId, curFormationTypeDef,function (msg)--FIGHT_LEVEL
|
NetManager.HardStageFightRequest(_fightLevelData.nodeId, curFormationTypeDef,function (msg)--FIGHT_LEVEL
|
||||||
-- Log("山河社稷图回复战斗 星级 "..msg.stars.." drop "..#msg.drop.itemlist)
|
-- Log("山河社稷图回复战斗 星级 "..msg.stars.." drop "..#msg.drop.itemlist)
|
||||||
HardStageFightResponseMsg = msg
|
HardStageFightResponseMsg = msg
|
||||||
curBattlefightLevelData = _fightLevelData
|
curBattlefightLevelData = _fightLevelData
|
||||||
|
local result = msg.stars > 0 and 1 or 0
|
||||||
if _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then
|
if _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then
|
||||||
local fightData = BattleManager.GetBattleServerData(msg,0)
|
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
|
elseif _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevel then
|
||||||
local fightData = BattleManager.GetBattleServerData(msg,0)
|
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
|
elseif _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevelReward then
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||||
--刷新数据刷新界面
|
--刷新数据刷新界面
|
||||||
|
|
|
@ -48,7 +48,8 @@ function this.On_Btn2_Click()
|
||||||
PopupTipPanel.ShowTip(Language[10720])
|
PopupTipPanel.ShowTip(Language[10720])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
NetManager.ChallengeDeathPathRequest(curIndex,function(msg)
|
-- TODO: 没有战斗结果校验
|
||||||
|
NetManager.ChallengeDeathPathRequest(curIndex,function(msg)
|
||||||
LogBlue("总伤害 "..msg.damage.." 历史最高 "..msg.historyMax)
|
LogBlue("总伤害 "..msg.damage.." 历史最高 "..msg.historyMax)
|
||||||
local fightData = BattleManager.GetBattleServerData(msg)
|
local fightData = BattleManager.GetBattleServerData(msg)
|
||||||
DeathPosManager.drop=msg.drop
|
DeathPosManager.drop=msg.drop
|
||||||
|
|
|
@ -62,6 +62,7 @@ function this.FightBattle( callBack)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_LOOT, 1)
|
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_LOOT, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- TODO: 没有战斗结果校验
|
||||||
NetManager.FastFightChallengeRequest(type,monsterId,function (msg)
|
NetManager.FastFightChallengeRequest(type,monsterId,function (msg)
|
||||||
this.score = msg.score
|
this.score = msg.score
|
||||||
this.hurt = msg.hurt
|
this.hurt = msg.hurt
|
||||||
|
|
|
@ -55,6 +55,7 @@ function this.GuildChallengeRequest(attackType,callBack)
|
||||||
attackTypeShotTime = attackType
|
attackTypeShotTime = attackType
|
||||||
if attackType == 0 then
|
if attackType == 0 then
|
||||||
canSweep = 1
|
canSweep = 1
|
||||||
|
-- TODO: 没有战斗结果校验
|
||||||
NetManager.GuildChallengeRequest(this.GetCurBoss(),attackType,function (msg)
|
NetManager.GuildChallengeRequest(this.GetCurBoss(),attackType,function (msg)
|
||||||
local fightData = BattleManager.GetBattleServerData(msg)
|
local fightData = BattleManager.GetBattleServerData(msg)
|
||||||
this.damage = msg.damage
|
this.damage = msg.damage
|
||||||
|
|
|
@ -168,7 +168,7 @@ function this.StarFightHightLadder(personInfo,skipFight,callBack)
|
||||||
end
|
end
|
||||||
-- end)
|
-- end)
|
||||||
end
|
end
|
||||||
)
|
):SetResult(msg.fightResult)
|
||||||
else
|
else
|
||||||
this.BattleHightLadderData(msg)
|
this.BattleHightLadderData(msg)
|
||||||
local fightData = BattleManager.GetBattleServerData(msg)
|
local fightData = BattleManager.GetBattleServerData(msg)
|
||||||
|
|
|
@ -76,7 +76,7 @@ function this:BindEvent()
|
||||||
-- 刷新数据
|
-- 刷新数据
|
||||||
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
|
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
|
||||||
end, 0.2):Start()
|
end, 0.2):Start()
|
||||||
end)
|
end):SetResult(msg.result)
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
|
@ -113,7 +113,8 @@ function this:BindEvent()
|
||||||
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
|
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)--打完刷新血量
|
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)--打完刷新血量
|
||||||
end, 0.2):Start()
|
end, 0.2):Start()
|
||||||
end)
|
end):SetResult(msg.result)
|
||||||
|
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,6 +37,7 @@ function TaSuiLingXiao:BindEvent()
|
||||||
|
|
||||||
Util.AddClick(self.btnFight,function()
|
Util.AddClick(self.btnFight,function()
|
||||||
--开始战斗
|
--开始战斗
|
||||||
|
-- TODO: 没有战斗结果校验
|
||||||
NetManager.TasuilingxiaoRequest(self.actData.activityId,function(msg)
|
NetManager.TasuilingxiaoRequest(self.actData.activityId,function(msg)
|
||||||
CommonActPageManager.TaSuiLingXiaoMsg = msg
|
CommonActPageManager.TaSuiLingXiaoMsg = msg
|
||||||
local fightData = BattleManager.GetBattleServerData(msg,0)
|
local fightData = BattleManager.GetBattleServerData(msg,0)
|
||||||
|
|
|
@ -296,6 +296,7 @@ function this.GetMonsterDataReMainTimesAndTime()
|
||||||
this.fightBossOldIndex = 0
|
this.fightBossOldIndex = 0
|
||||||
--开始战斗
|
--开始战斗
|
||||||
function this.ExecuteFightBattle(id,func)
|
function this.ExecuteFightBattle(id,func)
|
||||||
|
-- TODO: 没有战斗结果校验
|
||||||
NetManager.StartXiaoyaoBossFightRequest(id,function(msg)
|
NetManager.StartXiaoyaoBossFightRequest(id,function(msg)
|
||||||
local fightData = BattleManager.GetBattleServerData(msg,0)
|
local fightData = BattleManager.GetBattleServerData(msg,0)
|
||||||
if func then
|
if func then
|
||||||
|
|
Loading…
Reference in New Issue