This commit is contained in:
aozhiwei 2023-04-05 16:28:07 +08:00
parent a401d1c6bd
commit 395d8d2246
2 changed files with 7 additions and 4 deletions

View File

@ -154,9 +154,10 @@ void CondAddBuff::ProcDisengageBattle()
std::vector<std::tuple<int, int>> hold_buff_list; std::vector<std::tuple<int, int>> hold_buff_list;
long long last_check_frameno = 0; long long last_check_frameno = 0;
bool handled = false; bool handled = false;
a8::XTimerWp timer;
); );
a8::XTimerWp timer = owner->room->xtimer.SetIntervalWpEx context->timer = owner->room->xtimer.SetIntervalWpEx
( (
disengate_time * SERVER_FRAME_RATE, disengate_time * SERVER_FRAME_RATE,
[this, context] (int event, const a8::Args* args) [this, context] (int event, const a8::Args* args)
@ -193,9 +194,9 @@ void CondAddBuff::ProcDisengageBattle()
&xtimer_attacher); &xtimer_attacher);
auto cb = auto cb =
[this, timer, context] (const a8::Args& args) mutable [this, context] (const a8::Args& args) mutable
{ {
if (timer.expired()) { if (context->timer.expired()) {
return; return;
} }
if (!meta->_buff_param5_int_set.empty() && if (!meta->_buff_param5_int_set.empty() &&
@ -209,7 +210,7 @@ void CondAddBuff::ProcDisengageBattle()
context->hold_buff_list.clear(); context->hold_buff_list.clear();
} }
context->handled = false; context->handled = false;
owner->room->xtimer.ResetTimer(timer); owner->room->xtimer.ResetTimer(context->timer);
}; };
event_handlers_.push_back event_handlers_.push_back

View File

@ -2968,9 +2968,11 @@ void Room::SyncFrameData()
pair.second->SendUpdateMsg(); pair.second->SendUpdateMsg();
#ifdef DEBUG #ifdef DEBUG
end_tick = a8::XGetTickCount(); end_tick = a8::XGetTickCount();
#if 0
if (a8::XGetTickCount() - begin_tick > 100) { if (a8::XGetTickCount() - begin_tick > 100) {
A8_ABORT(); A8_ABORT();
} }
#endif
begin_tick = a8::XGetTickCount(); begin_tick = a8::XGetTickCount();
#endif #endif
} }