summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-19 21:13:00 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-19 21:13:00 +0000
commitc071261e8ac92dff5f47969386da189407c8346d (patch)
tree07ae19a5d282891656a0df4c5f2ec63318dc902e /src/map/clif.c
parent9597a0e6b9d232ae73acf3a3f6c9e93953188659 (diff)
downloadhercules-c071261e8ac92dff5f47969386da189407c8346d.tar.gz
hercules-c071261e8ac92dff5f47969386da189407c8346d.tar.bz2
hercules-c071261e8ac92dff5f47969386da189407c8346d.tar.xz
hercules-c071261e8ac92dff5f47969386da189407c8346d.zip
- Added sd->canuseitem_tick = tick to the pc_authok initializer data. Fixes items not being usable under some circumstances.
- Removed the empty ack packets from pc_useitem, it is now invoked from clif.c when the function to use items fails. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5329 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 6b9f2d71b..e0f65155a 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9622,7 +9622,8 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) {
//Whether the item is used or not is irrelevant, the char ain't idle. [Skotlex]
sd->idletime = last_tick;
- pc_useitem(sd,RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2);
+ if (!pc_useitem(sd,RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2))
+ clif_useitemack(sd,n,0,0); //Send an empty ack packet or the client gets stuck.
}
/*==========================================