This commit is contained in:
aozhiwei 2024-04-10 15:40:03 +08:00
parent 27d751cf2e
commit 53b6153622

View File

@ -1719,17 +1719,17 @@ void Creature::CheckSpecObject(int new_poly_flags)
} }
if ((1 << i) == SAMPLE_POLYFLAGS_GLASS) { if ((1 << i) == SAMPLE_POLYFLAGS_GLASS) {
if (a8::HasBitFlag(poly_ext_flags_, i)) { if (a8::HasBitFlag(poly_ext_flags_, i)) {
RemoveBuffById(8058); ClearBuffById(8058);
RemoveBuffById(kInGrassBuffId); RemoveBuffById(kInGrassBuffId);
} else { } else {
TryAddBuffAndSetTime(this, kInGrassBuffId, 9999999); TryAddBuffAndSetTime(this, kInGrassBuffId, 9999999);
if (battling_grass_hide_delay_timer.expired() && if (battling_grass_hide_delay_timer.expired() &&
(room->GetFrameNo() - last_battling_frameno) * FRAME_RATE_MS < (room->GetFrameNo() - last_battling_frameno) * FRAME_RATE_MS <
mt::Param::s().battling_disengage_time) { mt::Param::s().battling_disengage_time) {
int dur_time = mt::Param::s().battling_grass_hide_delay_time * FRAME_RATE_MS; int dur_time = mt::Param::s().battling_grass_hide_delay_time;
battling_grass_hide_delay_timer = room->xtimer.SetTimeoutWpEx battling_grass_hide_delay_timer = room->xtimer.SetTimeoutWpEx
( (
dur_time / SERVER_FRAME_RATE, dur_time / FRAME_RATE_MS,
[this] (int event, const a8::Args* args) [this] (int event, const a8::Args* args)
{ {
if (a8::TIMER_EXEC_EVENT == event) { if (a8::TIMER_EXEC_EVENT == event) {