From 8629562655cfcbd6aef97307e3e0c078235619ff Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 25 Oct 2013 12:45:13 -0200 Subject: 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 --- src/map/map.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/map/map.c') 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) { -- cgit v1.2.3-60-g2f50