From e702cc0ab6dccfd0a10b5a1881841452c326affc Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 2 Apr 2013 22:22:23 -0300 Subject: Introducing 5 new/official mapflags. They're: - weapon_damage_rate - magic_damage_rate - misc_damage_rate - long_damage_rate - short_damage_rate Dropped 15 battle settings that became pointless with this upgrade. Updated battleground zone damage reductions, skill damage from -30% to -20% and weapon damage from -40% to -30%. Special Thanks to Muad_Dib. Signed-off-by: shennetsind --- src/map/npc.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/map/npc.c') 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)); -- cgit v1.2.3-60-g2f50