From 03714d5473cda8a7f66803823fddf05394903ab2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 1 Apr 2024 11:22:44 +0800 Subject: [PATCH] 1 --- server/gameserver/ingamevoice.cc | 1 + server/gameserver/mtb/InGameVoice.h | 20 ++++++++++---------- server/gameserver/mtb/mtb.all.cc | 16 ++++++++-------- server/tools/protobuild/mt.proto | 1 + 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/server/gameserver/ingamevoice.cc b/server/gameserver/ingamevoice.cc index 13e3201e..2e372229 100644 --- a/server/gameserver/ingamevoice.cc +++ b/server/gameserver/ingamevoice.cc @@ -152,6 +152,7 @@ void InGameVoice::Notify(Human* killer, Human* deader, const mt::InGameVoice* me break; default: { + return; } break; } diff --git a/server/gameserver/mtb/InGameVoice.h b/server/gameserver/mtb/InGameVoice.h index 5ba71f92..6982b6af 100644 --- a/server/gameserver/mtb/InGameVoice.h +++ b/server/gameserver/mtb/InGameVoice.h @@ -11,7 +11,6 @@ namespace mtb std::shared_ptr GetClass() const; int event_type() const { return event_type_; }; - int moba_is_play() const { return moba_is_play_; }; int sound_id() const { return sound_id_; }; const std::string cond() const { return cond_; }; const std::string notify_object() const { return notify_object_; }; @@ -19,21 +18,21 @@ namespace mtb int play_interval() const { return play_interval_; }; int series_kill_interval() const { return series_kill_interval_; }; int play_scene() const { return play_scene_; }; + int id() const { return id_; }; bool has_event_type() const { return __flags__.test(0);}; - bool has_moba_is_play() const { return __flags__.test(1);}; - bool has_sound_id() const { return __flags__.test(2);}; - bool has_cond() const { return __flags__.test(3);}; - bool has_notify_object() const { return __flags__.test(4);}; - bool has_notify_fields() const { return __flags__.test(5);}; - bool has_play_interval() const { return __flags__.test(6);}; - bool has_series_kill_interval() const { return __flags__.test(7);}; - bool has_play_scene() const { return __flags__.test(8);}; + bool has_sound_id() const { return __flags__.test(1);}; + bool has_cond() const { return __flags__.test(2);}; + bool has_notify_object() const { return __flags__.test(3);}; + bool has_notify_fields() const { return __flags__.test(4);}; + bool has_play_interval() const { return __flags__.test(5);}; + bool has_series_kill_interval() const { return __flags__.test(6);}; + bool has_play_scene() const { return __flags__.test(7);}; + bool has_id() const { return __flags__.test(8);}; protected: int event_type_ = 0; - int moba_is_play_ = 0; int sound_id_ = 0; std::string cond_; std::string notify_object_; @@ -41,6 +40,7 @@ namespace mtb int play_interval_ = 0; int series_kill_interval_ = 0; int play_scene_ = 0; + int id_ = 0; public: std::bitset<9> __flags__; diff --git a/server/gameserver/mtb/mtb.all.cc b/server/gameserver/mtb/mtb.all.cc index d057f568..5e1c75a2 100644 --- a/server/gameserver/mtb/mtb.all.cc +++ b/server/gameserver/mtb/mtb.all.cc @@ -135,14 +135,14 @@ namespace mtb if (!meta_class) { meta_class = std::make_shared("InGameVoice", 9, 0); meta_class->SetSimpleField(0, "event_type", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, event_type_)); - meta_class->SetSimpleField(1, "moba_is_play", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, moba_is_play_)); - meta_class->SetSimpleField(2, "sound_id", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, sound_id_)); - meta_class->SetSimpleField(3, "cond", a8::reflect::ET_STRING, my_offsetof2(InGameVoice, cond_)); - meta_class->SetSimpleField(4, "notify_object", a8::reflect::ET_STRING, my_offsetof2(InGameVoice, notify_object_)); - meta_class->SetSimpleField(5, "notify_fields", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, notify_fields_)); - meta_class->SetSimpleField(6, "play_interval", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, play_interval_)); - meta_class->SetSimpleField(7, "series_kill_interval", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, series_kill_interval_)); - meta_class->SetSimpleField(8, "play_scene", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, play_scene_)); + meta_class->SetSimpleField(1, "sound_id", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, sound_id_)); + meta_class->SetSimpleField(2, "cond", a8::reflect::ET_STRING, my_offsetof2(InGameVoice, cond_)); + meta_class->SetSimpleField(3, "notify_object", a8::reflect::ET_STRING, my_offsetof2(InGameVoice, notify_object_)); + meta_class->SetSimpleField(4, "notify_fields", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, notify_fields_)); + meta_class->SetSimpleField(5, "play_interval", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, play_interval_)); + meta_class->SetSimpleField(6, "series_kill_interval", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, series_kill_interval_)); + meta_class->SetSimpleField(7, "play_scene", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, play_scene_)); + meta_class->SetSimpleField(8, "id", a8::reflect::ET_INT32, my_offsetof2(InGameVoice, id_)); } return meta_class; } diff --git a/server/tools/protobuild/mt.proto b/server/tools/protobuild/mt.proto index 2c179d59..39c6c1e0 100755 --- a/server/tools/protobuild/mt.proto +++ b/server/tools/protobuild/mt.proto @@ -68,6 +68,7 @@ message InGameVoice optional int32 play_interval = 7; optional int32 series_kill_interval = 8; optional int32 play_scene = 9; + optional int32 id = 10; } message MapArea