From 3f6a45e547d8455f69350ed3a6cd843b9388da51 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 24 May 2023 14:50:35 +0800 Subject: [PATCH] 1 --- server/gameserver/mt/Param.cc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/server/gameserver/mt/Param.cc b/server/gameserver/mt/Param.cc index d1b938c0..439a80bb 100644 --- a/server/gameserver/mt/Param.cc +++ b/server/gameserver/mt/Param.cc @@ -209,6 +209,29 @@ namespace mt } } + { + std::vector strings; + a8::Split(GetStringParam("robot_placement"), strings, '|'); + for (auto& str : strings) { + s_.robot_placement.push_back(a8::XValue(str).GetDouble()); + } + if (s_.robot_placement.size() != 9) { + abort(); + } + } + { + s_.robot_placement_time = GetIntParam("robot_placement_time"); + } + { + std::vector strings; + a8::Split(GetStringParam("robot_placement_type"), strings, '|'); + for (auto& str : strings) { + s_.robot_placement_type.push_back(a8::XValue(str).GetDouble()); + } + if (s_.robot_placement_type.size() != 2) { + abort(); + } + } } int Param::GetIntParam(const std::string& param_name, int def_val)