From 2f8f562c2c85aaff8fe2f12c2f4ab3092f53bd9c Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Tue, 23 Jun 2009 01:35:07 +0200 Subject: More fixes to storage derived from ea stable. --- src/map/atcommand.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 4696f60..e85ca7d 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1457,13 +1457,13 @@ int atcommand_storage( struct storage *stor; //changes from Freya/Yor nullpo_retr(-1, sd); - if (sd->state.storage_flag == 1) { - clif_displaymessage(fd, "You have opened your guild storage. Close it before."); + if (sd->state.storage_flag) { + clif_displaymessage(fd, msg_table[250]); return -1; } if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) { - clif_displaymessage(fd, "You have already opened your storage."); + clif_displaymessage(fd, msg_table[250]); return -1; } @@ -1472,6 +1472,7 @@ int atcommand_storage( return 0; } + /*========================================== * *------------------------------------------ @@ -1484,18 +1485,18 @@ int atcommand_guildstorage( nullpo_retr(-1, sd); if (sd->status.guild_id > 0) { - if (sd->state.storage_flag == 1) { - clif_displaymessage(fd, "You have already opened your guild storage."); + if (sd->state.storage_flag) { + clif_displaymessage(fd, msg_table[251]); return -1; } if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) { - clif_displaymessage(fd, "Your storage is opened. Close it before."); + clif_displaymessage(fd, msg_table[251]); return -1; } storage_guild_storageopen(sd); } else { - clif_displaymessage(fd, "You are not in a guild."); - return -1; + clif_displaymessage(fd, msg_table[252]); + return -1; } return 0; @@ -1510,6 +1511,7 @@ int atcommand_option( const char* command, const char* message) { int param1 = 0, param2 = 0, param3 = 0; + nullpo_retr(-1, sd); if (!message || !*message || sscanf(message, "%d %d %d", ¶m1, ¶m2, ¶m3) < 1 || param1 < 0 || param2 < 0 || param3 < 0) { clif_displaymessage(fd, "Please, enter at least a option (usage: @option )."); -- cgit v1.2.3-70-g09d2