1
This commit is contained in:
parent
bbfe9c0376
commit
e0a8ea8b03
@ -1717,19 +1717,22 @@ void Creature::CheckSpecObject(int new_poly_flags)
|
||||
RemoveBuffById(kInGrassBuffId);
|
||||
} else {
|
||||
TryAddBuffAndSetTime(this, kInGrassBuffId, 9999999);
|
||||
if ((room->GetFrameNo() - last_battling_frameno) * FRAME_RATE_MS <
|
||||
mt::Param::s().battling_grass_hide_delay_time) {
|
||||
#if 0
|
||||
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 * FRAME_RATE_MS;
|
||||
battling_grass_hide_delay_timer = room->xtimer.SetTimeoutWpEx
|
||||
(
|
||||
dur_time * SERVER_FRAME_RATE,
|
||||
[] (int event, const a8::Args* args)
|
||||
dur_time / SERVER_FRAME_RATE,
|
||||
[this] (int event, const a8::Args* args)
|
||||
{
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
if (HasBuffEffect(kBET_InGrass) && !dead) {
|
||||
TryAddBuffAndSetTime(this, 8058, 9999999);
|
||||
}
|
||||
}
|
||||
},
|
||||
&xtimer_attacher);
|
||||
#endif
|
||||
} else {
|
||||
TryAddBuffAndSetTime(this, 8058, 9999999);
|
||||
}
|
||||
|
@ -142,6 +142,7 @@ namespace mt
|
||||
int battle_auto_ready_min_time = 0;
|
||||
int battle_auto_ready_max_time = 0;
|
||||
|
||||
int battling_disengage_time = 0;
|
||||
int battling_detection_range = 0;
|
||||
int battling_grass_hide_delay_time = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user