summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/intif.c18
-rw-r--r--src/map/intif.h1
-rw-r--r--src/map/pc.c4
3 files changed, 18 insertions, 5 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index 7288ec8f8..6a46c6d3c 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -1882,7 +1882,7 @@ int intif_mercenary_create(struct s_mercenary *merc)
return 0;
}
-int intif_parse_mercenary_create(int fd)
+int intif_parse_mercenary_received(int fd)
{
int len = RFIFOW(fd,2) - 5;
if( sizeof(struct s_mercenary) != len )
@@ -1892,12 +1892,22 @@ int intif_parse_mercenary_create(int fd)
return 0;
}
- merc_data_received((struct s_mercenary*)RFIFOP(fd,9), RFIFOB(fd,8));
+ merc_data_received((struct s_mercenary*)RFIFOP(fd,5), RFIFOB(fd,4));
return 0;
}
+int intif_mercenary_request(int merc_id, int char_id)
+{
+ if (CheckForCharServer())
+ return 0;
-
+ WFIFOHEAD(inter_fd,10);
+ WFIFOW(inter_fd,0) = 0x3071;
+ WFIFOL(inter_fd,2) = merc_id;
+ WFIFOL(inter_fd,6) = char_id;
+ WFIFOSET(inter_fd,10);
+ return 0;
+}
//-----------------------------------------------------------------
// inter serverからの通信
@@ -1988,7 +1998,7 @@ int intif_parse(int fd)
case 0x3855: intif_parse_Auction_bid(fd); break;
#endif
// Mercenary System
- case 0x3870: intif_parse_mercenary_create(fd); break;
+ case 0x3870: intif_parse_mercenary_received(fd); break;
case 0x3880: intif_parse_CreatePet(fd); break;
case 0x3881: intif_parse_RecvPetData(fd); break;
diff --git a/src/map/intif.h b/src/map/intif.h
index 0b4cf348f..b1ee824e0 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -79,6 +79,7 @@ int intif_quest_add(int char_id, struct quest * qd);
// MERCENARY SYSTEM
int intif_mercenary_create(struct s_mercenary *merc);
+int intif_mercenary_request(int merc_id, int char_id);
#ifndef TXT_ONLY
// MAIL SYSTEM
diff --git a/src/map/pc.c b/src/map/pc.c
index 0d173927d..4cd983768 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -917,8 +917,10 @@ int pc_reg_received(struct map_session_data *sd)
intif_request_petdata(sd->status.account_id, sd->status.char_id, sd->status.pet_id);
// Homunculus [albator]
- if (sd->status.hom_id > 0)
+ if( sd->status.hom_id > 0 )
intif_homunculus_requestload(sd->status.account_id, sd->status.hom_id);
+ if( sd->status.mer_id > 0 )
+ intif_mercenary_request(sd->status.mer_id, sd->status.char_id);
map_addiddb(&sd->bl);
map_delnickdb(sd->status.char_id, sd->status.name);