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

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
end
---获取某个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)
local expectList = {}
for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do

View File

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

View File

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