summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-20 09:48:20 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-20 09:48:20 +0000
commitacb92c94cae29a2e516b1f77101889f7d043bf85 (patch)
treeaae252574dbb089be259309395f4bfb71e9e36a7 /src/map/atcommand.c
parentb240a78c9fc934bfba8e918c7a058fe04953136e (diff)
downloadhercules-acb92c94cae29a2e516b1f77101889f7d043bf85.tar.gz
hercules-acb92c94cae29a2e516b1f77101889f7d043bf85.tar.bz2
hercules-acb92c94cae29a2e516b1f77101889f7d043bf85.tar.xz
hercules-acb92c94cae29a2e516b1f77101889f7d043bf85.zip
fixed @storage / @gstorage
started using MAX_MOB_DB git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1256 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 9bcf0a511..2964c8ce4 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1874,12 +1874,25 @@ int atcommand_storage(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
+ 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.");
+ return -1;
+ }
+
+ if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) {
+ clif_displaymessage(fd, "You have already opened your storage.");
+ return -1;
+ }
+
storage_storageopen(sd);
return 0;
}
+
/*==========================================
*
*------------------------------------------
@@ -1888,9 +1901,23 @@ int atcommand_guildstorage(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
+ struct storage *stor; //changes from Freya/Yor
nullpo_retr(-1, sd);
- if (sd->status.guild_id > 0)
+
+ if (sd->status.guild_id > 0) {
+ if (sd->state.storage_flag == 1) {
+ clif_displaymessage(fd, "You have already opened your guild storage.");
+ return -1;
+ }
+ if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) {
+ clif_displaymessage(fd, "Your storage is opened. Close it before.");
+ return -1;
+ }
storage_guild_storageopen(sd);
+ } else {
+ clif_displaymessage(fd, "You are not in a guild.");
+ return -1;
+ }
return 0;
}