Added multi-hit critical damage display support (#2982)

* Fixed #1788.
* Double Attack and Fear Breeze can now critically strike.
This commit is contained in:
Jittapan Pluemsumran
2019-09-17 14:48:29 +07:00
committed by GitHub
parent ce42168b0d
commit 08d160aaac
7 changed files with 36 additions and 21 deletions

View File

@@ -4784,6 +4784,7 @@ static int clif_hallucination_damage()
/// 10 = critical hit
/// 11 = lucky dodge
/// 12 = (touch skill?)
/// 13 = multi-hit critical
int clif_damage(struct block_list* src, struct block_list* dst, t_tick tick, int sdelay, int ddelay, int64 sdamage, int div, enum e_damage_type type, int64 sdamage2, bool spdamage)
{
unsigned char buf[34];
@@ -4804,7 +4805,8 @@ int clif_damage(struct block_list* src, struct block_list* dst, t_tick tick, int
nullpo_ret(src);
nullpo_ret(dst);
type = clif_calc_delay(type,div,damage+damage2,ddelay);
if (type != DMG_MULTI_HIT_CRITICAL)
type = clif_calc_delay(type,div,damage+damage2,ddelay);
sc = status_get_sc(dst);
if(sc && sc->count) {
if(sc->data[SC_HALLUCINATION]) {
@@ -4866,6 +4868,9 @@ int clif_damage(struct block_list* src, struct block_list* dst, t_tick tick, int
if(src == dst) {
unit_setdir(src, unit_getdir(src));
}
// In case this assignment is bypassed by DMG_MULTI_HIT_CRITICAL
type = clif_calc_delay(type, div, damage + damage2, ddelay);
//Return adjusted can't walk delay for further processing.
return clif_calc_walkdelay(dst, ddelay, type, damage+damage2, div);
}