1
This commit is contained in:
parent
54f0efdc8a
commit
6f79dee0d4
@ -24,6 +24,7 @@ namespace mt
|
||||
_int_buff_param4 = a8::XValue(buff_param4());
|
||||
_int_buff_param5 = a8::XValue(buff_param5());
|
||||
_int_buff_param6 = a8::XValue(buff_param6());
|
||||
_res_scale = a8::XValue(res_scale()).GetDouble();
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(child_buff(), strings, '|');
|
||||
@ -133,6 +134,9 @@ namespace mt
|
||||
if (a8::lisp::Expr::MaybeExpr(buff_param6())) {
|
||||
_buff_param6_expr = LispEnv::Instance()->CompileSkillNumberExpr(buff_param6());
|
||||
}
|
||||
if (a8::lisp::Expr::MaybeExpr(res_scale())) {
|
||||
_res_scale_expr = LispEnv::Instance()->CompileSkillNumberExpr(res_scale());
|
||||
}
|
||||
}
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
@ -414,14 +418,18 @@ namespace mt
|
||||
|
||||
float Buff::GetBuffParam6(::Buff* buff) const
|
||||
{
|
||||
if (_buff_param6_expr) {
|
||||
if (_res_scale_expr) {
|
||||
return LispEnv::Instance()->EvalSkillNumberExpr
|
||||
(
|
||||
_buff_param6_expr,
|
||||
_res_scale_expr,
|
||||
buff
|
||||
);
|
||||
}
|
||||
return _buff_param6;
|
||||
return _res_scale;
|
||||
}
|
||||
|
||||
float Buff::GetResScale(::Buff* buff) const
|
||||
{
|
||||
}
|
||||
|
||||
std::string Buff::duration_time() const
|
||||
|
@ -54,6 +54,7 @@ namespace mt
|
||||
long long _only_spec_race = 0;
|
||||
long long _exclude_spec_race = 0;
|
||||
std::vector<int> _effect_list;
|
||||
float _res_scale;
|
||||
|
||||
std::vector<int> _child_buff_list;
|
||||
|
||||
@ -64,6 +65,7 @@ namespace mt
|
||||
float GetBuffParam4(::Buff* buff) const;
|
||||
float GetBuffParam5(::Buff* buff) const;
|
||||
float GetBuffParam6(::Buff* buff) const;
|
||||
float GetResScale(::Buff* buff) const;
|
||||
|
||||
private:
|
||||
float _duration_time = 0.0f;
|
||||
@ -74,6 +76,7 @@ namespace mt
|
||||
std::shared_ptr<a8::lisp::Value> _buff_param4_expr;
|
||||
std::shared_ptr<a8::lisp::Value> _buff_param5_expr;
|
||||
std::shared_ptr<a8::lisp::Value> _buff_param6_expr;
|
||||
std::shared_ptr<a8::lisp::Value> _res_scale_expr;
|
||||
|
||||
std::string duration_time() const;
|
||||
|
||||
|
@ -44,6 +44,7 @@ namespace mtb
|
||||
int disable_shot() const { return disable_shot_; };
|
||||
int disable_useskill() const { return disable_useskill_; };
|
||||
const std::string effect_list() const { return effect_list_; };
|
||||
const std::string res_scale() const { return res_scale_; };
|
||||
|
||||
bool has_buff_id() const { return __flags__.test(0);};
|
||||
bool has_name() const { return __flags__.test(1);};
|
||||
@ -79,6 +80,7 @@ namespace mtb
|
||||
bool has_disable_shot() const { return __flags__.test(31);};
|
||||
bool has_disable_useskill() const { return __flags__.test(32);};
|
||||
bool has_effect_list() const { return __flags__.test(33);};
|
||||
bool has_res_scale() const { return __flags__.test(34);};
|
||||
|
||||
protected:
|
||||
|
||||
@ -116,9 +118,10 @@ namespace mtb
|
||||
int disable_shot_ = 0;
|
||||
int disable_useskill_ = 0;
|
||||
std::string effect_list_;
|
||||
std::string res_scale_;
|
||||
|
||||
public:
|
||||
std::bitset<34> __flags__;
|
||||
std::bitset<35> __flags__;
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -443,7 +443,7 @@ namespace mtb
|
||||
{
|
||||
a8::reflect::Class* meta_class = nullptr;
|
||||
if (!meta_class) {
|
||||
meta_class = new a8::reflect::Class("Buff", 34, 0);
|
||||
meta_class = new a8::reflect::Class("Buff", 35, 0);
|
||||
meta_class->SetSimpleField(0, "buff_id", a8::reflect::ET_INT32, my_offsetof2(Buff, buff_id_));
|
||||
meta_class->SetSimpleField(1, "name", a8::reflect::ET_STRING, my_offsetof2(Buff, name_));
|
||||
meta_class->SetSimpleField(2, "buff_target", a8::reflect::ET_INT32, my_offsetof2(Buff, buff_target_));
|
||||
@ -478,6 +478,7 @@ namespace mtb
|
||||
meta_class->SetSimpleField(31, "disable_shot", a8::reflect::ET_INT32, my_offsetof2(Buff, disable_shot_));
|
||||
meta_class->SetSimpleField(32, "disable_useskill", a8::reflect::ET_INT32, my_offsetof2(Buff, disable_useskill_));
|
||||
meta_class->SetSimpleField(33, "effect_list", a8::reflect::ET_STRING, my_offsetof2(Buff, effect_list_));
|
||||
meta_class->SetSimpleField(34, "res_scale", a8::reflect::ET_STRING, my_offsetof2(Buff, res_scale_));
|
||||
}
|
||||
return meta_class;
|
||||
}
|
||||
|
@ -380,6 +380,7 @@ message Buff
|
||||
optional int32 disable_shot = 32;
|
||||
optional int32 disable_useskill = 33;
|
||||
optional string effect_list = 35;
|
||||
optional string res_scale = 39;
|
||||
}
|
||||
|
||||
message Drop
|
||||
|
Loading…
x
Reference in New Issue
Block a user