summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-31 00:42:56 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-31 00:42:56 +0000
commit01125519eed1ab1d2293e96e859e6711365b3d12 (patch)
treea576886c0d27b08c6e6445bbe942b2d12e435fd7 /src/map/pc.c
parent55d99ca77ba52ce480be9e2ec6ff9c35ddd575ed (diff)
downloadhercules-01125519eed1ab1d2293e96e859e6711365b3d12.tar.gz
hercules-01125519eed1ab1d2293e96e859e6711365b3d12.tar.bz2
hercules-01125519eed1ab1d2293e96e859e6711365b3d12.tar.xz
hercules-01125519eed1ab1d2293e96e859e6711365b3d12.zip
- Fixed the pc_additem weight check breaking when your current weight is above your max.
- Some minor cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11621 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 5db1502c1..9c55f5d9b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2826,7 +2826,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
data = itemdb_search(item_data->nameid);
w = data->weight*amount;
- if(w > sd->max_weight - sd->weight)
+ if(sd->weight + w > sd->max_weight)
return 2;
i = MAX_INVENTORY;