public static string GetStylesPath(this PluginContainer pluginContainer) { return(pluginContainer.GetPath("/styles")); }
public static string GetPath(this PluginContainer pluginContainer) { return(pluginContainer.GetPath(null)); }
public static string GetLabelText(this PluginContainer pluginContainer, string propertyName) { return(pluginContainer.GetPropertyDefinition <string>(propertyName, "LabelText")); }
public static string GetTemplatesPath(this PluginContainer pluginContainer) { return(pluginContainer.GetPath("/templates")); }
public static string GetHomePage(this PluginContainer pluginContainer) { return(pluginContainer.GetDefinition <string>("HomePage")); }
public static object GetDefaultValue(this PluginContainer pluginContainer, string propertyName) { return(pluginContainer.GetPropertyDefinition <object>(propertyName, "DefaultValue")); }
public static IEnumerable <ExtendedProperty> GetProperties(this PluginContainer pluginContainer) { return(getProperties(pluginContainer, false)); }
public static string GetIconSmall(this PluginContainer pluginContainer) { return(pluginContainer.GetImagePath(pluginContainer.GetDefinition <string>("IconSmall") ?? pluginContainer.GetDefinition <string>("IconLarge"))); }
public AlgorithmContainer(Algorithm algorithm, PluginContainer pluginContainer, ComputeDevice computeDevice) { PluginContainer = pluginContainer; Algorithm = algorithm; ComputeDevice = computeDevice; }
public static IEnumerable <ExtendedProperty> GetPropertiesUsingDefaultValues(this PluginContainer pluginContainer) { return(getProperties(pluginContainer, true)); }
public FileWriterService(PluginContainer plugin) : base(plugin) { }
public override void Pulse() { // ------------ Deactivate if not in Game etc if (Me == null || !StyxWoW.IsInGame) { return; } // ------------ Deactivate Plugin in BGs, Inis, while Casting and on Transport if (Battlegrounds.IsInsideBattleground || Me.IsInInstance || Me.IsOnTransport) { return; } // ------------ Deactivate Plugin if in Combat, Dead or Ghost if (inCombat) { return; } if (!hasItBeenInitialized && Settings.Active1) { // ------------ Deactivate ProfileChanger if Profile Swapper is enabled or Questbot etc is choosen List <PluginContainer> _pluginList = PluginManager.Plugins; foreach (PluginContainer _pluginMe in _pluginList) { if (_pluginMe.Plugin.Name == "Profile Changer") { PluginMe = _pluginMe; } } BotBase bot = TreeRoot.Current; if (bot.Name == "PartyBot" || bot.Name == "Multibox Follower" || bot.Name == "Multibox Leader" || bot.Name == "Mixed Mode" || bot.Name == "DungeonBuddy" || bot.Name == "BGBuddy" || bot.Name == "ArchaeologieBuddy" || bot.Name == "Tyrael" || bot.Name == "LazyRaider" || bot.Name == "Combat Bot" || bot.Name == "Fpsware's LazyBoxer" || bot.Name == "Raid Bot") { Logging.Write(Colors.LightSkyBlue, "{0} is choosen, so deactivate Profile Changer", bot.Name); PluginMe.Enabled = false; return; } foreach (PluginContainer _plugin in _pluginList) { if (_plugin.Enabled && _plugin.Plugin.Name == "Brodieman's Profile Swapper") { Logging.Write(Colors.LightSkyBlue, "Brodieman's Profile Swapper is activated, so deactivate Profile Changer"); PluginMe.Enabled = false; return; } } SWProfile1.Reset(); SWProfile2.Reset(); SWProfile3.Reset(); SWProfile4.Reset(); SWProfile5.Reset(); SWProfile6.Reset(); SWProfile7.Reset(); SWProfile8.Reset(); SWProfile9.Reset(); SWProfile10.Reset(); SWProfile11.Reset(); SWProfile12.Reset(); SWProfile1.Start(); ChangeProfile(Settings.Profile1); hasItBeenInitialized = true; Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Init Done"); } if (!SWProfile1.IsRunning && !SWProfile2.IsRunning && !SWProfile3.IsRunning && !SWProfile4.IsRunning && !SWProfile5.IsRunning && !SWProfile6.IsRunning && !SWProfile7.IsRunning && !SWProfile8.IsRunning && !SWProfile9.IsRunning && !SWProfile10.IsRunning && !SWProfile11.IsRunning && !SWProfile12.IsRunning && Settings.Active1) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: A failure occured. Init and then switch to Profile 1 and restart Timer1"); hasItBeenInitialized = false; } if (Settings.Active1) { if ((SWProfile1.Elapsed.TotalMinutes > Convert.ToInt16(Settings.Minutes1) && !Settings.RandomTime) || (SWProfile1.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active2) { ChangeProfile(Settings.Profile2); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile1.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active2) { SWProfile2.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active2) { if ((SWProfile2.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes2) && !Settings.RandomTime) || (SWProfile2.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active3) { ChangeProfile(Settings.Profile3); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile2.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active3) { SWProfile3.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active3) { if ((SWProfile3.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes3) && !Settings.RandomTime) || (SWProfile3.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active4) { ChangeProfile(Settings.Profile4); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile3.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active4) { SWProfile4.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active4) { if ((SWProfile4.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes4) && !Settings.RandomTime) || (SWProfile4.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active5) { ChangeProfile(Settings.Profile5); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile4.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active5) { SWProfile5.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active5) { if ((SWProfile5.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes5) && !Settings.RandomTime) || (SWProfile5.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active6) { ChangeProfile(Settings.Profile6); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile5.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active6) { SWProfile6.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active6) { if ((SWProfile6.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes6) && !Settings.RandomTime) || (SWProfile6.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active7) { ChangeProfile(Settings.Profile7); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile6.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active7) { SWProfile7.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active7) { if ((SWProfile7.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes7) && !Settings.RandomTime) || (SWProfile7.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active8) { ChangeProfile(Settings.Profile8); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile7.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active8) { SWProfile8.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active8) { if ((SWProfile8.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes8) && !Settings.RandomTime) || (SWProfile8.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active9) { ChangeProfile(Settings.Profile9); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile8.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active9) { SWProfile9.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active9) { if ((SWProfile9.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes9) && !Settings.RandomTime) || (SWProfile9.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active10) { ChangeProfile(Settings.Profile10); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile9.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active10) { SWProfile10.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active10) { if ((SWProfile10.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes10) && !Settings.RandomTime) || (SWProfile10.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active11) { ChangeProfile(Settings.Profile11); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile10.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active11) { SWProfile11.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active11) { if ((SWProfile11.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes11) && !Settings.RandomTime) || (SWProfile11.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.Active12) { ChangeProfile(Settings.Profile12); } else { if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile11.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else if (Settings.Active12) { SWProfile12.Start(); } else { SWProfile1.Start(); } } } if (Settings.Active12) { if ((SWProfile12.Elapsed.TotalMinutes > Convert.ToInt32(Settings.Minutes12) && !Settings.RandomTime) || (SWProfile12.Elapsed.TotalMinutes > NextRandomTime && Settings.RandomTime)) { Logging.Write(Colors.LightSkyBlue, "Profile Changer: Change Profile"); if (Settings.RandomProfile) { ChangeRandomProfile(); } else if (Settings.StopBot) { WoWMovement.MoveStop(); Logging.Write(Colors.LightSkyBlue, "Profile Changer: Log Out Now, bb"); Lua.DoString("ForceQuit()"); return; } else { ChangeProfile(Settings.Profile1); } Logging.WriteDiagnostic(Colors.LightSkyBlue, "Profile Changer: Reset Timer"); SWProfile12.Reset(); if (Settings.RandomProfile) { StartRandomProfileTimer(); } else { SWProfile1.Start(); } } } }
public static async Task <bool> Run() { PluginContainer plugin = PluginManager.Plugins.Where(p => p.Plugin.Name == "SideStep" || p.Plugin.Name == "回避").First(); // 检测附近 对象是否有特定读条技能 System.Collections.Generic.IEnumerable <BattleCharacter> num = GameObjectManager.GetObjectsOfType <BattleCharacter>() .Where(r => r.CastingSpellId != 0 && !r.IsMe && r.Distance() < 50 && ( r.CastingSpellId == 15594 || r.CastingSpellId == 15590 || r.CastingSpellId == 15591 || r.CastingSpellId == 15592 || r.CastingSpellId == 15593 || r.CastingSpellId == 15602 || r.CastingSpellId == 15605 || r.CastingSpellId == 15606 || r.CastingSpellId == 15607 || r.CastingSpellId == 15610 || r.CastingSpellId == 15609 ) ); if (num != null && num.Count() > 0) { BattleCharacter spell = num.First(); Logging.Write(Colors.Aquamarine, $"跟随"); if (spell.NpcId == 8299) { if (plugin != null) { if (plugin.Enabled == true) { plugin.Enabled = false; } } } BattleCharacter Obj = GameObjectManager.GetObjectsOfType <BattleCharacter>(true).Where(r => r.NpcId == 729 || r.NpcId == 8378 || // "雅·修特拉" r.NpcId == 1492 || // "于里昂热" r.NpcId == 4130 || // "阿尔菲诺" r.NpcId == 5239 || // "阿莉塞" r.NpcId == 8889 || // 琳 r.Name == "阿莉塞" || r.Name == "琳" || r.Name == "水晶公" || r.Name == "敏菲利亚" || r.Name == "桑克瑞德" ).OrderBy(r => r.Distance()).First(); //当距离大于跟随距离 再处理跟随 if (Obj.Location.Distance2D(Core.Me.Location) >= 0.2) { if (Core.Me.IsCasting) { ActionManager.StopCasting(); //断读条 } // 选中跟随最近的队友 Obj.Target(); Logging.Write(Colors.Aquamarine, $"队友{Obj.Name}距离:{Obj.Location.Distance2D(Core.Me.Location)}"); while (Obj.Location.Distance2D(Core.Me.Location) >= 0.2) { Navigator.PlayerMover.MoveTowards(Obj.Location); await Coroutine.Sleep(50); } Navigator.PlayerMover.MoveStop(); await Coroutine.Sleep(50); return(true); } } if (Core.Target != null) { System.Collections.Generic.IEnumerable <BattleCharacter> sC = GameObjectManager.GetObjectsOfType <BattleCharacter>().Where( r => !r.IsMe && r.Distance() < 50 && r.NpcId == 8250 ); //77BOSS2 // /77BOSS2 移动 if (sC.Any() == true) { if (plugin != null) { if (plugin.Enabled == true) { plugin.Enabled = false; } } Logging.Write(Colors.Aquamarine, $"boss2"); BattleCharacter spellCaster = sC.First(); if (spellCaster != null && spellCaster.Name == Core.Target.Name) { BattleCharacter Obj = GameObjectManager.GetObjectsOfType <BattleCharacter>(true).Where(r => r.NpcId == 729 || r.NpcId == 8378 || // "雅·修特拉" r.NpcId == 1492 || // "于里昂热" r.NpcId == 4130 || // "阿尔菲诺" r.NpcId == 5239 || // "阿莉塞" r.NpcId == 8889 || // 琳 r.Name == "阿莉塞" || r.Name == "琳" || r.Name == "水晶公" || r.Name == "敏菲利亚" || r.Name == "桑克瑞德" ).OrderBy(r => r.Distance()).First(); //当距离大于跟随距离 再处理跟随 if (Obj.Location.Distance2D(Core.Me.Location) >= 0.2) { if (Core.Me.IsCasting) { ActionManager.StopCasting(); //断读条 } // 选中跟随最近的队友 Obj.Target(); Logging.Write(Colors.Aquamarine, $"队友{Obj.Name}距离:{Obj.Location.Distance2D(Core.Me.Location)}"); while (Obj.Location.Distance2D(Core.Me.Location) >= 0.2) { Navigator.PlayerMover.MoveTowards(Obj.Location); await Coroutine.Sleep(50); } Navigator.PlayerMover.MoveStop(); await Coroutine.Sleep(50); return(true); } } } } return(false); }
public void Dispose(bool isExplicitlyInitiatedDispose) { if (!_isDisposed) { // NOTE: we should call any Dispose() method for any managed or unmanaged // resource, if that resource provides a Dispose() method. // Clean up managed resources, if explicit disposal... if (isExplicitlyInitiatedDispose) { // empty, for now } // Clean up unmanaged resources (if any) here... if (_pluginAntiDrown != null) { _pluginAntiDrown.Enabled = _pluginAntiDrownWasEnabled; _pluginAntiDrown = null; } TreeRoot.GoalText = string.Empty; TreeRoot.StatusText = string.Empty; // Call parent Dispose() (if it exists) here ... base.Dispose(); } _isDisposed = true; }
public static void Initialize(this PluginContainer pluginContainer) { pluginContainer.ExecuteMethod("Initialize"); }
public FileReaderService(PluginContainer plugin) : base(plugin) { }
public static void Unload(this PluginContainer pluginContainer) { pluginContainer.ExecuteMethod("Unload"); }
public static string GetIconSmallDisabled(this PluginContainer pluginContainer) { return(pluginContainer.GetImagePath(pluginContainer.GetDefinition <string>("IconSmallDisabled")) ?? pluginContainer.GetIconSmall()); }
public static string GetBackgroundImage(this PluginContainer pluginContainer) { return(pluginContainer.GetImagePath(pluginContainer.GetDefinition <string>("BackgroundImage"))); }
public static Version GetOxiteMaxVersion(this PluginContainer pluginContainer) { return(parseVersion(pluginContainer.GetDefinition <object>("OxiteMaxVersion"))); }
public static string GetCategory(this PluginContainer pluginContainer) { return(pluginContainer.GetDefinition <string>("Category")); }
public static string GetHelpUrl(this PluginContainer pluginContainer, string propertyName) { return(pluginContainer.GetPropertyDefinition <string>(propertyName, "HelpUrl")); }
public static string GetDescription(this PluginContainer pluginContainer) { return(pluginContainer.GetDefinition <string>("Description")); }
public static bool HasMethod(this PluginContainer pluginContainer, string methodName) { return(pluginContainer.GetMethod(methodName) != null); }
public static string GetDisplayName(this PluginContainer pluginContainer) { return(pluginContainer.GetDefinition <string>("DisplayName") ?? pluginContainer.GetFallBackDisplayName()); }
public static string GetScriptsPath(this PluginContainer pluginContainer) { return(pluginContainer.GetPath("/scripts")); }
public static DateTime?GetDateModified(this PluginContainer pluginContainer) { return(pluginContainer.GetDateModified(new HttpContextWrapper(HttpContext.Current))); }
public static string GetImagesPath(this PluginContainer pluginContainer) { return(pluginContainer.GetPath("/img")); }
public static DateTime?GetDateModified(this PluginContainer pluginContainer, HttpContextBase httpContextBase) { return(pluginContainer.VirtualPath.FileModifiedDate(httpContextBase)); }
// this is being run in a new thread public void ThreadLoop() { while (true) { try { // if keybind is pressed and our wow window is the currently active window then toggle HB IntPtr fgWinHwnd = GetForegroundWindow(); if (_myPlugin == null) _myPlugin = PluginManager.Plugins.FirstOrDefault(p => p.Name.Equals(Name)); if (HBToggleKeybind.PollKeys() && (WowHandle == fgWinHwnd) && (_myPlugin != null && _myPlugin.Enabled)) ToggleHB(); if (MovementKeybind.PollKeys() && (WowHandle == fgWinHwnd) && (_myPlugin != null && _myPlugin.Enabled)) ToggleMovement(); Thread.Sleep(50); } catch (Exception ex) { Logging.WriteException(ex); } } }
public static string GetIconLargeError(this PluginContainer pluginContainer) { return(pluginContainer.GetImagePath(pluginContainer.GetDefinition <string>("IconLargeError")) ?? pluginContainer.GetIconLarge()); }
public override void OnStart() { // The XML element didn't exist when the constructor was called... // So we had to defer some final parsing that really should've happened in the constructor // to the OnStart() method. This will parse the final arguments, and set IsAttributeProblem // correctly, for normal processing. ParseHuntingGroundHotspots(); // This reports problems, and stops BT processing if there was a problem with attributes... // We had to defer this action, as the 'profile line number' is not available during the element's // constructor call. OnStart_HandleAttributeProblem(); // If the quest is complete, this behavior is already done... // So we don't want to falsely inform the user of things that will be skipped. if (!IsDone) { // Disable the AntiDrown plugin if present, as it interferes with our anti-drown prevention... _pluginAntiDrown = PluginManager.Plugins.FirstOrDefault(plugin => (plugin.Name == "Anti-Drown")); if (_pluginAntiDrown != null) { _pluginAntiDrownWasEnabled = _pluginAntiDrown.Enabled; _pluginAntiDrown.Enabled = false; } PlayerQuest quest = StyxWoW.Me.QuestLog.GetQuestById((uint)QuestId); TreeRoot.GoalText = this.GetType().Name + ": " + ((quest != null) ? ("\"" + quest.Name + "\"") : "In Progress"); GuiShowProgress(null); } }
public SecuredServiceBase(PluginContainer plugin) { this.plugin = plugin; }