Added multi-hit critical damage display support (#2982)
* Fixed #1788. * Double Attack and Fear Breeze can now critically strike.
This commit is contained in:
committed by
GitHub
parent
ce42168b0d
commit
08d160aaac
@@ -2382,14 +2382,12 @@ static bool is_attack_critical(struct Damage* wd, struct block_list *src, struct
|
||||
struct map_session_data *tsd = BL_CAST(BL_PC, target);
|
||||
|
||||
if (!first_call)
|
||||
return (wd->type == DMG_CRITICAL);
|
||||
return (wd->type == DMG_CRITICAL || wd->type == DMG_MULTI_HIT_CRITICAL);
|
||||
|
||||
if (skill_id == NPC_CRITICALSLASH || skill_id == LG_PINPOINTATTACK) //Always critical skills
|
||||
return true;
|
||||
|
||||
if( !(wd->type&DMG_MULTI_HIT) && sstatus->cri && (!skill_id ||
|
||||
skill_id == KN_AUTOCOUNTER || skill_id == SN_SHARPSHOOTING ||
|
||||
skill_id == MA_SHARPSHOOTING || skill_id == NJ_KIRIKAGE))
|
||||
if( sstatus->cri && ( !skill_id || skill_get_nk(skill_id)&NK_CRITICAL ) )
|
||||
{
|
||||
short cri = sstatus->cri;
|
||||
|
||||
@@ -5359,8 +5357,16 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
|
||||
battle_calc_multi_attack(&wd, src, target, skill_id, skill_lv);
|
||||
|
||||
// crit check is next since crits always hit on official [helvetica]
|
||||
if (is_attack_critical(&wd, src, target, skill_id, skill_lv, true))
|
||||
if (is_attack_critical(&wd, src, target, skill_id, skill_lv, true)) {
|
||||
#if PACKETVER >= 20161207
|
||||
if (wd.type&DMG_MULTI_HIT)
|
||||
wd.type = DMG_MULTI_HIT_CRITICAL;
|
||||
else
|
||||
wd.type = DMG_CRITICAL;
|
||||
#else
|
||||
wd.type = DMG_CRITICAL;
|
||||
#endif
|
||||
}
|
||||
|
||||
// check if we're landing a hit
|
||||
if(!is_attack_hitting(&wd, src, target, skill_id, skill_lv, true))
|
||||
|
||||
Reference in New Issue
Block a user