summaryrefslogtreecommitdiff
path: root/src/char/int_mercenary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/int_mercenary.c')
-rw-r--r--src/char/int_mercenary.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c
index 133dcf565..671c71278 100644
--- a/src/char/int_mercenary.c
+++ b/src/char/int_mercenary.c
@@ -198,10 +198,15 @@ void mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char flag)
WFIFOSET(fd,size);
}
-void mapif_parse_mercenary_create(int fd, struct s_mercenary* merc)
+void mapif_parse_mercenary_create(int fd, const struct s_mercenary *merc)
{
- bool result = mapif->mercenary_create(merc);
- mapif->mercenary_send(fd, merc, result);
+ struct s_mercenary merc_;
+ bool result;
+
+ memcpy(&merc_, merc, sizeof(merc_));
+
+ result = mapif->mercenary_create(&merc_);
+ mapif->mercenary_send(fd, &merc_, result);
}
void mapif_parse_mercenary_load(int fd, int merc_id, int char_id)