diff options
author | shennetsind <ind@henn.et> | 2013-06-15 05:00:04 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-15 05:00:04 -0300 |
commit | cf78bebc95e3387cf7fbe0720825bacb95c1b61a (patch) | |
tree | e895ec5f3f9baa111476af18607ec292f06d9df6 /src/map/atcommand.c | |
parent | 1dd4882c00b82d9a2f138211dbc2c8c542e2af88 (diff) | |
parent | de3f4423058405636c76e05cd87a6eae0bfa7707 (diff) | |
download | hercules-cf78bebc95e3387cf7fbe0720825bacb95c1b61a.tar.gz hercules-cf78bebc95e3387cf7fbe0720825bacb95c1b61a.tar.bz2 hercules-cf78bebc95e3387cf7fbe0720825bacb95c1b61a.tar.xz hercules-cf78bebc95e3387cf7fbe0720825bacb95c1b61a.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index d9810e77c..b6a9e42ee 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3718,10 +3718,33 @@ ACMD(reloadpcdb) *------------------------------------------*/ ACMD(reloadscript) { + struct s_mapiterator* iter; + struct map_session_data* pl_sd; + nullpo_retr(-1, sd); //atcommand_broadcast( fd, sd, "@broadcast", "Server is reloading scripts..." ); //atcommand_broadcast( fd, sd, "@broadcast", "You will feel a bit of lag at this point !" ); + iter = mapit_getallusers(); + for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) { + if (pl_sd->npc_id || pl_sd->npc_shopid) { + if (pl_sd->state.using_fake_npc) { + clif->clearunit_single(pl_sd->npc_id, CLR_OUTSIGHT, pl_sd->fd); + pl_sd->state.using_fake_npc = 0; + } + if (pl_sd->state.menu_or_input) + pl_sd->state.menu_or_input = 0; + if (pl_sd->npc_menu) + pl_sd->npc_menu = 0; + + pl_sd->npc_id = 0; + pl_sd->npc_shopid = 0; + if (pl_sd->st && pl_sd->st->state != END) + pl_sd->st->state = END; + } + } + mapit->free(iter); + flush_fifos(); iMap->reloadnpc(true); // reload config files seeking for npcs script_reload(); @@ -6397,7 +6420,7 @@ ACMD(trade) return false; } - trade_traderequest(sd, pl_sd); + trade->request(sd, pl_sd); return true; } @@ -6601,7 +6624,7 @@ ACMD(misceffect) { ACMD(mail) { nullpo_ret(sd); - mail_openmail(sd); + mail->openmail(sd); return true; } |