summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-24 17:08:58 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-24 17:08:58 +0000
commitf762bfba6e4e3e29db6898f1c61023f662330270 (patch)
treee0809191f340d0c1f4ce5315a3d19b6540d03e64 /src/map/pc.c
parentd8b857ad9db40f4e6345419c8d3659b7914519e7 (diff)
downloadhercules-f762bfba6e4e3e29db6898f1c61023f662330270.tar.gz
hercules-f762bfba6e4e3e29db6898f1c61023f662330270.tar.bz2
hercules-f762bfba6e4e3e29db6898f1c61023f662330270.tar.xz
hercules-f762bfba6e4e3e29db6898f1c61023f662330270.zip
update
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@779 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 896a905fb..897b96861 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3213,9 +3213,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
if(!itemdb_isequip2(data)){
// ? 備品ではないので、?所有品なら個?のみ?化させる
for(i=0;i<MAX_INVENTORY;i++)
- if(sd->status.inventory[i].nameid == item_data->nameid &&
- sd->status.inventory[i].card[0] == item_data->card[0] && sd->status.inventory[i].card[1] == item_data->card[1] &&
- sd->status.inventory[i].card[2] == item_data->card[2] && sd->status.inventory[i].card[3] == item_data->card[3]) {
+ if(compare_item(&sd->status.inventory[i], item_data)) {
if(sd->status.inventory[i].amount+amount > MAX_AMOUNT)
return 5;
sd->status.inventory[i].amount+=amount;
@@ -3450,9 +3448,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
if(!itemdb_isequip2(data)){
// ? 備品ではないので、?所有品なら個?のみ?化させる
for(i=0;i<MAX_CART;i++){
- if(sd->status.cart[i].nameid==item_data->nameid &&
- sd->status.cart[i].card[0] == item_data->card[0] && sd->status.cart[i].card[1] == item_data->card[1] &&
- sd->status.cart[i].card[2] == item_data->card[2] && sd->status.cart[i].card[3] == item_data->card[3]){
+ if(compare_item(&sd->status.cart[i], item_data)) {
if(sd->status.cart[i].amount+amount > MAX_AMOUNT)
return 1;
sd->status.cart[i].amount+=amount;