- Fixed Potion Pitcher sometimes crashing the server.
- Fixed a compile warning by adjusting the acid demonstration formula. - Added flag 2 to the skill_castnodex_db file for skills that shouldn't be affected by delay/cast reducing skills/effects. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5714 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
7929d3b844
commit
edc99399f6
@ -5,6 +5,11 @@ 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
|
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
|
||||||
|
|
||||||
2006/03/23
|
2006/03/23
|
||||||
|
* Fixed Potion Pitcher sometimes crashing the server. [Skotlex]
|
||||||
|
* Fixed a compile warning by adjusting the acid demonstration formula.
|
||||||
|
[Skotlex]
|
||||||
|
* Added flag 2 to the skill_castnodex_db file for skills that shouldn't be
|
||||||
|
affected by delay/cast reducing skills/effects. [Skotlex]
|
||||||
* Added SantaPoring's water_height.txt modifications. [Lance]
|
* Added SantaPoring's water_height.txt modifications. [Lance]
|
||||||
* Minor cleanups. [Lance]
|
* Minor cleanups. [Lance]
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
// map_name map_water_level_to_use
|
// map_name map_water_level_to_use
|
||||||
// Example: Use geffen's water level for prontera when prontera.rsw isn't found in the grf.
|
// Example: Use geffen's water level for prontera when prontera.rsw isn't found in the grf.
|
||||||
// prontera.gat geffen.gat
|
// prontera.gat geffen.gat
|
||||||
|
// You can also directly specify the rsw file:
|
||||||
|
// prontera.gat geffen.rsw
|
||||||
|
|
||||||
force_1-1.gat force_map1.gat
|
force_1-1.gat force_map1.gat
|
||||||
force_2-1.gat force_map1.gat
|
force_2-1.gat force_map1.gat
|
||||||
@ -175,4 +177,4 @@ y_airport.gat airport.gat
|
|||||||
lhz_airport.gat airport.gat
|
lhz_airport.gat airport.gat
|
||||||
airplane_01.gat airplane.gat
|
airplane_01.gat airplane.gat
|
||||||
que_job03.gat que_job02.gat
|
que_job03.gat que_job02.gat
|
||||||
p_track02.gat p_track01.gat
|
p_track02.gat p_track01.gat
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
//<Skill id>,<Cast: 1 or 0>,<Delay (Optional): 1 or 0>
|
//<Skill id>,<Cast: 1 or 0>,<Delay (Optional): 1 or 0>
|
||||||
// Cast: With 1, dex does not affect the skill's cast rate
|
// Cast: With 1, dex does not affect the skill's cast rate
|
||||||
|
// Cast: With 2, cast-rate cannot be reduced by Suffragium and the like
|
||||||
|
// Cast: With 3, same effect as 1 + 2
|
||||||
// Cast: With 0, dex affects the skill's cast rate
|
// Cast: With 0, dex affects the skill's cast rate
|
||||||
// Delay: With 1, dex does not affect the skill's delay rate
|
// Delay: With 1, dex does not affect the skill's delay rate
|
||||||
|
// Delay: With 2, delay cannot be reduced by Suffragium and the like
|
||||||
// Delay: With 0, dex affects the skill's delay rate
|
// Delay: With 0, dex affects the skill's delay rate
|
||||||
// Example - 46,1,1 = Double Strafe's casting time and delay is not affected by dex.
|
// Example - 46,1,1 = Double Strafe's casting time and delay is not affected by dex.
|
||||||
// By default, dex NEVER affects after-cast delay, so no need of putting 'x,0,1' in this file
|
// By default, dex NEVER affects after-cast delay, so no need of putting 'x,0,1' in this file
|
||||||
@ -34,7 +37,7 @@
|
|||||||
468,1 //SL_STUN
|
468,1 //SL_STUN
|
||||||
469,1 //SL_SMA
|
469,1 //SL_SMA
|
||||||
1014,1 //PR_REDEMPTIO
|
1014,1 //PR_REDEMPTIO
|
||||||
10010,1 //GD_BATTLEORDER
|
10010,3 //GD_BATTLEORDER
|
||||||
10011,1 //GD_REGENERATION
|
10011,3 //GD_REGENERATION
|
||||||
10012,1 //GD_RESTORE
|
10012,3 //GD_RESTORE
|
||||||
10013,1 //GD_EMERGENCYCALL
|
10013,3 //GD_EMERGENCYCALL
|
||||||
|
@ -2807,13 +2807,13 @@ struct Damage battle_calc_misc_attack(
|
|||||||
aflag = (aflag&~BF_RANGEMASK)|BF_LONG;
|
aflag = (aflag&~BF_RANGEMASK)|BF_LONG;
|
||||||
break;
|
break;
|
||||||
case CR_ACIDDEMONSTRATION:
|
case CR_ACIDDEMONSTRATION:
|
||||||
//This equation is not official, but it's the closest to the official one
|
{ // updated the formula based on a Japanese formula found to be exact [Reddozen]
|
||||||
//that Viccious Pucca and the other folks at the forums could come up with. [Skotlex]
|
int vit = status_get_vit(target);
|
||||||
// updated the formula based on a Japanese formula found to be exact [Reddozen]
|
damage = 7*(vit*int_*int_) / (10*(vit+int_));
|
||||||
damage = (int)((0.7 * status_get_vit(target) * (int_ * int_)) / (status_get_vit(target) + int_));
|
if (tsd) damage/=2;
|
||||||
if (tsd) damage/=2;
|
aflag = (aflag&~BF_RANGEMASK)|BF_LONG;
|
||||||
aflag = (aflag&~BF_RANGEMASK)|BF_LONG;
|
break;
|
||||||
break;
|
}
|
||||||
case NJ_ZENYNAGE:
|
case NJ_ZENYNAGE:
|
||||||
{
|
{
|
||||||
int dmgnage = (500*skill_lv)+rand()%(500*skill_lv);
|
int dmgnage = (500*skill_lv)+rand()%(500*skill_lv);
|
||||||
|
@ -4544,6 +4544,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
|
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
|
||||||
}
|
}
|
||||||
tbl.id = 0;
|
tbl.id = 0;
|
||||||
|
tbl.type = BL_NUL;
|
||||||
tbl.m = src->m;
|
tbl.m = src->m;
|
||||||
tbl.x = src->x;
|
tbl.x = src->x;
|
||||||
tbl.y = src->y;
|
tbl.y = src->y;
|
||||||
@ -8224,6 +8225,7 @@ int skill_check_condition(struct map_session_data *sd,int skill, int lv, int typ
|
|||||||
int skill_castfix( struct block_list *bl, int skill_id, int skill_lv, int time)
|
int skill_castfix( struct block_list *bl, int skill_id, int skill_lv, int time)
|
||||||
{
|
{
|
||||||
struct status_change *sc;
|
struct status_change *sc;
|
||||||
|
int castnodex = skill_get_castnodex(skill_id, skill_lv);
|
||||||
|
|
||||||
nullpo_retr(0, bl);
|
nullpo_retr(0, bl);
|
||||||
|
|
||||||
@ -8232,7 +8234,7 @@ int skill_castfix( struct block_list *bl, int skill_id, int skill_lv, int time)
|
|||||||
nullpo_retr(0, sd);
|
nullpo_retr(0, sd);
|
||||||
|
|
||||||
// calculate base cast time (reduced by dex)
|
// calculate base cast time (reduced by dex)
|
||||||
if (!skill_get_castnodex(skill_id, skill_lv) > 0) {
|
if (castnodex&~1) {
|
||||||
int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
|
int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
|
||||||
if (scale > 0) // not instant cast
|
if (scale > 0) // not instant cast
|
||||||
time = time * scale / battle_config.castrate_dex_scale;
|
time = time * scale / battle_config.castrate_dex_scale;
|
||||||
@ -8247,28 +8249,30 @@ int skill_castfix( struct block_list *bl, int skill_id, int skill_lv, int time)
|
|||||||
if (sd->castrate != 100)
|
if (sd->castrate != 100)
|
||||||
time -= time * (100 - sd->castrate) / 100;
|
time -= time * (100 - sd->castrate) / 100;
|
||||||
} else if (bl->type == BL_PET) { //Skotlex: Simple scaling
|
} else if (bl->type == BL_PET) { //Skotlex: Simple scaling
|
||||||
int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
|
if (castnodex&~1) {
|
||||||
if (scale > 0) // not instant cast
|
int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
|
||||||
time = time * scale / battle_config.castrate_dex_scale;
|
if (scale > 0) // not instant cast
|
||||||
else return 0; // instant cast
|
time = time * scale / battle_config.castrate_dex_scale;
|
||||||
|
else return 0; // instant cast
|
||||||
|
}
|
||||||
if (battle_config.cast_rate != 100)
|
if (battle_config.cast_rate != 100)
|
||||||
time = time * battle_config.cast_rate / 100;
|
time = time * battle_config.cast_rate / 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate cast time reduced by skill bonuses
|
if (castnodex&~2)
|
||||||
sc = status_get_sc(bl);
|
{ // calculate cast time reduced by skill bonuses
|
||||||
/* ƒTƒtƒ‰ƒMƒEƒ€ */
|
sc = status_get_sc(bl);
|
||||||
if (sc && sc->count) {
|
/* ƒTƒtƒ‰ƒMƒEƒ€ */
|
||||||
if (sc->data[SC_SUFFRAGIUM].timer != -1) {
|
if (sc && sc->count) {
|
||||||
time -= time * (sc->data[SC_SUFFRAGIUM].val1 * 15) / 100;
|
if (sc->data[SC_SUFFRAGIUM].timer != -1) {
|
||||||
status_change_end(bl, SC_SUFFRAGIUM, -1);
|
time -= time * (sc->data[SC_SUFFRAGIUM].val1 * 15) / 100;
|
||||||
|
status_change_end(bl, SC_SUFFRAGIUM, -1);
|
||||||
|
}
|
||||||
|
/* ƒuƒ‰ƒM‚ÌŽ? */
|
||||||
|
if (sc->data[SC_POEMBRAGI].timer != -1)
|
||||||
|
time -= time * sc->data[SC_POEMBRAGI].val2 / 100;
|
||||||
}
|
}
|
||||||
/* ƒuƒ‰ƒM‚ÌŽ? */
|
|
||||||
if (sc->data[SC_POEMBRAGI].timer != -1)
|
|
||||||
time -= time * sc->data[SC_POEMBRAGI].val2 / 100;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// return final cast time
|
// return final cast time
|
||||||
return (time > 0) ? time : 0;
|
return (time > 0) ? time : 0;
|
||||||
}
|
}
|
||||||
@ -8278,7 +8282,8 @@ int skill_castfix( struct block_list *bl, int skill_id, int skill_lv, int time)
|
|||||||
*/
|
*/
|
||||||
int skill_delayfix( struct block_list *bl, int skill_id, int skill_lv, int time )
|
int skill_delayfix( struct block_list *bl, int skill_id, int skill_lv, int time )
|
||||||
{
|
{
|
||||||
struct status_change *sc;
|
struct status_change *sc;
|
||||||
|
int delaynodex = skill_get_delaynodex(skill_id, skill_lv);
|
||||||
|
|
||||||
nullpo_retr(0, bl);
|
nullpo_retr(0, bl);
|
||||||
|
|
||||||
@ -8295,13 +8300,13 @@ int skill_delayfix( struct block_list *bl, int skill_id, int skill_lv, int time
|
|||||||
} else if (time < 0)
|
} else if (time < 0)
|
||||||
time = -time + status_get_amotion(bl); // if set to <0, the attack motion is added.
|
time = -time + status_get_amotion(bl); // if set to <0, the attack motion is added.
|
||||||
|
|
||||||
if (battle_config.delay_dependon_dex && /* dex‚̉e‹¿‚ðŒvŽZ‚·‚é */
|
if (battle_config.delay_dependon_dex && delaynodex&~1)
|
||||||
!skill_get_delaynodex(skill_id, skill_lv)) // if skill casttime is allowed to be reduced by dex
|
{ // if skill casttime is allowed to be reduced by dex
|
||||||
{
|
|
||||||
int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
|
int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
|
||||||
if (scale < 0)
|
if (scale > 0)
|
||||||
scale = 0;
|
time = time * scale / battle_config.castrate_dex_scale;
|
||||||
time = time * scale / battle_config.castrate_dex_scale;
|
else
|
||||||
|
time = battle_config.min_skill_delay_limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (battle_config.delay_rate != 100)
|
if (battle_config.delay_rate != 100)
|
||||||
@ -8314,12 +8319,13 @@ int skill_delayfix( struct block_list *bl, int skill_id, int skill_lv, int time
|
|||||||
time = battle_config.min_skill_delay_limit;
|
time = battle_config.min_skill_delay_limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ƒuƒ‰ƒM‚ÌŽ? */
|
if (delaynodex&~2)
|
||||||
sc= status_get_sc(bl);
|
{ /* ƒuƒ‰ƒM‚ÌŽ? */
|
||||||
if (sc && sc->count) {
|
sc= status_get_sc(bl);
|
||||||
if (sc->data[SC_POEMBRAGI].timer != -1)
|
if (sc && sc->count) {
|
||||||
time -= time * sc->data[SC_POEMBRAGI].val3 / 100;
|
if (sc->data[SC_POEMBRAGI].timer != -1)
|
||||||
if (sc->data[SC_SPIRIT].timer != -1)
|
time -= time * sc->data[SC_POEMBRAGI].val3 / 100;
|
||||||
|
if (sc->data[SC_SPIRIT].timer != -1)
|
||||||
switch (skill_id) {
|
switch (skill_id) {
|
||||||
case CR_SHIELDBOOMERANG:
|
case CR_SHIELDBOOMERANG:
|
||||||
if (sc->data[SC_SPIRIT].val2 == SL_CRUSADER)
|
if (sc->data[SC_SPIRIT].val2 == SL_CRUSADER)
|
||||||
@ -8330,6 +8336,7 @@ int skill_delayfix( struct block_list *bl, int skill_id, int skill_lv, int time
|
|||||||
time /= 2;
|
time /= 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (time > 0) ? time : 0;
|
return (time > 0) ? time : 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user