- Skill required-state will now only be checked on cast-begin, not cast-end.

- Added a check in status_calc_pc to prevent player rate adjustments from from going below 0.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8553 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-08-31 01:10:36 +00:00
parent 5eac0942c6
commit b0428a5285
3 changed files with 43 additions and 5 deletions

View File

@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/30
* Skill required-state will now only be checked on cast-begin, not
cast-end. [Skotlex]
* Added a check in status_calc_pc to prevent player rate adjustments from
from going below 0. [Skotlex]
* Removed sending normal-damage packets instead of skill packets for
splash-damaged skills, since... well, that's how Aegis does it. [Skotlex]
* Updated HLIF_CHANGE to work as explained by Tharis -> It now adds 30*lv

View File

@ -8376,6 +8376,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
}
}
if(!type)//States are only checked on begin-casting. [Skotlex]
switch(state) {
case ST_HIDING:
if(!(sc && sc->option&OPTION_HIDE)) {
@ -8420,7 +8421,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
}
break;
case ST_SIGHT:
if((!sc || sc->data[SC_SIGHT].timer == -1) && type&1) {
if(!sc || sc->data[SC_SIGHT].timer == -1) {
clif_skill_fail(sd,skill,0,0);
return 0;
}
@ -8444,9 +8445,6 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
}
break;
case ST_MOVE_ENABLE:
if(type)//Check only on begin casting. [Skotlex]
break;
if (sc && sc->data[SC_COMBO].timer != -1 && sc->data[SC_COMBO].val1 == skill)
sd->ud.canmove_tick = gettick(); //When using a combo, cancel the can't move delay to enable the skill. [Skotlex]

View File

@ -2109,7 +2109,43 @@ int status_calc_pc(struct map_session_data* sd,int first)
sd->dsprate -= sd->sc.data[SC_SERVICE4U].val3;
}
if(sd->dsprate < 0) sd->dsprate = 0;
//Underflow protections.
if(sd->sprate < 0)
sd->sprate = 0;
if(sd->dsprate < 0)
sd->dsprate = 0;
if(sd->hprate < 0)
sd->hprate = 0;
if(sd->sprate < 0)
sd->sprate = 0;
if(sd->castrate < 0)
sd->castrate = 0;
if(sd->delayrate < 0)
sd->delayrate = 0;
if(sd->speed_rate < 0)
sd->speed_rate = 0;
if(sd->hprecov_rate < 0)
sd->hprecov_rate = 0;
if(sd->sprecov_rate < 0)
sd->sprecov_rate = 0;
if(sd->matk_rate < 0)
sd->matk_rate = 0;
if(sd->critical_rate < 0)
sd->critical_rate = 0;
if(sd->hit_rate < 0)
sd->hit_rate = 0;
if(sd->flee_rate < 0)
sd->flee_rate = 0;
if(sd->flee2_rate < 0)
sd->flee2_rate = 0;
if(sd->def_rate < 0)
sd->def_rate = 0;
if(sd->def2_rate < 0)
sd->def2_rate = 0;
if(sd->mdef_rate < 0)
sd->mdef_rate = 0;
if(sd->mdef2_rate < 0)
sd->mdef2_rate = 0;
// Anti-element and anti-race
if((skill=pc_checkskill(sd,CR_TRUST))>0)