summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-08-07 16:27:33 -0300
committershennetsind <ind@henn.et>2013-08-07 16:27:33 -0300
commit4fee6cb386a90f24306e54ea3606fa7fa133b8e3 (patch)
tree24a5226906ffcce685e6553461b79c013e059fcc
parent46a6fdb7374f5fe9301b9d23289f563c6f7fb4f9 (diff)
downloadhercules-4fee6cb386a90f24306e54ea3606fa7fa133b8e3.tar.gz
hercules-4fee6cb386a90f24306e54ea3606fa7fa133b8e3.tar.bz2
hercules-4fee6cb386a90f24306e54ea3606fa7fa133b8e3.tar.xz
hercules-4fee6cb386a90f24306e54ea3606fa7fa133b8e3.zip
For Report #7333
Added official 'this item cannot be used within this area' response http://hercules.ws/board/tracker/issue-7333-map-zone-db/ Special Thanks to kyeme Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/pc.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/map/clif.h b/src/map/clif.h
index f68eaafa3..47c2cc776 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -322,6 +322,7 @@ typedef enum useskill_fail_cause { // clif_skill_fail
enum clif_messages {
SKILL_CANT_USE_AREA = 0x536,
+ ITEM_CANT_USE_AREA = 0x537,
};
/**
diff --git a/src/map/pc.c b/src/map/pc.c
index f29c590b3..6dea877a0 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4432,6 +4432,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
/* on restricted maps the item is consumed but the effect is not used */
for(i = 0; i < map[sd->bl.m].zone->disabled_items_count; i++) {
if( map[sd->bl.m].zone->disabled_items[i] == nameid ) {
+ clif->msg(sd, ITEM_CANT_USE_AREA); // This item cannot be used within this area
if( battle_config.item_restricted_consumption_type ) {
clif->useitemack(sd,n,sd->status.inventory[n].amount-1,true);
pc->delitem(sd,n,1,1,0,LOG_TYPE_CONSUME);