- Battleground mapflags:

* 1 = no scoreboard (as Tierra Valley is).
* 2 = scoreboard enable (as Flavius and KvM requires).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13594 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
zephyrus 2009-03-17 22:39:22 +00:00
parent 7fd0aa832a
commit 94fbb46238

View File

@ -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;