summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-29 10:39:36 -0300
committershennetsind <ind@henn.et>2013-07-29 10:39:36 -0300
commit1caae981b4f000b67bdd0b118fb76797c2bfa06c (patch)
treeafcf1f2881cfc88029fab7d0fdc161d0e04df9d7 /src/map/pc.c
parent2eab181cece04d8c6a79f9d1a3ff74343cd3ae76 (diff)
downloadhercules-1caae981b4f000b67bdd0b118fb76797c2bfa06c.tar.gz
hercules-1caae981b4f000b67bdd0b118fb76797c2bfa06c.tar.bz2
hercules-1caae981b4f000b67bdd0b118fb76797c2bfa06c.tar.xz
hercules-1caae981b4f000b67bdd0b118fb76797c2bfa06c.zip
Ultimate Item DB Update
http://hercules.ws/board/topic/1778-ultimate-item-db-update/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 11e775dea..1af83acc5 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4249,12 +4249,26 @@ int pc_isUseitem(struct map_session_data *sd,int n)
(item->class_base[sd->class_&JOBL_2_1?1:(sd->class_&JOBL_2_2?2:0)])
))
return 0;
- //Not usable by upper class. [Inkfish]
+
+ //Not usable by upper class. [Haru]
while( 1 ) {
- if( item->class_upper&1 && !(sd->class_&(JOBL_UPPER|JOBL_THIRD|JOBL_BABY)) ) break;
- if( item->class_upper&2 && sd->class_&(JOBL_UPPER|JOBL_THIRD) ) break;
- if( item->class_upper&4 && sd->class_&JOBL_BABY ) break;
- if( item->class_upper&8 && sd->class_&JOBL_THIRD ) break;
+ // Normal classes (no upper, no baby, no third classes)
+ if( item->class_upper&0x01 && !(sd->class_&(JOBL_UPPER|JOBL_THIRD|JOBL_BABY)) ) break;
+#ifdef RENEWAL
+ // Upper classes (no third classes)
+ if( item->class_upper&0x02 && sd->class_&JOBL_UPPER && !(sd->class_&JOBL_THIRD) ) break;
+#else
+ //pre-re has no use for the extra, so we maintain the previous for backwards compatibility
+ if( item->class_upper&0x02 && sd->class_&(JOBL_UPPER|JOBL_THIRD) ) break;
+#endif
+ // Baby classes (no third classes)
+ if( item->class_upper&0x04 && sd->class_&JOBL_BABY && !(sd->class_&JOBL_THIRD) ) break;
+ // Third classes (no upper, no baby classes)
+ if( item->class_upper&0x08 && sd->class_&JOBL_THIRD && !(sd->class_&(JOBL_UPPER|JOBL_BABY)) ) break;
+ // Upper third classes
+ if( item->class_upper&0x10 && sd->class_&JOBL_THIRD && sd->class_&JOBL_UPPER ) break;
+ // Baby third classes
+ if( item->class_upper&0x20 && sd->class_&JOBL_THIRD && sd->class_&JOBL_BABY ) break;
return 0;
}