diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 5695ddb4a5..ace5de05e9 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS 2006/02/18 + * Removed the SP_ cases from status_get_sc_def as they were colliding + with other status changes. [Skotlex] * Implemented SG_MIRACLE (Miracle of the Sun, Moon and Stars) [Komurka] - duration is stored in battle_config.sg_miracle_skill_duration (currently it's set to 10 minutes) diff --git a/src/map/pc.c b/src/map/pc.c index 216d9cfd2a..48f2977ad9 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7491,7 +7491,7 @@ struct map_session_data *pc_get_child (struct map_session_data *sd) * SP‰ñ•œ—ÊŒvŽZ *------------------------------------------ */ -static int natural_heal_tick,natural_heal_prev_tick,natural_heal_diff_tick; +static unsigned int natural_heal_prev_tick,natural_heal_diff_tick; static int pc_spheal(struct map_session_data *sd) { int a = natural_heal_diff_tick; @@ -7886,8 +7886,7 @@ static int pc_natural_heal_sub(struct map_session_data *sd,va_list ap) { */ int pc_natural_heal(int tid,unsigned int tick,int id,int data) { - natural_heal_tick = tick; - natural_heal_diff_tick = DIFF_TICK(natural_heal_tick,natural_heal_prev_tick); + natural_heal_diff_tick = DIFF_TICK(tick,natural_heal_prev_tick); clif_foreachclient(pc_natural_heal_sub, tick); natural_heal_prev_tick = tick; @@ -8398,8 +8397,9 @@ int do_init_pc(void) { add_timer_func_list(pc_autosave, "pc_autosave"); add_timer_func_list(pc_spiritball_timer, "pc_spiritball_timer"); add_timer_func_list(pc_blockskill_end, "pc_blockskill_end"); - add_timer_func_list(pc_follow_timer, "pc_follow_timer"); - add_timer_interval((natural_heal_prev_tick = gettick() + NATURAL_HEAL_INTERVAL), pc_natural_heal, 0, 0, NATURAL_HEAL_INTERVAL); + add_timer_func_list(pc_follow_timer, "pc_follow_timer"); + natural_heal_prev_tick = gettick(); + add_timer_interval(natural_heal_prev_tick + NATURAL_HEAL_INTERVAL, pc_natural_heal, 0, 0, NATURAL_HEAL_INTERVAL); add_timer(gettick() + autosave_interval, pc_autosave, 0, 0); #ifndef TXT_ONLY pc_read_gm_account(0); diff --git a/src/map/status.c b/src/map/status.c index 6c1350a0f3..d9f958f1eb 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3305,31 +3305,26 @@ int status_get_sc_def(struct block_list *bl, int type) switch (type) { //Note that stats that are *100/3 were simplified to *33 - case SP_MDEF1: // mdef case SC_STONE: case SC_FREEZE: case SC_DECREASEAGI: case SC_COMA: sc_def = 300 +100*status_get_mdef(bl) +33*status_get_luk(bl); break; - case SP_MDEF2: // int case SC_SLEEP: case SC_CONFUSION: sc_def = 300 +100*status_get_int(bl) +33*status_get_luk(bl); break; - case SP_DEF1: // def - sc_def = 300 +100*status_get_def(bl) +33*status_get_luk(bl); - break; - case SP_DEF2: // vit +// Removed since it collides with normal sc. +// case SP_DEF1: // def +// sc_def = 300 +100*status_get_def(bl) +33*status_get_luk(bl); +// break; case SC_STUN: case SC_POISON: case SC_SILENCE: case SC_STOP: sc_def = 300 +100*status_get_vit(bl) +33*status_get_luk(bl); break; - case SP_LUK: // luck - sc_def = 300 +100*status_get_luk(bl); - break; case SC_BLIND: sc_def = 300 +100*status_get_int(bl) +33*status_get_vit(bl); break;