summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-17 00:15:33 +0000
committerDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-17 00:15:33 +0000
commit7b2f7c0503cb5be8bc45f57353d838a4dbf84d7b (patch)
tree34fb42eb5bf938c6c02b56e26931c6b1937e4c89 /src/map/pc.c
parent5a064d5a6723601d08610082ab6c203bc94cdab0 (diff)
downloadhercules-7b2f7c0503cb5be8bc45f57353d838a4dbf84d7b.tar.gz
hercules-7b2f7c0503cb5be8bc45f57353d838a4dbf84d7b.tar.bz2
hercules-7b2f7c0503cb5be8bc45f57353d838a4dbf84d7b.tar.xz
hercules-7b2f7c0503cb5be8bc45f57353d838a4dbf84d7b.zip
Orn's and Albator's Homunculus system, finally, YAY!!
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index edd95ae8a..dc1ecbde7 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -24,6 +24,7 @@
#include "npc.h"
#include "mob.h"
#include "pet.h"
+#include "mercenary.h" //orn
#include "itemdb.h"
#include "script.h"
#include "battle.h"
@@ -676,6 +677,10 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t
if (sd->status.pet_id > 0)
intif_request_petdata(sd->status.account_id, sd->status.char_id, sd->status.pet_id);
+ // Homunculus [albator]
+ if (sd->status.hom_id > 0)
+ intif_homunculus_requestload(sd->status.account_id, sd->status.hom_id);
+
// パ?ティ、ギルドデ?タの要求
if (sd->status.party_id > 0 && party_search(sd->status.party_id) == NULL)
party_request_info(sd->status.party_id);
@@ -3257,6 +3262,10 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
unit_remove_map(&sd->pd->bl, clrtype);
intif_save_petdata(sd->status.account_id,&sd->pet);
}
+ if(sd->status.hom_id > 0 && sd->hd) { //orn
+ unit_remove_map(&sd->hd->bl, clrtype);
+ intif_homunculus_requestsave(sd->status.account_id, &sd->homunculus);
+ }
chrif_save(sd,2);
chrif_changemapserver(sd, mapindex, x, y, ip, (short)port);
return 0;
@@ -3289,6 +3298,8 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
unit_remove_map(&sd->bl, clrtype);
if(sd->status.pet_id > 0 && sd->pd)
unit_remove_map(&sd->pd->bl, clrtype);
+ if(sd->status.hom_id > 0 && sd->hd) //orn
+ unit_remove_map(&sd->hd->bl, clrtype);
clif_changemap(sd,map[m].index,x,y); // [MouseJstr]
} else if(sd->state.auth)
//Tag player for rewarping after map-loading is done. [Skotlex]
@@ -3306,6 +3317,13 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
sd->pd->ud.dir = sd->ud.dir;
}
+ if(sd->status.hom_id > 0 && sd->hd ) { //orn
+ sd->hd->bl.m = m;
+ sd->hd->bl.x = sd->hd->ud.to_x = x;
+ sd->hd->bl.y = sd->hd->ud.to_y = y;
+ sd->hd->ud.dir = sd->ud.dir;
+ }
+
return 0;
}
@@ -4717,6 +4735,14 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
pet_unlocktarget(sd->pd);
}
+ if(sd->status.hom_id > 0 && sd->hd) //orn
+ {
+ merc_stop_walking(sd->hd, 1) ;
+ merc_stop_attack(sd->hd) ;
+ merc_hom_delete(sd->hd,0);
+ }
+
+
// Leave duel if you die [LuzZza]
if(battle_config.duel_autoleave_when_die) {
if(sd->duel_group > 0)