Ejemplo n.º 1
0
            protected override void OnTick()
            {
                if (World.Player == null)
                {
                    DamageTracker.Stop();
                    return;
                }

                _gump?.CloseGump();

                TimeSpan span = DateTime.UtcNow.Subtract(StartTime);

                DamagePerSecond = span.Seconds > 0 ? TotalDamageDealt / span.TotalSeconds : 0;

                if (DamagePerSecond > MaxDamagePerSecond)
                {
                    MaxDamagePerSecond = DamagePerSecond;
                }

                //Client.Instance.RequestTitlebarUpdate();

                _damageInfo.AppendLine($"Total Damage Dealt: {TotalDamageDealt}");
                _damageInfo.AppendLine($"Total Damage Taken: {TotalDamageTaken}");
                _damageInfo.AppendLine($"Max Damage Dealt: {MaxSingleDamageDealt} on '{MaxSingleDamageDealtName}'");
                _damageInfo.AppendLine($"Max Damage Taken: {MaxSingleDamageTaken}");

                _gump = new DamageTrackerGump(_damageInfo.ToString());
                _gump.SendGump();

                _damageInfo.Clear();
            }
Ejemplo n.º 2
0
            protected override void OnTick()
            {
                if (World.Player == null)
                {
                    DamageTracker.Stop();
                    return;
                }

                TimeSpan span = DateTime.UtcNow.Subtract(StartTime);

                DamagePerSecond = span.Seconds > 0 ? TotalDamageDealt / span.TotalSeconds : 0;

                if (DamagePerSecond > MaxDamagePerSecond)
                {
                    MaxDamagePerSecond = DamagePerSecond;
                }

                Client.Instance.RequestTitlebarUpdate();
            }