alltrueist
Active Member
- Joined
- Dec 10, 2012
- Messages
- 1,424
This is something I cooked up when I was developing my Fistweaving routine for WoW and then promptly forgot about. I've been thinking about our issues targeting companions, and how we might solve what appears to be a game issue. I opened up DefaultCombat and focused ONLY on the Targeting.cs file. I put this code at the very end:
And in the ScanTargets and DefaultCombat.IsHealer section, I dropped the new companion check right after the old companion check:
I haven't tested it yet, but I'm not sure if it really matters if I test it. The companion targeting bug is so unpredictable that I could test it and it works great, but then you guys test it and it doesn't work. The question I'm really asking is:
1. SHOULD this work in theory? (Much different than whether it does work or doesn't)
2. How does the bot currently determine my companion?
3. What would be the difference between using TorNpc (which I currently use) and TorObject (which I was tempted to use)?
Just trying to see if we can get traction on this issue that has bugged me for years. If we can get companion targeting reliably working, we could actually test out healing routines.
Code:
public static TorNpc MyCompanion
{
get
{
TorNpc companion = ObjectManager.GetObjects<TorNpc>().Where(unit => unit.Name == Me.Companion.Name && unit.Guid == Me.Companion.Guid && !unit.IsDead && unit.IsFriendly).OrderBy(i => i.Distance).FirstOrDefault();
if (companion == null) { Logger.Write("I can't find a companion"); }
return companion;
}
}
And in the ScanTargets and DefaultCombat.IsHealer section, I dropped the new companion check right after the old companion check:
Code:
if (Tank == null && Me.Companion != null && !Me.Companion.IsDead)
Tank = Me.Companion;
if (Tank == null && MyCompanion != null && !MyCompanion.IsDead)
Tank = MyCompanion;
if (Tank == null)
Tank = Me;
I haven't tested it yet, but I'm not sure if it really matters if I test it. The companion targeting bug is so unpredictable that I could test it and it works great, but then you guys test it and it doesn't work. The question I'm really asking is:
1. SHOULD this work in theory? (Much different than whether it does work or doesn't)
2. How does the bot currently determine my companion?
3. What would be the difference between using TorNpc (which I currently use) and TorObject (which I was tempted to use)?
Just trying to see if we can get traction on this issue that has bugged me for years. If we can get companion targeting reliably working, we could actually test out healing routines.