diff options
author | shennetsind <ind@henn.et> | 2013-04-02 22:22:23 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-04-02 22:22:23 -0300 |
commit | e702cc0ab6dccfd0a10b5a1881841452c326affc (patch) | |
tree | 5060b0e6187773b7e8e5f7ba900188850e475e8e /src/map/npc.c | |
parent | 57dff2db23556d01beedd8af95a41e4f03f66681 (diff) | |
download | hercules-e702cc0ab6dccfd0a10b5a1881841452c326affc.tar.gz hercules-e702cc0ab6dccfd0a10b5a1881841452c326affc.tar.bz2 hercules-e702cc0ab6dccfd0a10b5a1881841452c326affc.tar.xz hercules-e702cc0ab6dccfd0a10b5a1881841452c326affc.zip |
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 <ind@henn.et>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 18 |
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)); |