summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-15 21:09:45 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-15 21:09:45 +0000
commit17b65ba822078e7dd0457590e491b5544269dcc5 (patch)
tree474ae0e67f380212702b0aa65ab9e64c59a1a9f8 /src/map/npc.c
parent6622349ed1bb02a8d89bc0d6a3c85a1bb5867a6b (diff)
downloadhercules-17b65ba822078e7dd0457590e491b5544269dcc5.tar.gz
hercules-17b65ba822078e7dd0457590e491b5544269dcc5.tar.bz2
hercules-17b65ba822078e7dd0457590e491b5544269dcc5.tar.xz
hercules-17b65ba822078e7dd0457590e491b5544269dcc5.zip
- When reading mapflags, when a map is set to be pvp or gvg, the other will be turned off (disables pvp mapflags in gvg maps for pk-servers)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6610 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 931a205c8..d503d011a 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2306,6 +2306,12 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
}
else if (strcmpi(w3,"pvp")==0) {
map[m].flag.pvp=state;
+ if (state) {
+ map[m].flag.gvg=0;
+ map[m].flag.gvg=0;
+ map[m].flag.gvg_dungeon=0;
+ map[m].flag.gvg_castle=0;
+ }
}
else if (strcmpi(w3,"pvp_noparty")==0) {
map[m].flag.pvp_noparty=state;
@@ -2348,15 +2354,18 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
}
else if (strcmpi(w3,"gvg")==0) {
map[m].flag.gvg=state;
+ if (state) map[m].flag.pvp=0;
}
else if (strcmpi(w3,"gvg_noparty")==0) {
map[m].flag.gvg_noparty=state;
}
else if (strcmpi(w3,"gvg_dungeon")==0) {
map[m].flag.gvg_dungeon=state;
+ if (state) map[m].flag.pvp=0;
}
else if (strcmpi(w3,"gvg_castle")==0) {
map[m].flag.gvg_castle=state;
+ if (state) map[m].flag.pvp=0;
}
else if (strcmpi(w3,"nozenypenalty")==0) {
map[m].flag.nozenypenalty=state;