summaryrefslogtreecommitdiff
path: root/src/char/int_homun.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-26 10:37:45 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-26 10:37:45 +0000
commit49e9510c432987393d10ec1b8b1c2d416c9feb42 (patch)
tree4d930ebf1094ad5972cb8ba20b89d12ce74d4f3c /src/char/int_homun.c
parentfda87bd7ef5a71f4f5d5e604de1b15c58763efdd (diff)
downloadhercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.gz
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.bz2
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.xz
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.zip
Adjusted eAthena code to compile cleanly in C++ mode.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/int_homun.c')
-rw-r--r--src/char/int_homun.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/char/int_homun.c b/src/char/int_homun.c
index 49434cd90..d547b60f7 100644
--- a/src/char/int_homun.c
+++ b/src/char/int_homun.c
@@ -175,7 +175,7 @@ int inter_homun_save()
int inter_homun_delete(int hom_id)
{
struct s_homunculus *p;
- p = idb_get(homun_db,hom_id);
+ p = (struct s_homunculus*)idb_get(homun_db,hom_id);
if( p == NULL)
return 0;
idb_remove(homun_db,hom_id);
@@ -255,7 +255,6 @@ 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");
@@ -274,10 +273,9 @@ int mapif_load_homun(int fd)
{
struct s_homunculus *p;
int account_id;
- RFIFOHEAD(fd);
account_id = RFIFOL(fd,2);
- p= idb_get(homun_db,RFIFOL(fd,6));
+ p = (struct s_homunculus*)idb_get(homun_db,RFIFOL(fd,6));
if(p==NULL) {
mapif_homun_noinfo(fd,account_id);
return 0;
@@ -300,7 +298,7 @@ int mapif_save_homun(int fd,int account_id,struct s_homunculus *data)
if (data->hom_id == 0)
data->hom_id = homun_newid++;
hom_id = data->hom_id;
- p= idb_ensure(homun_db,hom_id,create_homun);
+ p = (struct s_homunculus*)idb_ensure(homun_db,hom_id,create_homun);
memcpy(p,data,sizeof(struct s_homunculus));
mapif_save_homun_ack(fd,account_id,1);
return 0;
@@ -336,27 +334,24 @@ int mapif_rename_homun(int fd, int account_id, int char_id, char *name){
int mapif_parse_SaveHomun(int fd)
{
- RFIFOHEAD(fd);
mapif_save_homun(fd,RFIFOL(fd,4),(struct s_homunculus *)RFIFOP(fd,8));
return 0;
}
int mapif_parse_DeleteHomun(int fd)
{
- RFIFOHEAD(fd);
mapif_delete_homun(fd,RFIFOL(fd,2));
return 0;
}
-int mapif_parse_RenameHomun(int fd){
- RFIFOHEAD(fd);
- mapif_rename_homun(fd, RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOP(fd, 10));
+int mapif_parse_RenameHomun(int fd)
+{
+ mapif_rename_homun(fd, RFIFOL(fd, 2), RFIFOL(fd, 6), (char*)RFIFOP(fd, 10));
return 0;
}
int inter_homun_parse_frommap(int fd)
{
- RFIFOHEAD(fd);
switch(RFIFOW(fd,0)){
case 0x3090: mapif_create_homun(fd); break;
case 0x3091: mapif_load_homun(fd); break;