From b79a9d7efa9213e3c791ec356bf21b712878d1aa Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 6 Jan 2014 15:26:00 -0200 Subject: Introducing Hercules Autotrade Persistency Aka autotrading merchants survive server restarts. Originally sekai's (aka me). Special Thanks to Haruna, Michieru. Signed-off-by: shennetsind --- src/map/atcommand.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index ce73319e2..ffd6da9d5 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -5479,12 +5479,19 @@ ACMD(autotrade) { int timeout = atoi(message); status->change_start(&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0); } - + clif->chsys_quit(sd); clif->authfail_fd(sd->fd, 15); + +#ifdef AUTOTRADE_PERSISTENCY + pc->autotrade_prepare(sd); + + return false;/* we fail to not cause it to proceed on is_atcommand */ +#else return true; +#endif } /*========================================== -- cgit v1.2.3-70-g09d2