summaryrefslogtreecommitdiff
path: root/src/char/int_homun.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/int_homun.c')
-rw-r--r--src/char/int_homun.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/char/int_homun.c b/src/char/int_homun.c
index c71cd7792..3de472d74 100644
--- a/src/char/int_homun.c
+++ b/src/char/int_homun.c
@@ -241,6 +241,7 @@ int mapif_delete_homun_ack(int fd,int flag)
}
int mapif_rename_homun_ack(int fd, int account_id, int char_id, int flag, char *name){
+ WFIFOHEAD(fd, NAME_LENGTH+12);
WFIFOW(fd, 0) =0x3894;
WFIFOL(fd, 2) =account_id;
WFIFOL(fd, 6) =char_id;
@@ -254,6 +255,7 @@ int mapif_rename_homun_ack(int fd, int account_id, int char_id, int flag, char *
int mapif_create_homun(int fd)
{
struct s_homunculus *p;
+ RFIFOHEAD(fd);
p= (struct s_homunculus *) aCalloc(sizeof(struct s_homunculus), 1);
if(p==NULL){
ShowFatalError("int_homun: out of memory !\n");
@@ -271,7 +273,9 @@ int mapif_create_homun(int fd)
int mapif_load_homun(int fd)
{
struct s_homunculus *p;
- int account_id = RFIFOL(fd,2);
+ int account_id;
+ RFIFOHEAD(fd);
+ account_id = RFIFOL(fd,2);
p= idb_get(homun_db,RFIFOL(fd,6));
if(p==NULL) {
@@ -292,7 +296,6 @@ int mapif_save_homun(int fd,int account_id,struct s_homunculus *data)
{
struct s_homunculus *p;
int hom_id;
- RFIFOHEAD(fd);
if (data->hom_id == 0)
data->hom_id = homun_newid++;
@@ -346,6 +349,7 @@ int mapif_parse_DeleteHomun(int fd)
}
int mapif_parse_RenameHomun(int fd){
+ RFIFOHEAD(fd);
mapif_rename_homun(fd, RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOP(fd, 10));
return 0;
}