From e8135f8c779df2a50badc6a2720f65afcec4c2ce Mon Sep 17 00:00:00 2001 From: aleos89 Date: Thu, 24 Apr 2014 15:42:43 -0400 Subject: [PATCH] Follow up to 97755d0 to move status message to map_msg.conf. --- conf/msg_conf/map_msg.conf | 4 +++- src/map/pc.c | 2 +- src/map/vending.c | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/conf/msg_conf/map_msg.conf b/conf/msg_conf/map_msg.conf index 3e73a4cddd..081d93918f 100644 --- a/conf/msg_conf/map_msg.conf +++ b/conf/msg_conf/map_msg.conf @@ -748,7 +748,9 @@ 732: Item cannot be opened when your inventory is full. -//733-899 free +733: Item '%s' has not yet saved to your cart. Please re-log in order to correctly save your Vending information. + +//734-899 free //------------------------------------ // More atcommands message diff --git a/src/map/pc.c b/src/map/pc.c index e34a95de2d..4438fe9809 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4633,7 +4633,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun if( (w = data->weight*amount) + sd->cart_weight > sd->cart_weight_max ) return 1; - //id no longer points to inventory/kafra id, while we get a new one, we don't want to mess up vending creation + // ID no longer points to inventory/kafra ID. While we get a new one we don't want to mess up vending creation. item_data->id = 0; i = MAX_CART; diff --git a/src/map/vending.c b/src/map/vending.c index 6ad2312038..c420147678 100755 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -345,11 +345,12 @@ bool vending_openvending(struct map_session_data* sd, const char* message, const sd->vending[i].amount = amount; sd->vending[i].value = min(value, (unsigned int)battle_config.vending_max_value); - //player just moved item to cart and we don't have the correct cart ID yet + // Player just moved item to cart and we don't have the correct cart ID yet. if (sd->status.cart[sd->vending[i].index].id == 0) { struct item_data *idb = itemdb_search(sd->status.cart[index].nameid); char msg[256]; - snprintf(msg, 256, "Item %s is not yet saved. Please re-log in order to correctly save your vending.", idb->jname); + + sprintf(msg, msg_txt(sd, 733), idb->jname); clif_displaymessage(sd->fd, msg); clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0); return false; @@ -377,7 +378,7 @@ bool vending_openvending(struct map_session_data* sd, const char* message, const Sql_ShowDebug(mmysql_handle); } - for( i = 0; i < count; i++ ){ + for( i = 0; i < count; i++ ) { if( Sql_Query( mmysql_handle, "INSERT INTO `%s`(`vending_id`,`index`,`cartinventory_id`,`amount`,`price`) VALUES( %d, %d, %d, %d, %d );", vending_items_db, sd->vender_id, i, sd->status.cart[sd->vending[i].index].id, sd->vending[i].amount, sd->vending[i].value ) != SQL_SUCCESS ){ Sql_ShowDebug(mmysql_handle); }