This commit is contained in:
aozhiwei 2023-09-06 13:43:43 +08:00
parent a6328b71c7
commit c2e86e60be
4 changed files with 7 additions and 9 deletions

View File

@ -17,13 +17,7 @@ void MapMgr::Init()
(
[this] (const mt::Map* map_meta, bool& stop)
{
if (map_meta->map_id() == 2001 ||
map_meta->map_id() == 1003 ||
#ifdef DEBUG
(DebugCmd::EnableNewMap() && map_meta->map_id() == 2002) ||
#endif
false
) {
if (map_meta->IsOpen()) {
auto map_instance = std::make_shared<MapInstance>();
map_instance->map_id = map_meta->map_id();
map_instance->Init();

View File

@ -271,7 +271,7 @@ namespace mt
bool Map::IsOpen() const
{
return true;
return is_open();
}
}

View File

@ -34,6 +34,7 @@ namespace mtb
int map_type() const { return map_type_; };
int team() const { return team_; };
int star_condition() const { return star_condition_; };
int is_open() const { return is_open_; };
bool has_map_id() const { return __flags__.test(0);};
bool has_template_list() const { return __flags__.test(1);};
@ -59,6 +60,7 @@ namespace mtb
bool has_map_type() const { return __flags__.test(21);};
bool has_team() const { return __flags__.test(22);};
bool has_star_condition() const { return __flags__.test(23);};
bool has_is_opon() const { return __flags__.test(24);};
protected:
@ -86,6 +88,7 @@ namespace mtb
int map_type_ = 0;
int team_ = 0;
int star_condition_ = 0;
int is_open_ = 0;
public:
std::bitset<21> __flags__;

View File

@ -71,7 +71,7 @@ namespace mtb
{
a8::reflect::Class* meta_class = nullptr;
if (!meta_class) {
meta_class = new a8::reflect::Class("Map", 24, 0);
meta_class = new a8::reflect::Class("Map", 25, 0);
meta_class->SetSimpleField(0, "map_id", a8::reflect::ET_INT32, my_offsetof2(Map, map_id_));
meta_class->SetSimpleField(1, "template_list", a8::reflect::ET_STRING, my_offsetof2(Map, template_list_));
meta_class->SetSimpleField(2, "map_name", a8::reflect::ET_STRING, my_offsetof2(Map, map_name_));
@ -96,6 +96,7 @@ namespace mtb
meta_class->SetSimpleField(21, "map_type", a8::reflect::ET_INT32, my_offsetof2(Map, map_type_));
meta_class->SetSimpleField(22, "team", a8::reflect::ET_INT32, my_offsetof2(Map, team_));
meta_class->SetSimpleField(23, "star_condition", a8::reflect::ET_INT32, my_offsetof2(Map, star_condition_));
meta_class->SetSimpleField(24, "is_open", a8::reflect::ET_INT32, my_offsetof2(Map, is_open_));
}
return meta_class;
}