summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-09-03 13:32:38 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-09-03 13:32:38 +0000
commit3d23d29e1f63a526338a35a05d384b7571f12553 (patch)
tree52a5b0a94b4fa85a3cc46dc86040eb70d4e0bdd4 /src/map/mercenary.c
parent66201d936391f0cabdfc1e47f6ca7fd6b692820e (diff)
downloadhercules-3d23d29e1f63a526338a35a05d384b7571f12553.tar.gz
hercules-3d23d29e1f63a526338a35a05d384b7571f12553.tar.bz2
hercules-3d23d29e1f63a526338a35a05d384b7571f12553.tar.xz
hercules-3d23d29e1f63a526338a35a05d384b7571f12553.zip
- Starting Mercenary Skill implementation.
- MS_BASH Completed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13189 54d463be-8e91-2dee-dedb-b68131a5f0ec
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;