using System;
using Styx.Helpers;
using System.Threading;
using System.Diagnostics;
using System.Collections.Generic;
using Styx.Plugins.PluginClass;
using Styx.Combat.CombatRoutine;
using Styx.WoWInternals;
namespace Styx.Bot.Plugins
{
public class QuickLogout : HBPlugin
{
// Minutes until logout
const int MINUTES = 0;
// Hours until logout
const int HOURS = 6;
// Logout at specified level
const int LEVEL = 95;
public WaitTimer _logout;
public override void Pulse()
{
if (_logout == null)
{
_logout = new WaitTimer(new TimeSpan(HOURS, MINUTES, 0));
_logout.Reset();
}
if (StyxWoW.Me.Level == LEVEL || _logout.IsFinished)
{
InactivityDetector.ForceLogout(true);
}
}
public override string Name { get { return "Logout"; } }
public override string Author { get { return "Apoc"; } }
public override Version Version { get { return new Version(1, 0); } }
public override bool WantButton { get { return false; } }
}
}