summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-03-17 22:39:22 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-03-17 22:39:22 +0000
commitf2a0ea907f3bbc0f48f7007b333ef06e19255add (patch)
treee22ef7118a16e213f4f58b0eb9317c51f04522ff /src/map
parent0884f746a4c82c31b7d98d2f2f95ad9508d01525 (diff)
downloadhercules-f2a0ea907f3bbc0f48f7007b333ef06e19255add.tar.gz
hercules-f2a0ea907f3bbc0f48f7007b333ef06e19255add.tar.bz2
hercules-f2a0ea907f3bbc0f48f7007b333ef06e19255add.tar.xz
hercules-f2a0ea907f3bbc0f48f7007b333ef06e19255add.zip
- Battleground mapflags:
* 1 = no scoreboard (as Tierra Valley is). * 2 = scoreboard enable (as Flavius and KvM requires). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13594 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/npc.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 0a37986c8..a1d22368e 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2725,13 +2725,22 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con
if (state) map[m].flag.pvp=0;
}
else if (!strcmpi(w3,"battleground")) {
- map[m].flag.battleground = state;
- if( state && map[m].flag.pvp )
+ if( state )
+ {
+ if( sscanf(w4, "%d", &state) == 1 )
+ map[m].flag.battleground = state;
+ else
+ map[m].flag.battleground = 1; // Default value
+ }
+ else
+ map[m].flag.battleground = 0;
+
+ if( map[m].flag.battleground && map[m].flag.pvp )
{
map[m].flag.pvp = 0;
ShowWarning("npc_parse_mapflag: You can't set PvP and BattleGround flags for the same map! Removing PvP flag from %s (file '%s', line '%d').\n", map[m].name, filepath, strline(buffer,start-buffer));
}
- if( state && (map[m].flag.gvg || map[m].flag.gvg_dungeon || map[m].flag.gvg_castle) )
+ if( map[m].flag.battleground && (map[m].flag.gvg || map[m].flag.gvg_dungeon || map[m].flag.gvg_castle) )
{
map[m].flag.gvg = 0;
map[m].flag.gvg_dungeon = 0;