diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-11 20:02:42 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-11 20:02:42 +0000 |
commit | 8f8e2e42ba3ea1416b80190a3006c061ef4ed8b5 (patch) | |
tree | a612370540a4dc74521288209c018b722f4e63f6 /src/map/atcommand.c | |
parent | 983e4606a13576385556437b5b6b9fc1273f1417 (diff) | |
download | hercules-8f8e2e42ba3ea1416b80190a3006c061ef4ed8b5.tar.gz hercules-8f8e2e42ba3ea1416b80190a3006c061ef4ed8b5.tar.bz2 hercules-8f8e2e42ba3ea1416b80190a3006c061ef4ed8b5.tar.xz hercules-8f8e2e42ba3ea1416b80190a3006c061ef4ed8b5.zip |
- @storage/@gstorage will no longer work if you have a trade or a storage opened already.
- Cleaned up a bit @gstorage
- Added a bunch of npc functions required to properly handle moving the NPC cells when an npc is moved from it's previous location.
- Added npc_setcells to handle setting down the NPC cells of ontouch npcs.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9990 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index fbd7a28ff..64396fa4b 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2163,6 +2163,9 @@ int atcommand_charspeed(const int fd, struct map_session_data* sd, const char* c int atcommand_storage(const int fd, struct map_session_data* sd, const char* command, const char* message) { nullpo_retr(-1, sd); + + if (sd->npc_id || sd->vender_id || sd->state.trading || sd->state.storage_flag) + return -1; if (storage_storageopen(sd) == 1) { //Already open. @@ -2182,21 +2185,24 @@ int atcommand_guildstorage(const int fd, struct map_session_data* sd, const char struct storage *stor; //changes from Freya/Yor nullpo_retr(-1, sd); - if (sd->status.guild_id > 0) { - if (sd->state.storage_flag) { - clif_displaymessage(fd, msg_txt(251)); - return -1; - } - if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) { - clif_displaymessage(fd, msg_txt(251)); - return -1; - } - storage_guild_storageopen(sd); - } else { + if (!sd->status.guild_id) { clif_displaymessage(fd, msg_txt(252)); return -1; } + if (sd->npc_id || sd->vender_id || sd->state.trading || sd->state.storage_flag) + return -1; + + if (sd->state.storage_flag) { + clif_displaymessage(fd, msg_txt(251)); + return -1; + } + + if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) { + clif_displaymessage(fd, msg_txt(251)); + return -1; + } + storage_guild_storageopen(sd); return 0; } |