From 4b825f68fa8e8ec86d6aa1694f629ed348fe50f1 Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Tue, 23 Jun 2009 00:22:39 +0200 Subject: Redo storage, derived from ea stable. --- src/map/atcommand.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 2283961..4696f60 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1375,10 +1375,11 @@ int atcommand_save( const int fd, struct map_session_data* sd, const char* command, const char* message) { + nullpo_retr(-1, sd); + pc_setsavepoint(sd, sd->mapname, sd->bl.x, sd->bl.y); pc_makesavestatus(sd); chrif_save(sd); - storage_storage_save(sd); clif_displaymessage(fd, msg_table[6]); // Character data respawn point saved. return 0; @@ -6093,23 +6094,23 @@ atcommand_character_storage_list( counter = 0; count = 0; for (i = 0; i < MAX_STORAGE; i++) { - if (stor->storage[i].nameid > 0 && (item_data = itemdb_search(stor->storage[i].nameid)) != NULL) { - counter = counter + stor->storage[i].amount; + if (stor->storage_[i].nameid > 0 && (item_data = itemdb_search(stor->storage_[i].nameid)) != NULL) { + counter = counter + stor->storage_[i].amount; count++; if (count == 1) { sprintf(output, "------ Storage items list of '%s' ------", pl_sd->status.name); clif_displaymessage(fd, output); } - if (stor->storage[i].refine) - sprintf(output, "%d %s %+d (%s %+d, id: %d)", stor->storage[i].amount, item_data->name, stor->storage[i].refine, item_data->jname, stor->storage[i].refine, stor->storage[i].nameid); + if (stor->storage_[i].refine) + sprintf(output, "%d %s %+d (%s %+d, id: %d)", stor->storage_[i].amount, item_data->name, stor->storage_[i].refine, item_data->jname, stor->storage_[i].refine, stor->storage_[i].nameid); else - sprintf(output, "%d %s (%s, id: %d)", stor->storage[i].amount, item_data->name, item_data->jname, stor->storage[i].nameid); + sprintf(output, "%d %s (%s, id: %d)", stor->storage_[i].amount, item_data->name, item_data->jname, stor->storage_[i].nameid); clif_displaymessage(fd, output); memset(output, '\0', sizeof(output)); counter2 = 0; for (j = 0; j < item_data->slot; j++) { - if (stor->storage[i].card[j]) { - if ((item_temp = itemdb_search(stor->storage[i].card[j])) != NULL) { + if (stor->storage_[i].card[j]) { + if ((item_temp = itemdb_search(stor->storage_[i].card[j])) != NULL) { if (output[0] == '\0') sprintf(outputtmp, " -> (card(s): #%d %s (%s), ", ++counter2, item_temp->name, item_temp->jname); else -- cgit v1.2.3-70-g09d2