summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/itemdb.h20
-rw-r--r--src/map/pc.c2
2 files changed, 14 insertions, 8 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index 5aabdc5c2..5c1628374 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -319,10 +319,6 @@ enum geneticist_item_list {
ITEMID_BLACK_THING_TO_THROW, // 13290
};
-enum item_nouse_list {
- NOUSE_SITTING = 0x01,
-};
-
//
enum e_chain_cache {
ECC_ORE,
@@ -359,6 +355,16 @@ enum ItemTradeRestrictions {
ITR_ALL = 0x1ff ///< Sum of all the above values
};
+/**
+ * Iten No-use restrictions
+ */
+enum ItemNouseRestrictions {
+ INR_NONE = 0x0, ///< No restrictions
+ INR_SITTING = 0x1, ///< Item can't be used while sitting
+
+ INR_ALL = 0x1 ///< Sum of all the above values
+};
+
struct item_data {
uint16 nameid;
char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH];
@@ -398,7 +404,7 @@ struct item_data {
unsigned available : 1;
unsigned no_refine : 1; // [celest]
unsigned delay_consume : 1; // Signifies items that are not consumed immediately upon double-click [Skotlex]
- unsigned trade_restriction : 9; ///< Item restrictions mask (@see enum ItemTradeRestrictions)
+ unsigned trade_restriction : 9; ///< Item trade restrictions mask (@see enum ItemTradeRestrictions)
unsigned autoequip: 1;
unsigned buyingstore : 1;
unsigned bindonequip : 1;
@@ -410,8 +416,8 @@ struct item_data {
unsigned int storage:1;
unsigned int guildstorage:1;
} stack;
- struct {// used by item_nouse.txt
- unsigned int flag;
+ struct {
+ unsigned int flag; ///< Item nouse restriction mask (@see enum ItemNouseRestrictions)
unsigned short override;
} item_usage;
short gm_lv_trade_override; //GM-level to override trade_restriction
diff --git a/src/map/pc.c b/src/map/pc.c
index ce2b8040e..3afb6c556 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4191,7 +4191,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
if( !item->script ) //if it has no script, you can't really consume it!
return 0;
- if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override) ) {
+ if( (item->item_usage.flag&INR_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override) ) {
clif->msgtable(sd->fd,0x297);
//clif->colormes(sd->fd,COLOR_WHITE,msg_txt(1474));
return 0; // You cannot use this item while sitting.