From 071be58854f037749f5ec160f1a0d50fc41b78eb Mon Sep 17 00:00:00 2001 From: zephyrus Date: Thu, 26 Feb 2009 21:27:12 +0000 Subject: - Fixed item Nemesis. - Fixed Tarot Card being used on Emperium. - First Part of BattleGround Implementation (please wait). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13550 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/npc.c | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index 1014cc832..0a37986c8 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2651,13 +2651,18 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con map[m].flag.nozenypenalty=state; } else if (!strcmpi(w3,"pvp")) { - map[m].flag.pvp=state; - if (state) { - if (map[m].flag.gvg || map[m].flag.gvg_dungeon || map[m].flag.gvg_castle) - ShowWarning("npc_parse_mapflag: You can't set PvP and GvG flags for the same map! Removing GvG flags from %s (file '%s', line '%d').\n", map[m].name, filepath, strline(buffer,start-buffer)); - map[m].flag.gvg=0; - map[m].flag.gvg_dungeon=0; - map[m].flag.gvg_castle=0; + map[m].flag.pvp = state; + if( state && (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; + map[m].flag.gvg_castle = 0; + ShowWarning("npc_parse_mapflag: You can't set PvP and GvG flags for the same map! Removing GvG flags from %s (file '%s', line '%d').\n", map[m].name, filepath, strline(buffer,start-buffer)); + } + if( state && map[m].flag.battleground ) + { + map[m].flag.battleground = 0; + ShowWarning("npc_parse_mapflag: You can't set GvG and BattleGround flags for the same map! Removing BattleGround flag from %s (file '%s', line '%d').\n", map[m].name, filepath, strline(buffer,start-buffer)); } } else if (!strcmpi(w3,"pvp_noparty")) @@ -2697,12 +2702,17 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con else if (!strcmpi(w3,"pvp_nocalcrank")) map[m].flag.pvp_nocalcrank=state; else if (!strcmpi(w3,"gvg")) { - map[m].flag.gvg=state; - if (state && map[m].flag.pvp) + map[m].flag.gvg = state; + if( state && map[m].flag.pvp ) { - map[m].flag.pvp=0; + map[m].flag.pvp = 0; ShowWarning("npc_parse_mapflag: You can't set PvP and GvG 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.battleground ) + { + map[m].flag.battleground = 0; + ShowWarning("npc_parse_mapflag: You can't set PvP and BattleGround flags for the same map! Removing BattleGround flag from %s (file '%s', line '%d').\n", map[m].name, filepath, strline(buffer,start-buffer)); + } } else if (!strcmpi(w3,"gvg_noparty")) map[m].flag.gvg_noparty=state; @@ -2714,6 +2724,21 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con map[m].flag.gvg_castle=state; if (state) map[m].flag.pvp=0; } + else if (!strcmpi(w3,"battleground")) { + map[m].flag.battleground = state; + if( state && 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) ) + { + map[m].flag.gvg = 0; + map[m].flag.gvg_dungeon = 0; + map[m].flag.gvg_castle = 0; + ShowWarning("npc_parse_mapflag: You can't set GvG and BattleGround flags for the same map! Removing GvG flag from %s (file '%s', line '%d').\n", map[m].name, filepath, strline(buffer,start-buffer)); + } + } else if (!strcmpi(w3,"noexppenalty")) map[m].flag.noexppenalty=state; else if (!strcmpi(w3,"nozenypenalty")) -- cgit v1.2.3-70-g09d2