diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-09-08 17:51:14 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-09-08 17:51:14 +0000 |
commit | 486da709006e0385815f4d78726d26553da9ca91 (patch) | |
tree | 75d01004d9bd6fb60cca7511a4ca10ed018934c8 /src | |
parent | 371a82fd7d41c1c1d45845e6617cc5bbd7a34053 (diff) | |
download | hercules-486da709006e0385815f4d78726d26553da9ca91.tar.gz hercules-486da709006e0385815f4d78726d26553da9ca91.tar.bz2 hercules-486da709006e0385815f4d78726d26553da9ca91.tar.xz hercules-486da709006e0385815f4d78726d26553da9ca91.zip |
Fixed bugreport:6557 players unable to use char commands will no longer get the 'charcommand failed' message, instead it'll show as a normal chat message
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16759 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 8aaef2769..1e44376c9 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8819,6 +8819,7 @@ ACMD_FUNC(cart) { return 0; #undef MC_CART_MDFY } + /** * Fills the reference of available commands in atcommand DBMap **/ @@ -9256,6 +9257,15 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message sprintf(atcmd_msg, "%s", command); break; } + + if( !pc_get_group_level(sd) ) { + if( x >= 1 || y >= 1 ) { /* we have command */ + info = get_atcommandinfo_byname(atcommand_checkalias(command + 1)); + if( !info || info->char_groups[sd->group_pos] == 0 ) /* if we can't use or doesn't exist: don't even display the command failed message */ + return false; + } else + return false;/* display as normal message */ + } sprintf(output, msg_txt(1388), charcommand_symbol); // Charcommand failed (usage: %c<command> <char name> <parameters>). clif_displaymessage(fd, output); |