Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix parry crit cap logic #3956

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ui/core/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,14 @@ export class Player<SpecType extends Spec> {
const hasOffhandWeapon = this.getGear().getEquippedItem(ItemSlot.ItemSlotOffHand)?.item.weaponSpeed !== undefined;
// Due to warrior HS bug, hit cap for crit cap calculation should be 8% instead of 27%
const meleeHitCap = hasOffhandWeapon && this.spec != Spec.SpecWarrior ? 27.0 : 8.0;
const expertiseCap = this.getInFrontOfTarget() ? 20.5 : 6.5;
const dodgeCap = 6.5
const parryCap = this.getInFrontOfTarget() ? 14.0 : 0
const expertiseCap = dodgeCap + parryCap

const remainingMeleeHitCap = Math.max(meleeHitCap - meleeHit, 0.0);
const remainingExpertiseCap = Math.max(expertiseCap - expertise, 0.0)
const remainingDodgeCap = Math.max(dodgeCap - expertise, 0.0)
const remainingParryCap = Math.max(parryCap - expertise, 0.0)
const remainingExpertiseCap = remainingDodgeCap + remainingParryCap

let specSpecificOffset = 0.0;

Expand Down
Loading