Exemplo n.º 1
0
        internal static void UpdateStats(HitRecord record, Attempt playerStats, Attempt theHit = null)
        {
            if (record.ModifiersMask > -1 && record.Type != Labels.MISS)
            {
                if ((record.ModifiersMask & ASSASSINATE) != 0)
                {
                    playerStats.AssHits++;
                    playerStats.TotalAss += record.Total;

                    if (theHit != null)
                    {
                        theHit.AssHits++;
                    }
                }

                if ((record.ModifiersMask & DOUBLEBOW) != 0)
                {
                    playerStats.DoubleBowHits++;

                    if (theHit != null)
                    {
                        theHit.DoubleBowHits++;
                    }
                }

                if ((record.ModifiersMask & FLURRY) != 0)
                {
                    playerStats.FlurryHits++;

                    if (theHit != null)
                    {
                        theHit.FlurryHits++;
                    }
                }

                if ((record.ModifiersMask & HEADSHOT) != 0)
                {
                    playerStats.HeadHits++;
                    playerStats.TotalHead += record.Total;

                    if (theHit != null)
                    {
                        theHit.HeadHits++;
                    }
                }

                if ((record.ModifiersMask & FINISHING) != 0)
                {
                    playerStats.FinishingHits++;
                    playerStats.TotalFinishing += record.Total;

                    if (theHit != null)
                    {
                        theHit.FinishingHits++;
                    }
                }

                if ((record.ModifiersMask & TWINCAST) != 0)
                {
                    playerStats.TwincastHits++;

                    if (theHit != null)
                    {
                        theHit.TwincastHits++;
                    }
                }
                else
                {
                    playerStats.TotalNonTwincast += record.Total;
                }

                if ((record.ModifiersMask & RAMPAGE) != 0)
                {
                    playerStats.RampageHits++;

                    if (theHit != null)
                    {
                        theHit.RampageHits++;
                    }
                }

                // A Strikethrough Riposte is the attacker attacking through a riposte from the defender
                if (IsRiposte(record.ModifiersMask))
                {
                    playerStats.RiposteHits++;
                    playerStats.TotalRiposte += record.Total;

                    if (theHit != null)
                    {
                        theHit.RiposteHits++;
                    }
                }

                if ((record.ModifiersMask & STRIKETHROUGH) != 0)
                {
                    playerStats.StrikethroughHits++;

                    if (theHit != null)
                    {
                        theHit.StrikethroughHits++;
                    }
                }

                if ((record.ModifiersMask & SLAY) != 0)
                {
                    playerStats.SlayHits++;
                    playerStats.TotalSlay += record.Total;

                    if (theHit != null)
                    {
                        theHit.SlayHits++;
                    }
                }

                if ((record.ModifiersMask & CRIT) != 0)
                {
                    playerStats.CritHits++;

                    if (theHit != null)
                    {
                        theHit.CritHits++;
                    }

                    if ((record.ModifiersMask & LUCKY) == 0)
                    {
                        playerStats.TotalCrit += record.Total;

                        if (theHit != null)
                        {
                            theHit.TotalCrit += record.Total;
                        }

                        if ((record.ModifiersMask & TWINCAST) == 0)
                        {
                            playerStats.NonTwincastCritHits++;
                            playerStats.TotalNonTwincastCrit += record.Total;

                            if (theHit != null)
                            {
                                theHit.NonTwincastCritHits++;
                                theHit.TotalNonTwincastCrit += record.Total;
                            }
                        }
                    }
                }

                if ((record.ModifiersMask & LUCKY) != 0)
                {
                    playerStats.LuckyHits++;
                    playerStats.TotalLucky += record.Total;

                    if (theHit != null)
                    {
                        theHit.LuckyHits++;
                        theHit.TotalLucky += record.Total;
                    }

                    if ((record.ModifiersMask & TWINCAST) == 0)
                    {
                        playerStats.NonTwincastLuckyHits++;
                        playerStats.TotalNonTwincastLucky += record.Total;

                        if (theHit != null)
                        {
                            theHit.NonTwincastLuckyHits++;
                            theHit.TotalNonTwincastLucky += record.Total;
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        internal static void Parse(HitRecord record, Attempt playerStats, Attempt theHit = null)
        {
            if (record.ModifiersMask > -1)
            {
                if ((record.ModifiersMask & RAMPAGE) != 0)
                {
                    playerStats.RampageHits++;

                    if (theHit != null)
                    {
                        theHit.RampageHits++;
                    }
                }

                if ((record.ModifiersMask & STRIKETHROUGH) != 0)
                {
                    playerStats.StrikethroughHits++;

                    if (theHit != null)
                    {
                        theHit.StrikethroughHits++;
                    }
                }

                // A Strikethrough Riposte is the attacker attacking through a riposte from the defender
                if (IsRiposte(record.ModifiersMask))
                {
                    playerStats.RiposteHits++;

                    if (theHit != null)
                    {
                        theHit.RiposteHits++;
                    }
                }

                if ((record.ModifiersMask & TWINCAST) != 0)
                {
                    playerStats.TwincastHits++;

                    if (theHit != null)
                    {
                        theHit.TwincastHits++;
                    }
                }

                if ((record.ModifiersMask & CRIT) != 0)
                {
                    playerStats.CritHits++;

                    if (theHit != null)
                    {
                        theHit.CritHits++;
                    }

                    if ((record.ModifiersMask & LUCKY) == 0)
                    {
                        playerStats.TotalCrit += record.Total;

                        if (theHit != null)
                        {
                            theHit.TotalCrit += record.Total;
                        }
                    }
                }

                if ((record.ModifiersMask & LUCKY) != 0)
                {
                    playerStats.LuckyHits++;
                    playerStats.TotalLucky += record.Total;

                    if (theHit != null)
                    {
                        theHit.LuckyHits++;
                        theHit.TotalLucky += record.Total;
                    }
                }
            }
        }