summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/mercenary.c19
-rw-r--r--src/map/skill.c1
-rw-r--r--src/map/unit.c3
5 files changed, 20 insertions, 9 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 257fceb16..14e82f792 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3088,6 +3088,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return 0;
//Just fallback on master.
t_bl=(struct block_list *)((TBL_HOMUNCULUS*)target)->master;
+ if (((TBL_PC*)t_bl)->state.monster_ignore && t_bl != s_bl && flag&BCT_ENEMY)
+ return 0;
break;
}
case BL_SKILL: //Skill with no owner? Kinda odd... but.. let it through.
diff --git a/src/map/clif.c b/src/map/clif.c
index 016629098..f78f1ff90 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1471,6 +1471,8 @@ int clif_hominfo(struct map_session_data *sd, int flag)
WBUFW(buf,0)=0x22e;
memcpy(WBUFP(buf,2),sd->homunculus.name,NAME_LENGTH);
WBUFB(buf,26)=sd->homunculus.rename_flag * 2;
+ // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
+ WBUFB(buf,26)=sd->homunculus.rename_flag | (sd->homunculus.vaporize << 1) | (sd->homunculus.hp?0:4);
WBUFW(buf,27)=sd->homunculus.level;
WBUFW(buf,29)=sd->homunculus.hunger;
WBUFW(buf,31)=(unsigned short) (hd->master->homunculus.intimacy / 100) ;
@@ -5043,7 +5045,7 @@ int clif_displaymessage(const int fd, char* mes)
int len_mes = strlen(mes);
if (len_mes > 0) { // don't send a void message (it's not displaying on the client chat). @help can send void line.
- WFIFOHEAD(fd, 5 + len_mes);
+ WFIFOHEAD(fd, 5 + len_mes);
WFIFOW(fd,0) = 0x8e;
WFIFOW(fd,2) = 5 + len_mes; // 4 + len + NULL teminate
memcpy(WFIFOP(fd,4), mes, len_mes + 1);
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index a415fb7c7..9521f7071 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -54,14 +54,6 @@ void merc_load_exptables(void);
int mercskill_castend_id( int tid, unsigned int tick, int id,int data );
static int merc_hom_hungry(int tid,unsigned int tick,int id,int data);
-int do_init_merc (void)
-{
- merc_load_exptables();
- memset(homunculus_db,0,sizeof(homunculus_db)); //[orn]
- read_homunculusdb(); //[orn]
- return 0;
-}
-
static unsigned long hexptbl[MAX_LEVEL+1];
void merc_load_exptables(void)
@@ -1089,4 +1081,15 @@ int read_homunculusdb()
return 0;
}
+int do_init_merc (void)
+{
+ merc_load_exptables();
+ memset(homunculus_db,0,sizeof(homunculus_db)); //[orn]
+ read_homunculusdb(); //[orn]
+ // Add homunc timer function to timer func list [Toms]
+ add_timer_func_list(merc_natural_heal, "merc_natural_heal");
+ add_timer_func_list(merc_hom_hungry, "merc_hom_hungry");
+ return 0;
+}
+
int do_final_merc (void);
diff --git a/src/map/skill.c b/src/map/skill.c
index 9e8d6add8..e06b5f2ef 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5589,6 +5589,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
{
if (sd && sd->hd && ( sd->hd->battle_status.hp >= (sd->hd->battle_status.max_hp * 80 / 100 ) ) ) {
sd->homunculus.vaporize = 1;
+ clif_hominfo(sd, 0);
merc_hom_delete(sd->hd, 0) ;
} else if ( sd )
{
diff --git a/src/map/unit.c b/src/map/unit.c
index 511ec86ce..19e01f2ea 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1638,6 +1638,9 @@ int unit_free(struct block_list *bl) {
status_change_end(bl,SC_EXPLOSIONSPIRITS,-1);
}
}
+ if (sd->followtimer != -1)
+ pc_stop_following(sd);
+
// Notify friends that this char logged out. [Skotlex]
clif_foreachclient(clif_friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 0);
party_send_logout(sd);