summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index e20b3760e..b8a6912ee 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2075,7 +2075,7 @@ static int pc_disguise(struct map_session_data *sd, int class)
clif->spawn(&sd->bl);
if (class == sd->status.class && pc_iscarton(sd)) {
//It seems the cart info is lost on undisguise.
- clif->cartlist(sd);
+ clif->cartList(sd);
clif->updatestatus(sd,SP_CARTINFO);
}
if (sd->chat_id != 0) {
@@ -4504,14 +4504,15 @@ static int pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_typ
sd->status.zeny -= zeny;
clif->updatestatus(sd,SP_ZENY);
- achievement->validate_zeny(sd, -zeny); // Achievements [Smokexyz/Hercules]
+ if (zeny > 0) {
+ achievement->validate_zeny(sd, -zeny); // Achievements [Smokexyz/Hercules]
+ logs->zeny(sd, type, tsd ? tsd : sd, -zeny);
- if(!tsd) tsd = sd;
- logs->zeny(sd, type, tsd, -zeny);
- if( zeny > 0 && sd->state.showzeny ) {
- char output[255];
- sprintf(output, "Removed %dz.", zeny);
- clif_disp_onlyself(sd, output);
+ if (sd->state.showzeny) {
+ char output[255];
+ sprintf(output, "Removed %dz.", zeny);
+ clif_disp_onlyself(sd, output);
+ }
}
return 0;
@@ -4642,14 +4643,15 @@ static int pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_typ
sd->status.zeny += zeny;
clif->updatestatus(sd,SP_ZENY);
- achievement->validate_zeny(sd, zeny); // Achievements [Smokexyz/Hercules]
+ if (zeny > 0) {
+ achievement->validate_zeny(sd, zeny); // Achievements [Smokexyz/Hercules]
+ logs->zeny(sd, type, tsd ? tsd : sd, zeny);
- if(!tsd) tsd = sd;
- logs->zeny(sd, type, tsd, zeny);
- if( zeny > 0 && sd->state.showzeny ) {
- char output[255];
- sprintf(output, "Gained %dz.", zeny);
- clif_disp_onlyself(sd, output);
+ if (sd->state.showzeny) {
+ char output[255];
+ sprintf(output, "Gained %dz.", zeny);
+ clif_disp_onlyself(sd, output);
+ }
}
return 0;
@@ -4687,7 +4689,7 @@ static int pc_search_inventory(struct map_session_data *sd, int item_id)
* 6 = ?
* 7 = stack limitation
*------------------------------------------*/
-static int pc_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type)
+static int pc_additem(struct map_session_data *sd, const struct item *item_data, int amount, e_log_pick_type log_type)
{
struct item_data *data;
int i;
@@ -9196,7 +9198,7 @@ static int pc_setoption(struct map_session_data *sd, int type)
#ifndef NEW_CARTS
if( type&OPTION_CART && !( p_type&OPTION_CART ) ) { //Cart On
- clif->cartlist(sd);
+ clif->cartList(sd);
clif->updatestatus(sd, SP_CARTINFO);
if(pc->checkskill(sd, MC_PUSHCART) < 10)
status_calc_pc(sd,SCO_NONE); //Apply speed penalty.
@@ -9303,7 +9305,7 @@ static int pc_setcart(struct map_session_data *sd, int type)
break;
default:/* everything else is an allowed ID so we can move on */
if( !sd->sc.data[SC_PUSH_CART] ) /* first time, so fill cart data */
- clif->cartlist(sd);
+ clif->cartList(sd);
clif->updatestatus(sd, SP_CARTINFO);
sc_start(NULL,&sd->bl, SC_PUSH_CART, 100, type, 0);
clif->sc_load(&sd->bl, sd->bl.id, AREA, SI_ON_PUSH_CART, type, 0, 0);