* If both Double Attack and critical attack have chance to trigger within one attack, Double Attack takes priority. (bugreport:3231)

* Fixed Butterfly Wings not working on maps blocking Teleport. (bugreport:3236)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13886 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Inkfish 2009-06-13 04:25:34 +00:00
parent 2416ee8686
commit 0ec8d255ae
3 changed files with 29 additions and 32 deletions

View File

@ -3,6 +3,9 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
09/06/13
* If both Double Attack and critical attack have chance to trigger within one attack, Double Attack takes priority. (bugreport:3231) [Inkfish]
* Fixed Butterfly Wings not working on maps blocking Teleport. (bugreport:3236) [Inkfish]
09/06/12
* Fixed "arrow_atk" flag never being reset results in arrow consumption on itemskills and autocasts. (bugreport:3233) [Inkfish]
* Fixed itemskill not bypassing Silence, SteelBody, Berserk and the like. (bugreport:3232) [Inkfish]

View File

@ -1066,8 +1066,26 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
flag.lh=1;
}
if( sd && !skill_num )
{ //Check for double attack.
if( ( ( skill_lv = pc_checkskill(sd,TF_DOUBLE) ) > 0 && sd->weapontype1 == W_DAGGER )
|| ( sd->double_rate > 0 && sd->weapontype1 != W_FIST ) ) //Will fail bare-handed
{ //Success chance is not added, the higher one is used [Skotlex]
if( rand()%100 < ( 5*skill_lv > sd->double_rate ? 5*skill_lv : sd->double_rate ) )
{
wd.div_ = skill_get_num(TF_DOUBLE,skill_lv?skill_lv:1);
wd.type = 0x08;
}
}
else if( sd->weapontype1 == W_REVOLVER && (skill_lv = pc_checkskill(sd,GS_CHAINACTION)) > 0 && rand()%100 < 5*skill_lv )
{
wd.div_ = skill_get_num(GS_CHAINACTION,skill_lv);
wd.type = 0x08;
}
}
//Check for critical
if(!flag.cri && sstatus->cri &&
if( !flag.cri && !(wd.type&0x08) && sstatus->cri &&
(!skill_num ||
skill_num == KN_AUTOCOUNTER ||
skill_num == SN_SHARPSHOOTING || skill_num == MA_SHARPSHOOTING ||
@ -2089,29 +2107,6 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
return wd;
}
if(sd && !skill_num && !flag.cri)
{ //Check for double attack.
if(((skill_lv = pc_checkskill(sd,TF_DOUBLE)) > 0 && sd->weapontype1 == W_DAGGER)
||(sd->double_rate > 0 && sd->weapontype1 != W_FIST)) //Will fail bare-handed
{ //Success chance is not added, the higher one is used [Skotlex]
if (rand()%100 < (5*skill_lv>sd->double_rate?5*skill_lv:sd->double_rate))
{
wd.div_=skill_get_num(TF_DOUBLE,skill_lv?skill_lv:1);
damage_div_fix(wd.damage, wd.div_);
wd.type = 0x08;
}
} else
if (sd->weapontype1 == W_REVOLVER &&
(skill_lv = pc_checkskill(sd,GS_CHAINACTION)) > 0 &&
(rand()%100 < 5*skill_lv)
)
{
wd.div_=skill_get_num(GS_CHAINACTION,skill_lv);
damage_div_fix(wd.damage, wd.div_);
wd.type = 0x08;
}
}
if (sd)
{
if (!flag.rh && flag.lh)

View File

@ -384,13 +384,12 @@ int skillnotok (int skillid, struct map_session_data *sd)
return 1;
}
return 0;
break;
case AL_TELEPORT:
if(map[m].flag.noteleport) {
clif_skill_teleportmessage(sd,0);
return 1;
}
return 0;
// if(map[m].flag.noteleport) {
// clif_skill_teleportmessage(sd,0);
// return 1;
// }
return 0; // gonna be checked in 'skill_castend_nodamage_id'
case WE_CALLPARTNER:
case WE_CALLPARENT:
case WE_CALLBABY:
@ -4388,11 +4387,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case AL_TELEPORT:
if(sd)
{
if (map[bl->m].flag.noteleport) {
if (map[bl->m].flag.noteleport && skilllv <= 2) {
clif_skill_teleportmessage(sd,0);
break;
}
if(!battle_config.duel_allow_teleport && sd->duel_group) { // duel restriction [LuzZza]
if(!battle_config.duel_allow_teleport && sd->duel_group && skilllv <= 2) { // duel restriction [LuzZza]
clif_displaymessage(sd->fd, "Duel: Can't use teleport in duel.");
break;
}