Fixes Weapon Crush and Weapon Blocking combo (#4809)

* Fixes #4808.
* Weapon Crush now uses SC_WEAPONBLOCK_ON to track the target instead of SC_COMBO.
* Also fixes Quick Draw Shot target selection.
* Quick Draw Shot and Weapon Blocking should be considered a combo and not end physical attacks when casting them.
* SC_QD_SHOT_READY will no longer become active if the player has 193+ ASPD.
* SC_QD_SHOT_READY will now end once Quick Draw Shot has been casted.
* Cleans up skill_check_condition_sc_required and removes duplicate code.
Thanks to @wdivet, @LordWhiplash, and @ecdarreola!
This commit is contained in:
Aleos
2020-04-30 12:17:50 -04:00
committed by GitHub
parent da523d9fcd
commit 8f19cfc3a1
5 changed files with 46 additions and 47 deletions

View File

@@ -1574,10 +1574,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
target_id = src->id;
combo = 1;
} else if ( target_id == src->id &&
inf&INF_SELF_SKILL &&
(skill->inf2[INF2_NOTARGETSELF] ||
(skill_id == RL_QD_SHOT && sc && sc->data[SC_QD_SHOT_READY])) ) {
} else if (target_id == src->id && inf&INF_SELF_SKILL && skill->inf2[INF2_NOTARGETSELF]) {
target_id = ud->target; // Auto-select target. [Skotlex]
combo = 1;
}
@@ -1594,6 +1591,20 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
return 0;
}
break;
case GC_WEAPONCRUSH:
if (sc && sc->data[SC_WEAPONBLOCK_ON]) {
if ((target = map_id2bl(sc->data[SC_WEAPONBLOCK_ON]->val1)) == nullptr)
return 0;
combo = 1;
}
break;
case RL_QD_SHOT:
if (sc && sc->data[SC_QD_SHOT_READY]) {
if ((target = map_id2bl(sc->data[SC_QD_SHOT_READY]->val1)) == nullptr)
return 0;
combo = 1;
}
break;
case WE_MALE:
case WE_FEMALE:
if (!sd->status.partner_id)