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.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index bc91a8c60..16851d8f7 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -54,7 +54,7 @@ int merc_search_index(int class_)
bool merc_class(int class_)
{
- return (bool)(merc_search_index(class_) < 0);
+ return (bool)(merc_search_index(class_) > -1);
}
struct view_data * merc_get_viewdata(int class_)
@@ -91,6 +91,15 @@ int merc_create(struct map_session_data *sd, int class_, unsigned int lifetime)
return 1;
}
+int mercenary_save(struct mercenary_data *md)
+{
+ md->mercenary.hp = md->battle_status.hp;
+ md->mercenary.sp = md->battle_status.sp;
+ intif_mercenary_save(&md->mercenary);
+
+ return 1;
+}
+
int merc_data_received(struct s_mercenary *merc, bool flag)
{
struct map_session_data *sd;