summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-07 19:30:53 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-07 19:30:53 +0000
commit7332d10a5961e767091639e9666e2594834fc4d1 (patch)
treea93f464ef1880e9511e4f5c50a71504fa5ca592d /src
parent6ef0cea83969e0b00e33721e956bc0583e3715eb (diff)
downloadhercules-7332d10a5961e767091639e9666e2594834fc4d1.tar.gz
hercules-7332d10a5961e767091639e9666e2594834fc4d1.tar.bz2
hercules-7332d10a5961e767091639e9666e2594834fc4d1.tar.xz
hercules-7332d10a5961e767091639e9666e2594834fc4d1.zip
- Should have fixed clif_item_sub to properly store pet egg/armor data. There should be no more "random refine levels" bugs related to these.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7574 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index e0ddc6504..3ee121d2f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2214,8 +2214,8 @@ int clif_delitem(struct map_session_data *sd,int n,int amount)
}
// Simplifies inventory/cart/storage packets by handling the packet section relevant to items. [Skotlex]
-// Equip is > 0 for equippable items (holds the equip-point)
-// 0 for stackable items, -1 for stackable items where arrows must send in the equip-point.
+// Equip is >= 0 for equippable items (holds the equip-point, is 0 for pet
+// armor/egg) -1 for stackable items, -2 for stackable items where arrows must send in the equip-point.
void clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *id, int equip)
{
if (id->view_id > 0)
@@ -2224,15 +2224,15 @@ void clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *
WBUFW(buf,n)=i->nameid;
WBUFB(buf,n+2)=itemtype(id->type);
WBUFB(buf,n+3)=i->identify;
- if (equip > 0 || id->type == 7) { //Equippable item (pet eggs also count).
+ if (equip >= 0) { //Equippable item
WBUFW(buf,n+4)=equip;
WBUFW(buf,n+6)=i->equip;
WBUFB(buf,n+8)=i->attribute;
WBUFB(buf,n+9)=i->refine;
} else { //Stackable item.
WBUFW(buf,n+4)=i->amount;
- if (equip == -1 && id->equip == 0x8000)
- WBUFW(buf,n+6)=0x8000;
+ if (equip == -2 && id->equip == EQP_AMMO)
+ WBUFW(buf,n+6)=EQP_AMMO;
else
WBUFW(buf,n+6)=0;
}
@@ -2265,8 +2265,8 @@ void clif_inventorylist(struct map_session_data *sd)
ne++;
} else { //Stackable.
WBUFW(buf,n*s+4)=i+2;
- clif_item_sub(buf, n*s+6, &sd->status.inventory[i], sd->inventory_data[i], -1);
- if (sd->inventory_data[i]->equip == 0x8000 &&
+ clif_item_sub(buf, n*s+6, &sd->status.inventory[i], sd->inventory_data[i], -2);
+ if (sd->inventory_data[i]->equip == EQP_AMMO &&
sd->status.inventory[i].equip)
arrow=i;
#if PACKETVER >= 5
@@ -2349,7 +2349,7 @@ void clif_storagelist(struct map_session_data *sd,struct storage *stor)
ne++;
} else { //Stackable
WBUFW(buf,n*s+4)=i+1;
- clif_item_sub(buf, n*s+6, &stor->storage_[i], id, 0);
+ clif_item_sub(buf, n*s+6, &stor->storage_[i], id,-1);
#if PACKETVER >= 5
clif_addcards(WBUFP(buf,n*s+14), &stor->storage_[i]);
#endif
@@ -2399,7 +2399,7 @@ void clif_guildstoragelist(struct map_session_data *sd,struct guild_storage *sto
ne++;
} else { //Stackable
WBUFW(buf,n*s+4)=i+1;
- clif_item_sub(buf, n*s+6, &stor->storage_[i], id, 0);
+ clif_item_sub(buf, n*s+6, &stor->storage_[i], id,-1);
#if PACKETVER >= 5
clif_addcards(WBUFP(buf,n*s+14), &stor->storage_[i]);
#endif
@@ -2448,7 +2448,7 @@ void clif_cartlist(struct map_session_data *sd)
ne++;
} else { //Stackable
WBUFW(buf,n*s+4)=i+2;
- clif_item_sub(buf, n*s+6, &sd->status.cart[i], id, 0);
+ clif_item_sub(buf, n*s+6, &sd->status.cart[i], id,-1);
#if PACKETVER >= 5
clif_addcards(WBUFP(buf,n*s+14), &sd->status.cart[i]);
#endif