Cleans up Thief's Double Attack item bonuses (#7070)

* Items that grant TF_DOUBLE now no longer require bDoubleRate.
* Adds pc_checkskill_flag() to return a skill's flag value.
Thanks to @eppc0330 and @secretdataz!
This commit is contained in:
Aleos
2022-06-28 12:01:57 -04:00
committed by GitHub
parent 17d6381901
commit 394dab1237
9 changed files with 33 additions and 38 deletions

View File

@@ -3805,6 +3805,7 @@ static void battle_calc_multi_attack(struct Damage* wd, struct block_list *src,s
if( sd && !skill_id ) { // if no skill_id passed, check for double attack [helvetica]
short i;
if( ( ( skill_lv = pc_checkskill(sd,TF_DOUBLE) ) > 0 && sd->weapontype1 == W_DAGGER )
|| ( pc_checkskill_flag(*sd, TF_DOUBLE) > SKILL_FLAG_PERMANENT && sd->weapontype1 != W_FIST )
|| ( sd->bonus.double_rate > 0 && sd->weapontype1 != W_FIST ) // Will fail bare-handed
|| ( sc && sc->data[SC_KAGEMUSYA] && sd->weapontype1 != W_FIST )) // Will fail bare-handed
{ //Success chance is not added, the higher one is used [Skotlex]