【新假战斗】修复正常战斗报错,修复加战斗中主角性别错误

dev_chengFeng
gaoxin 2021-11-10 13:22:32 +08:00
parent 6d377cdf69
commit b661b04ad1
3 changed files with 12 additions and 2 deletions

View File

@ -324,6 +324,16 @@ function ConfigManager.TryGetConfigDataByThreeKey(cfgType, key1, value1, key2, v
return configData return configData
end end
---获取某个key值为value的所有条目 ---获取某个key值为value的所有条目
function ConfigManager.TryGetAllConfigsDataByKey(cfgType, key, value)
local expectList = {}
for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do
if configInfo[key] == value then
table.insert(expectList, configInfo)
end
end
return expectList
end
---获取某个key值为value的所有条目
function ConfigManager.GetAllConfigsDataByKey(cfgType, key, value) function ConfigManager.GetAllConfigsDataByKey(cfgType, key, value)
local expectList = {} local expectList = {}
for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do

View File

@ -682,7 +682,7 @@ function this.GetMonsterDataFromGroup(gId, camp)
unitId = 20100, unitId = 20100,
position = 100, position = 100,
star = 1, star = 1,
playerSex = 0, playerSex = NameManager.roleSex,
forceScore = 0, forceScore = 0,
property = {} property = {}
} }

View File

@ -5,7 +5,7 @@ function GuideBattleLogic:Init(guideType)
return return
end end
self.guideType = guideType self.guideType = guideType
self.configList = ConfigManager.GetAllConfigsDataByKey(ConfigName.GuideBattleConfig, "GuideGroup", self.guideType) self.configList = ConfigManager.TryGetAllConfigsDataByKey(ConfigName.GuideBattleConfig, "GuideGroup", self.guideType)
end end