Thanks for trying to help.
Each time I modify the default priest.cs (yes, the one that comes with HB), I get an error upon startup that reads:
"
No CC Loaded!, trying to refresh
Can't start - No combat class is loaded!
"
As soon as I remove the code, the cc works (but still with LOS problems).
I have placed the additional code that CodenameG provided like this:
/// Pull logic here for approaching and engaging target's in combat
#region Pull
private readonly Stopwatch _pullTimer = new Stopwatch();
public override void Pull()
{
if (!Me.CurrentTarget.InLineOfSight && !Me.Combat)
{
slog(Me.CurrentTarget.Name + " is not in line of sight, blacklisting for now.");
Styx.Logic.Blacklist.Add(Me.CurrentTargetGuid, TimeSpan.FromSeconds(10));
Me.ClearTarget();
return;
}
if (!_pullTimer.IsRunning)
_pullTimer.Start();
if (_me.CurrentTarget != null)
{
if (_me.CurrentTarget.Distance > 100)
{
return;
}
WoWUnit closestHostile = _me.CurrentTarget; ;
if (lookHostileMobs)
{
List<WoWUnit> mobList = ObjectManager.GetObjectsOfType<WoWUnit>(false);
if (mobList.Count > 0)
foreach (WoWUnit thing in mobList)
{
try
{
if (!thing.PvpFlagged && thing.InLineOfSight && !thing.Tagged && thing.Guid != _me.Guid && thing.IsHostile && thing.IsAlive && thing.Distance < lookHostileMobDistance && (thing.Distance + 5 < closestHostile.Distance || !closestHostile.IsHostile))
{
closestHostile = thing;
}
}
catch (Exception ex)
{
Logging.WriteException(ex);
}
}
if (_me.CurrentTarget != closestHostile)
{
closestHostile.Target();
Log("Switching current target {0} to closest hostile target {1}", _me.CurrentTarget.Name, closestHostile.Name);
}
}
Log("Killing {0} at distance {1}",
closestHostile.Name,
Math.Floor(closestHostile.Distance)
);
if (closestHostile.Distance >= 30 && !_me.Combat && _pullTimer.Elapsed.Seconds <= 25)
{
Navigator.MoveTo(closestHostile.Location);
Thread.Sleep(100);
return;
}
if (_pullTimer.Elapsed.Seconds > 25)
{
Log("Blacklisting {0}", closestHostile.Name);
Blacklist.Add(closestHostile != null ? closestHostile.CurrentTargetGuid : 0, TimeSpan.FromMinutes(15));
_me.ClearTarget();
_pullTimer.Reset();
return;
}
_pullTimer.Reset();
WoWMovement.MoveStop();
Thread.Sleep(100);
closestHostile.Face();
Thread.Sleep(100);
if (SpellManager.KnownSpells.ContainsKey("Vampiric Touch") && _me.CurrentTarget.HealthPercent > VTtargetHP)
{
if (!_me.CurrentTarget.Buffs.ContainsKey("Vampiric Touch") && !iAmPVPing)
{
SpellManager.CastSpell("Vampiric Touch");
Log("Casting Vampiric Touch");
return;
}
else if (!_me.CurrentTarget.Buffs.ContainsKey("Devouring Plague") && useDevouringPlague && SpellManager.CanCastSpell("Devouring Plague"))
{
SpellManager.CastSpell("Devouring Plague");
Log("Casting Devouring Plague");
return;
}
}
if (_me.Shapeshift != ShapeshiftForm.Shadow && SpellManager.CanCastSpell("Holy Fire"))
{
SpellManager.CastSpell("Holy Fire");
Log("Casting Holy Fire");
}
else if (SpellManager.KnownSpells.ContainsKey("Mind Blast"))
{
if (MindBlast())
Log("Casting Mind Blast");
}
else
{
if (Smite())
Log("Casting Smite");
}
}
}
#endregion