summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r--src/map/mercenary.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 0c6e03b6b..566aab6c1 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -314,7 +314,10 @@ int merc_data_received(struct s_mercenary *merc, bool flag)
void mercenary_damage(struct mercenary_data *md, struct block_list *src, int hp, int sp)
{
- clif_mercenary_updatestatus(md->master, SP_HP);
+ if( hp )
+ clif_mercenary_updatestatus(md->master, SP_HP);
+ if( sp )
+ clif_mercenary_updatestatus(md->master, SP_SP);
}
void mercenary_heal(struct mercenary_data *md, int hp, int sp)
@@ -357,6 +360,18 @@ int mercenary_kills(struct mercenary_data *md)
return 0;
}
+int mercenary_checkskill(struct mercenary_data *md, int skill_id)
+{
+ int i = skill_id - MC_SKILLBASE;
+
+ if( !md || !md->db )
+ return 0;
+ if( md->db->skill[i].id == skill_id )
+ return md->db->skill[i].lv;
+
+ return 0;
+}
+
int read_mercenarydb(void)
{
FILE *fp;