Пример #1
0
        public bool IsBetterVersionOf(BossFight _BossFight)
        {
            try
            {
                var aQualityHigh   = IsQualityHigh();
                var aFightStart    = m_StartDateTime;
                var aFightEnd      = m_EndDateTime;
                var aFightDuration = m_FightDuration;
                var bQualityHigh   = _BossFight.IsQualityHigh();
                var bFightStart    = _BossFight.m_StartDateTime;
                var bFightEnd      = _BossFight.m_EndDateTime;
                var bFightDuration = _BossFight.m_FightDuration;

                if (aQualityHigh == true && bQualityHigh == false)
                {
                    return(true);
                }
                else if (aQualityHigh == false && bQualityHigh == true)
                {
                    return(false);
                }

                var aEndSpecifier = m_DataPrecisionDetails.EndSpecifier;
                var bEndSpecifier = _BossFight.m_DataPrecisionDetails.EndSpecifier;

                if (aEndSpecifier == SpecifierType.CombatEventSpecifier || aEndSpecifier == SpecifierType.YellSpecifier)
                {
                    if (bEndSpecifier != SpecifierType.CombatEventSpecifier && bEndSpecifier != SpecifierType.YellSpecifier)
                    {
                        return(true);
                    }
                }
                else if (bEndSpecifier == SpecifierType.CombatEventSpecifier || bEndSpecifier == SpecifierType.YellSpecifier)
                {
                    if (aEndSpecifier != SpecifierType.CombatEventSpecifier && aEndSpecifier != SpecifierType.YellSpecifier)
                    {
                        return(true);/*if statement not needed but here for clarity*/
                    }
                }

                if (m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.Damage)
                    + m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.EffectiveHeal)
                    + m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.DamageTaken) >
                    _BossFight.m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.Damage)
                    + _BossFight.m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.EffectiveHeal)
                    + _BossFight.m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.DamageTaken))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                VF_RaidDamageDatabase.Logger.LogException(ex);
            }
            return(false);
        }
Пример #2
0
        public void AddBossFightData(BossFight _BossFight, PlayerFightData _PlayerFightData)
        {
            if (_BossFight.IsQualityHigh(true))
            {
                if (m_PlayerBossStats.ContainsKey(_BossFight.BossName) == false)
                {
                    m_PlayerBossStats.Add(_BossFight.BossName, new TotalPlayerBossStats());
                }
                var bossFightDataList = m_PlayerBossStats[_BossFight.BossName];

                bossFightDataList.m_PlayerFightDatas.Add(_PlayerFightData);
            }
            m_AttendedFights.Add(_BossFight);
        }
Пример #3
0
        public bool IsBetterVersionOf(BossFight _BossFight)
        {
            try
            {
                var aQualityHigh   = IsQualityHigh();
                var aFightStart    = m_StartDateTime;
                var aFightEnd      = m_EndDateTime;
                var aFightDuration = m_FightDuration;
                var bQualityHigh   = _BossFight.IsQualityHigh();
                var bFightStart    = _BossFight.m_StartDateTime;
                var bFightEnd      = _BossFight.m_EndDateTime;
                var bFightDuration = _BossFight.m_FightDuration;

                if (aQualityHigh == true && bQualityHigh == false)
                {
                    return(true);
                }
                else if (aQualityHigh == false && bQualityHigh == true)
                {
                    return(false);
                }

                if (m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.Damage)
                    + m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.EffectiveHeal)
                    + m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.DamageTaken) >
                    _BossFight.m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.Damage)
                    + _BossFight.m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.EffectiveHeal)
                    + _BossFight.m_PlayerFightData.Sum((_Value) => (long)_Value.Item2.DamageTaken))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                VF_RaidDamageDatabase.Logger.LogException(ex);
            }
            return(false);
        }