diff options
author | shennetsind <ind@henn.et> | 2013-11-06 15:10:35 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-11-06 15:10:35 -0200 |
commit | 6f77d070b98c73962a4f45f274a0f5c58a2448e3 (patch) | |
tree | 4fa9aa479472fc6cf37803c32df0ad684994b1e5 /src/map/pet.c | |
parent | 778facb21f822cea549939c8dbee886e1cd342aa (diff) | |
download | hercules-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/pet.c')
-rw-r--r-- | src/map/pet.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/pet.c b/src/map/pet.c index 7dcf06c02..b75cc5a44 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -65,7 +65,7 @@ void pet_set_intimate(struct pet_data *pd, int value) pd->pet.intimate = value; if( (intimate >= battle_config.pet_equip_min_friendly && pd->pet.intimate < battle_config.pet_equip_min_friendly) || (intimate < battle_config.pet_equip_min_friendly && pd->pet.intimate >= battle_config.pet_equip_min_friendly) ) - status_calc_pc(sd,0); + status_calc_pc(sd,SCO_NONE); } int pet_create_egg(struct map_session_data *sd, int item_id) @@ -219,7 +219,7 @@ int pet_hungry(int tid, int64 tick, int id, intptr_t data) { pd->pet.intimate = 0; pd->status.speed = pd->db->status.speed; } - status_calc_pet(pd, 0); + status_calc_pet(pd, SCO_NONE); clif->send_petdata(sd,pd,1,pd->pet.intimate); } clif->send_petdata(sd,pd,2,pd->pet.hungry); @@ -304,7 +304,7 @@ int pet_return_egg(struct map_session_data *sd, struct pet_data *pd) pd->pet.incuvate = 1; unit->free(&pd->bl,CLR_OUTSIGHT); - status_calc_pc(sd,0); + status_calc_pc(sd,SCO_NONE); sd->status.pet_id = 0; return 1; @@ -360,14 +360,14 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) pd->bl.y = pd->ud.to_y; map->addiddb(&pd->bl); - status_calc_pet(pd,1); + status_calc_pet(pd,SCO_FIRST); pd->last_thinktime = timer->gettick(); pd->state.skillbonus = 0; if( battle_config.pet_status_support ) script->run(pet->db[i].pet_script,0,sd->bl.id,0); if( pd->petDB && pd->petDB->equip_script ) - status_calc_pc(sd,0); + status_calc_pc(sd,SCO_NONE); if( battle_config.pet_hungry_delay_rate != 100 ) interval = (pd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100; @@ -703,7 +703,7 @@ int pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { if( pd->state.skillbonus ) { pd->state.skillbonus = 0; - status_calc_pc(sd,0); + status_calc_pc(sd,SCO_NONE); } if( pd->s_skill && pd->s_skill->timer != INVALID_TIMER ) { @@ -759,7 +759,7 @@ int pet_food(struct map_session_data *sd, struct pet_data *pd) } else if( pd->pet.intimate > 1000 ) pd->pet.intimate = 1000; - status_calc_pet(pd, 0); + status_calc_pet(pd, SCO_NONE); pd->pet.hungry += pd->petDB->fullness; if( pd->pet.hungry > 100 ) pd->pet.hungry = 100; @@ -1062,7 +1062,7 @@ int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { if (pd->state.skillbonus != bonus) { pd->state.skillbonus = bonus; - status_calc_pc(sd, 0); + status_calc_pc(sd, SCO_NONE); } // wait for the next timer pd->bonus->timer=timer->add(tick+duration,pet->skill_bonus_timer,sd->bl.id,0); |