コード例 #1
0
 // This is to monitor the snapshotted targets.
 private void SnapShotTimerElapsed()
 {
     // Remove targets that should not be here anymore
     RakedTargets.RemoveAll(
         o =>
         o == null || o.Unit == null || !o.Unit.IsValid || o.Unit.IsDead ||
         !o.Unit.HasAura(SpellBook.RakeBleedDebuff));
 }
コード例 #2
0
        public void AddRakedTarget(WoWUnit target, bool fromCombatEvent = false)
        {
            foreach (var rakedTarget in RakedTargets)
            {
                if (target == rakedTarget.Unit)
                {
                    // target already exists, update the multiplier
                    if (!fromCombatEvent)
                    {
                        rakedTarget.AppliedMultiplier = CurrentMultiplier;
                    }
                    return;
                }
            }

            // target does not exist...
            var unit = new BleedingUnit(target, CurrentMultiplier);

            RakedTargets.Add(unit);

            Log.Diagnostics(string.Format("Added Raked unit: {0} [{1}] @ {2:0.##}x ({3} total tracked units)",
                                          unit.Unit.SafeName, unit.Unit.GetUnitId(), unit.AppliedMultiplier, RakedTargets.Count));
        }