【2倍速修改】
parent
1320371eac
commit
194160cc40
|
@ -232,7 +232,10 @@ function this:OnOpen(_fightData, _fightType, _endFunc)
|
|||
BattleView:SetNameStr(nil)
|
||||
this.DefResult:SetActive(false)
|
||||
this.AtkResult:SetActive(false)
|
||||
|
||||
local lvOpenTimeScaleConFig = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.PrivilegeTypeConfig,"PrivilegeType",PRIVILEGE_TYPE.DoubleTimesFight,"UnlockType",1)
|
||||
if lvOpenTimeScaleConFig and PlayerManager.level == lvOpenTimeScaleConFig.Condition[1][1] and BattleManager.GetTimeScale() == BATTLE_TIME_SCALE_ONE then
|
||||
BattleManager.SetTimeScale(BATTLE_TIME_SCALE_TWO)
|
||||
end
|
||||
-- 开始战斗
|
||||
BattleView:StartBattle()
|
||||
|
||||
|
|
|
@ -241,23 +241,25 @@ function PrivilegeManager.GetPrivilegeOpenTip(privilegeType)
|
|||
end
|
||||
|
||||
--当存在多解锁类型时
|
||||
if #privilegeList>1 then
|
||||
local infoList={}
|
||||
-- if #privilegeList>1 then
|
||||
-- local infoList={}
|
||||
--解锁2倍速的处理
|
||||
for i,v in ipairs(privilegeList) do
|
||||
if (v.UnlockType==2 or v.UnlockType==3) and privilegeType==PRIVILEGE_TYPE.DoubleTimesFight then
|
||||
for _, con in ipairs(v.Condition) do
|
||||
if con[2] > 0 then
|
||||
table.insert(infoList, con[1])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- for i,v in ipairs(privilegeList) do
|
||||
-- if (v.UnlockType==1) and privilegeType==PRIVILEGE_TYPE.DoubleTimesFight then
|
||||
-- for _, con in ipairs(v.Condition) do
|
||||
-- if con[2] > 0 then
|
||||
-- table.insert(infoList, con[1])
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
if privilegeType==PRIVILEGE_TYPE.DoubleTimesFight then
|
||||
local fightConfig = ConfigManager.GetConfigData(ConfigName.MainLevelConfig, infoList[1])
|
||||
return string.format(Language[11402],GetLanguageStrById(fightConfig.Name),infoList[2])
|
||||
end
|
||||
local lvOpenTimeScaleConFig = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.PrivilegeTypeConfig,"PrivilegeType",PRIVILEGE_TYPE.DoubleTimesFight,"UnlockType",1)
|
||||
-- local fightConfig = ConfigManager.GetConfigData(ConfigName.MainLevelConfig, infoList[1])
|
||||
-- return string.format(Language[11402],GetLanguageStrById(fightConfig.Name),infoList[2])
|
||||
return string.format("玩家等级达到 %s 级解锁",lvOpenTimeScaleConFig.Condition[1][1])
|
||||
end
|
||||
-- end
|
||||
|
||||
local privilegeData = privilegeList[1]
|
||||
-- 没有条件直接返回0
|
||||
|
|
Loading…
Reference in New Issue