From 6f77d070b98c73962a4f45f274a0f5c58a2448e3 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 6 Nov 2013 15:10:35 -0200 Subject: Modified status_calc_ Replaces the previous 'first' flag with a multi-option flag capable of selectively determining calls where the recalculation must not be hold by delayed damage, and therefore must take place immediately. This fixes issues caused by actions that require immediate recalculation e.g. on-level-up max_hp update, also modified @baselevel where status_calc was being called after the heal and not before, causing it not to be fully healed. Special Thanks to Haruna! <3 Signed-off-by: shennetsind --- src/map/mob.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index 97f8ea6c1..3f2ae2a55 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -601,7 +601,7 @@ int mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { memcpy(md->guardian_data->guild_name, g->name, NAME_LENGTH); md->guardian_data->guardup_lv = guardup_lv; if( guardup_lv ) - status_calc_mob(md, 0); //Give bonuses. + status_calc_mob(md, SCO_NONE); //Give bonuses. return 0; } @@ -919,7 +919,7 @@ int mob_spawn (struct mob_data *md) } memset(&md->state, 0, sizeof(md->state)); - status_calc_mob(md, 1); + status_calc_mob(md, SCO_FIRST); md->attacked_id = 0; md->target_id = 0; md->move_fail_count = 0; @@ -2725,7 +2725,7 @@ int mob_class_change (struct mob_data *md, int class_) unit->skillcastcancel(&md->bl, 0); status->set_viewdata(&md->bl, class_); clif->class_change(&md->bl, md->vd->class_, 1); - status_calc_mob(md, 1); + status_calc_mob(md, SCO_FIRST); md->ud.state.speed_changed = 1; //Speed change update. if (battle_config.monster_class_change_recover) { -- cgit v1.2.3-60-g2f50