/// <summary> /// Issues the plugin event with parameter. /// </summary> /// <param name="pluginEventType">Type of the plugin event.</param> /// <param name="param">The parameter.</param> public static void IssuePluginEventWithParam(PluginEvents pluginEventType, long param) { #if UNITY_ANDROID && !UNITY_EDITOR //SetEventData((int)pluginEventType, param); uint data = 0x80000000 | ((uint)pluginEventType << 25) | (uint)(param & 0x00000000FFFFFFFF); GL.IssuePluginEvent(GetRenderEventFunc(), (int)data); data = 0x80000000 | 0x40000000 | ((uint)pluginEventType << 25) | (uint)(((uint)(param >> 32) & 0x00000000FFFFFFFF)); GL.IssuePluginEvent(GetRenderEventFunc(), (int)data); GL.IssuePluginEvent(GetRenderEventFunc(), (int)pluginEventType); #endif }
/// <summary> /// The plugin manager or application will call this to let the /// plugin know that the application is ready for the plugin to /// request registration for any plugin events it requires. /// </summary> // Required method to implement the IPlugin interface public void InitializePlugin(PluginComponentManager pm) { // Register for plugin events. // Leave any that the plugin doesn't need null PluginEvents events = new PluginEvents(); events.GameLoaded = GameLoaded; events.GameLoading = GameLoading; events.GameSaving = GameSaving; events.GameSaved = GameSaved; events.PluginSelected = PluginSelected; events.PluginUnselected = PluginUnselected; pm.RegisterPlugin(this, events); // If the plugin needs any other initialization // it should be done here. }
public void InitializePlugin(PluginComponentManager pm) { PluginEvents events = new PluginEvents(); events.GameLoaded = OnGameLoaded; pm.RegisterPlugin(this, events); pluginManager = pm; SkillsAllXml = db.SkillsAllXml; SkillsCommonXml = db.SkillsCommonXml; SkillsBerserkerXml = db.SkillsBerserkerXml; SkillsSoldierXml = db.SkillsSoldierXml; SkillsSirenXml = db.SkillsSirenXml; SkillsHunterXml = db.SkillsHunterXml; this.Enabled = false; }
public void InitializePlugin(PluginComponentManager pm) { PluginEvents events = new PluginEvents(); events.GameLoaded = OnGameLoaded; events.PluginCommand = OnPluginCommand; pm.RegisterPlugin(this, events); pluginManager = pm; switch (this.Text) { case "Weapons": GearTL = new InventoryTreeList(GearTree, db.WeaponList); this.gbGear.Text = "Weapon Backpack"; this.copyToBackpackToolStripMenuItem.Visible = false; break; case "Items": GearTL = new InventoryTreeList(GearTree, db.ItemList); this.gbGear.Text = "Item Backpack"; this.copyToBackpackToolStripMenuItem.Visible = false; break; case "Bank": GearTL = new InventoryTreeList(GearTree, db.BankList); this.gbGear.Text = "Bank"; this.copyToBankToolStripMenuItem.Visible = false; break; } Init(); // The index translators control the caption that goes over the top of each // level or quality SlideSelector. Attach each translator then signal the // value changed event to cause the translator to update the caption. this.LevelIndexGear.IndexTranslator += new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.LevelTranslator); this.QualityGear.IndexTranslator += new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.QualityTranslator); this.LevelIndexGear.OnValueChanged(EventArgs.Empty); this.QualityGear.OnValueChanged(EventArgs.Empty); HighlightFont = new Font(GearTree.Font, FontStyle.Italic | FontStyle.Bold); this.Enabled = false; }
public void InitializePlugin(PluginComponentManager pm) { PluginEvents events = new PluginEvents(); events.GameLoaded = OnGameLoaded; events.GameSaving = OnGameSaving; pm.RegisterPlugin(this, events); this.Enabled = false; LocationsXml = db.LocationsXml; db.setXPchart(); DoLocationsList(); Cash.Maximum = GlobalSettings.MaxCash; Experience.Maximum = GlobalSettings.MaxExperience; Level.Maximum = GlobalSettings.MaxLevel; BankSpace.Maximum = GlobalSettings.MaxBankSlots; BackpackSpace.Maximum = GlobalSettings.MaxBackpackSlots; SkillPoints.Maximum = GlobalSettings.MaxSkillPoints; }
private async Task <bool> GetCoroutine() { if (_isDone) { return(true); } PluginEvents.PulseUpdates(); if (_currentActBountiesCoroutine == null) { _isDone = true; return(true); } if (PluginEvents.TimeSinceWorldChange < 1000) { Logger.Debug("[Bounties] Sleeping 1 second due to world change"); await Coroutine.Sleep(1000); } if (!await _currentActBountiesCoroutine.GetCoroutine()) { return(false); } _completedActs.Add(_currentAct); if (PluginSettings.Current.BountyMode3.HasValue && PluginSettings.Current.BountyMode3.Value) { _acts.Remove(_currentAct); if (_acts.Count == 0) { _isDone = true; return(true); } } _currentActBountiesCoroutine = GetNextAct(); if (_currentActBountiesCoroutine != null) { Logger.Info("[Bounties] Picked {0} as new target. (BonusAct: {1})", _currentActBountiesCoroutine.Act, _currentActBountiesCoroutine.Act == ZetaDia.CurrentBonusAct); } return(true); }
public async Task <bool> Coroutine() { if (_isDone) { return(true); } PluginEvents.PulseUpdates(); if (!await _keywardenCoroutine.GetCoroutine()) { return(true); } _keywardenCoroutine.Dispose(); _keywardenCoroutine = null; var keywardenData = GetNext(); if (keywardenData != null) { _keywardenCoroutine = new KeywardenCoroutine(keywardenData); return(false); } _isDone = true; return(true); }
/// <summary> /// Issues the plugin event. /// </summary> /// <param name="pluginEventType">Type of the plugin event.</param> public static void IssuePluginEvent(PluginEvents pluginEventType) { #if UNITY_ANDROID && !UNITY_EDITOR GL.IssuePluginEvent(GetRenderEventFunc(), (int)pluginEventType); #endif }
private void OnClickApply(object sender, System.EventArgs e) { if (checkBoxAltDesign.Checked != Options.DesignAlternative) { Options.DesignAlternative = checkBoxAltDesign.Checked; MainForm.ChangeDesign(); PluginEvents.FireDesignChangeEvent(); } Files.CacheData = checkBoxCacheData.Checked; if (checkBoxNewMapSize.Checked != (Map.Felucca.Width == 7168)) { if (checkBoxNewMapSize.Checked) { Map.Felucca.Width = 7168; Map.Trammel.Width = 7168; } else { Map.Felucca.Width = 6144; Map.Trammel.Width = 6144; } MainForm.ChangeMapSize(); } if (checkBoxuseDiff.Checked != Map.UseDiff) { Map.UseDiff = checkBoxuseDiff.Checked; ControlEvents.FireMapDiffChangeEvent(); } if (numericUpDownItemSizeWidth.Value != Options.ArtItemSizeWidth || numericUpDownItemSizeHeight.Value != Options.ArtItemSizeHeight) { Options.ArtItemSizeWidth = (int)numericUpDownItemSizeWidth.Value; Options.ArtItemSizeHeight = (int)numericUpDownItemSizeHeight.Value; MainForm.ReloadItemTab(); } if (checkBoxItemClip.Checked != Options.ArtItemClip) { Options.ArtItemClip = checkBoxItemClip.Checked; MainForm.ReloadItemTab(); } Files.UseHashFile = checkBoxUseHash.Checked; if (map0Nametext.Text != Options.MapNames[0] || map1Nametext.Text != Options.MapNames[1] || map2Nametext.Text != Options.MapNames[2] || map3Nametext.Text != Options.MapNames[3] || map4Nametext.Text != Options.MapNames[4] || map5Nametext.Text != Options.MapNames[5]) { Options.MapNames[0] = map0Nametext.Text; Options.MapNames[1] = map1Nametext.Text; Options.MapNames[2] = map2Nametext.Text; Options.MapNames[3] = map3Nametext.Text; Options.MapNames[4] = map4Nametext.Text; Options.MapNames[5] = map5Nametext.Text; ControlEvents.FireMapNameChangeEvent(); } Options.MapCmd = cmdtext.Text; Options.MapArgs = argstext.Text; if (Directory.Exists(textBoxOutputPath.Text)) { Options.OutputPath = textBoxOutputPath.Text; } }
public PluginEventInfo(PluginEvents @event, object payload) { this.Event = @event; this.Payload = payload; }
public PluginEventInfo(PluginEvents @event) { this.Event = @event; this.Payload = null; }
public static void IssuePluginEvent(PluginEvents eventid) { #if (UNITY_EDITOR || UNITY_STANDALONE_OSX) GL.IssuePluginEvent((int)eventid); #endif }