summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-14 11:34:59 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-14 11:34:59 +0000
commit6aab03b220d3d65be71f56b4ff77ac4fa261571b (patch)
tree0156201c8bf17e71fe066336cd508417fda2c9cd /src/map/clif.c
parentc59ea57a893908f54d2960a1e18d2473a1bb8196 (diff)
downloadhercules-6aab03b220d3d65be71f56b4ff77ac4fa261571b.tar.gz
hercules-6aab03b220d3d65be71f56b4ff77ac4fa261571b.tar.bz2
hercules-6aab03b220d3d65be71f56b4ff77ac4fa261571b.tar.xz
hercules-6aab03b220d3d65be71f56b4ff77ac4fa261571b.zip
Applied a temp patch to make some npc-executed atcommands work again (bugreport:790).
Added support for right-click-gm-menu kicking NPC objects. Removed redundant function npc_checknear2(). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12073 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 4cbfbd198..79ec6e8e4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10231,20 +10231,34 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd)
}
clif_GM_kick(sd, tsd, 1);
if(log_config.gm && lv >= log_config.gm) {
- char message[NAME_LENGTH+6];
- sprintf(message, "/kick %d", tsd->status.char_id);
+ char message[256];
+ sprintf(message, "/kick %s (%d)", tsd->status.name, tsd->status.char_id);
log_atcommand(sd, message);
}
- break;
}
+ break;
case BL_MOB:
status_percent_damage(&sd->bl, target, 100, 0, true);
if(log_config.gm && lv >= log_config.gm) {
- char message[NAME_LENGTH+16];
+ char message[256];
sprintf(message, "/kick %s (%d)", status_get_name(target), status_get_class(target));
log_atcommand(sd, message);
}
- break;
+ break;
+ case BL_NPC:
+ {
+ struct npc_data* nd = (struct npc_data *)target;
+ lv = get_atcommand_level(atcommand_unloadnpc);
+ if( pc_isGM(sd) < lv )
+ return;
+ npc_unload(nd);
+ if( log_config.gm && lv >= log_config.gm ) {
+ char message[256];
+ sprintf(message, "/kick %s (%d)", status_get_name(target), status_get_class(target));
+ log_atcommand(sd, message);
+ }
+ }
+ break;
default:
clif_GM_kickack(sd, 0);
}