diff options
author | Haru <haru@dotalux.com> | 2018-06-24 22:06:41 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2018-06-30 01:51:11 +0200 |
commit | f071f91664ac5b6ed31591c33c001bcf6a75a53f (patch) | |
tree | 9092f84f37443c24f0d83cc2860bf9db04a9559d /src/char/int_mercenary.c | |
parent | ccfd2de6387f7919ef0c83fc3e48eb18b0fc5427 (diff) | |
download | hercules-f071f91664ac5b6ed31591c33c001bcf6a75a53f.tar.gz hercules-f071f91664ac5b6ed31591c33c001bcf6a75a53f.tar.bz2 hercules-f071f91664ac5b6ed31591c33c001bcf6a75a53f.tar.xz hercules-f071f91664ac5b6ed31591c33c001bcf6a75a53f.zip |
Move mapif functions from int_mercenary.c to mapif.c
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char/int_mercenary.c')
-rw-r--r-- | src/char/int_mercenary.c | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c index 6c94b62c9..52afdcb9f 100644 --- a/src/char/int_mercenary.c +++ b/src/char/int_mercenary.c @@ -185,65 +185,6 @@ bool inter_mercenary_delete(int merc_id) return true; } -void mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char flag) -{ - int size = sizeof(struct s_mercenary) + 5; - - nullpo_retv(merc); - WFIFOHEAD(fd,size); - WFIFOW(fd,0) = 0x3870; - WFIFOW(fd,2) = size; - WFIFOB(fd,4) = flag; - memcpy(WFIFOP(fd,5),merc,sizeof(struct s_mercenary)); - WFIFOSET(fd,size); -} - -void mapif_parse_mercenary_create(int fd, const struct s_mercenary *merc) -{ - struct s_mercenary merc_; - bool result; - - memcpy(&merc_, merc, sizeof(merc_)); - - result = inter_mercenary->create(&merc_); - mapif->mercenary_send(fd, &merc_, result); -} - -void mapif_parse_mercenary_load(int fd, int merc_id, int char_id) -{ - struct s_mercenary merc; - bool result = inter_mercenary->load(merc_id, char_id, &merc); - mapif->mercenary_send(fd, &merc, result); -} - -void mapif_mercenary_deleted(int fd, unsigned char flag) -{ - WFIFOHEAD(fd,3); - WFIFOW(fd,0) = 0x3871; - WFIFOB(fd,2) = flag; - WFIFOSET(fd,3); -} - -void mapif_parse_mercenary_delete(int fd, int merc_id) -{ - bool result = inter_mercenary->delete(merc_id); - mapif->mercenary_deleted(fd, result); -} - -void mapif_mercenary_saved(int fd, unsigned char flag) -{ - WFIFOHEAD(fd,3); - WFIFOW(fd,0) = 0x3872; - WFIFOB(fd,2) = flag; - WFIFOSET(fd,3); -} - -void mapif_parse_mercenary_save(int fd, struct s_mercenary* merc) -{ - bool result = inter_mercenary->save(merc); - mapif->mercenary_saved(fd, result); -} - int inter_mercenary_sql_init(void) { return 0; |