From 2292d4ea410e4e87501973c3169d136677d3dcde Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 5 Dec 2013 15:12:44 -0200 Subject: Fixed Bug 7879 guild storage would remain locked when the operation failed, now it unlocks regardless of success. Special Thanks to GrumpyPanda http://hercules.ws/board/tracker/issue-7879-guild-storage-bug/ Signed-off-by: shennetsind --- src/char/int_storage.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/char') diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 30671df5e..0313f2a41 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -242,18 +242,17 @@ int mapif_itembound_ack(int fd, int aid, int guild_id) #ifdef GP_BOUND_ITEMS WFIFOHEAD(fd,8); WFIFOW(fd,0) = 0x3856; - WFIFOL(fd,2) = aid; + WFIFOL(fd,2) = aid;/* the value is not being used, drop? */ WFIFOW(fd,6) = guild_id; WFIFOSET(fd,8); #endif return 0; } - //------------------------------------------------ //Guild bound items pull for offline characters [Akinari] //Revised by [Mhalicot] //------------------------------------------------ -int mapif_parse_ItemBoundRetrieve(int fd) +int mapif_parse_ItemBoundRetrieve_sub(int fd) { #ifdef GP_BOUND_ITEMS StringBuf buf; @@ -357,11 +356,14 @@ int mapif_parse_ItemBoundRetrieve(int fd) //Finally reload storage and tell map we're done mapif_load_guild_storage(fd,aid,guild_id,0); - mapif_itembound_ack(fd,aid,guild_id); #endif return 0; } - +void mapif_parse_ItemBoundRetrieve(int fd) { + mapif_parse_ItemBoundRetrieve_sub(fd); + /* tell map server the operation is over and it can unlock the storage */ + mapif_itembound_ack(fd,RFIFOL(fd,6),RFIFOW(fd,10)); +} int inter_storage_parse_frommap(int fd) { RFIFOHEAD(fd); -- cgit v1.2.3-70-g09d2