diff --git a/server/gameserver/mtb/MobaRoom.h b/server/gameserver/mtb/MobaRoom.h index 099167d7..2615e4c9 100644 --- a/server/gameserver/mtb/MobaRoom.h +++ b/server/gameserver/mtb/MobaRoom.h @@ -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: diff --git a/server/gameserver/mtb/mtb.all.cc b/server/gameserver/mtb/mtb.all.cc index 487b6c15..b3bc873e 100644 --- a/server/gameserver/mtb/mtb.all.cc +++ b/server/gameserver/mtb/mtb.all.cc @@ -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; diff --git a/server/tools/protobuild/mt.proto b/server/tools/protobuild/mt.proto index 849b87bd..84e729d4 100755 --- a/server/tools/protobuild/mt.proto +++ b/server/tools/protobuild/mt.proto @@ -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; }