This commit is contained in:
azw 2023-11-07 02:02:49 +00:00
parent af44ab08ce
commit 2a5cf678ea

View File

@ -973,6 +973,9 @@ void CallFuncBuff::SummonCarSpecPoint()
void CallFuncBuff::RangeHoldBuff()
{
if (owner->dead) {
return;
}
struct InnerObject
{
CreatureWeakPtr c;
@ -992,7 +995,6 @@ void CallFuncBuff::RangeHoldBuff()
auto context = A8_MAKE_ANON_STRUCT_SHARED
(
std::map<int, InnerObject> in_human_infos;
int keep_buff_uniid = 0;
);
auto on_enter =
@ -1018,28 +1020,13 @@ void CallFuncBuff::RangeHoldBuff()
}
itr->second.OnLeave();
};
auto check_cb =
[this, context, on_enter, on_stay, on_leave]
()
{
if (!owner->dead) {
};
};
{
event_handlers_.push_back(owner->GetTrigger()->AddListener
(
kDieEvent,
[this, context] (const a8::Args& args) mutable
{
if (context->keep_buff_uniid) {
owner->RemoveBuffByUniId(context->keep_buff_uniid);
context->keep_buff_uniid = 0;
}
}
));
}
{
context->keep_buff_uniid = owner->TryAddBuff(GetCaster().Get(), meta->_int_buff_param4, skill_meta);
}
}