* Added "nogo" mapflag to prevent the use of @go on a specified map. [Valaris]

git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@273 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
valaris 2004-11-20 17:04:06 +00:00
parent 8cbba34e16
commit 070d0b9f1b
5 changed files with 17 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Date Added Date Added
11/20 11/20
* Added "nogo" mapflag to prevent the use of @go on a specified map. [Valaris]
* Fixed small/big monster spawning crashing (mixed up the merge). [Valaris] * Fixed small/big monster spawning crashing (mixed up the merge). [Valaris]
* Fixed crash with upgrading TXT and having more than 256 accounts. [Valaris] * Fixed crash with upgrading TXT and having more than 256 accounts. [Valaris]
* TXT upgrades will convert broken flag to attribute column. [Valaris] * TXT upgrades will convert broken flag to attribute column. [Valaris]

View File

@ -2740,6 +2740,11 @@ int atcommand_go(
char output[200]; char output[200];
int m; int m;
if(map[sd->bl.m].flag.nogo) {
clif_displaymessage(sd->fd,"You can not use @go on this map.");
return 0;
}
struct { char map[16]; int x, y; } data[] = { struct { char map[16]; int x, y; } data[] = {
{ "prontera.gat", 156, 191 }, // 0=Prontera { "prontera.gat", 156, 191 }, // 0=Prontera
{ "morocc.gat", 156, 93 }, // 1=Morroc { "morocc.gat", 156, 93 }, // 1=Morroc

View File

@ -517,6 +517,7 @@ struct map_data {
unsigned leaves : 1; // [Valaris] unsigned leaves : 1; // [Valaris]
unsigned rain : 1; // [Valaris] unsigned rain : 1; // [Valaris]
unsigned indoors : 1; // celest unsigned indoors : 1; // celest
unsigned nogo : 1; // [Valaris]
} flag; } flag;
struct point save; struct point save;
struct npc_data *npc[MAX_NPC_PER_MAP]; struct npc_data *npc[MAX_NPC_PER_MAP];

View File

@ -2116,6 +2116,9 @@ static int npc_parse_mapflag(char *w1,char *w2,char *w3,char *w4)
else if (strcmpi(w3,"indoors")==0) { // celest else if (strcmpi(w3,"indoors")==0) { // celest
map[m].flag.indoors=1; map[m].flag.indoors=1;
} }
else if (strcmpi(w3,"nogo")==0) { // celest
map[m].flag.nogo=1;
}
return 0; return 0;
} }

View File

@ -4585,7 +4585,7 @@ int buildin_isloggedin(struct script_state *st)
*------------------------------------------ *------------------------------------------
*/ */
enum { MF_NOMEMO,MF_NOTELEPORT,MF_NOSAVE,MF_NOBRANCH,MF_NOPENALTY,MF_NOZENYPENALTY,MF_PVP,MF_PVP_NOPARTY,MF_PVP_NOGUILD,MF_GVG,MF_GVG_NOPARTY,MF_NOTRADE,MF_NOSKILL, MF_NOWARP,MF_NOPVP,MF_NOICEWALL, enum { MF_NOMEMO,MF_NOTELEPORT,MF_NOSAVE,MF_NOBRANCH,MF_NOPENALTY,MF_NOZENYPENALTY,MF_PVP,MF_PVP_NOPARTY,MF_PVP_NOGUILD,MF_GVG,MF_GVG_NOPARTY,MF_NOTRADE,MF_NOSKILL, MF_NOWARP,MF_NOPVP,MF_NOICEWALL,
MF_SNOW, MF_FOG, MF_SAKURA, MF_LEAVES, MF_RAIN, MF_INDOORS }; MF_SNOW, MF_FOG, MF_SAKURA, MF_LEAVES, MF_RAIN, MF_INDOORS, MF_NOGO };
int buildin_setmapflagnosave(struct script_state *st) int buildin_setmapflagnosave(struct script_state *st)
{ {
@ -4674,6 +4674,9 @@ int buildin_setmapflag(struct script_state *st)
case MF_INDOORS: // celest case MF_INDOORS: // celest
map[m].flag.indoors=1; map[m].flag.indoors=1;
break; break;
case MF_NOGO: // celest
map[m].flag.nogo=1;
break;
} }
} }
@ -4747,6 +4750,9 @@ int buildin_removemapflag(struct script_state *st)
case MF_INDOORS: // celest case MF_INDOORS: // celest
map[m].flag.indoors=0; map[m].flag.indoors=0;
break; break;
case MF_NOGO: // celest
map[m].flag.nogo=0;
break;
} }
} }