Hi!
I wrote a simple function, that should return a WoWUnit, if another player of my group reaches atleast 85% of my aggro.
It seems, that it doesnt work very well. Did i something wrong? Or does ThreatInfo.RawPercent fail alot? Sometimes it works, sometimes it throws really funny numbers.
Here is my code:
I wrote a simple function, that should return a WoWUnit, if another player of my group reaches atleast 85% of my aggro.
It seems, that it doesnt work very well. Did i something wrong? Or does ThreatInfo.RawPercent fail alot? Sometimes it works, sometimes it throws really funny numbers.
Here is my code:
Code:
public WoWUnit PlayerNuke()
{
foreach (WoWPlayer d in Me.PartyMembers)
{
if (d.Guid != StyxWoW.Me.Guid)
{
if (d.CurrentTarget != null && d.CurrentTarget.IsAlive && !d.CurrentTarget.IsPlayer && (d.CurrentTarget.IsTargetingMyPartyMember || d.IsTargetingMeOrPet))
{
if (d.CurrentTarget.ThreatInfo.RawPercent > 85 && d.CurrentTarget.ThreatInfo.ThreatValue > 1000)
{
return d.CurrentTarget;
}
}
}
}
return null;
}