diff options
author | shennetsind <ind@henn.et> | 2013-10-25 12:45:13 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-10-25 12:45:13 -0200 |
commit | 8629562655cfcbd6aef97307e3e0c078235619ff (patch) | |
tree | 6de8f57077d52fe52c306adee05d6043c5675584 /src/map/map.c | |
parent | 259fe1930d2307248327bd5737f4909fd77e72ad (diff) | |
download | hercules-8629562655cfcbd6aef97307e3e0c078235619ff.tar.gz hercules-8629562655cfcbd6aef97307e3e0c078235619ff.tar.bz2 hercules-8629562655cfcbd6aef97307e3e0c078235619ff.tar.xz hercules-8629562655cfcbd6aef97307e3e0c078235619ff.zip |
nocashshop mapflag
As requested by the community in http://hercules.ws/board/topic/1477-mapflag-for-cash-shop/ and http://hercules.ws/board/topic/1476-disable-cashshop-in-pvp-woe/
'nocashshop' mapflag disables the usage of the cashshop button as well as any attempts to purchase (in case the flag is turned on after someone gets the shop open).
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c index 749b9de81..133c63a1c 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -4388,7 +4388,17 @@ bool map_zone_mf_cache(int m, char *flag, char *params) { map_zone_mf_cache_add(m,rflag); } } + } else if (!strcmpi(flag,"nocashshop")) { + if( state && map->list[m].flag.nocashshop ) + ;/* nothing to do */ + else { + if( state ) + map_zone_mf_cache_add(m,"nocashshop\toff"); + else if( map->list[m].flag.nocashshop ) + map_zone_mf_cache_add(m,"nocashshop"); + } } + return false; } void map_zone_apply(int m, struct map_zone_data *zone, const char* start, const char* buffer, const char* filepath) { |