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