Пример #1
0
        public CalculationOptionsWarlock(Character character)
        {
            ImportTalents(character);

            Latency                = 0.05f;
            TargetLevel            = 73;
            FightDuration          = 360;
            DotGap                 = 1;
            AfflictionDebuffs      = 12;
            ShadowPriestDps        = 1200;
            FillerSpell            = FillerSpell.Shadowbolt;
            CastedCurse            = CastedCurse.CurseOfShadow;
            CastImmolate           = false;
            CastCorruption         = false;
            CastUnstableAffliction = false;
            CastSiphonLife         = false;
            CastShadowburn         = false;
            CastConflagrate        = false;
            Pet                  = Pet.Succubus;
            PetSacrificed        = true;
            IsbMethod            = IsbMethod.Raid;
            CustomIsbUptime      = .6f;
            NumRaidWarlocks      = 2;
            NumRaidShadowPriests = 2;

            for (int i = 0; i < 5; i++)
            {
                RaidWarlocks[i]      = new SUWarlock();
                RaidShadowPriests[i] = new SUShadowPriest();
            }
        }
Пример #2
0
        public void SaveRaid()
        {
            CalculationOptionsWarlock options = Character.CalculationOptions as CalculationOptionsWarlock;

            options.NumRaidWarlocks      = numWarlocks;
            options.NumRaidShadowPriests = numShadowPriests;

            for (int i = 0; i < 5; i++)
            {
                WarlockControl control = (WarlockControl)this.groupBoxWarlocks.Controls["suWarlock" + (i + 1)];
                SUWarlock      warlock = options.RaidWarlocks[i];

                warlock.HitPercent  = control.HitPercent;
                warlock.CritPercent = control.CritPercent;
                warlock.SbCastTime  = control.SbCastTime;
                warlock.SbCastRatio = control.SbCastRatio;
                warlock.ShadowDps   = control.ShadowDps;
            }

            for (int i = 0; i < 5; i++)
            {
                ShadowPriestControl control = (ShadowPriestControl)this.groupBoxShadowPriests.Controls["suShadowPriest" + (i + 1)];
                SUShadowPriest      sp      = options.RaidShadowPriests[i];

                sp.HitPercent  = control.HitPercent;
                sp.MbFrequency = control.MbFrequency;
                sp.ShadowDps   = control.ShadowDps;
            }
        }
Пример #3
0
        public void LoadRaid()
        {
            CalculationOptionsWarlock options = Character.CalculationOptions as CalculationOptionsWarlock;

            numWarlocks      = options.NumRaidWarlocks;
            numShadowPriests = options.NumRaidShadowPriests;
            comboBoxNumWarlocks.SelectedIndex      = numWarlocks;
            comboBoxNumShadowPriests.SelectedIndex = numShadowPriests;

            for (int i = 0; i < 5; i++)
            {
                WarlockControl control = (WarlockControl)this.groupBoxWarlocks.Controls["suWarlock" + (i + 1)];
                SUWarlock      warlock = options.RaidWarlocks[i];

                control.HitPercent  = warlock.HitPercent;
                control.CritPercent = warlock.CritPercent;
                control.SbCastTime  = warlock.SbCastTime;
                control.SbCastRatio = warlock.SbCastRatio;
                control.ShadowDps   = warlock.ShadowDps;
            }

            for (int i = 0; i < 5; i++)
            {
                ShadowPriestControl control = (ShadowPriestControl)this.groupBoxShadowPriests.Controls["suShadowPriest" + (i + 1)];
                SUShadowPriest      sp      = options.RaidShadowPriests[i];

                control.HitPercent  = sp.HitPercent;
                control.MbFrequency = sp.MbFrequency;
                control.ShadowDps   = sp.ShadowDps;
            }
        }
Пример #4
0
 private CalculationOptionsWarlock()
 {
     for (int i = 0; i < 5; i++)
     {
         RaidWarlocks[i]      = new SUWarlock();
         RaidShadowPriests[i] = new SUShadowPriest();
     }
 }
Пример #5
0
        public static void CalculateRaidIsbUptime(CharacterCalculationsWarlock calculations)
        {
            if (calculations.CalculationOptions.IsbMethod == IsbMethod.Raid)
            {
                float chanceToHit = CalculationsWarlock.ChanceToHit(calculations.CalculationOptions.TargetLevel, calculations.HitPercent);
                float myDirectShadowHitsPerSecond = calculations.SpellRotation.ShadowBoltCastRatio / calculations.SpellRotation.ShadowBoltCastTime * chanceToHit;
                float myEffectiveCritRate         = myDirectShadowHitsPerSecond * calculations.CritPercent;

                float raidDirectShadowHitsPerSecond = 0, raidEffectiveCritRate = 0, raidShadowDps = 0;
                for (int i = 0; i < calculations.CalculationOptions.NumRaidWarlocks; i++)
                {
                    SUWarlock currentWarlock = calculations.CalculationOptions.RaidWarlocks[i];
                    currentWarlock.Calculate(calculations);
                    raidDirectShadowHitsPerSecond += currentWarlock.DirectShadowHitsPerSecond;
                    raidEffectiveCritRate         += currentWarlock.EffectiveCritRate;
                    raidShadowDps += currentWarlock.ShadowDps;
                }
                for (int i = 0; i < calculations.CalculationOptions.NumRaidShadowPriests; i++)
                {
                    SUShadowPriest currentSp = calculations.CalculationOptions.RaidShadowPriests[i];
                    currentSp.Calculate(calculations);
                    raidDirectShadowHitsPerSecond += currentSp.DirectShadowHitsPerSecond;
                    raidShadowDps += currentSp.ShadowDps;
                }

                myEffectiveCritRate   /= 100;
                raidEffectiveCritRate /= 100;
                float raidIsbUptime = 1 - (float)Math.Pow(1 - (raidEffectiveCritRate / raidDirectShadowHitsPerSecond), 4);
                float totalIsbUptime = 1 - (float)Math.Pow(1 - ((raidEffectiveCritRate + myEffectiveCritRate) / (raidDirectShadowHitsPerSecond + myDirectShadowHitsPerSecond)), 4);

                calculations.RaidDpsFromIsb = raidShadowDps * 0.2f * (totalIsbUptime - raidIsbUptime);
                calculations.IsbUptime      = totalIsbUptime;
            }
            else
            {
                calculations.RaidDpsFromIsb = 0;
                calculations.IsbUptime      = calculations.CalculationOptions.CustomIsbUptime;
            }
        }