alltrueist
Active Member
- Joined
- Dec 10, 2012
- Messages
- 1,424
We need to fix healing. Here's some code I butchered from my Discipline Priest routine from WoW, adapted to Buddywing the best I could:
Then, in the individual healing file, you'd call it doing something like this (using Seer.cs for example):
Theoretically, would this work? Could we add companions? I feel like the current way that DefaultCombat calls healing targets is way too complicated, but maybe that's for a reason.
Also, we super need a way to call GroupMembers and RaidMembers. I thought I was crazy because I couldn't find this, but it just isn't there. At the moment, it'll just heal any friendly player in range.
PHP:
#region TestStuff
public static IEnumerable<TorPlayer> PartyMembers { get { return getPartyMembers(); } }
public static IEnumerable<TorPlayer> Tanks { get { return getTanks(); } }
public static IEnumerable<TorPlayer> getPartyMembers()
{
var t = ObjectManager.GetObjects<TorPlayer>().Where(p => p.IsFriendly).ToList();
return t;
}
public static IEnumerable<TorPlayer> getTanks()
{
var t = ObjectManager.GetObjects<TorPlayer>().Where(p => p != null && (p.Discipline == CharacterDiscipline.Defense
|| p.Discipline == CharacterDiscipline.Darkness
|| p.Discipline == CharacterDiscipline.Immortal
|| p.Discipline == CharacterDiscipline.KeneticCombat
|| p.Discipline == CharacterDiscipline.ShieldSpecialist
|| p.Discipline == CharacterDiscipline.ShieldTech)).ToList();
return t;
}
public static TorPlayer experimentalhealTarget
{
get
{
if (!Me.InCombat) return null;
var t = PartyMembers.Where(p => p != null
&& !p.IsDead
&& p.InLineOfSight
&& p.HealthPercent <= 80
&& p.Distance <= 40).OrderBy(p => p.HealthPercent).FirstOrDefault();
return t != null ? t : null;
}
}
public static TorPlayer experimentalhealTank
{
get
{
if (!Me.InCombat) return null;
var t = Tanks.Where(p => p != null
&& !p.IsDead
&& p.InLineOfSight
&& p.HealthPercent <= 95
&& p.Distance <= 40).OrderBy(p => p.HealthPercent).FirstOrDefault();
return t != null ? t : null;
}
}
#endregion
Then, in the individual healing file, you'd call it doing something like this (using Seer.cs for example):
PHP:
Spell.Cast("Benevolence", onTarget => Targeting.experimentalhealTarget),
Theoretically, would this work? Could we add companions? I feel like the current way that DefaultCombat calls healing targets is way too complicated, but maybe that's for a reason.
Also, we super need a way to call GroupMembers and RaidMembers. I thought I was crazy because I couldn't find this, but it just isn't there. At the moment, it'll just heal any friendly player in range.