summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-23 14:59:51 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-23 14:59:51 +0000
commitc45d93d9d873996f99829dfc506c7875ea13d24c (patch)
tree19dcfcbf374369ba433e63c6ed800d707eb05176 /src/map
parent94281a398ef3a288a23cebb9f2d9a5227c570996 (diff)
downloadhercules-c45d93d9d873996f99829dfc506c7875ea13d24c.tar.gz
hercules-c45d93d9d873996f99829dfc506c7875ea13d24c.tar.bz2
hercules-c45d93d9d873996f99829dfc506c7875ea13d24c.tar.xz
hercules-c45d93d9d873996f99829dfc506c7875ea13d24c.zip
- Added column `mer_id` on char_db
- More mercenary implementations (delete, load, create) - Some fixes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13117 54d463be-8e91-2dee-dedb-b68131a5f0ec
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);