1
This commit is contained in:
parent
53b6153622
commit
803f0ae873
@ -1721,26 +1721,30 @@ void Creature::CheckSpecObject(int new_poly_flags)
|
||||
if (a8::HasBitFlag(poly_ext_flags_, i)) {
|
||||
ClearBuffById(8058);
|
||||
RemoveBuffById(kInGrassBuffId);
|
||||
if (!battling_grass_hide_delay_timer.expired()) {
|
||||
room->xtimer.Delete(battling_grass_hide_delay_timer);
|
||||
}
|
||||
} else {
|
||||
TryAddBuffAndSetTime(this, kInGrassBuffId, 9999999);
|
||||
if (battling_grass_hide_delay_timer.expired() &&
|
||||
(room->GetFrameNo() - last_battling_frameno) * FRAME_RATE_MS <
|
||||
mt::Param::s().battling_disengage_time) {
|
||||
int dur_time = mt::Param::s().battling_grass_hide_delay_time;
|
||||
battling_grass_hide_delay_timer = room->xtimer.SetTimeoutWpEx
|
||||
(
|
||||
dur_time / FRAME_RATE_MS,
|
||||
[this] (int event, const a8::Args* args)
|
||||
{
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
if (HasBuffEffect(kBET_InGrass) && !dead) {
|
||||
TryAddBuffAndSetTime(this, 8058, 9999999);
|
||||
if (battling_grass_hide_delay_timer.expired()) {
|
||||
if ((room->GetFrameNo() - last_battling_frameno) * FRAME_RATE_MS <
|
||||
mt::Param::s().battling_disengage_time) {
|
||||
int dur_time = mt::Param::s().battling_grass_hide_delay_time;
|
||||
battling_grass_hide_delay_timer = room->xtimer.SetTimeoutWpEx
|
||||
(
|
||||
dur_time / FRAME_RATE_MS,
|
||||
[this] (int event, const a8::Args* args)
|
||||
{
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
if (HasBuffEffect(kBET_InGrass) && !dead) {
|
||||
TryAddBuffAndSetTime(this, 8058, 9999999);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
&xtimer_attacher);
|
||||
} else {
|
||||
TryAddBuffAndSetTime(this, 8058, 9999999);
|
||||
},
|
||||
&xtimer_attacher);
|
||||
} else {
|
||||
TryAddBuffAndSetTime(this, 8058, 9999999);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user