- Fixed nocommand mapflag causing the "you can't use commands on this map" message to trigger one very single chat, instead of only for actual @/# command invocation.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8817 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
2beeeee85c
commit
7c23227861
@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
|
|||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
2006/09/19
|
2006/09/19
|
||||||
|
* Fixed nocommand mapflag causing the "you can't use commands on this map"
|
||||||
|
message to trigger one very single chat, instead of only for actual @/#
|
||||||
|
command invocation. [Skotlex]
|
||||||
* Added support for skipping empty string menu entries for the select()
|
* Added support for skipping empty string menu entries for the select()
|
||||||
command (just as `menu` has it already) [Skotlex]
|
command (just as `menu` has it already) [Skotlex]
|
||||||
* Fixed pc_set_hate_mob letting you place mobs on any of the three
|
* Fixed pc_set_hate_mob letting you place mobs on any of the three
|
||||||
|
@ -807,17 +807,20 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message, int
|
|||||||
if (!*str)
|
if (!*str)
|
||||||
return AtCommand_None;
|
return AtCommand_None;
|
||||||
|
|
||||||
if (map[sd->bl.m].nocommand &&
|
if (!gmlvl) gmlvl = pc_isGM(sd);
|
||||||
(gmlvl > 0? gmlvl:pc_isGM(sd)) < map[sd->bl.m].nocommand)
|
type = atcommand(sd, gmlvl, str, &info);
|
||||||
{ //Command not allowed on this map.
|
|
||||||
sprintf(atcmd_output, msg_txt(143));
|
|
||||||
clif_displaymessage(fd, atcmd_output);
|
|
||||||
return AtCommand_None;
|
|
||||||
}
|
|
||||||
type = atcommand(sd, gmlvl > 0 ? gmlvl : pc_isGM(sd), str, &info);
|
|
||||||
if (type != AtCommand_None) {
|
if (type != AtCommand_None) {
|
||||||
char command[100];
|
char command[100];
|
||||||
const char* p = str;
|
const char* p = str;
|
||||||
|
|
||||||
|
if (map[sd->bl.m].nocommand &&
|
||||||
|
gmlvl < map[sd->bl.m].nocommand)
|
||||||
|
{ //Command not allowed on this map.
|
||||||
|
sprintf(atcmd_output, msg_txt(143));
|
||||||
|
clif_displaymessage(fd, atcmd_output);
|
||||||
|
return AtCommand_None;
|
||||||
|
}
|
||||||
|
|
||||||
malloc_tsetdword(command, '\0', sizeof(command));
|
malloc_tsetdword(command, '\0', sizeof(command));
|
||||||
malloc_tsetdword(atcmd_output, '\0', sizeof(atcmd_output));
|
malloc_tsetdword(atcmd_output, '\0', sizeof(atcmd_output));
|
||||||
while (*p && !isspace(*p))
|
while (*p && !isspace(*p))
|
||||||
|
@ -148,20 +148,21 @@ is_charcommand(const int fd, struct map_session_data* sd, const char* message, i
|
|||||||
if (!*str)
|
if (!*str)
|
||||||
return CharCommand_None;
|
return CharCommand_None;
|
||||||
|
|
||||||
if (map[sd->bl.m].nocommand &&
|
if (!gmlvl) gmlvl = pc_isGM(sd);
|
||||||
(gmlvl > 0? gmlvl:pc_isGM(sd)) < map[sd->bl.m].nocommand)
|
type = charcommand(sd, gmlvl, str, &info);
|
||||||
{ //Command not allowed on this map.
|
|
||||||
char output[200];
|
|
||||||
sprintf(output, msg_table[143]);
|
|
||||||
clif_displaymessage(fd, output);
|
|
||||||
return AtCommand_None;
|
|
||||||
}
|
|
||||||
|
|
||||||
type = charcommand(sd, gmlvl > 0 ? gmlvl : pc_isGM(sd), str, &info);
|
|
||||||
if (type != CharCommand_None) {
|
if (type != CharCommand_None) {
|
||||||
char command[100];
|
char command[100];
|
||||||
char output[200];
|
char output[200];
|
||||||
const char* p = str;
|
const char* p = str;
|
||||||
|
|
||||||
|
if (map[sd->bl.m].nocommand &&
|
||||||
|
gmlvl < map[sd->bl.m].nocommand)
|
||||||
|
{ //Command not allowed on this map.
|
||||||
|
sprintf(output, msg_txt(143));
|
||||||
|
clif_displaymessage(fd, output);
|
||||||
|
return AtCommand_None;
|
||||||
|
}
|
||||||
|
|
||||||
malloc_tsetdword(command, '\0', sizeof(command));
|
malloc_tsetdword(command, '\0', sizeof(command));
|
||||||
malloc_tsetdword(output, '\0', sizeof(output));
|
malloc_tsetdword(output, '\0', sizeof(output));
|
||||||
while (*p && !isspace(*p))
|
while (*p && !isspace(*p))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user