summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-28 03:22:47 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-28 03:22:47 +0000
commit95a4d6754449522d3eceacce0f602e206a38b511 (patch)
tree1220c1ae06e770eef9451009bb08876ba18e5b4e /src/map/pc.c
parent8dc6db3cd509c8f3e9a14f109afb3d0e95331a5d (diff)
downloadhercules-95a4d6754449522d3eceacce0f602e206a38b511.tar.gz
hercules-95a4d6754449522d3eceacce0f602e206a38b511.tar.bz2
hercules-95a4d6754449522d3eceacce0f602e206a38b511.tar.xz
hercules-95a4d6754449522d3eceacce0f602e206a38b511.zip
Added support for the "favorite item tab" feature. super-mega-thanks to Judas, credits to Fatal Error.
Be aware this update requires a new column in the inventory db, run upgrade_svn16517.sql in your database. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16518 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index c697fd046..0f04cc017 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3812,7 +3812,7 @@ int pc_delitem(struct map_session_data *sd,int n,int amount,int type, short reas
sd->status.inventory[n].amount -= amount;
sd->weight -= sd->inventory_data[n]->weight*amount ;
- if(sd->status.inventory[n].amount<=0){
+ if( sd->status.inventory[n].amount <= 0 ){
if(sd->status.inventory[n].equip)
pc_unequipitem(sd,n,3);
memset(&sd->status.inventory[n],0,sizeof(sd->status.inventory[0]));
@@ -4267,6 +4267,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
sd->cart_num++;
clif_cart_additem(sd,i,amount,0);
}
+ sd->status.cart[i].favorite = 0;/* clear */
log_pick_pc(sd, log_type, amount, &sd->status.cart[i]);
sd->cart_weight += w;
@@ -4318,7 +4319,7 @@ int pc_putitemtocart(struct map_session_data *sd,int idx,int amount)
if( item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->state.vending )
return 1;
-
+
if( pc_cart_additem(sd,item_data,amount,LOG_TYPE_NONE) == 0 )
return pc_delitem(sd,idx,amount,0,5,LOG_TYPE_NONE);