summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorMatheus Macabu <mkbu95@gmail.com>2013-06-15 03:25:38 -0300
committerMatheus Macabu <mkbu95@gmail.com>2013-06-15 03:25:38 -0300
commitb745cb176a16e771bf5bbae43a7445cf160d1342 (patch)
tree48bc1d0fb831d679c4666f70e3acd92e6ed01ddd /src/map/atcommand.c
parent634bcc63b7adff53d817c19195c4060170eeecfc (diff)
downloadhercules-b745cb176a16e771bf5bbae43a7445cf160d1342.tar.gz
hercules-b745cb176a16e771bf5bbae43a7445cf160d1342.tar.bz2
hercules-b745cb176a16e771bf5bbae43a7445cf160d1342.tar.xz
hercules-b745cb176a16e771bf5bbae43a7445cf160d1342.zip
- HPM: Added trade interface;
- Moved PARTY_RECRUIT definition to mmo.h to avoid segfault; - Check if item is already at maximum refine; - Fixed that @reloadscript with one npc bug (thanks to akinari). Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d9810e77c..6cda0ad84 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(sd->npc_id, CLR_OUTSIGHT, 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;
}