/*========================================== * Close shop *------------------------------------------*/ void vending_closevending(struct map_session_data* sd) { nullpo_retv(sd); sd->vender_id = 0; clif_closevendingboard(&sd->bl,0); }
/*========================================== * Close shop *------------------------------------------*/ void vending_closevending(struct map_session_data *sd) { nullpo_retv(sd); if(sd->state.vending) { sd->state.vending = false; clif_closevendingboard(&sd->bl, 0); idb_remove(vending->db, sd->status.char_id); } }
/*========================================== * Close shop *------------------------------------------*/ void vending_closevending(struct map_session_data* sd) { nullpo_retv(sd); if( sd->state.vending ) { sd->state.vending = false; clif_closevendingboard(&sd->bl, 0); } }
/*========================================== * Close shop *------------------------------------------*/ void vending_closevending(struct map_session_data* sd) { nullpo_retv(sd); if( sd->state.vending ) { sd->state.vending = false; sd->vend_coin = battle_config.vending_zeny_id; clif_closevendingboard(&sd->bl, 0); if( map[sd->bl.m].flag.vending_cell ) // Cell becomes available again. map_setcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_NOBOARDS, true); } }
/** * Make a player close his shop * @param sd : player session */ void vending_closevending(struct map_session_data* sd) { nullpo_retv(sd); if( sd->state.vending ) { if( Sql_Query( mmysql_handle, "DELETE FROM `%s` WHERE vending_id = %d;", vending_items_db, sd->vender_id ) != SQL_SUCCESS || Sql_Query( mmysql_handle, "DELETE FROM `%s` WHERE `id` = %d;", vendings_db, sd->vender_id ) != SQL_SUCCESS ){ Sql_ShowDebug(mmysql_handle); } sd->state.vending = false; clif_closevendingboard(&sd->bl, 0); idb_remove(vending_db, sd->status.char_id); } }