public Debug() { InitializeComponent(); DynamicSize = false; return; var I = UXHelper.GetControl <Enigma.D3.UI.Controls.UXItemsControl>("Root.NormalLayer.minimap_dialog_backgroundScreen.minimap_dialog_pve.minimap_pve_main"); this.Width = I.x468_UIRect.Width; this.Height = I.x468_UIRect.Height; Canvas.SetLeft(this, I.x468_UIRect.Left); Canvas.SetTop(this, I.x468_UIRect.Top); // ObjectDumper.Dump(I); //T.Rect.Width; /*Enigma.D3.UI.UIRect Rect = Control.x4BC_UIRect_1600x1200; * * this.Width = Rect.Width; * this.Height = Rect.Height; * Canvas.SetTop(this, Rect.Top); * ObjectDumper.Dump(Control); * Canvas.SetLeft(this, (Rect.Width * 0.9) + Rect.Left);*/ }
private static bool tryCheckInventoryFull() { try { var inventoryItems = ActorCommonDataHelper.EnumerateInventoryItems(); if (inventoryItems.Count() <= 20) { return(false); } string error_notification_uielement = "Root.TopLayer.error_notify.error_text"; //string inventory_full_text = "Not enough Inventory space to complete this operation."; string item_canot_be_picked = "That item cannot be picked up."; var errortext = UXHelper.GetControl <UXLabel>(error_notification_uielement); if (errortext.xA20_Text_StructStart_Min84Bytes == item_canot_be_picked && errortext.IsVisible()) { return(true); } return(false); } catch { return(true); } }
private static void Action_RemoveSkillsFromHotbar(int StartSlot) { for (int i = StartSlot; i < 6; i++) { if (!isSkillsWindowVisible()) { return; } string control = ""; switch (i) { case 0: control = A_Enums.UIElements.SkillHotBarLeftclick; break; case 1: control = A_Enums.UIElements.SkillHotBarRightclick; break; case 2: control = A_Enums.UIElements.SkillHotBar1; break; case 3: control = A_Enums.UIElements.SkillHotBar2; break; case 4: control = A_Enums.UIElements.SkillHotBar3; break; case 5: control = A_Enums.UIElements.SkillHotBar4; break; } if (UXHelper.GetControl <UXIcon>(control).GetPowerSnoId() != -1) { UIRect Slot = A_Tools.T_D3UI.UIElement.getRect(control); A_Tools.InputSimulator.IS_Mouse.MoveCursor((int)Slot.Left, (int)Slot.Top, (int)Slot.Right, (int)Slot.Bottom); Thread.Sleep(50); A_Tools.InputSimulator.IS_Mouse.LeftDown(0, 0); Thread.Sleep(50); A_Tools.InputSimulator.IS_Mouse.MoveCursor((uint)Slot.Left, (uint)(Slot.Top - (Slot.Height))); Thread.Sleep(50); A_Tools.InputSimulator.IS_Mouse.LeftUp(0, 0); while (Engine.Current.ObjectManager.xA00_PlayerInput.Dereference().x14_StructStart_Min56Bytes == 37088) { A_Tools.InputSimulator.IS_Mouse.RightCLick(); Thread.Sleep(50); } } } }
private static void get_HotBarSkills() { try { while (!A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.portrait_0)) { System.Threading.Thread.Sleep(5); } var HotBar1 = UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBar1); var HotBar2 = UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBar2); var HotBar3 = UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBar3); var HotBar4 = UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBar4); var HotBarRightClick = UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBarRightclick); var HotBarLeftClick = UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBarLeftclick); List <SkillPower> AllSkillPowers; lock (A_Collection.Presets.SkillPowers.AllSkillPowers) AllSkillPowers = A_Collection.Presets.SkillPowers.AllSkillPowers.ToList(); A_Collection.Skills.SkillInfos._HotBar1Skill = AllSkillPowers.FirstOrDefault(x => x.PowerSNO == convert_ArchonPowerSNO(HotBar1.GetPowerSnoId())); A_Collection.Skills.SkillInfos._HotBar2Skill = AllSkillPowers.FirstOrDefault(x => x.PowerSNO == convert_ArchonPowerSNO(HotBar2.GetPowerSnoId())); A_Collection.Skills.SkillInfos._HotBar3Skill = AllSkillPowers.FirstOrDefault(x => x.PowerSNO == convert_ArchonPowerSNO(HotBar3.GetPowerSnoId())); A_Collection.Skills.SkillInfos._HotBar4Skill = AllSkillPowers.FirstOrDefault(x => x.PowerSNO == convert_ArchonPowerSNO(HotBar4.GetPowerSnoId())); A_Collection.Skills.SkillInfos._HotBarRightClickSkill = AllSkillPowers.FirstOrDefault(x => x.PowerSNO == convert_ArchonPowerSNO(HotBarRightClick.GetPowerSnoId())); A_Collection.Skills.SkillInfos._HotBarLeftClickSkill = AllSkillPowers.FirstOrDefault(x => x.PowerSNO == convert_ArchonPowerSNO(HotBarLeftClick.GetPowerSnoId())); } catch (Exception e) { A_Handler.Log.Exception.addExceptionLogEntry(e, A_Enums.ExceptionThread.ICollector); } }
public static bool isVisible(string ControlName) { try { return(UXHelper.GetControl <UXChatEditLine>(ControlName).IsVisible()); } catch { return(false); } }
public static string Label_getText(string LabelControlName) { try { return(UXHelper.GetControl <UXLabel>(LabelControlName).xA20_Text_StructStart_Min84Bytes); } catch { return(""); } }
private static int Get_UnspentPoints_Utility() { try { return(int.Parse(UXHelper.GetControl <UXLabel>(A_Enums.UIElements.ParagonPointsAvailable_Utility).xA20_Text_StructStart_Min84Bytes)); } catch { return(0); } }
private static int Get_UnspentPoints_Core() { try { int UnspentPoints = int.Parse(UXHelper.GetControl <UXLabel>(A_Enums.UIElements.ParagonPointsAvailable_Core).xA20_Text_StructStart_Min84Bytes); return(UnspentPoints); } catch { return(0); } }
private static bool isActiveSelectionDisabled() { bool disabled = false; if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_SkillSlot1).x1460_IsDisabled == 1) { disabled = true; } return(disabled); }
private static bool isActivePowerAssigned(int PowerSno) { if (!UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_AssignesSkill).IsVisible()) { return(false); } int Sno = UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_AssignesSkill).GetPowerSnoId(); return(Sno == PowerSno); }
private static int Get_TotalPoints_CurrentTab() { try { string RawText = UXHelper.GetControl <UXLabel>("Root.NormalLayer.Paragon_main.LayoutRoot.ParagonPointSelect.TotalPoints").xA20_Text_StructStart_Min84Bytes; int PointsTotal = int.Parse(Regex.Match(RawText, @"\d+").Groups[0].Value); return(PointsTotal); } catch { return(0); } }
private static void Action_SelectActivePower(int PowerSno) { if (!isSkillsWindowVisible()) { return; } string control = ""; if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Active_SkillSlot1)) { if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_SkillSlot1).GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Active_SkillSlot1; } } if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Active_SkillSlot2)) { if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_SkillSlot2).GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Active_SkillSlot2; } } if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Active_SkillSlot3)) { if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_SkillSlot3).GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Active_SkillSlot3; } } if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Active_SkillSlot4)) { if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_SkillSlot4).GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Active_SkillSlot4; } } if (control != "") { UIRect Slot = A_Tools.T_D3UI.UIElement.getRect(control); A_Tools.InputSimulator.IS_Mouse.LeftClick((int)Slot.Left, (int)Slot.Top, (int)Slot.Right, (int)Slot.Bottom); Thread.Sleep(50); } }
public static bool IsKanaisCube_MainPage_Visible() { try { string Text = "KANAI'S CUBE"; string vendor_mainpage = "Root.NormalLayer.vendor_dialog_mainPage.text_category"; return(UXHelper.GetControl <UXLabel>(vendor_mainpage).xA20_Text_StructStart_Min84Bytes == Text); } catch (Exception) { return(false); } }
public static UIRect getRect(string control) { try { if (A_Collection.Environment.Scene.GameTick > 1 && A_Collection.Environment.Scene.Counter_CurrentFrame != 0) { UXItemsControl _control = UXHelper.GetControl <UXItemsControl>(control); UIRect rect = _control.x468_UIRect.TranslateToClientRect(Engine.Current.VideoPreferences.x0C_DisplayMode.x20_Width, Engine.Current.VideoPreferences.x0C_DisplayMode.x24_Height); return(rect); } return(default(UIRect)); } catch { return(default(UIRect)); } }
private static bool isGambleVendor() { try { string Currency_String = UXHelper.GetControl <UXLabel>("Root.NormalLayer.shop_dialog_mainPage.gold_label").xA20_Text_StructStart_Min84Bytes; if (Currency_String == "Your Available Gold:") { return(false); } return(true); } catch { return(false); } }
private static int GetSpentPoints_OnGivenBonus(int Bonus) // 0-3 { try { string spentPoints = UXHelper.GetControl <UXLabel>(A_Enums.UIElements.ParagonPointSelect_BonusX_Base + Bonus + A_Enums.UIElements.ParagonPointSelect_BonusX_Extension).xA20_Text_StructStart_Min84Bytes; if (spentPoints.Contains("/")) { spentPoints = spentPoints.Split('/')[0]; } int value = int.Parse(spentPoints); return(value); } catch { return(90000); } }
public static UIRect getRect(string control) { try { if (A_Collection.Environment.Scene.GameTick > 1 && A_Collection.Environment.Scene.Counter_CurrentFrame != 0) { UXItemsControl _control = UXHelper.GetControl <UXItemsControl>(control); int video_width = A_Collection.D3Client.Window.D3ClientRect.Width; int video_height = A_Collection.D3Client.Window.D3ClientRect.Height; UIRect rect = _control.x468_UIRect.TranslateToClientRect(video_width, video_height); return(rect); } return(default(UIRect)); } catch { return(default(UIRect)); } }
private static bool tryCheckEnoughShards() { try { string error_notification_uielement = "Root.TopLayer.error_notify.error_text"; string not_enough_shards = "Not enough Blood Shards."; var errortext = UXHelper.GetControl <UXLabel>(error_notification_uielement); if (errortext.xA20_Text_StructStart_Min84Bytes == not_enough_shards && errortext.IsVisible()) { return(false); } return(true); } catch { return(false); } }
private static void get_SkillControls() { try { var _Controls = new List <UXIcon>(); _Controls.Add(UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBar1)); _Controls.Add(UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBar2)); _Controls.Add(UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBar3)); _Controls.Add(UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBar4)); _Controls.Add(UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBarRightclick)); _Controls.Add(UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillHotBarLeftclick)); lock (A_Collection.Skills.UI_Controls.SkillControls) A_Collection.Skills.UI_Controls.SkillControls = _Controls; } catch (Exception e) { A_Handler.Log.Exception.addExceptionLogEntry(e, A_Enums.ExceptionThread.ICollector); } }
private static bool OpenOffense_Tab() { try { while (isParagonWindowVisible()) { if (UXHelper.GetControl <UXLabel>("Root.NormalLayer.Paragon_main.LayoutRoot.ParagonPointSelect.Bonuses.bonus2.Stat").xA20_Text_StructStart_Min84Bytes == "Critical Hit Chance") { return(true); } UIRect Tab = A_Tools.T_D3UI.UIElement.getRect(A_Enums.UIElements.ParagonPointSelect_TabOffense); A_Tools.InputSimulator.IS_Mouse.LeftClick((int)Tab.Left, (int)Tab.Top, (int)Tab.Right, (int)Tab.Bottom); Thread.Sleep(50); } return(false); } catch { return(false); } }
private static int tryGetBloodShardCosts(UIReference lastClickedElement) { try { int bloodShardCosts = 10000; var text = UXHelper.GetControl <UXLabel>(lastClickedElement.x008_Name + ".text_cost").xA20_Text_StructStart_Min84Bytes; var shardstring = Regex.Match(text, @"\d+").Groups[0].Value; if (int.TryParse(shardstring, out bloodShardCosts)) { return(bloodShardCosts); } return(bloodShardCosts); } catch { return(10000); } }
private static string get_ClanTag() { try { string ClanTag = ""; if (!A_Collection.Me.HeroStates.isInGame) { ClanTag = UXHelper.GetControl <UXIcon>(A_Enums.UIElements.menu_portrait_1_text).xA20_Text_StructStart_Min84Bytes; } else { ClanTag = UXHelper.GetControl <UXIcon>(A_Enums.UIElements.portrait_0_text).xA20_Text_StructStart_Min84Bytes; } ClanTag = Regex.Match(ClanTag, @"\<(.*)>").Groups[0].Value; return(ClanTag); } catch { return(""); } }
public temp(string param) { InitializeComponent(); var x = UXHelper.GetControl <UXItemsControl>(param); var Data = GetItems(); Canvas.SetLeft(this, x.x468_UIRect.Left + 270); Canvas.SetTop(this, x.x468_UIRect.Top); int ActorSnoId = Enigma.D3.Engine.Current.Read <int>(x.Address + 0x0E50); int Value = Data.ContainsKey(ActorSnoId) ? Attributes.JewelRank.GetValue(Data[ActorSnoId]) : 0; aa.Text = Value.ToString(); var xe = new System.Text.RegularExpressions.Regex(@"\d+"); var tes = xe.Match(param); aas.Text = tes.NextMatch().Value.ToString(); //aas.Text = ._tilerow"+Row+"._item"+i+".Item" // ObjectDumper.Dump(x, param); }
protected override void OnPulse() { if (ZetaDia.Me == null) { return; } var minimap = UXHelper.GetControl <UXMinimap>(10917491887468455961); var minimapIcons = new List <TrinityMinimapIcon>(); var minimapIconAcdIds = new HashSet <int>(); var playerScreenPosition = minimap.Bounds.Center; var playerPosition = ZetaDia.Me.Position; foreach (var icon in minimap.Items) { var acdId = icon.AcdId; var screenPosition = icon.ScreenPosition; var screenOffset = screenPosition - playerScreenPosition + new Vector2(0, 18); var position = playerPosition - Rotate(FlipX(screenOffset, Vector2.Zero), Vector2.Zero, -135).ToVector3(); minimapIcons.Add(new TrinityMinimapIcon { Name = Regex.Replace(icon.Name, @"\{.*?\}(\s|)+", ""), Id = icon.Id, ScreenPosition = screenPosition, ScreenOffset = screenOffset, Position = position, Distance = position.Distance(playerPosition), AcdId = acdId, }); minimapIconAcdIds.Add(acdId); } MinimapIcons = minimapIcons.OrderBy(i => i.Distance).ToList(); MinimapIconAcdIds = minimapIconAcdIds; }
private static bool ActivePage_ContainsPower(int PowerSno) { if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Active_SkillSlot1)) { if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_SkillSlot1).GetPowerSnoId() == PowerSno) { return(true); } } if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Active_SkillSlot2)) { if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_SkillSlot2).GetPowerSnoId() == PowerSno) { return(true); } } if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Active_SkillSlot3)) { if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_SkillSlot3).GetPowerSnoId() == PowerSno) { return(true); } } if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Active_SkillSlot4)) { if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_SkillSlot4).GetPowerSnoId() == PowerSno) { return(true); } } return(false); }
public void Reload() { Base = UXHelper.GetControl <T>(Name).Address; Pointer = Base + Offset; }
private static void Action_SelectPassivePower(int PowerSno) { string control = ""; if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Passive_Skill1)) { if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Passive_Skill1).GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Passive_Skill1; } else if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Passive_Skill2)) { if (UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Passive_Skill2).GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Passive_Skill2; } else if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Passive_Skill3)) { if ( UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Passive_Skill3).GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Passive_Skill3; } else if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Passive_Skill4)) { if ( UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Passive_Skill4) .GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Passive_Skill4; } else if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Passive_Skill5)) { if ( UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Passive_Skill5) .GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Passive_Skill5; } else if (A_Tools.T_D3UI.UIElement.isVisible(A_Enums.UIElements.SkillPanel_Passive_Skill6)) { if ( UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Passive_Skill6) .GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Passive_Skill6; } else if ( A_Tools.T_D3UI.UIElement.isVisible( A_Enums.UIElements.SkillPanel_Passive_Skill7)) { if ( UXHelper.GetControl <UXIcon>( A_Enums.UIElements.SkillPanel_Passive_Skill7).GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Passive_Skill7; } else if ( A_Tools.T_D3UI.UIElement.isVisible( A_Enums.UIElements.SkillPanel_Passive_Skill8)) { if ( UXHelper.GetControl <UXIcon>( A_Enums.UIElements.SkillPanel_Passive_Skill8) .GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Passive_Skill8; } else if ( A_Tools.T_D3UI.UIElement.isVisible( A_Enums.UIElements.SkillPanel_Passive_Skill9)) { if ( UXHelper.GetControl <UXIcon>( A_Enums.UIElements.SkillPanel_Passive_Skill9) .GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements.SkillPanel_Passive_Skill9; } else if ( A_Tools.T_D3UI.UIElement.isVisible( A_Enums.UIElements .SkillPanel_Passive_Skill10)) { if ( UXHelper.GetControl <UXIcon>( A_Enums.UIElements .SkillPanel_Passive_Skill10) .GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements .SkillPanel_Passive_Skill10; } else if ( A_Tools.T_D3UI.UIElement.isVisible( A_Enums.UIElements .SkillPanel_Passive_Skill11)) { if ( UXHelper.GetControl <UXIcon>( A_Enums.UIElements .SkillPanel_Passive_Skill11) .GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements .SkillPanel_Passive_Skill11; } else if ( A_Tools.T_D3UI.UIElement .isVisible( A_Enums.UIElements .SkillPanel_Passive_Skill12)) { if ( UXHelper.GetControl <UXIcon>( A_Enums.UIElements .SkillPanel_Passive_Skill12) .GetPowerSnoId() == PowerSno) { control = A_Enums.UIElements .SkillPanel_Passive_Skill12; } else if ( A_Tools.T_D3UI.UIElement .isVisible( A_Enums .UIElements .SkillPanel_Passive_Skill13)) { if ( UXHelper .GetControl <UXIcon>( A_Enums .UIElements .SkillPanel_Passive_Skill13) .GetPowerSnoId() == PowerSno) { control = A_Enums .UIElements .SkillPanel_Passive_Skill13; } else if ( A_Tools.T_D3UI .UIElement .isVisible( A_Enums .UIElements .SkillPanel_Passive_Skill14)) { if ( UXHelper .GetControl <UXIcon> (A_Enums .UIElements .SkillPanel_Passive_Skill14) .GetPowerSnoId() == PowerSno) { control = A_Enums .UIElements .SkillPanel_Passive_Skill14; } else if ( A_Tools .T_D3UI .UIElement .isVisible (A_Enums .UIElements .SkillPanel_Passive_Skill15)) { if ( UXHelper .GetControl < UXIcon > (A_Enums .UIElements .SkillPanel_Passive_Skill15) .GetPowerSnoId() == PowerSno) { control = A_Enums .UIElements .SkillPanel_Passive_Skill15; } else if ( A_Tools .T_D3UI .UIElement .isVisible (A_Enums .UIElements .SkillPanel_Passive_Skill16)) { if ( UXHelper .GetControl < UXIcon > (A_Enums .UIElements .SkillPanel_Passive_Skill16) .GetPowerSnoId() == PowerSno) { control = A_Enums .UIElements .SkillPanel_Passive_Skill16; } else if ( A_Tools .T_D3UI .UIElement .isVisible (A_Enums .UIElements .SkillPanel_Passive_Skill17)) { if ( UXHelper .GetControl < UXIcon > (A_Enums .UIElements .SkillPanel_Passive_Skill17) .GetPowerSnoId() == PowerSno) { control = A_Enums .UIElements .SkillPanel_Passive_Skill17; } else if ( A_Tools .T_D3UI .UIElement .isVisible (A_Enums .UIElements .SkillPanel_Passive_Skill18)) { if ( UXHelper .GetControl < UXIcon > (A_Enums .UIElements .SkillPanel_Passive_Skill18) .GetPowerSnoId() == PowerSno) { control = A_Enums .UIElements .SkillPanel_Passive_Skill18; } else if ( A_Tools .T_D3UI .UIElement .isVisible (A_Enums .UIElements .SkillPanel_Passive_Skill19)) { if ( UXHelper .GetControl < UXIcon > (A_Enums .UIElements .SkillPanel_Passive_Skill19) .GetPowerSnoId() == PowerSno) { control = A_Enums .UIElements .SkillPanel_Passive_Skill19; } } } } } } } } } } } } } } } } } } } } UIRect Slot = A_Tools.T_D3UI.UIElement.getRect(control); A_Tools.InputSimulator.IS_Mouse.LeftClick((int)Slot.Left, (int)Slot.Top, (int)Slot.Right, (int)Slot.Bottom); A_Tools.InputSimulator.IS_Mouse.LeftClick((int)Slot.Left, (int)Slot.Top, (int)Slot.Right, (int)Slot.Bottom); Thread.Sleep(100); }
private static void Action_SelectRune(int PowerSno, int RuneId) { if (!isSkillsWindowVisible()) { return; } string control = ""; if (RuneId == -1) { control = A_Enums.UIElements.SkillPanel_Active_RuneSlot0; } else { if ( UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_RuneSlot1_Text) .xA20_Text_StructStart_Min84Bytes == A_Collection.Presets.SkillPowers.AllSkillPowers.First(x => x.PowerSNO == PowerSno) .Runes.First(x => x.RuneIndex == RuneId) .Name) { control = A_Enums.UIElements.SkillPanel_Active_RuneSlot1; } else if ( UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_RuneSlot2_Text) .xA20_Text_StructStart_Min84Bytes == A_Collection.Presets.SkillPowers.AllSkillPowers.First(x => x.PowerSNO == PowerSno) .Runes.First(x => x.RuneIndex == RuneId) .Name) { control = A_Enums.UIElements.SkillPanel_Active_RuneSlot2; } else if ( UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_RuneSlot3_Text) .xA20_Text_StructStart_Min84Bytes == A_Collection.Presets.SkillPowers.AllSkillPowers.First(x => x.PowerSNO == PowerSno) .Runes.First(x => x.RuneIndex == RuneId) .Name) { control = A_Enums.UIElements.SkillPanel_Active_RuneSlot3; } else if ( UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_RuneSlot4_Text) .xA20_Text_StructStart_Min84Bytes == A_Collection.Presets.SkillPowers.AllSkillPowers.First(x => x.PowerSNO == PowerSno) .Runes.First(x => x.RuneIndex == RuneId) .Name) { control = A_Enums.UIElements.SkillPanel_Active_RuneSlot4; } else if ( UXHelper.GetControl <UXIcon>(A_Enums.UIElements.SkillPanel_Active_RuneSlot5_Text) .xA20_Text_StructStart_Min84Bytes == A_Collection.Presets.SkillPowers.AllSkillPowers.First(x => x.PowerSNO == PowerSno) .Runes.First(x => x.RuneIndex == RuneId) .Name) { control = A_Enums.UIElements.SkillPanel_Active_RuneSlot5; } } if (control != "") { UIRect Slot = A_Tools.T_D3UI.UIElement.getRect(control); A_Tools.InputSimulator.IS_Mouse.LeftClick((int)Slot.Left, (int)Slot.Top, (int)Slot.Right, (int)Slot.Bottom); A_Tools.InputSimulator.IS_Mouse.LeftClick((int)Slot.Left, (int)Slot.Top, (int)Slot.Right, (int)Slot.Bottom); Thread.Sleep(50); } }
public void Dump() { ObjectDumper.Dump(UXHelper.GetControl <T>(Name)); }