From 486da709006e0385815f4d78726d26553da9ca91 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 8 Sep 2012 17:51:14 +0000 Subject: 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 --- src/map/atcommand.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/map/atcommand.c') 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 ). clif_displaymessage(fd, output); -- cgit v1.2.3-60-g2f50