From 88d74cb2f179b074d5a81df60c2eb95f6873cf8e Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Tue, 23 Jun 2009 01:45:20 +0200 Subject: Make opening storage fail if there is a storage already open. Derived from ea stable. --- src/map/storage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/map/storage.c b/src/map/storage.c index 50f0bef..dc9f714 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -147,7 +147,7 @@ int storage_storageopen(struct map_session_data *sd) //Storage loading always from sql idea from Komurka [Skotlex] - removed as it opens exploits when server lags. //#ifdef TXT_ONLY if((stor = (struct storage *) numdb_search(storage_db,sd->status.account_id)) != NULL) { - if (stor->storage_status == 0) { + if (stor->storage_status == 0 && sd->state.storage_flag == 0) { stor->storage_status = 1; sd->state.storage_flag = 1; clif_storageitemlist(sd,stor); @@ -457,6 +457,8 @@ int storage_guild_storageopen(struct map_session_data *sd) if((gstor = guild2storage2(sd->status.guild_id)) != NULL) { if(gstor->storage_status) return 1; + if(sd->state.storage_flag) + return 1; //Can't open both storages at a time. gstor->storage_status = 1; sd->state.storage_flag = 2; clif_guildstorageitemlist(sd,gstor); -- cgit v1.2.3-70-g09d2