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!
This commit is contained in:
Aleos
2019-12-23 18:36:54 -05:00
committed by GitHub
parent b0119631a4
commit 464fd40607
3 changed files with 9 additions and 9 deletions

View File

@@ -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:

View File

@@ -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);
}

View File

@@ -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;