From 2910f03bc4e83c82b5dccc015c409a29d2135c93 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 7 Apr 2023 20:50:30 +0800 Subject: [PATCH] 1 --- server/gameserver/mtb/MapThing.h | 5 ++++- server/gameserver/mtb/mtb.all.cc | 3 ++- server/tools/protobuild/mt.proto | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server/gameserver/mtb/MapThing.h b/server/gameserver/mtb/MapThing.h index f507cec3..0cb93499 100644 --- a/server/gameserver/mtb/MapThing.h +++ b/server/gameserver/mtb/MapThing.h @@ -46,6 +46,7 @@ namespace mtb int life_time() const { return life_time_; }; int summon_born_rad() const { return summon_born_rad_; }; const std::string shapes() const { return shapes_; }; + int delay_destroy() const { return delay_destroy_; }; bool has_thing_id() const { return __flags__.test(0);}; bool has_thing_type() const { return __flags__.test(1);}; @@ -83,6 +84,7 @@ namespace mtb bool has_life_time() const { return __flags__.test(33);}; bool has_summon_born_rad() const { return __flags__.test(34);}; bool has_shapes() const { return __flags__.test(35);}; + bool has_delay_destroy() const { return __flags__.test(36);}; protected: @@ -122,9 +124,10 @@ namespace mtb int life_time_ = 0; int summon_born_rad_ = 0; std::string shapes_; + int delay_destroy_ = 0; public: - std::bitset<36> __flags__; + std::bitset<37> __flags__; }; }; diff --git a/server/gameserver/mtb/mtb.all.cc b/server/gameserver/mtb/mtb.all.cc index 2ace87a8..35625213 100644 --- a/server/gameserver/mtb/mtb.all.cc +++ b/server/gameserver/mtb/mtb.all.cc @@ -112,7 +112,7 @@ namespace mtb { a8::reflect::Class* meta_class = nullptr; if (!meta_class) { - meta_class = new a8::reflect::Class("MapThing", 36, 0); + meta_class = new a8::reflect::Class("MapThing", 37, 0); meta_class->SetSimpleField(0, "thing_id", a8::reflect::ET_INT32, my_offsetof2(MapThing, thing_id_)); meta_class->SetSimpleField(1, "thing_type", a8::reflect::ET_INT32, my_offsetof2(MapThing, thing_type_)); meta_class->SetSimpleField(2, "time", a8::reflect::ET_INT32, my_offsetof2(MapThing, time_)); @@ -149,6 +149,7 @@ namespace mtb meta_class->SetSimpleField(33, "life_time", a8::reflect::ET_INT32, my_offsetof2(MapThing, life_time_)); meta_class->SetSimpleField(34, "summon_born_rad", a8::reflect::ET_INT32, my_offsetof2(MapThing, summon_born_rad_)); meta_class->SetSimpleField(35, "shapes", a8::reflect::ET_STRING, my_offsetof2(MapThing, shapes_)); + meta_class->SetSimpleField(36, "delay_destroy", a8::reflect::ET_INT32, my_offsetof2(MapThing, delay_destroy_)); } return meta_class; } diff --git a/server/tools/protobuild/mt.proto b/server/tools/protobuild/mt.proto index ddb1ea7e..2017df52 100755 --- a/server/tools/protobuild/mt.proto +++ b/server/tools/protobuild/mt.proto @@ -86,6 +86,7 @@ message MapThing optional int32 life_time = 33; optional int32 summon_born_rad = 34; optional string shapes = 36; + optional int32 delay_destroy = 38; } message SafeArea