summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-06 15:10:35 -0200
committershennetsind <ind@henn.et>2013-11-06 15:10:35 -0200
commit6f77d070b98c73962a4f45f274a0f5c58a2448e3 (patch)
tree4fa9aa479472fc6cf37803c32df0ad684994b1e5 /src/map/mob.c
parent778facb21f822cea549939c8dbee886e1cd342aa (diff)
downloadhercules-6f77d070b98c73962a4f45f274a0f5c58a2448e3.tar.gz
hercules-6f77d070b98c73962a4f45f274a0f5c58a2448e3.tar.bz2
hercules-6f77d070b98c73962a4f45f274a0f5c58a2448e3.tar.xz
hercules-6f77d070b98c73962a4f45f274a0f5c58a2448e3.zip
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 <ind@henn.et>
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c6
1 files changed, 3 insertions, 3 deletions
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) {