1
This commit is contained in:
parent
18ec8eda7f
commit
e7ca5aad51
@ -74,6 +74,13 @@ namespace mt
|
||||
_attr_nums.push_back(a8::XValue(str).GetDouble());
|
||||
}
|
||||
}
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(effect_list(), strings, '|');
|
||||
for (auto& str : strings) {
|
||||
_effect_list.push_back(a8::XValue(str).GetDouble());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GraspBuff::Init2()
|
||||
|
@ -17,6 +17,7 @@ namespace mt
|
||||
int _trigger_type = 0;
|
||||
int _trigger_subtype = 0;
|
||||
std::vector<int> _trigger_cond;
|
||||
std::vector<int> _effect_list;
|
||||
int GetBuffTime(int hero_lv) const;
|
||||
float GetAttrNum(int hero_lv) const;
|
||||
|
||||
|
@ -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__;
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user