summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-03 14:11:15 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-03 14:11:15 +0000
commit0dd21624a69cf05d3c25f4d76500b3d8366a5c62 (patch)
tree9c67baf12e279d0d4b8c6bbf65e62b1a1a01eb5e /src/map/clif.c
parente3b24cf36bd25b4a49adf324174e53e997c53c9b (diff)
downloadhercules-0dd21624a69cf05d3c25f4d76500b3d8366a5c62.tar.gz
hercules-0dd21624a69cf05d3c25f4d76500b3d8366a5c62.tar.bz2
hercules-0dd21624a69cf05d3c25f4d76500b3d8366a5c62.tar.xz
hercules-0dd21624a69cf05d3c25f4d76500b3d8366a5c62.zip
- Corrected clif_pase_DropItem so ack/nak is always sent (or client hangs waiting for a reply)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11854 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 8dfe196d4..5d2413acd 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8613,28 +8613,29 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd)
void clif_parse_DropItem(int fd, struct map_session_data *sd)
{
int item_index, item_amount;
+ do {
+ if (pc_isdead(sd))
+ break;
- if (pc_isdead(sd)) {
- clif_clearunit_area(&sd->bl, 1);
- return;
- }
+ if (pc_cant_act(sd))
+ break;
- if (pc_cant_act(sd))
- return;
+ if (sd->sc.count && (
+ sd->sc.data[SC_AUTOCOUNTER] ||
+ sd->sc.data[SC_BLADESTOP] ||
+ (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM)
+ ))
+ break;
- if (sd->sc.count && (
- sd->sc.data[SC_AUTOCOUNTER] ||
- sd->sc.data[SC_BLADESTOP] ||
- (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM)
- ))
- return;
+ item_index = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2;
+ item_amount = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
+ if (!pc_dropitem(sd, item_index, item_amount))
+ break;
- item_index = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2;
- item_amount = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
- if (!pc_dropitem(sd, item_index, item_amount))
+ return;
+ } while (0);
//Because the client does not likes being ignored.
- clif_delitem(sd, item_index,0);
-
+ clif_delitem(sd, item_index,0);
}
/*==========================================