summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorDennis Friis <peavey@inspircd.org>2009-06-23 01:35:07 +0200
committerDennis Friis <peavey@inspircd.org>2009-06-25 01:13:20 +0200
commit2f8f562c2c85aaff8fe2f12c2f4ab3092f53bd9c (patch)
tree1f3e5351556519137c137942f78ef92f36bf67f3 /src/map/atcommand.c
parent85f88cd23756be9be2028e0ca13cf1449e38c858 (diff)
downloadtmwa-2f8f562c2c85aaff8fe2f12c2f4ab3092f53bd9c.tar.gz
tmwa-2f8f562c2c85aaff8fe2f12c2f4ab3092f53bd9c.tar.bz2
tmwa-2f8f562c2c85aaff8fe2f12c2f4ab3092f53bd9c.tar.xz
tmwa-2f8f562c2c85aaff8fe2f12c2f4ab3092f53bd9c.zip
More fixes to storage derived from ea stable.
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c18
1 files changed, 10 insertions, 8 deletions
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", &param1, &param2, &param3) < 1 || param1 < 0 || param2 < 0 || param3 < 0) {
clif_displaymessage(fd, "Please, enter at least a option (usage: @option <param1:0+> <param2:0+> <param3:0+>).");