summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorMatheus Macabu <mkbu95@gmail.com>2013-05-01 21:00:06 -0300
committerMatheus Macabu <mkbu95@gmail.com>2013-05-01 21:01:54 -0300
commitc347ebacd8116b49e0e839abab1be35432ce0446 (patch)
treed2ce9350884fe69fdbdb78d8fa6aa133d007c6e5 /src/map/pc.c
parent7a625b95742b780622482dc5d4de2c6622aac9ae (diff)
downloadhercules-c347ebacd8116b49e0e839abab1be35432ce0446.tar.gz
hercules-c347ebacd8116b49e0e839abab1be35432ce0446.tar.bz2
hercules-c347ebacd8116b49e0e839abab1be35432ce0446.tar.xz
hercules-c347ebacd8116b49e0e839abab1be35432ce0446.zip
Implemented "item_nouse.txt" to prevent players from using items under certain flags (which are pre-determined).
Fixes issue:7064. Thanks to Muad_Dib for providing the item list for this db. Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index afc92594b..892c27e87 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4086,6 +4086,10 @@ 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) ) {
+ return 0; // You cannot use this item while sitting.
+ }
+
switch( nameid ) //@TODO, lot oh harcoded nameid here
{
case 605: // Anodyne