diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-23 19:08:54 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-23 19:08:54 +0000 |
commit | ac96c8dbde939dc367afe734f3452590e154475c (patch) | |
tree | ad6b2ec838d199f6875ec331727b4a25249e0f9b /src/map/mercenary.c | |
parent | c45d93d9d873996f99829dfc506c7875ea13d24c (diff) | |
download | hercules-ac96c8dbde939dc367afe734f3452590e154475c.tar.gz hercules-ac96c8dbde939dc367afe734f3452590e154475c.tar.bz2 hercules-ac96c8dbde939dc367afe734f3452590e154475c.tar.xz hercules-ac96c8dbde939dc367afe734f3452590e154475c.zip |
- Completed Mercenary Create, Delete, Save. Tests OK.
- Incremented MAX_SKILL required for a proper load of Mercenary Skills.
- Some fixes.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13118 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r-- | src/map/mercenary.c | 11 |
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; |