summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-02-26 21:27:12 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-02-26 21:27:12 +0000
commit071be58854f037749f5ec160f1a0d50fc41b78eb (patch)
tree08a389d812e1ad88b84dd9638e2a155c5d948f9a /src/map/npc.c
parentb4b0462ea9eac4718cae3efc099579dcd14f2eed (diff)
downloadhercules-071be58854f037749f5ec160f1a0d50fc41b78eb.tar.gz
hercules-071be58854f037749f5ec160f1a0d50fc41b78eb.tar.bz2
hercules-071be58854f037749f5ec160f1a0d50fc41b78eb.tar.xz
hercules-071be58854f037749f5ec160f1a0d50fc41b78eb.zip
- 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
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c45
1 files changed, 35 insertions, 10 deletions
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"))