diff options
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r-- | src/map/mercenary.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 8b8353f46..495621014 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -94,7 +94,7 @@ int mercenary_get_lifetime(struct mercenary_data *md) return 0; td = timer->get(md->contract_timer); - return (td != NULL) ? DIFF_TICK(td->tick, timer->gettick()) : 0; + return (td != NULL) ? DIFF_TICK32(td->tick, timer->gettick()) : 0; } int mercenary_get_guild(struct mercenary_data *md) @@ -217,7 +217,7 @@ int mercenary_save(struct mercenary_data *md) return 1; } -int merc_contract_end_timer(int tid, unsigned int tick, int id, intptr_t data) { +int merc_contract_end_timer(int tid, int64 tick, int id, intptr_t data) { struct map_session_data *sd; struct mercenary_data *md; @@ -317,7 +317,7 @@ int merc_data_received(struct s_mercenary *merc, bool flag) { md->bl.y = md->ud.to_y; map->addiddb(&md->bl); - status_calc_mercenary(md,1); + status_calc_mercenary(md,SCO_FIRST); md->contract_timer = INVALID_TIMER; merc_contract_init(md); } @@ -360,7 +360,7 @@ int mercenary_killbonus(struct mercenary_data *md) const enum sc_type scs[] = { SC_MER_FLEE, SC_MER_ATK, SC_MER_HP, SC_MER_SP, SC_MER_HIT }; int index = rnd() % ARRAYLENGTH(scs); - sc_start(&md->bl, scs[index], 100, rnd() % 5, 600000); + sc_start(NULL,&md->bl, scs[index], 100, rnd() % 5, 600000); return 0; } @@ -490,7 +490,10 @@ int read_mercenary_skilldb(void) { return 0; } -void do_init_mercenary(void) { +void do_init_mercenary(bool minimal) { + if (minimal) + return; + mercenary->read_db(); mercenary->read_skilldb(); |