summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-06-02 23:52:44 +0200
committerGitHub <noreply@github.com>2019-06-02 23:52:44 +0200
commiteb0faf2b3ecc294d8247ce9afb81198730d516d2 (patch)
tree15964fe4890d8fab7f1baa39d4344c05a9b698b0 /src/map/map.c
parentbfc31c33f7311c2a647ada10eaf88190be18a2c5 (diff)
parent582336dff2bffba506891a54ecd9360e4fbdd65c (diff)
downloadhercules-eb0faf2b3ecc294d8247ce9afb81198730d516d2.tar.gz
hercules-eb0faf2b3ecc294d8247ce9afb81198730d516d2.tar.bz2
hercules-eb0faf2b3ecc294d8247ce9afb81198730d516d2.tar.xz
hercules-eb0faf2b3ecc294d8247ce9afb81198730d516d2.zip
Merge pull request #2221 from carloshenrq/nostorage
Mapflag nostorage and nogstorage
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 71eab9286..f92be52e9 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -5379,6 +5379,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;