Ejemplo n.º 1
0
        public override void Dispose()
        {
            Chat.Say -= QueueChat;
            Chat.Yell -= QueueChat;
            Chat.Whisper -= QueueChat;
            Chat.Party -= QueueChat;
            Chat.PartyLeader -= QueueChat;
            Chat.Battleground -= QueueChat;
            Chat.BattlegroundLeader -= QueueChat;
            Chat.Raid -= QueueChat;
            Chat.RaidLeader -= QueueChat;

            Styx.CommonBot.BotEvents.OnBotStopped -= OnStop;
            Styx.CommonBot.BotEvents.OnBotStarted -= OnStart;

            chatLogs.Clear();

            server.Dispose();
            server = null;
        }
Ejemplo n.º 2
0
        public override void Initialize()
        {
            chatLogs = new List<ChatLog>();

            Chat.Say += QueueChat;
            Chat.Yell += QueueChat;
            Chat.Whisper += QueueChat;
            Chat.Party += QueueChat;
            Chat.PartyLeader += QueueChat;
            Chat.Battleground += QueueChat;
            Chat.BattlegroundLeader += QueueChat;
            Chat.Raid += QueueChat;
            Chat.RaidLeader += QueueChat;

            Styx.CommonBot.BotEvents.OnBotStopped += OnStop;
            Styx.CommonBot.BotEvents.OnBotStarted += OnStart;

            Logging.Write("Init : WebService");

            this.apiKey = WSSettings.Instance.apikey;
            WoWPath = Path.GetDirectoryName(Styx.StyxWoW.Memory.Process.MainModule.FileName);

            server = new Server(WSSettings.Instance.webport, WoWPath + "\\Screenshots\\", checkRequestAccess, parseResult);
        }