ski
Well-Known Member
- Joined
- Feb 12, 2010
- Messages
- 3,720
Getting this error a lot in my log:
[2:52:53 AM:826] Object reference not set to an instance of an object. - From: ko0qjr-6 at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 504
at (Object )
at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
Here is that section of code (This is my own CC, so normally I can fix issues, but this one's got me confused):
I'm not sure what's causing it, any ideas? If this belongs in another section, please toss it over there instead.
[2:52:53 AM:826] Object reference not set to an instance of an object. - From: ko0qjr-6 at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 504
at (Object )
at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
Here is that section of code (This is my own CC, so normally I can fix issues, but this one's got me confused):
Code:
#region bugged mobs or adds
if (!fightTimer.IsRunning ||
Me.CurrentTarget.Guid != lastGuid)
{
fightTimer.Reset();
fightTimer.Start();
lastGuid = Me.CurrentTarget.Guid;
}
// blacklist mob for an hour if its bugged
if (fightTimer.ElapsedMilliseconds > 40 * 1000 &&
Me.CurrentTarget.HealthPercent > 95)
{
slog("Combat: This " + Me.CurrentTarget.Name + " is a bugged mob. Blacklisting for 1 hour.");
Logic.Blacklist.Add(Me.CurrentTarget.Guid, TimeSpan.FromHours(1.00));
Styx.Helpers.KeyboardManager.PressKey('S');
Thread.Sleep(5 * 1000);
Styx.Helpers.KeyboardManager.ReleaseKey('S');
Me.ClearTarget();
lastGuid = 0;
return;
}
I'm not sure what's causing it, any ideas? If this belongs in another section, please toss it over there instead.
Attachments
Last edited: