summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorhemagx <hemagx2@gmail.com>2015-12-14 22:08:04 +0200
committerHaru <haru@dotalux.com>2015-12-20 18:11:53 +0100
commit62bafa089bab20c641a48855a1ed6d9aa6c3aad4 (patch)
treebd0b704e4f5c3b2483ad2a9f561d2dd0984ee6c5 /src/map
parent91a3b9831f06e1a7ccb478596e02d463917ba8d3 (diff)
downloadhercules-62bafa089bab20c641a48855a1ed6d9aa6c3aad4.tar.gz
hercules-62bafa089bab20c641a48855a1ed6d9aa6c3aad4.tar.bz2
hercules-62bafa089bab20c641a48855a1ed6d9aa6c3aad4.tar.xz
hercules-62bafa089bab20c641a48855a1ed6d9aa6c3aad4.zip
Costume and Shadow items are not equip-able anymore on older clients that doesn't support it.
Fixes #947 Closes #954 as merged Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/itemdb.h2
-rw-r--r--src/map/pc.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index c804e4b4f..f508f5c1d 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -535,6 +535,8 @@ struct item_data {
#define itemdb_iscashfood(n) ((n) >= ITEMID_STR_DISH10_ && (n) <= ITEMID_VIT_DISH10_)
#define itemdb_is_GNbomb(n) ((n) >= ITEMID_APPLE_BOMB && (n) <= ITEMID_VERY_HARD_LUMP)
#define itemdb_is_GNthrowable(n) ((n) >= ITEMID_MYSTERIOUS_POWDER && (n) <= ITEMID_BLACK_THING_TO_THROW)
+#define itemdb_is_shadowequip(n) ((n) & (EQP_SHADOW_ARMOR|EQP_SHADOW_WEAPON|EQP_SHADOW_SHIELD|EQP_SHADOW_SHOES|EQP_SHADOW_ACC_R|EQP_SHADOW_ACC_L))
+#define itemdb_is_costumeequip(n) ((n) & (EQP_COSTUME_HEAD_TOP|EQP_COSTUME_HEAD_MID|EQP_COSTUME_HEAD_LOW|EQP_COSTUME_GARMENT))
//Item trade restrictions [Skotlex]
#define itemdb_isdropable(item, gmlv) (itemdb->isrestricted((item), (gmlv), 0, itemdb->isdropable_sub))
diff --git a/src/map/pc.c b/src/map/pc.c
index 567348d20..43d320a80 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -928,6 +928,11 @@ int pc_isequip(struct map_session_data *sd,int n)
if(item == NULL)
return 0;
+#if PACKETVER <= 20100707
+ if (itemdb_is_shadowequip(item->equip) || itemdb_is_costumeequip(item->equip))
+ return 0;
+#endif
+
if(pc_has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT))
return 1;