public DKCombatTable(Character c, StatsDK stats, CharacterCalculationsBase calcs, ICalculationOptionBase calcOpts, BossOptions bossOpts) { m_CState = new CombatState(); if (c != null) { m_CState.m_Char = c; m_CState.m_Talents = c.DeathKnightTalents; m_CState.m_Spec = CalculationsDPSDK.GetSpec(c.DeathKnightTalents); } m_CState.m_Stats = stats; // TODO: Put in check here for null. m_Calcs = calcs as CharacterCalculationsDPSDK; m_Opts = calcOpts as CalculationOptionsDPSDK; m_CState.m_Presence = Presence.Frost; if (calcOpts != null && m_Opts == null) { //throw new Exception("Opts not converted properly."); m_Opts = new CalculationOptionsDPSDK(); } try { m_CState.m_Presence = m_Opts.presence; } catch { } // pass stay w/ default m_BO = bossOpts; if (m_BO == null) { m_BO = new BossOptions(); } // JOTHAY TODO: Kind of an Ugly Hack to do this, but it will give them a value m_CState.m_NumberOfTargets = m_BO.MultiTargs ? m_BO.DynamicCompiler_MultiTargs.GetAverageTargetGroupSize(m_BO.BerserkTimer) : 1f; // m_CState.m_bAttackingFromBehind = m_BO.InBack; m_CState.fBossArmor = m_BO.Armor; SetupExpertise(c); }
public DKCombatTable(Character c, StatsDK stats, CharacterCalculationsBase calcs, ICalculationOptionBase calcOpts, BossOptions bossOpts) { m_CState = new CombatState(); if (c != null) { m_CState.m_Char = c; m_CState.m_Talents = c.DeathKnightTalents; m_CState.m_Spec = CalculationsDPSDK.GetSpec(c.DeathKnightTalents); } m_CState.m_Stats = stats; // TODO: Put in check here for null. m_Calcs = calcs as CharacterCalculationsDPSDK; m_Opts = calcOpts as CalculationOptionsDPSDK; m_CState.m_Presence = Presence.Frost; if (calcOpts != null && m_Opts == null) { //throw new Exception("Opts not converted properly."); m_Opts = new CalculationOptionsDPSDK(); } try { m_CState.m_Presence = m_Opts.presence; } catch { } // pass stay w/ default m_BO = bossOpts; if (m_BO == null) { m_BO = new BossOptions(); } // JOTHAY TODO: Kind of an Ugly Hack to do this, but it will give them a value m_CState.m_NumberOfTargets = m_BO.MultiTargs ? m_BO.DynamicCompiler_MultiTargs.GetAverageTargetGroupSize(m_BO.BerserkTimer) : 1f; // m_CState.m_bAttackingFromBehind = m_BO.InBack; m_CState.fBossArmor = m_BO.Armor; SetupExpertise(c); }