Просмотр исходного кода

- 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://svn.code.sf.net/p/rathena/svn/trunk@6610 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 лет назад
Родитель
Сommit
1b1249c5d8
2 измененных файлов с 11 добавлено и 0 удалено
  1. 2 0
      Changelog-Trunk.txt
  2. 9 0
      src/map/npc.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ 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/05/15
+	* 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) [Skotlex]
 	* Firepillar's damage per hit is now 100% MATK (rather than 20%) when the
 	  skill level is above 10. [Skotlex]
 	* Sorted out the item_data structure, getiteminfo should work correctly

+ 9 - 0
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;