View Single Post
  #25  
Old 06-15-2025, 11:02 PM
bcbrown bcbrown is offline
Fire Giant


Join Date: Jul 2022
Location: Kedge Keep
Posts: 664
Default

I'm saying the wiki version seems to correctly treat offhand delay. Did you really mess it up in the later version?

Code:
function computeWeaponDelayWithHaste(attackerStatStruct, bUseOffhand, bLogHasteValue)
{
	const mn_WeaponDelayDenominator = 100;

	var attackerWeaponDelay = attackerStatStruct.mainHandWeaponDelay;
	if(bUseOffhand)
	{
		attackerWeaponDelay = attackerStatStruct.offHandWeaponDelay;
	}
	...
}

function RunCombatSimulation(...)
{
	...
	const mainHandDelayHasteAdjustedInSeconds = (computeWeaponDelayWithHaste(attackerStatStruct, false, false) / 10);
	const offHandDelayHasteAdjustedInSeconds = (computeWeaponDelayWithHaste(attackerStatStruct, true, false) / 10);
	...
	const mainHandOffHandDelayRatio = (mainHandDelayHasteAdjustedInSeconds / offHandDelayHasteAdjustedInSeconds) < 1 ? (mainHandDelayHasteAdjustedInSeconds / offHandDelayHasteAdjustedInSeconds) : 1; 	// Off hand cannot be faster than mainhand. Clamp to 1 if off hand is faster.
}
Lmao I guess so.
Reply With Quote