- Modified the nocommand mapflag so you can specify the GM range that is blocked from using commands (eg: "prontera.gat mapflag nocommand 40" disables commands to characters in the GM range 0~39)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8733 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
c06808095d
commit
84f86fa96e
@ -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.
|
||||
|
||||
2006/09/13
|
||||
* Modified the nocommand mapflag so you can specify the GM range that is
|
||||
blocked from using commands (eg: "prontera.gat mapflag nocommand 40"
|
||||
disables commands to characters in the GM range 0~39) [Skotlex]
|
||||
* Modified the char-server TXT whisper system to use the online_db to know
|
||||
to which map server forward whispers, instead of just sending the whisper
|
||||
to every map server. [Skotlex]
|
||||
|
@ -807,8 +807,8 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message, int
|
||||
if (!*str)
|
||||
return AtCommand_None;
|
||||
|
||||
if (map[sd->bl.m].flag.nocommand &&
|
||||
(gmlvl > 0? gmlvl:pc_isGM(sd)) < battle_config.gm_skilluncond)
|
||||
if (map[sd->bl.m].nocommand &&
|
||||
(gmlvl > 0? gmlvl:pc_isGM(sd)) < map[sd->bl.m].nocommand)
|
||||
{ //Command not allowed on this map.
|
||||
sprintf(atcmd_output, msg_txt(143));
|
||||
clif_displaymessage(fd, atcmd_output);
|
||||
@ -5820,7 +5820,7 @@ int atcommand_mapinfo(
|
||||
clif_displaymessage(fd, atcmd_output);
|
||||
|
||||
strcpy(atcmd_output,"Other Flags: ");
|
||||
if (map[m_id].flag.nocommand)
|
||||
if (map[m_id].nocommand)
|
||||
strcat(atcmd_output, "NoCommand | ");
|
||||
if (map[m_id].flag.nobaseexp)
|
||||
strcat(atcmd_output, "NoBaseEXP | ");
|
||||
|
@ -148,8 +148,8 @@ is_charcommand(const int fd, struct map_session_data* sd, const char* message, i
|
||||
if (!*str)
|
||||
return CharCommand_None;
|
||||
|
||||
if (map[sd->bl.m].flag.nocommand &&
|
||||
(gmlvl > 0? gmlvl:pc_isGM(sd)) < battle_config.gm_skilluncond)
|
||||
if (map[sd->bl.m].nocommand &&
|
||||
(gmlvl > 0? gmlvl:pc_isGM(sd)) < map[sd->bl.m].nocommand)
|
||||
{ //Command not allowed on this map.
|
||||
char output[200];
|
||||
sprintf(output, msg_table[143]);
|
||||
|
@ -1115,7 +1115,6 @@ struct map_data {
|
||||
unsigned nomvploot : 1; // [Lorky]
|
||||
unsigned nightenabled :1; //For night display. [Skotlex]
|
||||
unsigned restricted : 1; // [Komurka]
|
||||
unsigned nocommand : 1; //Blocks @/# commands for non-gms. [Skotlex]
|
||||
unsigned nodrop : 1;
|
||||
unsigned novending : 1;
|
||||
unsigned loadevent : 1;
|
||||
@ -1134,6 +1133,7 @@ struct map_data {
|
||||
int zone; // [Komurka]
|
||||
int jexp; // map experience multiplicator
|
||||
int bexp; // map experience multiplicator
|
||||
int nocommand; //Blocks @/# commands for non-gms. [Skotlex]
|
||||
};
|
||||
|
||||
struct map_data_other_server {
|
||||
|
@ -2521,7 +2521,13 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
|
||||
map[m].flag.nomvploot=state;
|
||||
}
|
||||
else if (strcmpi(w3,"nocommand")==0) { // Skotlex
|
||||
map[m].flag.nocommand=state;
|
||||
if (state) {
|
||||
if (sscanf(w4, "%d", &state) == 1)
|
||||
map[m].nocommand =state;
|
||||
else //No level specified, block everyone.
|
||||
map[m].nocommand =100;
|
||||
} else
|
||||
map[m].nocommand=0;
|
||||
}
|
||||
else if (strcmpi(w3,"restricted")==0) { // Komurka
|
||||
if (state) {
|
||||
|
@ -8317,7 +8317,7 @@ int buildin_setmapflag(struct script_state *st)
|
||||
map[m].flag.restricted=1;
|
||||
break;
|
||||
case MF_NOCOMMAND:
|
||||
map[m].flag.nocommand=1;
|
||||
map[m].nocommand = (!val || atoi(val) <= 0) ? 100 : atoi(val);
|
||||
break;
|
||||
case MF_JEXP:
|
||||
map[m].jexp = (!val || atoi(val) < 0) ? 100 : atoi(val);
|
||||
@ -8461,7 +8461,7 @@ int buildin_removemapflag(struct script_state *st)
|
||||
map[m].flag.restricted=0;
|
||||
break;
|
||||
case MF_NOCOMMAND:
|
||||
map[m].flag.nocommand=0;
|
||||
map[m].nocommand=0;
|
||||
break;
|
||||
case MF_JEXP:
|
||||
map[m].jexp=100;
|
||||
|
Loading…
x
Reference in New Issue
Block a user