修复重复创建问题
This commit is contained in:
parent
b8de4b85b1
commit
f7e8eb37e1
@ -142,34 +142,36 @@ private:
|
|||||||
parameter_hash[item.i->param_name()] = &item;
|
parameter_hash[item.i->param_name()] = &item;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& meta : map_meta_list) {
|
{
|
||||||
MetaData::Map& item = a8::FastAppend(map_list);
|
for (auto& meta : map_meta_list) {
|
||||||
item.i = &meta;
|
MetaData::Map& item = a8::FastAppend(map_list);
|
||||||
item.Init();
|
item.i = &meta;
|
||||||
gamemap_hash[item.i->map_id()] = &item;
|
item.Init();
|
||||||
#if 1
|
gamemap_hash[item.i->map_id()] = &item;
|
||||||
{
|
#if 1
|
||||||
for (auto& tuple : item.template_list) {
|
{
|
||||||
auto itr = maptpl_meta_hash.find(std::get<0>(tuple));
|
for (auto& tuple : item.template_list) {
|
||||||
if (itr == maptpl_meta_hash.end()) {
|
auto itr = maptpl_meta_hash.find(std::get<0>(tuple));
|
||||||
maptpl_meta_hash[std::get<0>(tuple)] = std::list<metatable::MapTplThingJson>();
|
if (itr == maptpl_meta_hash.end()) {
|
||||||
itr = maptpl_meta_hash.find(std::get<0>(tuple));
|
maptpl_meta_hash[std::get<0>(tuple)] = std::list<metatable::MapTplThingJson>();
|
||||||
} else {
|
itr = maptpl_meta_hash.find(std::get<0>(tuple));
|
||||||
itr->second.clear();
|
} else {
|
||||||
|
itr->second.clear();
|
||||||
|
}
|
||||||
|
f8::ReadJsonMetaFile(res_path + std::get<0>(tuple) + ".json", itr->second);
|
||||||
}
|
}
|
||||||
f8::ReadJsonMetaFile(res_path + std::get<0>(tuple) + ".json", itr->second);
|
|
||||||
}
|
|
||||||
for (auto& pair : maptpl_meta_hash) {
|
|
||||||
std::vector<MetaData::MapTplThing> things;
|
|
||||||
for (auto& itr : pair.second) {
|
|
||||||
auto& thing = a8::FastAppend(things);
|
|
||||||
thing.i = &itr;
|
|
||||||
thing.Init();
|
|
||||||
}
|
|
||||||
maptpl_hash[pair.first] = things;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
for (auto& pair : maptpl_meta_hash) {
|
||||||
|
std::vector<MetaData::MapTplThing> things;
|
||||||
|
for (auto& itr : pair.second) {
|
||||||
|
auto& thing = a8::FastAppend(things);
|
||||||
|
thing.i = &itr;
|
||||||
|
thing.Init();
|
||||||
|
}
|
||||||
|
maptpl_hash[pair.first] = things;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& meta : safearea_meta_list) {
|
for (auto& meta : safearea_meta_list) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user