This commit is contained in:
aozhiwei 2024-03-27 19:34:07 +08:00
parent 1e7dc66b00
commit aaa0a2ea1d
3 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ namespace mtb
int revive_time() const { return revive_time_; };
int game_time() const { return game_time_; };
int tower_interval() const { return tower_interval_; };
int tower_recover_hp_rate() const { return tower_recover_hp_rate_; };
float tower_recover_hp_rate() const { return tower_recover_hp_rate_; };
const std::string towers() const { return towers_; };
bool has_map_id() const { return __flags__.test(0);};
@ -30,7 +30,7 @@ namespace mtb
int revive_time_ = 0;
int game_time_ = 0;
int tower_interval_ = 0;
int tower_recover_hp_rate_ = 0;
float tower_recover_hp_rate_ = 0.0f;
std::string towers_;
public:

View File

@ -120,7 +120,7 @@ namespace mtb
meta_class->SetSimpleField(1, "revive_time", a8::reflect::ET_INT32, my_offsetof2(MobaRoom, revive_time_));
meta_class->SetSimpleField(2, "game_time", a8::reflect::ET_INT32, my_offsetof2(MobaRoom, game_time_));
meta_class->SetSimpleField(3, "tower_interval", a8::reflect::ET_INT32, my_offsetof2(MobaRoom, tower_interval_));
meta_class->SetSimpleField(4, "tower_recover_hp_rate", a8::reflect::ET_INT32, my_offsetof2(MobaRoom, tower_recover_hp_rate_));
meta_class->SetSimpleField(4, "tower_recover_hp_rate", a8::reflect::ET_FLOAT, my_offsetof2(MobaRoom, tower_recover_hp_rate_));
meta_class->SetSimpleField(5, "towers", a8::reflect::ET_STRING, my_offsetof2(MobaRoom, towers_));
}
return meta_class;

View File

@ -52,7 +52,7 @@ message MobaRoom
optional int32 revive_time = 2;
optional int32 game_time = 3;
optional int32 tower_interval = 4;
optional int32 tower_recover_hp_rate = 5;
optional float tower_recover_hp_rate = 5;
optional string towers = 6;
}