Пример #1
0
        public void CalcRotation()
        {
            float normGCD  = (1.5f + .1f);
            float lostTime = Impedance.GetTotalImpedancePercs(Character.BossOptions, PLAYER_ROLES.MeleeDPS, Stats.MovementSpeed, Stats.FearDurReduc, Stats.StunDurReduc,
                                                              Stats.SnareRootDurReduc, Stats.SilenceDurReduc);
            float fightlength          = Character.BossOptions.BerserkTimer;
            float fightLengthAttacking = fightlength * (1f - lostTime);
            float timeZeal             = (fightlength / PaladinConstants.ZEAL_COOLDOWN) * (PaladinConstants.ZEAL_DURATION + (Stats.T12_4P ? 15f : 0f));

            PartRotationInfo[] infos = new PartRotationInfo[] { new PartRotationInfo((fightLengthAttacking - timeZeal) * (1d - Character.BossOptions.Under20Perc), normGCD, false, false), //Above 20, no Zeal
                                                                new PartRotationInfo(timeZeal * (1d - Character.BossOptions.Under20Perc), normGCD, false, true),                           //Above 20, Zeal
                                                                new PartRotationInfo((fightLengthAttacking - timeZeal) * Character.BossOptions.Under20Perc, normGCD, true, false),         //Under 20, no Zeal
                                                                new PartRotationInfo(timeZeal * Character.BossOptions.Under20Perc, normGCD, true, true) };                                 //Under 20, Zeal

            Dictionary <DamageAbility, float> tmpCasts = new Dictionary <DamageAbility, float>();

            foreach (DamageAbility abil in allAb)
            {
                tmpCasts.Add(abil, 0f);
            }
            foreach (PartRotationInfo info in infos)
            {
                DoRotation(info.Time, info.NormGCD, info.Below20, info.Zeal, tmpCasts);
                foreach (DamageAbility abil in allAb)
                {
                    casts[abil]   += tmpCasts[abil];
                    tmpCasts[abil] = 0f;
                }
            }

            casts[DamageAbility.White]   = fightLengthAttacking / AbilityHelper.WeaponSpeed(Character, Stats.PhysicalHaste);
            casts[DamageAbility.GoaK]    = fightlength / PaladinConstants.GOAK_COOLDOWN;
            casts[DamageAbility.SoC]     = casts[DamageAbility.Seal] = (float)(fightlength * SealProcsPerSec(Seal));
            casts[DamageAbility.SealDot] = (float)(fightlength * SealDotProcPerSec(Seal));

            float inquptime = Math.Min((casts[DamageAbility.Inquisition] * skills[DamageAbility.Inquisition].Cooldown) / fightLengthAttacking, 1f);

            //UsagePerSecCalc
            foreach (KeyValuePair <DamageAbility, Skill> kvp in skills)
            {
                kvp.Value.UsagePerSec = casts[kvp.Key] / (double)fightlength;
                kvp.Value.InqUptime   = inquptime;
            }
            //Seals
            casts[DamageAbility.SoC] = casts[DamageAbility.Seal] = (float)(fightlength * SealProcsPerSec(Seal));
            skills[DamageAbility.SoC].UsagePerSec = skills[DamageAbility.Seal].UsagePerSec = casts[DamageAbility.Seal] / (double)fightlength;
        }
Пример #2
0
        public void CalcRotation()
        {
            float normGCD = (1.5f + .1f);
            float lostTime = Impedance.GetTotalImpedancePercs(Character.BossOptions, PLAYER_ROLES.MeleeDPS, Stats.MovementSpeed, Stats.FearDurReduc, Stats.StunDurReduc, 
                                                                                                            Stats.SnareRootDurReduc, Stats.SilenceDurReduc);
            float fightlength = Character.BossOptions.BerserkTimer;
            float fightLengthAttacking = fightlength * (1f - lostTime);
            float timeZeal = (fightlength / PaladinConstants.ZEAL_COOLDOWN) * (PaladinConstants.ZEAL_DURATION + (Stats.T12_4P ? 15f : 0f));

            PartRotationInfo[] infos = new PartRotationInfo[] { new PartRotationInfo((fightLengthAttacking - timeZeal) * (1d - Character.BossOptions.Under20Perc), normGCD, false, false), //Above 20, no Zeal
                                                                new PartRotationInfo(timeZeal * (1d - Character.BossOptions.Under20Perc),                          normGCD, false, true),  //Above 20, Zeal 
                                                                new PartRotationInfo((fightLengthAttacking - timeZeal) * Character.BossOptions.Under20Perc,        normGCD, true,  false), //Under 20, no Zeal 
                                                                new PartRotationInfo(timeZeal * Character.BossOptions.Under20Perc,                                 normGCD, true,  true) };//Under 20, Zeal             

            Dictionary<DamageAbility, float> tmpCasts = new Dictionary<DamageAbility, float>();
            foreach (DamageAbility abil in allAb)
            {
                tmpCasts.Add(abil, 0f);
            }
            foreach (PartRotationInfo info in infos) 
            {
                DoRotation(info.Time, info.NormGCD, info.Below20, info.Zeal, tmpCasts);
                foreach (DamageAbility abil in allAb)
                {
                    casts[abil] += tmpCasts[abil];
                    tmpCasts[abil] = 0f;
                }
            }
            
            casts[DamageAbility.White] = fightLengthAttacking / AbilityHelper.WeaponSpeed(Character, Stats.PhysicalHaste);
            casts[DamageAbility.GoaK] = fightlength / PaladinConstants.GOAK_COOLDOWN;
            casts[DamageAbility.SoC] = casts[DamageAbility.Seal] = (float)(fightlength * SealProcsPerSec(Seal));
            casts[DamageAbility.SealDot] = (float)(fightlength * SealDotProcPerSec(Seal));

            float inquptime = Math.Min((casts[DamageAbility.Inquisition] * skills[DamageAbility.Inquisition].Cooldown) / fightLengthAttacking, 1f);

            //UsagePerSecCalc
            foreach (KeyValuePair<DamageAbility, Skill> kvp in skills)
            {
                kvp.Value.UsagePerSec = casts[kvp.Key] / (double)fightlength;
                kvp.Value.InqUptime = inquptime;
            }
            //Seals
            casts[DamageAbility.SoC] = casts[DamageAbility.Seal] = (float)(fightlength * SealProcsPerSec(Seal));
            skills[DamageAbility.SoC].UsagePerSec = skills[DamageAbility.Seal].UsagePerSec = casts[DamageAbility.Seal] / (double)fightlength;
        }