summaryrefslogtreecommitdiff
path: root/src/map/homunculus.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/homunculus.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/homunculus.c')
-rw-r--r--src/map/homunculus.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 52f0572c0..a7a409011 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -272,7 +272,7 @@ void homunculus_skillup(struct homun_data *hd,uint16 skill_id) {
{
hd->homunculus.hskill[i].lv++;
hd->homunculus.skillpts-- ;
- status_calc_homunculus(hd,0);
+ status_calc_homunculus(hd,SCO_NONE);
if (hd->master) {
clif->homskillup(hd->master, skill_id);
clif->hominfo(hd->master,hd,0);
@@ -413,7 +413,7 @@ bool homunculus_evolve(struct homun_data *hd) {
//status_Calc flag&1 will make current HP/SP be reloaded from hom structure
hom->hp = hd->battle_status.hp;
hom->sp = hd->battle_status.sp;
- status_calc_homunculus(hd,1);
+ status_calc_homunculus(hd,SCO_FIRST);
if (!(battle_config.hom_setting&0x2))
skill->unit_move(&sd->hd->bl,timer->gettick(),1); // apply land skills immediately
@@ -460,7 +460,7 @@ bool homunculus_mutate(struct homun_data *hd, int homun_id) {
hom->hp = hd->battle_status.hp;
hom->sp = hd->battle_status.sp;
hom->prev_class = prev_class;
- status_calc_homunculus(hd,1);
+ status_calc_homunculus(hd,SCO_FIRST);
if (!(battle_config.hom_setting&0x2))
skill->unit_move(&sd->hd->bl,timer->gettick(),1); // apply land skills immediately
@@ -505,7 +505,7 @@ int homunculus_gainexp(struct homun_data *hd,unsigned int exp) {
hd->homunculus.exp = 0;
clif->specialeffect(&hd->bl,568,AREA);
- status_calc_homunculus(hd,0);
+ status_calc_homunculus(hd,SCO_NONE);
status_percent_heal(&hd->bl, 100, 100);
return 0;
}
@@ -757,7 +757,7 @@ bool homunculus_create(struct map_session_data *sd, struct s_homunculus *hom) {
hd->bl.y = hd->ud.to_y;
map->addiddb(&hd->bl);
- status_calc_homunculus(hd,1);
+ status_calc_homunculus(hd,SCO_FIRST);
hd->hungry_timer = INVALID_TIMER;
return true;
@@ -1003,7 +1003,7 @@ bool homunculus_shuffle(struct homun_data *hd) {
memcpy(&hd->homunculus.hskill, &b_skill, sizeof(b_skill));
hd->homunculus.skillpts = skillpts;
clif->homskillinfoblock(sd);
- status_calc_homunculus(hd,0);
+ status_calc_homunculus(hd,SCO_NONE);
status_percent_heal(&hd->bl, 100, 100);
clif->specialeffect(&hd->bl,568,AREA);