From 464fd4060711136f0c417cf0bbcdf6fa8ff76ded Mon Sep 17 00:00:00 2001 From: Aleos Date: Mon, 23 Dec 2019 18:36:54 -0500 Subject: [PATCH] Corrected Vacuum Extreme behavior (#2526) * Fixes #2497. * Vacuum Extreme will now pull players into the center. * Vacuum Extreme should only pull in players that stop within it's AoE. * It will now ignore "no knockback" bonuses players have. Thanks to @esu1214, @cydh and @exneval! --- src/map/skill.cpp | 6 +++--- src/map/status.cpp | 9 ++++----- src/map/unit.cpp | 3 ++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 41e23e56ea..108c066540 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -14290,9 +14290,9 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t if (tsc && (tsc->data[SC_HALLUCINATIONWALK] || tsc->data[SC_HOVERING] || tsc->data[SC_VACUUM_EXTREME] || (tsc->data[SC_VACUUM_EXTREME_POSTDELAY] && tsc->data[SC_VACUUM_EXTREME_POSTDELAY]->val2 == sg->group_id))) // Ignore post delay from other vacuum (this will make stack effect enabled) return 0; - else - // Apply effect and suck targets one-by-one each n seconds - sc_start4(ss, bl, SC_VACUUM_EXTREME, 100, sg->skill_lv, sg->group_id, (sg->val1<<16)|(sg->val2), ++sg->val3*500, (sg->limit - DIFF_TICK(tick, sg->tick))); + + if (unit_bl2ud(bl)->walktimer == INVALID_TIMER) // Apply effect and suck non-walking targets one-by-one each n seconds + sc_start4(ss, bl, type, 100, sg->skill_lv, sg->group_id, (sg->val1<<16)|(sg->val2), ++sg->val3*500, (sg->limit - DIFF_TICK(tick, sg->tick))); break; case UNT_BANDING: diff --git a/src/map/status.cpp b/src/map/status.cpp index d35a249129..8dbea2c160 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -11110,12 +11110,11 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty break; case SC_VACUUM_EXTREME: // Suck target at n second, only if the n second is lower than the duration - // Doesn't apply to BL_PC - if (bl->type != BL_PC && val4 < tick && !unit_blown_immune(bl,0x1) && status_has_mode(status,MD_CANMOVE)) { + // Does not suck targets on no-knockback maps + if (val4 < tick && unit_blown_immune(bl, 0x9) == UB_KNOCKABLE) { tick_time = val4; val4 = tick - tick_time; - } - else + } else val4 = 0; break; case SC_FIRE_INSIGNIA: @@ -11500,7 +11499,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty unit_stop_attack(bl); break; case SC_VACUUM_EXTREME: - if (bl->type != BL_PC && !unit_blown_immune(bl,0x1)) { + if (bl->type != BL_PC && unit_blown_immune(bl, 0x1) == UB_KNOCKABLE) { unit_stop_walking(bl,1); unit_stop_attack(bl); } diff --git a/src/map/unit.cpp b/src/map/unit.cpp index a9114a217c..b686c504ea 100644 --- a/src/map/unit.cpp +++ b/src/map/unit.cpp @@ -1125,6 +1125,7 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, enum e_skill_bl * 0x1 - Offensive (not set: self skill, e.g. Backslide) * 0x2 - Knockback type (not set: Stop type, e.g. Ankle Snare) * 0x4 - Boss attack + * 0x8 - Ignore target player 'special_state.no_knockback' * @return reason for immunity * UB_KNOCKABLE - can be knocked back / stopped * UB_NO_KNOCKBACK_MAP - at WOE/BG map @@ -1153,7 +1154,7 @@ enum e_unit_blown unit_blown_immune(struct block_list* bl, uint8 flag) if( !(flag&0x4) && sd->sc.data[SC_BASILICA] && sd->sc.data[SC_BASILICA]->val4 == sd->bl.id) return UB_TARGET_BASILICA; // Target has special_state.no_knockback (equip) - if( (flag&(0x1|0x2)) && sd->special_state.no_knockback ) + if( (flag&(0x1|0x2)) && !(flag&0x8) && sd->special_state.no_knockback ) return UB_TARGET_NO_KNOCKBACK; } break;