This commit is contained in:
aozhiwei 2023-03-14 20:37:58 +08:00
parent 860a900d19
commit 88cdf9c86e
3 changed files with 15 additions and 0 deletions

View File

@ -34,6 +34,8 @@ class Buff
list_head on_remove_contexts; list_head on_remove_contexts;
a8::XTimerWp remover_timer; a8::XTimerWp remover_timer;
std::shared_ptr<a8::Args> init_args; std::shared_ptr<a8::Args> init_args;
float res_scale = 1;
long long res_scale_frameno = 0;
Buff(); Buff();
~Buff(); ~Buff();

View File

@ -440,10 +440,20 @@ void CallFuncBuff::ProcLightCircle()
} else if (kActiveDjsSkillTimerEvent == event) { } else if (kActiveDjsSkillTimerEvent == event) {
context->in_human_infos.clear(); context->in_human_infos.clear();
context->active_skill_meta = args->Get<const mt::Skill*>(0); context->active_skill_meta = args->Get<const mt::Skill*>(0);
Buff* buff = owner->GetBuffByUniId(context->keep_buff_uniid);
if (buff) {
buff->res_scale = 2.0f;
buff->res_scale_frameno = room->GetFrameNo();
}
check_cb(); check_cb();
} else if (kDeactiveDjsSkillTimerEvent == event) { } else if (kDeactiveDjsSkillTimerEvent == event) {
context->in_human_infos.clear(); context->in_human_infos.clear();
context->active_skill_meta = nullptr; context->active_skill_meta = nullptr;
Buff* buff = owner->GetBuffByUniId(context->keep_buff_uniid);
if (buff) {
buff->res_scale = 1.0f;
buff->res_scale_frameno = room->GetFrameNo();
}
check_cb(); check_cb();
} }
}, },

View File

@ -295,6 +295,9 @@ void Buff::FillMFBuff(cs::MFBuff* buff_pb)
buff_pb->set_left_time(GetLeftTime()); buff_pb->set_left_time(GetLeftTime());
buff_pb->set_lasting_time(GetLastingTime()); buff_pb->set_lasting_time(GetLastingTime());
buff_pb->set_buff_uniid(buff_uniid); buff_pb->set_buff_uniid(buff_uniid);
if (res_scale_frameno > 0) {
buff_pb->set_res_scale(res_scale);
}
if (owner->IsHuman() && if (owner->IsHuman() &&
(meta->buff_effect() == kBET_Driver || (meta->buff_effect() == kBET_Driver ||
meta->buff_effect() == kBET_Passenger)) { meta->buff_effect() == kBET_Passenger)) {