I try to use a code like this:
The HasAura will work fine, but the check if it's an Aura from me gives:
Code:
private static WoWPlayer AddedCheck()
{
return (from Unit in ObjectManager.GetObjectsOfType<WoWPlayer>(false)
orderby Unit.HealthPercent
where Unit.IsAlive
where Unit.IsPlayer
where Unit.Distance < 20
where !Unit.IsFriendly
where !Unit.IsPet
where Unit.InLineOfSpellSight
where !Unit.HasAura("Spell Name")
[B]where Unit.ActiveAuras["Spell Name"].CreatorGuid != Me.Guid[/B]
select Unit).LastOrDefault();
}
The HasAura will work fine, but the check if it's an Aura from me gives:
Code:
[BGBuddy PVP Suite] Targetting Error: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at BGBuddyPVPSuite.Targeting.<AddedCheck>b__c(WoWPlayer Unit) in c:\U\Honorbuddy_2.0.0.5883\Plugins\pvp\Targeting.cs:line 118
at System.Linq.Enumerable.<>c__DisplayClassf`1.<CombinePredicates>b__e(TSource x)
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.LastOrDefault[TSource](IEnumerable`1 source)
at BGBuddyPVPSuite.Targeting.AddedCheck() in c:\U\Honorbuddy_2.0.0.5883\Plugins\pvp\Targeting.cs:line 109
at BGBuddyPVPSuite.Targeting.PulseTargeting() in c:\U\Honorbuddy_2.0.0.5883\Plugins\pvp\Targeting.cs:line 88