Esempio n. 1
0
        private void btnAddMobToList_Click(object sender, EventArgs e)
        {
            if (StyxWoW.Me.CurrentTarget != null || StyxWoW.Me.CurrentTarget.IsPlayer)
            {
                var newTarget = new SpecialTarget {
                    TargetName = StyxWoW.Me.CurrentTarget.Name,
                    TargetId   = StyxWoW.Me.CurrentTarget.Entry,
                };

                //Don't create a new record if there is one.
                if (!TargetManager.AltarboySpecialTargets.Any(tar => tar.TargetId == newTarget.TargetId))
                {
                    TargetManager.AltarboySpecialTargets.Add(newTarget);
                    TargetManager.SaveSpecialTargets();
                    Logger.Log("Current target entry - (" + newTarget.TargetId + ") " + newTarget.TargetName);
                }
            }
        }
Esempio n. 2
0
        private void btnAddMobToList_Click(object sender, EventArgs e)
        {
            if (StyxWoW.Me.CurrentTarget != null || StyxWoW.Me.CurrentTarget.IsPlayer )
            {

                var newTarget = new SpecialTarget {
                    TargetName = StyxWoW.Me.CurrentTarget.Name ,
                    TargetId = StyxWoW.Me.CurrentTarget.Entry,
                };

                //Don't create a new record if there is one.
                if (!TargetManager.AltarboySpecialTargets.Any(tar => tar.TargetId == newTarget.TargetId))
                {
                    TargetManager.AltarboySpecialTargets.Add(newTarget);
                    TargetManager.SaveSpecialTargets();
                    Logger.Log("Current target entry - (" + newTarget.TargetId + ") " + newTarget.TargetName);
                }

            }
        }