static int merc_contract_end(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd; struct mercenary_data *md; if((sd = map_id2sd(id)) == NULL) return 1; if((md = sd->md) == NULL) return 1; if(md->contract_timer != tid) { ShowError("merc_contract_end %d != %d.\n", md->contract_timer, tid); return 0; } md->contract_timer = INVALID_TIMER; merc_delete(md, 0); // Mercenary soldier's duty hour is over. return 0; }
int mercenary_dead(struct mercenary_data *md) { merc_delete(md, 1); return 0; }
int mercenary_dead(struct mercenary_data *md, struct block_list *src) { merc_delete(md, 1); return 0; }