Parcourir la source

Resolves a mapflag overlap warning with PK Mode (#7109)

* Fixes #7099.
* Hides a warning message when PK Mode is enabled and a Battleground mapflag is attempted to overwrite the PvP mapflag.
Thanks to @LolyAll!
Aleos il y a 2 ans
Parent
commit
c2303c8f65
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      src/map/map.cpp

+ 2 - 1
src/map/map.cpp

@@ -4739,7 +4739,8 @@ bool map_setmapflag_sub(int16 m, enum e_mapflag mapflag, bool status, union u_ma
 
 				if (mapdata->flag[MF_PVP]) {
 					mapdata->flag[MF_PVP] = false;
-					ShowWarning("map_setmapflag: Unable to set PvP and Battleground flags for the same map! Removing PvP flag from %s.\n", mapdata->name);
+					if (!battle_config.pk_mode)
+						ShowWarning("map_setmapflag: Unable to set PvP and Battleground flags for the same map! Removing PvP flag from %s.\n", mapdata->name);
 				}
 				if (mapdata->flag[MF_GVG]) {
 					mapdata->flag[MF_GVG] = false;