summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 92285118d..abba98293 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3241,8 +3241,10 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
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));
}
- if( (zone = strdb_get(zone_db, MAP_ZONE_GVG_NAME)) && map[m].zone != zone ) {
+ if( state && (zone = strdb_get(zone_db, MAP_ZONE_PVP_NAME)) && map[m].zone != zone ) {
map_zone_apply(m,zone,w1,start,buffer,filepath);
+ } else if ( !state ) {
+ map[m].zone = &map_zone_pk;
}
}
else if (!strcmpi(w3,"pvp_noparty"))
@@ -3294,7 +3296,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
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));
}
- if( (zone = strdb_get(zone_db, MAP_ZONE_GVG_NAME)) && map[m].zone != zone ) {
+ if( state && (zone = strdb_get(zone_db, MAP_ZONE_GVG_NAME)) && map[m].zone != zone ) {
map_zone_apply(m,zone,w1,start,buffer,filepath);
}
}
@@ -3329,7 +3331,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
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));
}
- if( (zone = strdb_get(zone_db, MAP_ZONE_BG_NAME)) && map[m].zone != zone ) {
+ if( state && (zone = strdb_get(zone_db, MAP_ZONE_BG_NAME)) && map[m].zone != zone ) {
map_zone_apply(m,zone,w1,start,buffer,filepath);
}
}
@@ -3462,6 +3464,16 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
map[m].invincible_time_inc = (state) ? atoi(w4) : 0;
} else if ( !strcmpi(w3,"noknockback") ) {
map[m].flag.noknockback = state;
+ } else if ( !strcmpi(w3,"weapon_damage_rate") ) {
+ map[m].weapon_damage_rate = (state) ? atoi(w4) : 100;
+ } else if ( !strcmpi(w3,"magic_damage_rate") ) {
+ map[m].magic_damage_rate = (state) ? atoi(w4) : 100;
+ } else if ( !strcmpi(w3,"misc_damage_rate") ) {
+ map[m].misc_damage_rate = (state) ? atoi(w4) : 100;
+ } else if ( !strcmpi(w3,"short_damage_rate") ) {
+ map[m].short_damage_rate = (state) ? atoi(w4) : 100;
+ } else if ( !strcmpi(w3,"long_damage_rate") ) {
+ map[m].long_damage_rate = (state) ? atoi(w4) : 100;
} else
ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer));