diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-31 22:56:05 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-31 22:56:05 +0000 |
commit | 08c870656aeb76d839a8ad2fd071818b8618f899 (patch) | |
tree | 3ac8cc1544cd0a60f00312cdb6c8c21f62f287a8 /src/map/unit.c | |
parent | 409cb0381295716d654fd2ee5021e1011a45ab80 (diff) | |
download | hercules-08c870656aeb76d839a8ad2fd071818b8618f899.tar.gz hercules-08c870656aeb76d839a8ad2fd071818b8618f899.tar.bz2 hercules-08c870656aeb76d839a8ad2fd071818b8618f899.tar.xz hercules-08c870656aeb76d839a8ad2fd071818b8618f899.zip |
- A proper mercenary lifetime calculation.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13165 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index c1fb60031..59924a108 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1850,14 +1850,13 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l map_freeblock_unlock(); return 0; } - break; } case BL_MER: { struct mercenary_data *md = (struct mercenary_data *)bl; ud->canact_tick = ud->canmove_tick; - if( !md->mercenary.remain_life_time && !(md->master && !md->master->state.active) ) + if( mercenary_get_lifetime(md) <= 0 && !(md->master && !md->master->state.active) ) { clif_clearunit_area(bl,clrtype); map_delblock(bl); @@ -2097,7 +2096,7 @@ int unit_free(struct block_list *bl, int clrtype) struct map_session_data *sd = md->master; if( clrtype >= 0 ) { - if( md->mercenary.remain_life_time > 0 ) + if( mercenary_get_lifetime(md) > 0 ) mercenary_save(md); else { |