diff options
author | Carlos Henrique <carloshlfzanon@gmail.com> | 2018-09-20 16:08:47 -0300 |
---|---|---|
committer | Carlos Henrique <carloshlfzanon@gmail.com> | 2018-12-04 16:32:11 -0200 |
commit | 582336dff2bffba506891a54ecd9360e4fbdd65c (patch) | |
tree | 298a860fa285a1bc1d430322373b8b776de5fa2a /src/map/map.c | |
parent | 41d370cd3308be48b4ce00a50ee46515742978b0 (diff) | |
download | hercules-582336dff2bffba506891a54ecd9360e4fbdd65c.tar.gz hercules-582336dff2bffba506891a54ecd9360e4fbdd65c.tar.bz2 hercules-582336dff2bffba506891a54ecd9360e4fbdd65c.tar.xz hercules-582336dff2bffba506891a54ecd9360e4fbdd65c.zip |
Added mapflags 'nostorage' and 'nogstorage'
nostorage 1 -- blocks only @storage
nostorage 2 -- blocks only openstorage();
nostorage 3 -- blocks @storage and openstorage()
nogstorage 1 -- blocks only @gstorage
nogstorage 2 -- blocks only guildopenstorage();
nogstorage 3 -- blocks @gstorage and guildopenstorage()
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c index 93e86f80b..a0ac8cd95 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5425,6 +5425,32 @@ static bool map_zone_mf_cache(int m, char *flag, char *params) else if( map->list[m].flag.nocashshop ) map_zone_mf_cache_add(m,"nocashshop"); } + } else if (strcmpi(flag, "nostorage") == 0) { + if (!state) { + if (map->list[m].flag.nostorage != 0) { + sprintf(rflag, "nostorage\t%d", map->list[m].flag.nostorage); + map_zone_mf_cache_add(m, rflag); + } + } + if (sscanf(params, "%d", &state) == 1) { + if (state != map->list[m].flag.nostorage) { + sprintf(rflag, "nostorage\t%d", state); + map_zone_mf_cache_add(m, rflag); + } + } + } else if (strcmpi(flag, "nogstorage") == 0) { + if (!state) { + if (map->list[m].flag.nogstorage != 0) { + sprintf(rflag, "nogstorage\t%d", map->list[m].flag.nogstorage); + map_zone_mf_cache_add(m, rflag); + } + } + if (sscanf(params, "%d", &state) == 1) { + if (state != map->list[m].flag.nogstorage) { + sprintf(rflag, "nogstorage\t%d", state); + map_zone_mf_cache_add(m, rflag); + } + } } return false; |