diff options
author | Haru <haru@dotalux.com> | 2018-04-25 17:22:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-25 17:22:28 +0200 |
commit | d8c6912572f60284d61d819b20031a75f3d9b25f (patch) | |
tree | 7c89401bd80b69f8a4221c343fd73234e02d50b7 /src/map/map.c | |
parent | efeb386abc51baffa561f32d7d3b30868af767cd (diff) | |
parent | c45d7f983bfe8034e11f1d3e5b9b4404afec6b31 (diff) | |
download | hercules-d8c6912572f60284d61d819b20031a75f3d9b25f.tar.gz hercules-d8c6912572f60284d61d819b20031a75f3d9b25f.tar.bz2 hercules-d8c6912572f60284d61d819b20031a75f3d9b25f.tar.xz hercules-d8c6912572f60284d61d819b20031a75f3d9b25f.zip |
Merge pull request #2017 from AnnieRuru/32_delwall
*delwall now give a friendly warning to remind non-existent wall
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c index 780e6f535..90b304865 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3166,13 +3166,13 @@ void map_iwall_get(struct map_session_data *sd) dbi_destroy(iter); } -void map_iwall_remove(const char *wall_name) +bool map_iwall_remove(const char *wall_name) { struct iwall_data *iwall; int16 i, x1, y1; if( (iwall = (struct iwall_data *)strdb_get(map->iwall_db, wall_name)) == NULL ) - return; // Nothing to do + return false; for( i = 0; i < iwall->size; i++ ) { map->iwall_nextxy(iwall->x, iwall->y, iwall->dir, i, &x1, &y1); @@ -3185,6 +3185,7 @@ void map_iwall_remove(const char *wall_name) map->list[iwall->m].iwall_num--; strdb_remove(map->iwall_db, iwall->wall_name); + return true; } /** |