summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-06 21:22:20 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-06 21:22:20 +0000
commit5b1d1678fd03d6c780e933f6e464e3b02a860c0d (patch)
tree65b746ac53e67d12d9958223e095697bb8f20123 /src/map/pc.c
parent7afdfd0b4b60c52af9f4e488bb1208a426a5bddc (diff)
downloadhercules-5b1d1678fd03d6c780e933f6e464e3b02a860c0d.tar.gz
hercules-5b1d1678fd03d6c780e933f6e464e3b02a860c0d.tar.bz2
hercules-5b1d1678fd03d6c780e933f6e464e3b02a860c0d.tar.xz
hercules-5b1d1678fd03d6c780e933f6e464e3b02a860c0d.zip
- Rewrote all the item restriction functions so that they will take into account slotted card restrictions as well.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7552 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index f965fb6e3..4604ef41c 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2672,7 +2672,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
return 0; //Can't drop items in nodrop mapflag maps.
}
- if (!pc_candrop(sd,sd->status.inventory[n].nameid)) {
+ if (!pc_candrop(sd,&sd->status.inventory[n])) {
clif_displaymessage (sd->fd, msg_txt(263));
return 0;
}
@@ -2914,7 +2914,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
return 1;
data = itemdb_search(item_data->nameid);
- if(!itemdb_cancartstore(item_data->nameid, pc_isGM(sd)))
+ if(!itemdb_cancartstore(item_data, pc_isGM(sd)))
{ //Check item trade restrictions [Skotlex]
clif_displaymessage (sd->fd, msg_txt(264));
return 1;
@@ -5645,12 +5645,12 @@ int pc_setriding(struct map_session_data *sd)
* アイテムドロップ可不可判定
*------------------------------------------
*/
-int pc_candrop(struct map_session_data *sd,int item_id)
+int pc_candrop(struct map_session_data *sd,struct item *item)
{
int level = pc_isGM(sd);
if ( pc_can_give_items(level) ) //check if this GM level can drop items
return 0;
- return (itemdb_isdropable(item_id, level));
+ return (itemdb_isdropable(item, level));
}
/*==========================================