diff --git a/server/gameserver/mt/GraspBuff.cc b/server/gameserver/mt/GraspBuff.cc index caa61e9d..d13bbafe 100644 --- a/server/gameserver/mt/GraspBuff.cc +++ b/server/gameserver/mt/GraspBuff.cc @@ -74,6 +74,13 @@ namespace mt _attr_nums.push_back(a8::XValue(str).GetDouble()); } } + { + std::vector strings; + a8::Split(effect_list(), strings, '|'); + for (auto& str : strings) { + _effect_list.push_back(a8::XValue(str).GetDouble()); + } + } } void GraspBuff::Init2() diff --git a/server/gameserver/mt/GraspBuff.h b/server/gameserver/mt/GraspBuff.h index c5bc10a8..ccc4447e 100644 --- a/server/gameserver/mt/GraspBuff.h +++ b/server/gameserver/mt/GraspBuff.h @@ -17,6 +17,7 @@ namespace mt int _trigger_type = 0; int _trigger_subtype = 0; std::vector _trigger_cond; + std::vector _effect_list; int GetBuffTime(int hero_lv) const; float GetAttrNum(int hero_lv) const; diff --git a/server/gameserver/mtb/GraspBuff.h b/server/gameserver/mtb/GraspBuff.h index e718d152..dd1c4884 100644 --- a/server/gameserver/mtb/GraspBuff.h +++ b/server/gameserver/mtb/GraspBuff.h @@ -19,6 +19,7 @@ namespace mtb int attr_add_pattern() const { return attr_add_pattern_; }; int attr_add_pattern2() const { return attr_add_pattern2_; }; const std::string attr_num() const { return attr_num_; }; + const std::string effect_list() const { return effect_list_; }; bool has_graspbuff_id() const { return __flags__.test(0);}; bool has_graspbuff_floor() const { return __flags__.test(1);}; @@ -29,6 +30,7 @@ namespace mtb bool has_attr_add_pattern() const { return __flags__.test(6);}; bool has_attr_add_pattern2() const { return __flags__.test(7);}; bool has_attr_num() const { return __flags__.test(8);}; + bool has_effect_list() const { return __flags__.test(9);}; protected: @@ -41,9 +43,10 @@ namespace mtb int attr_add_pattern_ = 0; int attr_add_pattern2_ = 0; std::string attr_num_; + std::string effect_list_; public: - std::bitset<9> __flags__; + std::bitset<10> __flags__; }; }; diff --git a/server/gameserver/mtb/mtb.all.cc b/server/gameserver/mtb/mtb.all.cc index 78402152..ca24eaea 100644 --- a/server/gameserver/mtb/mtb.all.cc +++ b/server/gameserver/mtb/mtb.all.cc @@ -756,7 +756,7 @@ namespace mtb { a8::reflect::Class* meta_class = nullptr; if (!meta_class) { - meta_class = new a8::reflect::Class("GraspBuff", 9, 0); + meta_class = new a8::reflect::Class("GraspBuff", 10, 0); meta_class->SetSimpleField(0, "graspbuff_id", a8::reflect::ET_INT32, my_offsetof2(GraspBuff, graspbuff_id_)); meta_class->SetSimpleField(1, "graspbuff_floor", a8::reflect::ET_INT32, my_offsetof2(GraspBuff, graspbuff_floor_)); meta_class->SetSimpleField(2, "graspbuff_trigger", a8::reflect::ET_STRING, my_offsetof2(GraspBuff, graspbuff_trigger_)); @@ -766,6 +766,7 @@ namespace mtb meta_class->SetSimpleField(6, "attr_add_pattern", a8::reflect::ET_INT32, my_offsetof2(GraspBuff, attr_add_pattern_)); meta_class->SetSimpleField(7, "attr_add_pattern2", a8::reflect::ET_INT32, my_offsetof2(GraspBuff, attr_add_pattern2_)); meta_class->SetSimpleField(8, "attr_num", a8::reflect::ET_STRING, my_offsetof2(GraspBuff, attr_num_)); + meta_class->SetSimpleField(9, "effect_list", a8::reflect::ET_STRING, my_offsetof2(GraspBuff, effect_list_)); } return meta_class; } diff --git a/server/tools/protobuild/mt.proto b/server/tools/protobuild/mt.proto index 292fbfbb..700f2fb4 100755 --- a/server/tools/protobuild/mt.proto +++ b/server/tools/protobuild/mt.proto @@ -570,4 +570,5 @@ message GraspBuff optional int32 attr_add_pattern = 8; optional int32 attr_add_pattern2 = 9; optional string attr_num = 10; + optional string effect_list = 11; }