From 22c17ec129a57ecd08ca69805d718bb3dce07c94 Mon Sep 17 00:00:00 2001 From: sketchyphoenix Date: Tue, 24 Feb 2009 01:17:36 +0000 Subject: Replaced giving dummy sd gm levels in script commands atcommand and charcommand with a check by internal flag. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13546 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 3 ++- src/map/script.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/map') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index e40645a83..7836cefcb 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9028,7 +9028,8 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message //Grab the command information and check for the proper GM level required to use it or if the command exists info = get_atcommandinfo_byname(command); - if( info == NULL || info->func == NULL || ( *atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level ) || ( *atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2 ) ) + if( info == NULL || info->func == NULL || ( *atcmd_msg == atcommand_symbol && ((info) ? 99:pc_isGM(sd)) < info->level ) + || ( *atcmd_msg == charcommand_symbol && ((info) ? 99:pc_isGM(sd)) < info->level2 ) ) { sprintf(output, msg_txt(153), command); // "%s is Unknown Command." clif_displaymessage(fd, output); diff --git a/src/map/script.c b/src/map/script.c index c2ec1ddc8..178bbdf4b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10733,7 +10733,6 @@ BUILDIN_FUNC(atcommand) cmd++; } - sd->gmlevel = 99; is_atcommand(fd, sd, cmd, 0); return 0; @@ -10771,7 +10770,6 @@ BUILDIN_FUNC(charcommand) return 1; } - sd->gmlevel = 99; is_atcommand(0, sd, cmd, 0); return 0; -- cgit v1.2.3-70-g09d2