private static void CalculateTriggers(Dictionary<Trigger, float> triggerIntervals, Dictionary<Trigger, float> triggerChances, RotationCalculation rot) { triggerChances[Trigger.MeleeCrit] = triggerChances[Trigger.MeleeHit] = triggerChances[Trigger.MeleeAttack] = triggerChances[Trigger.PhysicalCrit] = triggerChances[Trigger.PhysicalHit] = triggerChances[Trigger.PhysicalAttack] = triggerChances[Trigger.DamageDone] = triggerChances[Trigger.SpellHit] = triggerChances[Trigger.DamageSpellHit] = triggerChances[Trigger.SpellCrit] = triggerChances[Trigger.DamageSpellCrit] = triggerChances[Trigger.DamageOrHealingDone] = triggerChances[Trigger.DoTTick] = triggerChances[Trigger.Use] = 1f; triggerIntervals[Trigger.Use] = 0f; triggerIntervals[Trigger.MeleeCrit] = (float)(1f / rot.GetMeleeCritsPerSec()); triggerIntervals[Trigger.MeleeHit] = triggerIntervals[Trigger.MeleeAttack] = (float)(1f / rot.GetMeleeAttacksPerSec()); triggerIntervals[Trigger.PhysicalCrit] = (float)(1f / rot.GetPhysicalCritsPerSec()); triggerIntervals[Trigger.PhysicalHit] = triggerIntervals[Trigger.PhysicalAttack] = (float)(1f / rot.GetPhysicalAttacksPerSec()); triggerIntervals[Trigger.DamageDone] = triggerIntervals[Trigger.DamageOrHealingDone] = (float)(1f / rot.GetAttacksPerSec()); triggerIntervals[Trigger.SpellHit] = triggerIntervals[Trigger.DamageSpellHit] = (float)(1f / rot.GetSpellAttacksPerSec()); triggerIntervals[Trigger.SpellCrit] = triggerIntervals[Trigger.DamageSpellCrit] = (float)(1f / rot.GetSpellCritsPerSec()); triggerIntervals[Trigger.DoTTick] = (float)(1f / rot.GetAbilityHitsPerSecond(rot.SealDot)); triggerIntervals[Trigger.WhiteHit] = (float)(1f / rot.White.UsagePerSec); triggerChances[Trigger.WhiteHit] = rot.White.CT.ChanceToLand; triggerIntervals[Trigger.CrusaderStrikeHit] = (float) (1f / rot.CS.UsagePerSec); triggerChances[Trigger.CrusaderStrikeHit] = rot.CS.CT.ChanceToLand; triggerIntervals[Trigger.JudgementHit] = (float) (1f / rot.Judge.UsagePerSec); triggerChances[Trigger.JudgementHit] = rot.Judge.CT.ChanceToLand; }
public CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem, RotationCalculation rot) { // First things first, we need to ensure that we aren't using bad data CharacterCalculationsRetribution calc = new CharacterCalculationsRetribution(); if (character == null) { return calc; } if (rot == null) { return calc; } calc.CombatStats = rot.Stats; calc.Character = rot.Character; calc.BasicStats = GetCharacterStats(character, additionalItem, false); //Damage procs are modeled as DPS calc.OtherDPS = new MagicDamage("", character, rot.Stats, DamageType.Arcane).AverageDamage + new MagicDamage("", character, rot.Stats, DamageType.Fire).AverageDamage + new MagicDamage("", character, rot.Stats, DamageType.Shadow).AverageDamage + new MagicDamage("", character, rot.Stats, DamageType.Frost).AverageDamage + new MagicDamage("", character, rot.Stats, DamageType.Nature).AverageDamage + new MagicDamage("", character, rot.Stats, DamageType.Holy).AverageDamage; rot.SetDPS(calc); calc.OverallPoints = calc.DPSPoints; return calc; }