public Bot(BotEvents events, MiunieBot miunie) { // BotEvents just need to be initiated here. // That's why it's injected. _miunie = miunie; }
public BotController(ICredentials botCredentials, IDiscordBot bot, BotEvents botEvents, ILogger logger) { _botCredentials = botCredentials; _bot = bot; _botEvents = botEvents; _logger = logger; }
public void OnDisabled() { Logger.Log("v{0} Disabled", Version); BotEvents.UnWire(); TabUi.RemoveTab(); }
public void OnEnabled() { Logger.Log("v{0} Enabled", Version); BotEvents.WireUp(); TabUi.InstallTab(); }
void Profile_OnNewOuterProfileLoaded(BotEvents.Profile.NewProfileLoadedEventArgs args) { try { LoadWayPoints(ProfileManager.CurrentProfile); } catch (Exception ex) { Logging.WriteException(ex); } }
public void OnDisabled() { Enabled = false; Logger.Info((string.Format("({0}) disabled.", Version))); DeveloperUI.RemoveTab(); //OverlayUI.RemoveOverlayComponents(); BotEvents.UnWire(); //MainUI.InstallButtons(); }
public void OnEnabled() { Enabled = true; Logger.Info(string.Format("({0}) enabled.", Version)); DeveloperUI.InstallTab(); //OverlayUI.InstallOverlayComponents(); BotEvents.WireUp(); //MainUI.InstallButtons(); }
public BotWorker(DiscordSocketClient client, BotEvents events) { _client = client; _events = events; _client.Log += _events.LogAsync; _client.Ready += _events.ReadyAsync; _client.UserJoined += _events.JoinedUser; _client.MessageReceived += _events.MessageReceivedAsync; }
private void Player_OnMapChanged(BotEvents.Player.MapChangedEventArgs args) { Beahviour(); //Why would we create same behaviors all over ? if (lastBehaviour == usedBehaviour) { return; } slog("Context changed. New context: " + usedBehaviour + ". Rebuilding behaviors."); CreateBehaviors(); }
internal static void PlayerOnMapChanged(BotEvents.Player.MapChangedEventArgs args) { // Since we hooked this in ctor, make sure we are the selected CC if (RoutineManager.Current.Name != SingularRoutine.Instance.Name) return; if (SingularRoutine.CurrentWoWContext == WoWContext.Battlegrounds || StyxWoW.Me.CurrentMap.IsRaid) DetachCombatLogEvent(); else AttachCombatLogEvent(); //Why would we create same behaviors all over ? if (SingularRoutine.LastWoWContext == SingularRoutine.CurrentWoWContext) { return; } Logger.Write("Context changed. New context: " + SingularRoutine.CurrentWoWContext + ". Rebuilding behaviors."); SingularRoutine.Instance.CreateBehaviors(); }
private void Player_OnMapChanged(BotEvents.Player.MapChangedEventArgs args) { _root = null; TargetFilterSetup(); }
private void onMobkill(BotEvents.Player.MobKilledEventArgs args) { }
private void onLevel(BotEvents.Player.LevelUpEventArgs args) { WSBot.estLevelUp lvl = new WSBot.estLevelUp(); lvl.lvl = Convert.ToInt32(Styx.StyxWoW.Me.Level); lvl.data = DateTime.Now; b.IncluirLevelUp(Sessao, lvl, SECURETY_KEY); Logging.Write("[MasterControl]: Level up!"); if (!status.ContainsValue("Level up!")) status.Add("message", "Level up!"); //if (MasterControlSettings.Instance.scLevel) screenie(); }
private void Player_OnLevelUp(BotEvents.Player.LevelUpEventArgs args) { ClearItemCache(); }
private void Profile_OnNewOuterProfileLoaded(BotEvents.Profile.NewProfileLoadedEventArgs args) { try { //Logger.Write("Processing new profile"); _petProfile = new PetProfile(args.NewProfile); PluginSettings.Instance.LastProfile = ProfileManager.XmlLocation; PluginSettings.Instance.Save(); } catch (Exception ex) { Logging.WriteException(ex); } }
private void onLevel(BotEvents.Player.LevelUpEventArgs args) { try { app.sendPlayerLevelUP(); } catch (Exception ex) { Logging.WriteException(ex); } //WSBot.estLevelUp lvl = new WSBot.estLevelUp(); //lvl.lvl = Convert.ToInt32(Styx.StyxWoW.Me.Level); //lvl.data = DateTime.Now; //b.IncluirLevelUp(Sessao, lvl, SECURETY_KEY); //Logging.Write("[MasterControl]: Level up!"); //if (!status.ContainsValue("Level up!")) // status.Add("message", "Level up!"); //if (MasterControlSettings.Instance.scLevel) screenie(); }
private void Player_OnMobKilled(BotEvents.Player.MobKilledEventArgs args) { AddCombatMessage(string.Format("You have slain {0}!", args.KilledMob.Name)); }
private static void OnLevel(BotEvents.Player.LevelUpEventArgs args) { const string title = "I Leveled Up!"; var message = FormatIt( "I Leveled up from {0} to {1}.", args.OldLevel, args.NewLevel); SendNotification(message, title); }
private static void OnMapChanged(BotEvents.Player.MapChangedEventArgs args) { var title = FormatIt( "Map Changed to {0}", args.NewMapName); string message = FormatIt("Your Honorbuddy instance has changed maps from {1} to {0}.", OldMapName, args.NewMapName); OldMapName = args.NewMapName; SendNotification(message, title); }
private void Player_OnLevelUp(BotEvents.Player.LevelUpEventArgs args) { if (!ConfigValues.Instance.NotifyLevelUp)return; var msg = string.Format("I'm level {0} now",args.NewLevel); Write(msg); }
private static void OnNewProfile(BotEvents.Profile.NewProfileLoadedEventArgs args) { var title = FormatIt( "New Profile Loaded: {0}", args.NewProfile.Name); var message = FormatIt( "Your Honorbuddy instance has changed profile from {1} to {0}.", args.OldProfile.Name, args.NewProfile.Name); SendNotification(message, title); }
private void BotEvents_OnBotChanged(BotEvents.BotChangedEventArgs args) { var msg = string.Format("Changed bot, From {0} to {1}",args.OldBot, args.NewBot); Write(msg); }
private void Player_OnLevelUp(BotEvents.Player.LevelUpEventArgs args) { var outMsg = String.Format("Leveled up : {0}", args.NewLevel); if (Config.Instance.SendLevelUpDirectly) SendMailDirectly(outMsg); if (!Config.Instance.LevelUpLog) return; ChatList.Add(RemoveChatFormatting(outMsg)); }
private void Player_OnMobKilled(BotEvents.Player.MobKilledEventArgs args) { if (!ConfigValues.Instance.NotifyMobKilled)return; var msg = string.Format("I killed {0}",args.KilledMob); Write(msg); }
public void Player_OnMapChanged(BotEvents.Player.MapChangedEventArgs args) { try { if ((CLU.LocationContext == GroupLogic.Battleground || CLU.LocationContext == GroupLogic.PVE) && TalentManager.CurrentSpec != WoWSpec.DruidFeral) DetachCombatLogEvent(); else AttachCombatLogEvent(); //Why would we create same behaviors all over ? if (CLU.LastLocationContext == CLU.LocationContext) { return; } CLULogger.TroubleshootLog("Context changed. New context: " + CLU.LocationContext + ". Rebuilding behaviors."); CLU.Instance.CreateBehaviors(); if (CLU.IsHealerRotationActive && StyxWoW.IsInGame) { CLULogger.TroubleshootLog( "CombatLogEvents: Party Members Changed - Re-Initialize list Of HealableUnits"); switch (CLUSettings.Instance.SelectedHealingAquisition) { case HealingAquisitionMethod.Proximity: HealableUnit.HealableUnitsByProximity(); break; case HealingAquisitionMethod.RaidParty: HealableUnit.HealableUnitsByPartyorRaid(); break; } } } catch (Exception ex) { CLULogger.DiagnosticLog("Player_OnMapChanged : {0}", ex); } }