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/clif.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/clif.c')
-rw-r--r-- | src/map/clif.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index d8ca2872a..94fc6f7a7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17387,6 +17387,12 @@ void __attribute__ ((unused)) clif_parse_dull(int fd,struct map_session_data *sd return; } void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) { + + if( map->list[sd->bl.m].flag.nocashshop ) { + clif->colormes(fd,COLOR_RED,msg_txt(1489)); //Cash Shop is disabled in this map + return; + } + WFIFOHEAD(fd, 10); WFIFOW(fd, 0) = 0x845; WFIFOL(fd, 2) = sd->cashPoints; //[Ryuuzaki] - switched positions to reflect proper values @@ -17423,6 +17429,11 @@ void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) { unsigned short limit = RFIFOW(fd, 4), i, j; unsigned int kafra_pay = RFIFOL(fd, 6);// [Ryuuzaki] - These are free cash points (strangely #CASH = main cash curreny for us, confusing) + if( map->list[sd->bl.m].flag.nocashshop ) { + clif->colormes(fd,COLOR_RED,msg_txt(1489)); //Cash Shop is disabled in this map + return; + } + for(i = 0; i < limit; i++) { int qty = RFIFOL(fd, 14 + ( i * 10 )); int id = RFIFOL(fd, 10 + ( i * 10 )); |