跳过战斗特权 修改

dev_chengFeng
ZhangBiao 2020-07-15 17:33:19 +08:00
parent 18c189cd0c
commit cbe238fc9d
4 changed files with 203 additions and 254 deletions

View File

@ -12488,223 +12488,15 @@ MonoBehaviour:
extension: .wav
resPathIndex: 81
resAbNameIndex: 90
- resName: Audio_battle_ab_lzhl01
- resName: Audio_battle_vo_ab01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_axl_aa01
- resName: Audio_battle_vo_axl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_bah_dww01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_bxxz_lhzf01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_chdr_qsqy01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_cy_aa01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_dhc_dhjf01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_dj_hmhx01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_dlsm_hskj01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_dm_lrzj01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_dst_zxtsl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_dz_htjl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_eh_hslc01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_fhlh_aa01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_ft_csl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_fx_lrzs01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_gg_alky01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_ghn_ysyn01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_hdxj_llhl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_hhe_swzh01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_hsmw_swzh01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_hxps_xtcz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jcdp_dpzc01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jgtn_aa01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jhns_ylp01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jhxn_wxlz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jll_yjl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jls_jlsw01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jl_aa01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jmm_myjm01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jw_aa01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jy_jyh01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_jzy_aa01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_lc_ssym01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_ldb_qzjfl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_ljgz_hllw01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_lsx_swz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_ls_lshd01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_lzz_fjlyl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_mjn_lhj01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_mp_lqfc01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_mslz_aa01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_mw_mwz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_mz_dzcx01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_mz_pxz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_nxq_lyc01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_ny_qmsg01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_qxn_yyw01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_rd_gftm01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_sdxj_sbj01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_sgb_aa01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_sjll_bgxp01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_tljz_zxxzl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_ts_jzlcl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_tyxj_tyyq01
- resName: Audio_battle_vo_bah01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
@ -12712,22 +12504,74 @@ MonoBehaviour:
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ce01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_chdr01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_cy01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ddtz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_dhdj01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_dj01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_dlsm01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_dm01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_dst01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_dz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_eh01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_fhlh01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ft01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_fx01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_gg01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ghn01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_hdxj01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_hhe01
extension: .mp3
resPathIndex: 82
@ -12736,14 +12580,38 @@ MonoBehaviour:
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_hxps01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_jcdp01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_jgtn01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_jhns01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_jll01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_jls01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_jlzz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_jmm01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_jtxn01
extension: .mp3
resPathIndex: 82
@ -12752,6 +12620,14 @@ MonoBehaviour:
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_jy01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_jzy01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_kqmw01
extension: .mp3
resPathIndex: 82
@ -12760,18 +12636,74 @@ MonoBehaviour:
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ldb01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ljgz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ls01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_lsx01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_lzz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_md01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_mmn01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_mp01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_muza01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_mz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_nxq01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ny01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_nz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_qxn01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_rd01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_sdxj01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_sgb01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_sjll01
extension: .mp3
resPathIndex: 82
@ -12780,10 +12712,22 @@ MonoBehaviour:
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_tljz01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ts01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_tyxj01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_wg01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_xllh01
extension: .mp3
resPathIndex: 82
@ -12792,6 +12736,14 @@ MonoBehaviour:
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ygl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_ygps01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_vo_yj01
extension: .mp3
resPathIndex: 82
@ -12808,42 +12760,6 @@ MonoBehaviour:
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_wg_wgfg01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_xllh_aa01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_yc_ycmh01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_ygl_yll01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_ygps_ysqr01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_yj_fjcy01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_ylw_pgdm01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_zbj_tpywl01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_battle_zz_zzm01
extension: .mp3
resPathIndex: 82
resAbNameIndex: 90
- resName: Audio_c_ch_0015_skeff_slidesk_buff
extension: .mp3
resPathIndex: 83

View File

@ -23,7 +23,8 @@ function this.SetBattleRecord(data, _optionData)
seed = data.fightSeed,
battleType = data.fightType,
fightData = data.fightData,
optionData = _optionData
optionData = _optionData,
result = -1,
}
BattleRecordList[_RecordIdFlag] = record
-- 设置当前战斗
@ -113,10 +114,39 @@ function this.GetBattleRecord(Id)
-- Log("uid:"..k)
-- Log("order = "..v.order.." camp = "..v.camp.." roleId = "..v.roleId.." monsterId = "..(v.monsterId or "nil").." roleLv = "..v.roleLv .." damage:"..v.damage.." heal:"..v.heal)
--end
record.result = BattleLogic.Result
return battleRecord
end
function this.GetBattleRecordResult(Id)
local isRecord, record = this.isHaveRecord(Id)
if not isRecord then
return
end
if record.result ~= -1 then
return record.result
end
local fightMaxRound= record.fightMaxRound
local seed = record.seed
local battleType = record.battleType
local fightData = record.fightData
local optionData = record.optionData
Random.SetSeed(seed)
BattleLogic.Init(fightData, optionData, fightMaxRound)
BattleLogic.Type = battleType
BattleLogic.StartOrder()
while not BattleLogic.IsEnd do
BattleLogic.Update()
end
record.result = BattleLogic.Result
return record.result
end
-- 获取当前战斗记录中我方最佳英雄数据
function this.GetBattleBestData(Id)
-- body

View File

@ -155,7 +155,7 @@ function this:BindEvent()
Util.AddClick(this.BtnGM, function ()
if BattleManager.IsCanOperate() and not BattleLogic.IsEnd then
BattleView.EndBattle(1)
BattleView.EndBattle()
BattleLogic.IsEnd = true
end
end)
@ -279,10 +279,10 @@ function this.InitOption()
this.Option:SetActive(true)
Util.GetGameObject(this.BtnTimeScale, "lock"):SetActive(not BattleManager.IsUnlockBattleSpeed())
local IsUnlockBattlePass = not BattleManager.IsUnlockBattlePass()
Util.GetGameObject(this.BtnExit, "lock"):SetActive(IsUnlockBattlePass)
Util.GetGameObject(this.Button, "lock"):SetActive(IsUnlockBattlePass)
this.Button:GetComponent("Button").interactable = not IsUnlockBattlePass
local IsUnLockBattlePass = BattleManager.IsUnlockBattlePass() or AppConst.isOpenGM
Util.GetGameObject(this.BtnExit, "lock"):SetActive(not IsUnLockBattlePass)
Util.GetGameObject(this.BtnGM, "lock"):SetActive(not IsUnLockBattlePass)
this.BtnGM:GetComponent("Button").interactable = IsUnLockBattlePass
-- 初始化战斗时间,刷新前端显示
BattleManager.InitTimeScale()

View File

@ -286,6 +286,9 @@ function this.EndBattle(result)
}
local battleId = BattleRecordManager.SetBattleRecord(record)
BattleRecordManager.SetBattleBothNameStr(this.nameStr, battleId)
result = result or BattleRecordManager.GetBattleRecordResult(battleId)
-- 战斗结束
this.root.BattleEnd(result)
end