summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-05 15:12:44 -0200
committershennetsind <ind@henn.et>2013-12-05 15:12:44 -0200
commit2292d4ea410e4e87501973c3169d136677d3dcde (patch)
tree5542f720b09832e8aa50340cce596f1373ef0ca6
parent9ce970bccc98f3004b14eaf11925d7d7841bf2d8 (diff)
downloadhercules-2292d4ea410e4e87501973c3169d136677d3dcde.tar.gz
hercules-2292d4ea410e4e87501973c3169d136677d3dcde.tar.bz2
hercules-2292d4ea410e4e87501973c3169d136677d3dcde.tar.xz
hercules-2292d4ea410e4e87501973c3169d136677d3dcde.zip
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 <ind@henn.et>
-rw-r--r--src/char/int_storage.c12
1 files changed, 7 insertions, 5 deletions
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);