summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-15 00:54:26 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-15 00:54:26 +0000
commitd85abed850f8de77802fde7da04da4353672382f (patch)
tree19e0322f0505e3388f17e7fe6683fa07712fc2b7 /src/map/pc.c
parent7e89cf01bd76ebed23a5d9eba56b763f1e3c4814 (diff)
downloadhercules-d85abed850f8de77802fde7da04da4353672382f.tar.gz
hercules-d85abed850f8de77802fde7da04da4353672382f.tar.bz2
hercules-d85abed850f8de77802fde7da04da4353672382f.tar.xz
hercules-d85abed850f8de77802fde7da04da4353672382f.zip
Fixed bugreport:6772 cart display will now update/save properly if you change to a cart of lower level; fixed 2 compiling warnings.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16926 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index b54b88ae2..6b757d20c 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3621,7 +3621,7 @@ int pc_paycash(struct map_session_data *sd, int price, int points)
{
char output[128];
int cash;
- nullpo_retv(sd);
+ nullpo_retr(sd,-1);
points = cap_value(points,-MAX_ZENY,MAX_ZENY); //prevent command UB
if( price < 0 || points < 0 )
@@ -3658,7 +3658,7 @@ int pc_paycash(struct map_session_data *sd, int price, int points)
int pc_getcash(struct map_session_data *sd, int cash, int points)
{
char output[128];
- nullpo_retv(sd);
+ nullpo_retr(sd,-1);
cash = cap_value(cash,-MAX_ZENY,MAX_ZENY); //prevent command UB
points = cap_value(points,-MAX_ZENY,MAX_ZENY); //prevent command UB
@@ -7485,6 +7485,8 @@ int pc_setcart(struct map_session_data *sd,int type) {
clif_updatestatus(sd, SP_CARTINFO);
sc_start(&sd->bl, SC_PUSH_CART, 100, type, 0);
clif_status_load_notick(&sd->bl, SI_ON_PUSH_CART, 2 , type, 0, 0);
+ if( sd->sc.data[SC_PUSH_CART] )/* forcefully update */
+ sd->sc.data[SC_PUSH_CART]->val1 = type;
break;
}