- Fixed Chase Walk having a deactivation cast time (should be instant)
- Changed status calc to allow value 0 stats; aegis allows negative values, but eA is unsigned in this regard, so ... git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10589 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
e0c63e1baa
commit
c0ccc85648
@ -4,6 +4,9 @@ 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.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
2007/05/20
|
2007/05/20
|
||||||
|
* Fixed Chase Walk having a deactivation cast time (should be instant)
|
||||||
|
* Changed status calc to allow value 0 stats; aegis allows
|
||||||
|
negative values, but eA is unsigned in this regard, so ...
|
||||||
* Added positional music effect to Battle Chant / Gospel
|
* Added positional music effect to Battle Chant / Gospel
|
||||||
- see r10588 on how to disable it if it annoys you ^^;
|
- see r10588 on how to disable it if it annoys you ^^;
|
||||||
2007/05/19
|
2007/05/19
|
||||||
|
@ -3114,7 +3114,7 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
|
|||||||
static unsigned short status_calc_str(struct block_list *bl, struct status_change *sc, int str)
|
static unsigned short status_calc_str(struct block_list *bl, struct status_change *sc, int str)
|
||||||
{
|
{
|
||||||
if(!sc || !sc->count)
|
if(!sc || !sc->count)
|
||||||
return cap_value(str,1,USHRT_MAX);
|
return cap_value(str,0,USHRT_MAX);
|
||||||
|
|
||||||
if(sc->data[SC_INCALLSTATUS].timer!=-1)
|
if(sc->data[SC_INCALLSTATUS].timer!=-1)
|
||||||
str += sc->data[SC_INCALLSTATUS].val1;
|
str += sc->data[SC_INCALLSTATUS].val1;
|
||||||
@ -3147,13 +3147,13 @@ static unsigned short status_calc_str(struct block_list *bl, struct status_chang
|
|||||||
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && str < 50)
|
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && str < 50)
|
||||||
str = 50;
|
str = 50;
|
||||||
|
|
||||||
return cap_value(str,1,USHRT_MAX);
|
return cap_value(str,0,USHRT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned short status_calc_agi(struct block_list *bl, struct status_change *sc, int agi)
|
static unsigned short status_calc_agi(struct block_list *bl, struct status_change *sc, int agi)
|
||||||
{
|
{
|
||||||
if(!sc || !sc->count)
|
if(!sc || !sc->count)
|
||||||
return cap_value(agi,1,USHRT_MAX);
|
return cap_value(agi,0,USHRT_MAX);
|
||||||
|
|
||||||
if(sc->data[SC_CONCENTRATE].timer!=-1 && sc->data[SC_QUAGMIRE].timer == -1)
|
if(sc->data[SC_CONCENTRATE].timer!=-1 && sc->data[SC_QUAGMIRE].timer == -1)
|
||||||
agi += (agi-sc->data[SC_CONCENTRATE].val3)*sc->data[SC_CONCENTRATE].val2/100;
|
agi += (agi-sc->data[SC_CONCENTRATE].val3)*sc->data[SC_CONCENTRATE].val2/100;
|
||||||
@ -3186,13 +3186,13 @@ static unsigned short status_calc_agi(struct block_list *bl, struct status_chang
|
|||||||
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && agi < 50)
|
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && agi < 50)
|
||||||
agi = 50;
|
agi = 50;
|
||||||
|
|
||||||
return cap_value(agi,1,USHRT_MAX);
|
return cap_value(agi,0,USHRT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned short status_calc_vit(struct block_list *bl, struct status_change *sc, int vit)
|
static unsigned short status_calc_vit(struct block_list *bl, struct status_change *sc, int vit)
|
||||||
{
|
{
|
||||||
if(!sc || !sc->count)
|
if(!sc || !sc->count)
|
||||||
return cap_value(vit,1,USHRT_MAX);
|
return cap_value(vit,0,USHRT_MAX);
|
||||||
|
|
||||||
if(sc->data[SC_INCALLSTATUS].timer!=-1)
|
if(sc->data[SC_INCALLSTATUS].timer!=-1)
|
||||||
vit += sc->data[SC_INCALLSTATUS].val1;
|
vit += sc->data[SC_INCALLSTATUS].val1;
|
||||||
@ -3215,13 +3215,13 @@ static unsigned short status_calc_vit(struct block_list *bl, struct status_chang
|
|||||||
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && vit < 50)
|
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && vit < 50)
|
||||||
vit = 50;
|
vit = 50;
|
||||||
|
|
||||||
return cap_value(vit,1,USHRT_MAX);
|
return cap_value(vit,0,USHRT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned short status_calc_int(struct block_list *bl, struct status_change *sc, int int_)
|
static unsigned short status_calc_int(struct block_list *bl, struct status_change *sc, int int_)
|
||||||
{
|
{
|
||||||
if(!sc || !sc->count)
|
if(!sc || !sc->count)
|
||||||
return cap_value(int_,1,USHRT_MAX);
|
return cap_value(int_,0,USHRT_MAX);
|
||||||
|
|
||||||
if(sc->data[SC_INCALLSTATUS].timer!=-1)
|
if(sc->data[SC_INCALLSTATUS].timer!=-1)
|
||||||
int_ += sc->data[SC_INCALLSTATUS].val1;
|
int_ += sc->data[SC_INCALLSTATUS].val1;
|
||||||
@ -3252,13 +3252,13 @@ static unsigned short status_calc_int(struct block_list *bl, struct status_chang
|
|||||||
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && int_ < 50)
|
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && int_ < 50)
|
||||||
int_ = 50;
|
int_ = 50;
|
||||||
|
|
||||||
return cap_value(int_,1,USHRT_MAX);
|
return cap_value(int_,0,USHRT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned short status_calc_dex(struct block_list *bl, struct status_change *sc, int dex)
|
static unsigned short status_calc_dex(struct block_list *bl, struct status_change *sc, int dex)
|
||||||
{
|
{
|
||||||
if(!sc || !sc->count)
|
if(!sc || !sc->count)
|
||||||
return cap_value(dex,1,USHRT_MAX);
|
return cap_value(dex,0,USHRT_MAX);
|
||||||
|
|
||||||
if(sc->data[SC_CONCENTRATE].timer!=-1 && sc->data[SC_QUAGMIRE].timer == -1)
|
if(sc->data[SC_CONCENTRATE].timer!=-1 && sc->data[SC_QUAGMIRE].timer == -1)
|
||||||
dex += (dex-sc->data[SC_CONCENTRATE].val4)*sc->data[SC_CONCENTRATE].val2/100;
|
dex += (dex-sc->data[SC_CONCENTRATE].val4)*sc->data[SC_CONCENTRATE].val2/100;
|
||||||
@ -3294,13 +3294,13 @@ static unsigned short status_calc_dex(struct block_list *bl, struct status_chang
|
|||||||
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && dex < 50)
|
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && dex < 50)
|
||||||
dex = 50;
|
dex = 50;
|
||||||
|
|
||||||
return cap_value(dex,1,USHRT_MAX);
|
return cap_value(dex,0,USHRT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned short status_calc_luk(struct block_list *bl, struct status_change *sc, int luk)
|
static unsigned short status_calc_luk(struct block_list *bl, struct status_change *sc, int luk)
|
||||||
{
|
{
|
||||||
if(!sc || !sc->count)
|
if(!sc || !sc->count)
|
||||||
return cap_value(luk,1,USHRT_MAX);
|
return cap_value(luk,0,USHRT_MAX);
|
||||||
|
|
||||||
if(sc->data[SC_CURSE].timer!=-1)
|
if(sc->data[SC_CURSE].timer!=-1)
|
||||||
return 0;
|
return 0;
|
||||||
@ -3321,7 +3321,7 @@ static unsigned short status_calc_luk(struct block_list *bl, struct status_chang
|
|||||||
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && luk < 50)
|
if(sc->data[SC_SPIRIT].timer!=-1 && sc->data[SC_SPIRIT].val2 == SL_HIGH && luk < 50)
|
||||||
luk = 50;
|
luk = 50;
|
||||||
|
|
||||||
return cap_value(luk,1,USHRT_MAX);
|
return cap_value(luk,0,USHRT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc, int batk)
|
static unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc, int batk)
|
||||||
|
@ -946,35 +946,39 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
|
|||||||
|
|
||||||
switch(skill_num){
|
switch(skill_num){
|
||||||
case ALL_RESURRECTION:
|
case ALL_RESURRECTION:
|
||||||
if(battle_check_undead(tstatus->race,tstatus->def_ele)){
|
if(battle_check_undead(tstatus->race,tstatus->def_ele)) {
|
||||||
temp=1;
|
temp = 1;
|
||||||
casttime = skill_castfix(src, PR_TURNUNDEAD, skill_lv);
|
casttime = skill_castfix(src, PR_TURNUNDEAD, skill_lv);
|
||||||
} else if (!status_isdead(target))
|
} else if (!status_isdead(target))
|
||||||
return 0; //Can't cast on non-dead characters.
|
return 0; //Can't cast on non-dead characters.
|
||||||
break;
|
break;
|
||||||
case MO_FINGEROFFENSIVE:
|
case MO_FINGEROFFENSIVE:
|
||||||
if(sd)
|
if(sd)
|
||||||
casttime += casttime * ((skill_lv > sd->spiritball)? sd->spiritball:skill_lv);
|
casttime += casttime * ((skill_lv > sd->spiritball)? sd->spiritball:skill_lv);
|
||||||
break;
|
break;
|
||||||
case MO_EXTREMITYFIST:
|
case MO_EXTREMITYFIST:
|
||||||
if (sc && sc->data[SC_COMBO].timer != -1 &&
|
if (sc && sc->data[SC_COMBO].timer != -1 &&
|
||||||
(sc->data[SC_COMBO].val1 == MO_COMBOFINISH ||
|
(sc->data[SC_COMBO].val1 == MO_COMBOFINISH ||
|
||||||
sc->data[SC_COMBO].val1 == CH_TIGERFIST ||
|
sc->data[SC_COMBO].val1 == CH_TIGERFIST ||
|
||||||
sc->data[SC_COMBO].val1 == CH_CHAINCRUSH))
|
sc->data[SC_COMBO].val1 == CH_CHAINCRUSH))
|
||||||
casttime = 0;
|
casttime = 0;
|
||||||
temp = 1;
|
temp = 1;
|
||||||
break;
|
break;
|
||||||
|
case SA_SPELLBREAKER:
|
||||||
|
temp = 1;
|
||||||
|
break;
|
||||||
|
case ST_CHASEWALK:
|
||||||
|
if (sc && sc->data[ST_CHASEWALK].timer != -1)
|
||||||
|
casttime = 0;
|
||||||
|
break;
|
||||||
case TK_RUN:
|
case TK_RUN:
|
||||||
if (sc && sc->data[SC_RUN].timer != -1)
|
if (sc && sc->data[SC_RUN].timer != -1)
|
||||||
casttime = 0;
|
casttime = 0;
|
||||||
break;
|
break;
|
||||||
case SA_SPELLBREAKER:
|
|
||||||
temp =1;
|
|
||||||
break;
|
|
||||||
case KN_CHARGEATK:
|
case KN_CHARGEATK:
|
||||||
//Taken from jA: Casttime is increased by dist/3*100%
|
//Taken from jA: Casttime is increased by dist/3*100%
|
||||||
casttime+= casttime * (distance_bl(src,target)-1)/3;
|
casttime+= casttime * (distance_bl(src,target)-1)/3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(skill_get_castnodex(skill_num, skill_lv)&2))
|
if (!(skill_get_castnodex(skill_num, skill_lv)&2))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user