From 01164c90ef975e90f8eac9bebc77e0ff93fbcf52 Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Thu, 25 Jun 2009 01:00:54 +0200 Subject: Move storage NPC close fix to storage.c. Fix @storeall, from ea stable. --- src/map/atcommand.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index e85ca7d..74567bb 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -6520,9 +6520,18 @@ atcommand_storeall(const int fd, struct map_session_data* sd, const char* command, const char* message) { int i; - if (storage_storageopen(sd) == 1) { - clif_displaymessage(fd, "run this command again.."); - return 0; + nullpo_retr(-1, sd); + + if (sd->state.storage_flag != 1) + { //Open storage. + switch (storage_storageopen(sd)) { + case 2: //Try again + clif_displaymessage(fd, "run this command again.."); + return 0; + case 1: //Failure + clif_displaymessage(fd, "You can't open the storage currently."); + return 1; + } } for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount) { -- cgit v1.2.3-70-g09d2