This commit is contained in:
aozhiwei 2023-03-21 12:43:00 +08:00
parent 1445283da3
commit 4d59b16aaa

View File

@ -148,6 +148,7 @@ void CondAddBuff::ProcDisengageBattle()
(
std::vector<std::tuple<int, int>> hold_buff_list;
long long last_check_frameno = 0;
bool handled = false;
);
a8::XTimerWp timer = owner->room->xtimer.SetIntervalWpEx
@ -156,7 +157,7 @@ void CondAddBuff::ProcDisengageBattle()
[this, context] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
if (!owner->dead) {
if (!owner->dead && !context->handled) {
for (int buff_id : meta->_buff_param4_int_list) {
int buff_uniid = owner->TryAddBuff
(
@ -180,6 +181,7 @@ void CondAddBuff::ProcDisengageBattle()
}
}
}
context->handled = true;
}
}
},
@ -201,6 +203,7 @@ void CondAddBuff::ProcDisengageBattle()
}
context->hold_buff_list.clear();
}
context->handled = false;
owner->room->xtimer.ResetTimer(timer);
};