diff options
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index c62791f31..c802929b4 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -13255,9 +13255,14 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) case BL_NPC: { - char command[NAME_LENGTH+11]; - sprintf(command, "%cunloadnpc %s", atcommand->at_symbol, iStatus->get_name(target)); - atcommand->parse(fd, sd, command, 1); + struct npc_data* nd = (struct npc_data *)target; + if( !pc->can_use_command(sd, "@unloadnpc")) { + clif->GM_kickack(sd, 0); + return; + } + npc_unload_duplicates(nd); + npc_unload(nd,true); + npc_read_event_script(); } break; |