What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Line of Sight

what i ment was any CC that comes with honorbuddy. not the ones you download from the forms. if you cant work a text editor to do it, maybe you shouldnt be doing it.
 
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
 
Last edited:
So any word on a fix for this? CnG's fix doesn't seem to work for me either (keep getting no CC available when applied even if its the only cc). Obviously it is a bot issue as it happens with pretty much every CC (default and third party).
 
if you see.
"_me." that means that the CC was built with that in it then how i do mine "Me." just change all the "Me." in the red to "_me." and it will work.
 
or just add this line, near the top where the _me. equivilant is.

private readonly LocalPlayer Me = ObjectManager.Me;
 
dam it why do i have to do everything? just post of list of CC's that need it and ill do it.
 
Thx for feedback on this.
I edited the priest.cs and incorporated CnG's code with the _me edits. Also changed "slog" to "Log" as that seemed to be a typo? Placed coded as noted below and now at least HB starts and loads the cc. Testing now to see how it does.
/// Pull logic here for approaching and engaging target's in combat
#region Pull

private readonly Stopwatch _pullTimer = new Stopwatch();

public override void Pull()
{
if (!_pullTimer.IsRunning)
_pullTimer.Start();

if (_me.CurrentTarget != null)
{

if (!_me.CurrentTarget.InLineOfSight && !_me.Combat)
{
Log(_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 (_me.CurrentTarget.Distance > 100)
{
return;
}
 
Thx for feedback on this.
I edited the priest.cs and incorporated CnG's code with the _me edits. Also changed "slog" to "Log" as that seemed to be a typo? Placed coded as noted below and now at least HB starts and loads the cc. Testing now to see how it does.
/// Pull logic here for approaching and engaging target's in combat
#region Pull

private readonly Stopwatch _pullTimer = new Stopwatch();

public override void Pull()
{
if (!_pullTimer.IsRunning)
_pullTimer.Start();

if (_me.CurrentTarget != null)
{

if (!_me.CurrentTarget.InLineOfSight && !_me.Combat)
{
Log(_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 (_me.CurrentTarget.Distance > 100)
{
return;
}
its not a typo, like Me. and _me. it can be diffrent from CC to CC, it just depends on how the developer implements it, hell you can change it to CocoMo("string here"); if you wanted.
 
haha.. thanks! Yeah, I am not a programmer... just know enough to find things and get me in trouble but sometimes I can figure out the simple stuff. It must be the default priest.cs file that comes with HB now uses Log and not slog as when I made that change, along with the _me one you picked up on, it now loads the cc. So, progress! Testing now to see if LOS issues still exist or not. Thanks for your help.
 
btw the problem your running into... where you have slog change to Slog

It no longer gives me no valid cc available error.. will run to see how it helps with the errors....
 
Darn! Just had a LOS issue, even with above edit of the cc. Mob was just on the other side of an open doorway of a building, wailing on my toon but each time my toon would cast I'd get a "target is not in line of sight" notification in game and mob ends up killing me without my toon doing any damage on it. My toon just stood there, getting beat on, trying over and over to cast at the mob even though it was not in line of site. haha! A bit funny to watch but also frustrating because it runs into these issues all the time.

OK, another... targets mob but a big chimney stack is between me and the mob. My toon keeps targeting the mob but does not move or blacklist. Dang... it seems this LOS issue is not so easily resolved?
 
Also.. CnG... any word on a fix for your CC's? you said don't apply to the third party CC's (which yours is) and your CC has a problem with it also. I'm running your latest Mage CC (2.3) and have the same issues as the default ones with LoS problems....
 
ok, if it started hitting you first, then its technicly in Combat(), the code i put up will only help if the thing is behind a wall, or object, and your not in combat. for what you discribed, youll need to edit Combat(), and in a timer with a check for line of sight, then have it blacklist, backup, and clear target.
 
I've used both Tombstone and Cimmerian and I'm having this LOS problem all the time on my death knight. Is there any solution?
 
ok, if it started hitting you first, then its technicly in Combat(), the code i put up will only help if the thing is behind a wall, or object, and your not in combat. for what you discribed, youll need to edit Combat(), and in a timer with a check for line of sight, then have it blacklist, backup, and clear target.

MM, happens out of combat. Toon will kill a mob, rest, loot than target another... and if target is behind an object (like a wall/door/chimney stack, etc.) it sometimes just stands there targeting and not in line of site.
Just verified and was not in combat when this happened.
 
I've used both Tombstone and Cimmerian and I'm having this LOS problem all the time on my death knight. Is there any solution?
im already responding to the post you made on the tombstone thread. and dont edit CC's made by other people only the default ones. if you need a change made to cimmerian, ask the developer politely for it.
 
MM, happens out of combat. Toon will kill a mob, rest, loot than target another... and if target is behind an object (like a wall/door/chimney stack, etc.) it sometimes just stands there targeting and not in line of site.
Just verified and was not in combat when this happened.
i cant look at the code, but it should have a target.clear, or something in it, so it wont keep trying to pull it. idk, theres not much i can do, i can only try to help, i draw the line at fixing other developers code for them. srry.
 
Ya, thanks for your help. Maybe the HB devs can help out here as the LOS issue seems pretty common. :-)
 
Back
Top