Please stop making posts about the CC running slow I am already aware the new group detection method is causing the problem.
Once I have found a way to fix it there will be an update.
I will not try to go into too much detail about the code on itself - you've used a lot of bad programming practices in your code and all in all, the code looks ugly and the code's logic isn't entirely correct. This is also why some of the code slows down the entire process.
But enough about that, I'm not here to flame. I use your CC for my druid, mainly because of the lack of time to write my own, so thank you for making one for everyone.
One big issue I noticed is that the bot doesn't face the enemy while "Use Movement" is disabled.
One even bigger issue is that, if you target yourself, the CC will make the bot go haywire and randomly twitch as it attempts to turn it's face to itself.
To fix both of these errors, open up "
HazzDruid.cs" and go to
line 212.
You will notice this code:
Code:
private bool DruidMove()
{
if (Me.CurrentTarget != null && HazzDruidSettings.Instance.UseMovement && Me.Combat)
{
DoMovement(Me.CurrentTarget);
Me.CurrentTarget.Face();
Combat();
return true;
}
else
{
Combat();
return true;
}
}
Change it into:
Code:
private void DruidMove()
{
if ((Me.CurrentTarget != null) && HazzDruidSettings.Instance.UseMovement && Me.Combat)
{
DoMovement(Me.CurrentTarget);
}
if ((Me.CurrentTarget != null) && Me.Combat && (Me.CurrentTarget != Me)) {
Me.CurrentTarget.Face();
}
Combat();
}
Fixes I've done:
- Removed duplicate code.
- Made function type void instead of bool.
- Added check to prevent facing target if target is the current player.
- Fixed CC not facing enemy when "Use Movement" was disabled.
This will fix the issue of not facing your target while in combat & "Use Movement" is disabled and the issue of the bot going haywire when you target yourself while using this CC.
This issue shouldn't have existed in the first place, but your programming logic isn't entirely correct, as I've mentioned before.
However, this
is free and you took time to create it, so thanks for that, I don't intend to flame for no reason. I could try to go through everything and optimize it (or even write my own), but since I don't have the time (or to be more exact, work is taking up my time so I'd lose money) I'll say thanks for the free druid CC and I'll leave it at that.
PS (for programmers only): I should note I'm not familiar with HB code & I've never -ever- written something for HB before, but C# stays C#. I've only modified the code's behaviour as compared to the original script. This means I've altered the logic, not the actual used functions. In terms of opcode, the very simple function I've modified runs slightly faster than before (unnoticeable, 'slightly faster' in terms of several milliseconds). Duplicate code was also removed.