summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-06 00:52:53 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-15 20:36:16 +0300
commit540da98b7d2ce92623678281e963c52c8e1f797b (patch)
tree87396ed9e2e662f04a6d78f8eaeb1c0fe3a771c5 /src/map/clif.c
parent304f26bf681ac8c003c1979da4855426be60bb09 (diff)
downloadhercules-540da98b7d2ce92623678281e963c52c8e1f797b.tar.gz
hercules-540da98b7d2ce92623678281e963c52c8e1f797b.tar.bz2
hercules-540da98b7d2ce92623678281e963c52c8e1f797b.tar.xz
hercules-540da98b7d2ce92623678281e963c52c8e1f797b.zip
Update packet ZC_FEED_MER.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 56be573c4..c00be574c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1799,19 +1799,25 @@ static void clif_homskillup(struct map_session_data *sd, uint16 skill_id)
WFIFOSET(fd,packet_len(0x239));
}
+/// Result of request to feed a homun/merc (ZC_FEED_MER).
+/// 022f <result>.B <name id>.W
+/// result:
+/// 0 = failure
+/// 1 = success
static void clif_hom_food(struct map_session_data *sd, int foodid, int fail)
{
int fd;
+ struct PACKET_ZC_FEED_MER p;
+
nullpo_retv(sd);
fd = sd->fd;
- WFIFOHEAD(fd,packet_len(0x22f));
- WFIFOW(fd,0)=0x22f;
- WFIFOB(fd,2)=fail;
- WFIFOW(fd,3)=foodid;
- WFIFOSET(fd,packet_len(0x22f));
-
- return;
+ WFIFOHEAD(fd, sizeof(p));
+ p.packetType = 0x22f;
+ p.result = fail;
+ p.itemId = foodid;
+ memcpy(WFIFOP(fd, 0), &p, sizeof(p));
+ WFIFOSET(fd, sizeof(p));
}
/// Notifies the client, that it is walking (ZC_NOTIFY_PLAYERMOVE).