From 1f504383c37f029cae1a3c6bdd1ea084f3407aa2 Mon Sep 17 00:00:00 2001 From: Dust765 Date: Tue, 21 Sep 2021 13:37:57 +0200 Subject: [PATCH] FIXES_AND_FEATURES --- README.md | 18 +- src/Configuration/Profile.cs | 15 ++ src/Dust765/Autos/AutoRangeDisplay.cs | 284 +++++++++++++++++++++ src/Dust765/Dust765/ClilocTriggers.cs | 5 + src/Dust765/Dust765/UOClassicCombatSelf.cs | 166 +++++++++++- src/Dust765/Shared/ModulesManager.cs | 2 + src/Game/GameObjects/Views/ItemView.cs | 35 ++- src/Game/GameObjects/Views/MultiView.cs | 26 +- src/Game/GameObjects/Views/StaticView.cs | 5 + src/Game/GameObjects/Views/TileView.cs | 5 + src/Game/UI/Gumps/OptionsGump.cs | 151 ++++++++++- src/Network/PacketHandlers.cs | 13 + 12 files changed, 694 insertions(+), 31 deletions(-) create mode 100644 src/Dust765/Autos/AutoRangeDisplay.cs diff --git a/README.md b/README.md index 0a7faebbd..5cf45a2b0 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,17 @@ alt="chat on Discord"> # Project dust765 This project is to address a problem constructed within the toxicity of this community. This is to show the community, open source projects are not meant for cliques and high school drama but rather the expansion of something greater, innovation. -A penny for your thoughts, the adder that prays beneath the rose. +# contact + +Discord: dust765#2787 + # feature showcase -[Video Part 1 on MetaCafe]( https://www.metacafe.com/watch/12177837/project-dust765/) +[Video Part 1 on YouTube](https://youtu.be/074Osj1Fcrg) -[Video Part 2 on MetaCafe](https://www.metacafe.com/watch/12177839/project-dust765-2/) +[Video Part 2 on YouTube](https://youtu.be/P7YBrI3s6ZI) -[Video Part 3 on MetaCafe](https://www.metacafe.com/watch/12177847/project-dust765-3/) +[Video Part 3 on YouTube](https://youtu.be/aqHiiOhx8Q8) # art / hue changes @@ -90,13 +94,15 @@ Ignore stamina check Block Wall of Stone +Block Energy Field + # misc 2 wireframe view hue impassable tiles -transparent / invisible house and items by Z level from player +transparent / invisible house and items by Z level from player and min Z from ground ignore list for circle of transparency (txt file created in your /Data/Client folder) @@ -128,7 +134,7 @@ UI UCC AL - Is an autoloot feature / UI. Only works with GridLoot enabled. You c UI UCC BUFFBAR - Provides a visible timer for next swing and disarm. You can enable lines individually enable them and also lock the UI to prevent moving it. There is a txt in /Data/Client to modify the timers for weapons. It does NOT change calculation with SSI or the like. -UI UCC SELF - Is an Automation feature to bandaid yourself, use pouches and pots and auto rearms a weapon after being disarmed. +UI UCC SELF - Is an Automation feature to bandaid yourself, use pouches, pots and enhanced apple (auto rearms a weapon after being disarmed). Checkboxes on the UI @@ -206,6 +212,8 @@ auto add marker for T-Maps -engage (auto pathfind and attack lasttarget) +-autorange (auto show range indicator when weapon is equipped) + # outlands disabled features due to client enforcement diff --git a/src/Configuration/Profile.cs b/src/Configuration/Profile.cs index 7d3ae4c5f..06f400d5c 100644 --- a/src/Configuration/Profile.cs +++ b/src/Configuration/Profile.cs @@ -349,6 +349,10 @@ internal sealed class Profile public bool BlockWoSFelOnly { get; set; } = false; public uint BlockWoSArt { get; set; } = 1872; public bool BlockWoSArtForceAoS { get; set; } = false; + public bool BlockEnergyF { get; set; } = false; + public bool BlockEnergyFFelOnly { get; set; } = false; + public uint BlockEnergyFArt { get; set; } = 1872; + public bool BlockEnergyFArtForceAoS { get; set; } = false; public bool BlackOutlineStatics { get; set; } = false; // ## BEGIN - END ## // MISC // ## BEGIN - END ## // MACROS @@ -368,6 +372,7 @@ internal sealed class Profile public int TransparentHousesTransparency { get; set; } public bool InvisibleHousesEnabled { get; set; } = false; public int InvisibleHousesZ { get; set; } + public int DontRemoveHouseBelowZ { get; set; } = 5; public bool IgnoreCoTEnabled { get; set; } = false; public bool ShowDeathOnWorldmap { get; set; } = false; // ## BEGIN - END ## // MISC2 @@ -452,6 +457,10 @@ internal sealed class Profile // ## BEGIN - END ## // SELF public bool UOClassicCombatSelf { get; set; } = false; public Point UOClassicCombatSelfLocation { get; set; } = new Point(25, 25); + public bool UOClassicCombatSelf_ColoredPouches { get; set; } = false; + public ushort UOClassicCombatSelf_ColoredPouchesColor { get; set; } = 38; + public bool UOClassicCombatSelf_AutoEApple { get; set; } = true; + public uint UOClassicCombatSelf_EAppleCooldown { get; set; } = 31000; public bool UOClassicCombatSelf_AutoBandage { get; set; } = true; public bool UOClassicCombatSelf_AutoPouche { get; set; } = true; public bool UOClassicCombatSelf_AutoCurepot { get; set; } = true; @@ -517,6 +526,12 @@ internal sealed class Profile public string LobbyIP { get; set; } = "127.0.0.1"; public string LobbyPort { get; set; } = "2596"; // ## BEGIN - END ## // LOBBY + // ## BEGIN - END ## // AUTOS + public bool AutoRangeDisplayAlways { get; set; } = false; + public bool AutoRangeDisplayActive { get; set; } = false; + public int AutoRangeDisplayActiveRange { get; set; } = 10; + public ushort AutoRangeDisplayHue { get; set; } = 0x0074; + // ## BEGIN - END ## // AUTOS // ## BEGIN - END ## // BASICSETUP public bool ShowJournalClient { get; set; } = true; public bool ShowJournalObjects { get; set; } = true; diff --git a/src/Dust765/Autos/AutoRangeDisplay.cs b/src/Dust765/Autos/AutoRangeDisplay.cs new file mode 100644 index 000000000..1f669a3c0 --- /dev/null +++ b/src/Dust765/Autos/AutoRangeDisplay.cs @@ -0,0 +1,284 @@ +#region license + +// Copyright (C) 2020 project dust765 +// +// This project is an alternative client for the game Ultima Online. +// The goal of this is to develop a lightweight client considering +// new technologies. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#endregion +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading; + +using ClassicUO.Configuration; +using ClassicUO.Game.GameObjects; +using ClassicUO.Dust765.Shared; +using ClassicUO.Game; +using ClassicUO.Game.Data; +using ClassicUO.Game.Managers; +using ClassicUO.Utility; + +namespace ClassicUO.Dust765.Autos +{ + internal class AutoRangeDisplay + { + public static bool IsEnabled { get; set; } + public static Thread a_AutoRangeThread; + + private static Item _tempItemInLeftHand; //temp var + private static Item _tempItemInRightHand; + + //WEAPONS LIST + public static readonly List WeaponsList = new List(); + + //##AutoRangeDisplay Toggle##// + public static void Toggle() + { + GameActions.Print(String.Format("Auto AutoRangeDisplay:{0}abled", (IsEnabled = !IsEnabled) == true ? "En" : "Dis"), 70); + } + + //##Register Command and Perform Checks##// + public static void Initialize() + { + CommandManager.Register("autorange", args => Toggle()); + + LoadFile(); + + a_AutoRangeThread = new Thread(new ThreadStart(DoAutoRange)) + { + IsBackground = true + }; + + if (ProfileManager.CurrentProfile.AutoRangeDisplayAlways) + { + IsEnabled = true; + } + } + + //##Default AutoRangeDisplay Status on GameLoad##// + static AutoRangeDisplay() + { + if (ProfileManager.CurrentProfile.AutoRangeDisplayAlways) + { + GameActions.Print(String.Format("Auto AutoRangeDisplay:Enabled"), 70); + IsEnabled = true; + } + else + IsEnabled = false; + } + + //##Perform AutoRangeDisplay Update on Toggle/Player Death##// + public static void Update() + { + if (!IsEnabled) // || World.Player.IsDead) + DisableAutoRangeDisplay(); + + if (IsEnabled) + EnableAutoRangeDisplay(); + } + + //##Enable AutoRangeDisplay##// + private static void EnableAutoRangeDisplay() + { + if (!a_AutoRangeThread.IsAlive) + { + a_AutoRangeThread = new Thread(new ThreadStart(DoAutoRange)) + { + IsBackground = true + }; + a_AutoRangeThread.Start(); + } + } + + //##Disable AutoRangeDisplay##// + private static void DisableAutoRangeDisplay() + { + if (a_AutoRangeThread.IsAlive) + { + a_AutoRangeThread.Abort(); + } + } + + //##Perform AutoRangeDisplay Checks##// + private static void DoAutoRange() + { + DateTime dateTime = DateTime.Now; + while (true) + { + + //if (World.Player == null || World.Player.IsDead) + // DisableAutoRangeDisplay(); + + if (World.Player == null || World.Player.IsDead || ProfileManager.CurrentProfile == null) + return; + + _tempItemInLeftHand = null; + _tempItemInRightHand = null; + _tempItemInLeftHand = World.Player.FindItemByLayer(Layer.OneHanded); + _tempItemInRightHand = World.Player.FindItemByLayer(Layer.TwoHanded); + + int range = 0; + int index = 0; + + if (_tempItemInRightHand != null) + { + index = WeaponsList.IndexOf(_tempItemInRightHand.Graphic); + + if (index != 0) + { + range = WeaponsList[index + 1]; + + ProfileManager.CurrentProfile.AutoRangeDisplayActive = true; + ProfileManager.CurrentProfile.AutoRangeDisplayActiveRange = range; + } else + { + ProfileManager.CurrentProfile.AutoRangeDisplayActive = false; + } + } + if (_tempItemInLeftHand != null) + { + index = WeaponsList.IndexOf(_tempItemInLeftHand.Graphic); + + if (index != 0) + { + range = WeaponsList[index + 1]; + + ProfileManager.CurrentProfile.AutoRangeDisplayActive = true; + ProfileManager.CurrentProfile.AutoRangeDisplayActiveRange = range; + } + else + { + ProfileManager.CurrentProfile.AutoRangeDisplayActive = false; + } + } + + if (_tempItemInRightHand == null && _tempItemInLeftHand == null) + ProfileManager.CurrentProfile.AutoRangeDisplayActive = false; + + Thread.Sleep(50); + } + } + + //##Perform Ninja Trigger##// + private static void NinjaItem() + { + + } + + //##Perform Message##// + public static void Print(string message, MessageColor color = MessageColor.Default) + { + GameActions.Print(message, (ushort) color, MessageType.System, 1); + } + + //GET WEAPON SPEED FROM FILE OR CREATE IT + public static void LoadFile() + { + string path = Path.Combine(CUOEnviroment.ExecutablePath, "Data", "Client"); + + if (!Directory.Exists(path)) + Directory.CreateDirectory(path); + + string autorange = Path.Combine(path, "autorange.txt"); + + if (!File.Exists(autorange)) + { + using (StreamWriter writer = new StreamWriter(autorange)) + { + //0x13B1, 0x13B2 bow / 0x26C2, 0x26CC comp / 0x26C3, 0x26CD repeating / 0x27A5, 0x27F0 yumi / 0xF4F, 0xF50 xbow / 0x13FC, 0x13FD heavy xbow + //0x2D1E, 0x2D2A elven comp, 0x2D1F, 0x2D2B magical shortbow + ushort[] weapons = { + + 0x13B1, 0x13B2, 0x26C2, 0x26CC, 0x26C3, 0x26CD, 0x27A5, 0x27F0, + 0xF4F, 0xF50, 0x13FC, 0x13FD, 0x2D1E, 0x2D2A, 0x2D1F, 0x2D2B + }; + + for (int i = 0; i < weapons.Length; i++) + { + ushort graphic = weapons[i]; + ushort flag = 10; + + switch (graphic) + { + case 0x13B1: + case 0x13B2: + flag = 10; + break; + + case 0x26C2: + case 0x26CC: + flag = 10; + break; + + case 0x26C3: + case 0x26CD: + flag = 7; + break; + + case 0x27A5: + case 0x27F0: + flag = 10; + break; + + case 0xF4F: + case 0xF50: + flag = 8; + break; + + case 0x13FC: + case 0x13FD: + flag = 8; + break; + + case 0x2D1E: + case 0x2D2A: + flag = 10; + break; + + case 0x2D1F: + case 0x2D2B: + flag = 10; + break; + } + + writer.WriteLine($"{graphic}={flag}"); + } + } + } + + TextFileParser autorangeParser = new TextFileParser(File.ReadAllText(autorange), new[] { ' ', '\t', ',', '=' }, new[] { '#', ';' }, new[] { '"', '"' }); + + while (!autorangeParser.IsEOF()) + { + var ss = autorangeParser.ReadTokens(); + if (ss != null && ss.Count != 0) + { + if (ushort.TryParse(ss[0], out ushort graphic)) + { + WeaponsList.Add(graphic); + } + + if (ushort.TryParse(ss[1], out ushort f)) + { + WeaponsList.Add(f); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Dust765/Dust765/ClilocTriggers.cs b/src/Dust765/Dust765/ClilocTriggers.cs index 12bc34728..e8bdfe16c 100644 --- a/src/Dust765/Dust765/ClilocTriggers.cs +++ b/src/Dust765/Dust765/ClilocTriggers.cs @@ -213,6 +213,11 @@ public void OnMessage(string text, ushort hue, string name, bool isunicode = tru UOClassicCombatSelf?.ClilocTriggerFSFullStamina(); return; } + if (text.StartsWith("A tasty bite of the enchanted apple lifts all curses from your soul.")) + { + UOClassicCombatSelf?.ClilocTriggerEApple(); + return; + } } public void OnCliloc(uint cliloc) diff --git a/src/Dust765/Dust765/UOClassicCombatSelf.cs b/src/Dust765/Dust765/UOClassicCombatSelf.cs index b1e8c7779..53289a69c 100644 --- a/src/Dust765/Dust765/UOClassicCombatSelf.cs +++ b/src/Dust765/Dust765/UOClassicCombatSelf.cs @@ -46,10 +46,10 @@ internal class UOClassicCombatSelf : Gump private readonly Label _title; //UI - private Label _uiTimerAutoBandage, _uiTimerAutoPouche, _uiTimerAutoCurepot, _uiTimerAutoHealpot, _uiTimerAutoRefreshpot, _uiTimerAutoRearmAfterDisarmed, _uiTimerStrengthpot, _uiTimerDexpot; - private Label _uiTextAutoBandage, _uiTextAutoPouche, _uiTextAutoCurepot, _uiTextAutoHealpot, _uiTextAutoRefreshpot; - private Checkbox _uiCboxAutoBandage, _uiCboxAutoPouche, _uiCboxAutoCurepot, _uiCboxAutoHealpot, _uiCboxAutoRefreshpot, _uiCboxRearmAfterPot, _uiCboxAutoRearmAfterDisarmed, _uiCboxConsiderHidden, _uiCboxConsiderSpells, _uiCboxIsDuelingOrTankMage; //NEW _uiCboxIsDuelingOrTankMage - private TextureControl _uiIconAutoBandage, _uiIconAutoPouche, _uiIconAutoCurepot, _uiIconAutoHealpot, _uiIconAutoRefreshpot, _uiIconStrengthpot, _uiIconDexpot, _uiIconAutoRearmAfterDisarmed, _uiIconConsiderHidden, _uiIconConsiderSpells; + private Label _uiTimerAutoBandage, _uiTimerAutoPouche, _uiTimerAutoCurepot, _uiTimerAutoHealpot, _uiTimerAutoRefreshpot, _uiTimerAutoEApple, _uiTimerAutoRearmAfterDisarmed, _uiTimerStrengthpot, _uiTimerDexpot; + private Label _uiTextAutoBandage, _uiTextAutoPouche, _uiTextAutoCurepot, _uiTextAutoHealpot, _uiTextAutoRefreshpot, _uiTextAutoEApple; + private Checkbox _uiCboxAutoBandage, _uiCboxAutoPouche, _uiCboxAutoCurepot, _uiCboxAutoHealpot, _uiCboxAutoRefreshpot, _uiCboxAutoEApple, _uiCboxRearmAfterPot, _uiCboxAutoRearmAfterDisarmed, _uiCboxConsiderHidden, _uiCboxConsiderSpells, _uiCboxIsDuelingOrTankMage; //NEW _uiCboxIsDuelingOrTankMage + private TextureControl _uiIconAutoBandage, _uiIconAutoPouche, _uiIconAutoCurepot, _uiIconAutoHealpot, _uiIconAutoRefreshpot, _uiIconAutoEApple, _uiIconStrengthpot, _uiIconDexpot, _uiIconAutoRearmAfterDisarmed, _uiIconConsiderHidden, _uiIconConsiderSpells; private Label _uiTextGotDisarmed; //, _uiTextGotHamstrung; private Label _uiTimerGotDisarmed; //, _uiTimerGotHamstrung; private Label _uiTextTimerDoDisarm; //, _uiTextTimerDoHamstring; @@ -91,6 +91,11 @@ internal class UOClassicCombatSelf : Gump private uint _timerAutoRefreshpot { get; set; } //AUTOREFRESH + //AUTOEAPPLE + private uint _tickStartAutoEApple; + private uint _timerAutoEApple { get; set; } + //AUTOEAPPLE + //REARM WEP AFTER POT private Item _tempItemInLeftHand; //temp var, wep that was in hand for re equip private Item _tempItemInRightHand; @@ -143,6 +148,12 @@ internal class UOClassicCombatSelf : Gump //MACROPOT //OPTIONS TO VARS + private bool UCCS_ColoredPouches = ProfileManager.CurrentProfile.UOClassicCombatSelf_ColoredPouches; + private ushort UCCS_ColoredPouchesColor = ProfileManager.CurrentProfile.UOClassicCombatSelf_ColoredPouchesColor; + + private bool UCCS_AutoEApple = ProfileManager.CurrentProfile.UOClassicCombatSelf_AutoEApple; + private uint UCCS_EAppleCooldown = ProfileManager.CurrentProfile.UOClassicCombatSelf_EAppleCooldown; + private bool UCCS_AutoBandage = ProfileManager.CurrentProfile.UOClassicCombatSelf_AutoBandage; private bool UCCS_AutoPouche = ProfileManager.CurrentProfile.UOClassicCombatSelf_AutoPouche; @@ -221,7 +232,7 @@ public UOClassicCombatSelf() : base(0, 0) //MAIN CONSTRUCT Width = 95; - Height = 280; + Height = 330; Add(_background = new AlphaBlendControl() { @@ -450,6 +461,48 @@ public UOClassicCombatSelf() : base(0, 0) Add(_uiCboxAutoRefreshpot); //AUTOREFRESHPOT + //AUTOEAPPLE + _uiIconAutoEApple = new TextureControl() + { + AcceptMouseInput = false + }; + + _uiIconAutoEApple.Texture = ArtLoader.Instance.GetTexture(0x2fd8); //apple + _uiIconAutoEApple.Hue = 0x0488; + _uiIconAutoEApple.X = -13; + _uiIconAutoEApple.Y = _uiIconAutoRefreshpot.Bounds.Bottom - 19; + _uiIconAutoEApple.Width = _uiIconAutoEApple.Texture.Width; + _uiIconAutoEApple.Height = _uiIconAutoEApple.Texture.Height; + Add(_uiIconAutoEApple); + + _uiTimerAutoEApple = new Label($"{_timerAutoEApple}", true, HUE_FONTS_YELLOW, 0, 1, FontStyle.BlackBorder) + { + X = _uiIconAutoEApple.Bounds.Right, + Y = _uiIconAutoEApple.Y + 7 + }; + Add(_uiTimerAutoEApple); + + _uiTextAutoEApple = new Label("OFF", true, HUE_FONTS_RED, 0, 1, FontStyle.BlackBorder) + { + X = _uiTimerAutoEApple.Bounds.Right, + Y = _uiIconAutoEApple.Y + 7 + }; + Add(_uiTextAutoEApple); + + _uiCboxAutoEApple = new Checkbox(0x00D2, 0x00D3, "", FONT, HUE_FONT) + { + X = _uiTextAutoEApple.Bounds.Right, + Y = _uiIconAutoEApple.Y + 8, + IsChecked = ProfileManager.CurrentProfile.UOClassicCombatSelf_AutoEApple + }; + _uiCboxAutoEApple.ValueChanged += (sender, e) => + { + ProfileManager.CurrentProfile.UOClassicCombatSelf_AutoEApple = _uiCboxAutoEApple.IsChecked; + UpdateVars(); + }; + Add(_uiCboxAutoEApple); + //AUTOEAPPLE + //STRENGTH _uiIconStrengthpot = new TextureControl() { @@ -459,7 +512,7 @@ public UOClassicCombatSelf() : base(0, 0) _uiIconStrengthpot.Texture = ArtLoader.Instance.GetTexture(0xF09); //strength _uiIconStrengthpot.Hue = 0; _uiIconStrengthpot.X = -13; - _uiIconStrengthpot.Y = _uiTextAutoRefreshpot.Bounds.Bottom; + _uiIconStrengthpot.Y = _uiIconAutoEApple.Bounds.Bottom; _uiIconStrengthpot.Width = _uiIconStrengthpot.Texture.Width; _uiIconStrengthpot.Height = _uiIconStrengthpot.Texture.Height; Add(_uiIconStrengthpot); @@ -738,6 +791,9 @@ protected override void OnDragEnd(int x, int y) public void UpdateVars() { //UPDATE VARS + UCCS_ColoredPouches = ProfileManager.CurrentProfile.UOClassicCombatSelf_ColoredPouches; + UCCS_ColoredPouchesColor = ProfileManager.CurrentProfile.UOClassicCombatSelf_ColoredPouchesColor; + UCCS_AutoBandage = ProfileManager.CurrentProfile.UOClassicCombatSelf_AutoBandage; UCCS_AutoPouche = ProfileManager.CurrentProfile.UOClassicCombatSelf_AutoPouche; @@ -752,6 +808,9 @@ public void UpdateVars() UCCS_AutoRefreshpot = ProfileManager.CurrentProfile.UOClassicCombatSelf_AutoRefreshpot; UCCS_RefreshpotCooldown = ProfileManager.CurrentProfile.UOClassicCombatSelf_RefreshpotCooldown; + UCCS_AutoEApple = ProfileManager.CurrentProfile.UOClassicCombatSelf_AutoEApple; + UCCS_EAppleCooldown = ProfileManager.CurrentProfile.UOClassicCombatSelf_EAppleCooldown; + UCCS_RearmAfterPot = ProfileManager.CurrentProfile.UOClassicCombatSelf_RearmAfterPot; UCCS_IsDuelingOrTankMage = ProfileManager.CurrentProfile.UOClassicCombatSelf_IsDuelingOrTankMage; @@ -794,6 +853,7 @@ public void UpdateVars() _uiCboxAutoCurepot.IsChecked = UCCS_AutoCurepot; _uiCboxAutoHealpot.IsChecked = UCCS_AutoHealpot; _uiCboxAutoRefreshpot.IsChecked = UCCS_AutoRefreshpot; + _uiCboxAutoEApple.IsChecked = UCCS_AutoEApple; _uiCboxIsDuelingOrTankMage.IsChecked = UCCS_IsDuelingOrTankMage; _uiCboxRearmAfterPot.IsChecked = UCCS_RearmAfterPot; @@ -852,6 +912,16 @@ public void UpdateVars() _uiTextAutoRefreshpot.Text = "OFF"; _uiTextAutoRefreshpot.Hue = HUE_FONTS_RED; } + if (UCCS_AutoEApple) + { + _uiTextAutoEApple.Text = "ON"; + _uiTextAutoEApple.Hue = HUE_FONTS_GREEN; + } + else + { + _uiTextAutoEApple.Text = "OFF"; + _uiTextAutoEApple.Hue = HUE_FONTS_RED; + } //ON OFF STATUS } public override void Dispose() @@ -883,6 +953,10 @@ private void UpdateUI() _uiTimerAutoRefreshpot.Hue = HUE_FONTS_GREEN; else _uiTimerAutoRefreshpot.Hue = HUE_FONTS_YELLOW; + if (_timerAutoEApple == 0) + _uiTimerAutoEApple.Hue = HUE_FONTS_GREEN; + else + _uiTimerAutoEApple.Hue = HUE_FONTS_YELLOW; if (_timerStrengthpot == 0) _uiTimerStrengthpot.Hue = HUE_FONTS_GREEN; else @@ -1020,6 +1094,19 @@ private void UpdateCounters() } _uiTimerAutoRefreshpot.Text = $"{_timerAutoRefreshpot}"; + //AUTOEAPPLE + if (_tickStartAutoEApple != 0) + { + if (_tickStartAutoEApple < Time.Ticks) + _timerAutoEApple = (UCCS_EAppleCooldown / 1000) - (Time.Ticks - _tickStartAutoEApple) / 1000; + } + if (_tickStartAutoEApple != 0 && (_tickStartAutoEApple + UCCS_EAppleCooldown) <= Time.Ticks) + { + _tickStartAutoEApple = 0; + _timerAutoEApple = 0; + } + _uiTimerAutoEApple.Text = $"{_timerAutoEApple}"; + //MACROSTRENGTH if (_tickStartStrengthpot != 0) { @@ -1213,7 +1300,7 @@ private void MainAutomation() if (UCCS_ConsiderHidden && World.Player.IsHidden) return; - if (UCCS_ConsiderSpells && GameCursor._spellTime >= 1) + if (UCCS_ConsiderSpells && GameCursor._spellTime >= 1 || UCCS_ConsiderSpells && TargetManager.IsTargeting) return; //RNG (NEW RNG EVERY 3 SEC) @@ -1406,13 +1493,64 @@ private void MainAutomation() } } + + //ENCHANTED APPLE + if (/*_lastMacroPot == 0xF0B || */UCCS_AutoEApple && World.Player.IsYellowHits) //cannot eat apple when paralyzed? !World.Player.IsParalyzed + { + //no disarm check needed + + var apple = World.Player.FindItemByGraphic(0x2fd8); + if (apple != null) + { + if ((_tickLastActionTime + UCCS_ActionCooldown) <= Time.Ticks && (_tickStartAutoEApple + UCCS_EAppleCooldown) <= Time.Ticks) + { + //RNG + if (_doneWaitRNG == false) + { + _waitRNG = true; + _tickWaitRNG = Time.Ticks; + return; + } + + GameActions.DoubleClick(apple); + GameActions.Print("UCC Self: Apple Enhanced Used."); + _tickLastActionTime = Time.Ticks; + //_tickStartAutoEApple = Time.Ticks; //triggered from cliloc as you can fail + _lastMacroPot = 0; + + //RNG + _doneWaitRNG = false; + } + } + else + { + UCCS_AutoEApple = false; + ProfileManager.CurrentProfile.UOClassicCombatSelf_AutoEApple = false; + + UpdateVars(); + + _lastMacroPot = 0; + } + } + //AUTOPOUCHE if (UCCS_AutoPouche) { if (World.Player.IsParalyzed) { + Item backpack = World.Player.FindItemByLayer(Layer.Backpack); - var redpouche = backpack.FindItem(0x0E79, 0x0026); + Item redpouche = null; + + if (UCCS_ColoredPouches) + { + //redpouche = backpack.FindItem(0x0E79, 0x0026); + redpouche = backpack.FindItem(0x0E79, UCCS_ColoredPouchesColor); + } + else + { + redpouche = World.Player.FindItemByGraphic(0x0E79); + } if (redpouche != null) { @@ -2231,6 +2369,18 @@ public void ClilocTriggerGotHamstrung() _tickGotHamstrung = Time.Ticks; } */ + public void ClilocTriggerEApple() + { + //if (UCCS_ClilocTriggers == false) + // return; + + //TRIGGER FROM "A tasty bite of the enchanted apple lifts all curses from your soul." MESSAGE + + _tickStartAutoEApple = Time.Ticks; + //_timerAutoEApple = 0; + + _tickLastActionTime = Time.Ticks; + } #endregion //FAILSAFE CLILOC TRIGGERS #region FAILSAFE CLILOC TRIGGERS diff --git a/src/Dust765/Shared/ModulesManager.cs b/src/Dust765/Shared/ModulesManager.cs index 5239f2c74..fabe3c420 100644 --- a/src/Dust765/Shared/ModulesManager.cs +++ b/src/Dust765/Shared/ModulesManager.cs @@ -31,6 +31,7 @@ internal class ModulesManager { public static void Load() { + AutoRangeDisplay.Initialize(); //AutoRangeDisplay// AutoMeditate.Initialize(); //AUTOMEDITATE##// AutoEngage.Initialize(); //AUTOENGAGE##// AutoMimic.Initialize(); //##AUTO MIMIC##// @@ -58,6 +59,7 @@ public static void Unload() /// public static void OnWorldUpdate( double totalMS ) { + AutoRangeDisplay.Update(); //AutoRangeDisplay// AutoMeditate.Update(); //AUTOMEDITATE##// AutoEngage.Update(); //AUTOENGAGE##// Defender.Update(totalMS); diff --git a/src/Game/GameObjects/Views/ItemView.cs b/src/Game/GameObjects/Views/ItemView.cs index 43dcbf669..37cceb474 100644 --- a/src/Game/GameObjects/Views/ItemView.cs +++ b/src/Game/GameObjects/Views/ItemView.cs @@ -108,6 +108,20 @@ public override bool Draw(UltimaBatcher2D batcher, int posX, int posY, ref Vecto } } } + if (ProfileManager.CurrentProfile.BlockEnergyF) + { + if (StaticFilters.IsEnergyField(Graphic) || Graphic == ProfileManager.CurrentProfile.BlockEnergyFArt) + { + if (ProfileManager.CurrentProfile.BlockEnergyFFelOnly && World.MapIndex != 0) + { + TileDataLoader.Instance.StaticData[Graphic].IsImpassable = false; + } + else + { + TileDataLoader.Instance.StaticData[Graphic].IsImpassable = true; + } + } + } // ## BEGIN - END ## // MISC if (OnGround) @@ -207,13 +221,24 @@ public override bool Draw(UltimaBatcher2D batcher, int posX, int posY, ref Vecto // ## BEGIN - END ## // MISC2 if (ProfileManager.CurrentProfile.TransparentHousesEnabled) { - if ((Z - World.Player.Z) > ProfileManager.CurrentProfile.TransparentHousesZ) - hueVec.Z = (float) ProfileManager.CurrentProfile.TransparentHousesTransparency / 10; + GameObject tile = World.Map.GetTile(X, Y); + + if (tile != null) + { + if ((Z - World.Player.Z) > ProfileManager.CurrentProfile.TransparentHousesZ && (Z - tile.Z) > ProfileManager.CurrentProfile.DontRemoveHouseBelowZ) + hueVec.Z = (float) ProfileManager.CurrentProfile.TransparentHousesTransparency / 10; + } } - if (ProfileManager.CurrentProfile.InvisibleHousesEnabled && (Z - World.Player.Z) > ProfileManager.CurrentProfile.InvisibleHousesZ) + if (ProfileManager.CurrentProfile.InvisibleHousesEnabled) { - //DO NOT DRAW IT - return false; + GameObject tile = World.Map.GetTile(X, Y); + + if (tile != null) + { + if ((Z - World.Player.Z) > ProfileManager.CurrentProfile.InvisibleHousesZ && (Z - tile.Z) > ProfileManager.CurrentProfile.DontRemoveHouseBelowZ) + //DO NOT DRAW IT + return false; + } } // ## BEGIN - END ## // MISC2 diff --git a/src/Game/GameObjects/Views/MultiView.cs b/src/Game/GameObjects/Views/MultiView.cs index 570d5a322..bb5662c5e 100644 --- a/src/Game/GameObjects/Views/MultiView.cs +++ b/src/Game/GameObjects/Views/MultiView.cs @@ -133,6 +133,11 @@ public override bool Draw(UltimaBatcher2D batcher, int posX, int posY, ref Vecto hueVec.Y = 1; } } + if (ProfileManager.CurrentProfile.AutoRangeDisplayActive && Distance == ProfileManager.CurrentProfile.AutoRangeDisplayActiveRange) + { + hueVec.X = ProfileManager.CurrentProfile.AutoRangeDisplayHue; + hueVec.Y = 1; + } if (ProfileManager.CurrentProfile.PreviewFields) { if (CombatCollection.MultiFieldPreview(this)) @@ -164,13 +169,24 @@ public override bool Draw(UltimaBatcher2D batcher, int posX, int posY, ref Vecto // ## BEGIN - END ## // MISC2 if (ProfileManager.CurrentProfile.TransparentHousesEnabled) { - if ((Z - World.Player.Z) > ProfileManager.CurrentProfile.TransparentHousesZ) - hueVec.Z = (float) ProfileManager.CurrentProfile.TransparentHousesTransparency / 10; + GameObject tile = World.Map.GetTile(X, Y); + + if (tile != null) + { + if ((Z - World.Player.Z) > ProfileManager.CurrentProfile.TransparentHousesZ && (Z - tile.Z) > ProfileManager.CurrentProfile.DontRemoveHouseBelowZ) + hueVec.Z = (float) ProfileManager.CurrentProfile.TransparentHousesTransparency / 10; + } } - if (ProfileManager.CurrentProfile.InvisibleHousesEnabled && (Z - World.Player.Z) > ProfileManager.CurrentProfile.InvisibleHousesZ) + if (ProfileManager.CurrentProfile.InvisibleHousesEnabled) { - //DO NOT DRAW IT - return false; + GameObject tile = World.Map.GetTile(X, Y); + + if (tile != null) + { + if ((Z - World.Player.Z) > ProfileManager.CurrentProfile.InvisibleHousesZ && (Z - tile.Z) > ProfileManager.CurrentProfile.DontRemoveHouseBelowZ) + //DO NOT DRAW IT + return false; + } } // ## BEGIN - END ## // MISC2 diff --git a/src/Game/GameObjects/Views/StaticView.cs b/src/Game/GameObjects/Views/StaticView.cs index a21a3c9ac..3796dda97 100644 --- a/src/Game/GameObjects/Views/StaticView.cs +++ b/src/Game/GameObjects/Views/StaticView.cs @@ -110,6 +110,11 @@ public override bool Draw(UltimaBatcher2D batcher, int posX, int posY, ref Vecto hueVec.Y = 1; } } + if (ProfileManager.CurrentProfile.AutoRangeDisplayActive && Distance == ProfileManager.CurrentProfile.AutoRangeDisplayActiveRange) + { + hueVec.X = ProfileManager.CurrentProfile.AutoRangeDisplayHue; + hueVec.Y = 1; + } if (ProfileManager.CurrentProfile.PreviewFields) { if (CombatCollection.StaticFieldPreview(this)) diff --git a/src/Game/GameObjects/Views/TileView.cs b/src/Game/GameObjects/Views/TileView.cs index 6220fda1a..da81f7928 100644 --- a/src/Game/GameObjects/Views/TileView.cs +++ b/src/Game/GameObjects/Views/TileView.cs @@ -94,6 +94,11 @@ public override bool Draw(UltimaBatcher2D batcher, int posX, int posY, ref Vecto hueVec.Y = 1; } } + if (ProfileManager.CurrentProfile.AutoRangeDisplayActive && Distance == ProfileManager.CurrentProfile.AutoRangeDisplayActiveRange) + { + hueVec.X = ProfileManager.CurrentProfile.AutoRangeDisplayHue; + hueVec.Y = 1; + } if (ProfileManager.CurrentProfile.PreviewFields) { if (CombatCollection.LandFieldPreview(this)) diff --git a/src/Game/UI/Gumps/OptionsGump.cs b/src/Game/UI/Gumps/OptionsGump.cs index 04a386447..a0cec3916 100644 --- a/src/Game/UI/Gumps/OptionsGump.cs +++ b/src/Game/UI/Gumps/OptionsGump.cs @@ -205,15 +205,15 @@ internal class OptionsGump : Gump private HSliderBar _multipleUnderlinesSelfPartyTransparency; // ## BEGIN - END ## // OLDHEALTLINES // ## BEGIN - END ## // MISC - private Checkbox _offscreenTargeting, _SpecialSetLastTargetCliloc, _blackOutlineStatics, _ignoreStaminaCheck, _blockWoS, _blockWoSFelOnly, _lockWoSArtForceAoS; - private InputField _SpecialSetLastTargetClilocText, _blockWoSArt; + private Checkbox _offscreenTargeting, _SpecialSetLastTargetCliloc, _blackOutlineStatics, _ignoreStaminaCheck, _blockWoS, _blockWoSFelOnly, _blockWoSArtForceAoS, _blockEnergyF, _blockEnergyFFelOnly, _blockEnergyFArtForceAoS; + private InputField _SpecialSetLastTargetClilocText, _blockWoSArt, _blockEnergyFArt; // ## BEGIN - END ## // MISC // ## BEGIN - END ## // MACROS private HSliderBar _lastTargetRange; // ## BEGIN - END ## // MACROS // ## BEGIN - END ## // MISC2 private Checkbox _wireframeView, _hueImpassableView, _transparentHouses, _invisibleHouses, _ignoreCoT, _showDeathOnWorldmap; - private HSliderBar _transparentHousesZ, _transparentHousesTransparency, _invisibleHousesZ; + private HSliderBar _transparentHousesZ, _transparentHousesTransparency, _invisibleHousesZ, _dontRemoveHouseBelowZ; // ## BEGIN - END ## // MISC2 // ## BEGIN - END ## // NAMEOVERHEAD private Checkbox _showHPLineInNOH; @@ -240,8 +240,8 @@ internal class OptionsGump : Gump private InputField _uccDisarmStrikeCooldown, _uccDisarmAttemptCooldown, _uccDisarmedCooldown; // ## BEGIN - END ## // UCCSETTINGS // ## BEGIN - END ## // SELF - private Checkbox _uccEnableSelf, _uccBandiesPoison, _uccNoRefreshPotAfterHamstrung; - private InputField _uccActionCooldown, _uccPoucheCooldown, _uccCurepotCooldown, _uccHealpotCooldown, _uccRefreshpotCooldown, _uccWaitForTarget, _uccBandiesHPTreshold, _uccCurepotHPTreshold, _uccHealpotHPTreshold, _uccRefreshpotStamTreshold, _uccAutoRearmAfterDisarmedCooldown, _uccNoRefreshPotAfterHamstrungCooldown, _uccStrengthPotCooldown, _uccDexPotCooldown, _uccRNGMin, _uccRNGMax; + private Checkbox _uccEnableSelf, _uccColoredPouches, _uccBandiesPoison, _uccNoRefreshPotAfterHamstrung; + private InputField _uccColoredPouchesColor, _uccActionCooldown, _uccPoucheCooldown, _uccCurepotCooldown, _uccHealpotCooldown, _uccRefreshpotCooldown, _uccWaitForTarget, _uccEAppleCooldown, _uccBandiesHPTreshold, _uccCurepotHPTreshold, _uccHealpotHPTreshold, _uccRefreshpotStamTreshold, _uccAutoRearmAfterDisarmedCooldown, _uccNoRefreshPotAfterHamstrungCooldown, _uccStrengthPotCooldown, _uccDexPotCooldown, _uccRNGMin, _uccRNGMax; private Checkbox _uccClilocTrigger, _uccMacroTrigger; // ## BEGIN - END ## // SELF // ## BEGIN - END ## // ADVMACROS @@ -251,6 +251,8 @@ internal class OptionsGump : Gump // ## BEGIN - END ## // ADVMACROS // ## BEGIN - END ## // AUTOMATIONS private Checkbox _autoWorldmapMarker; + private Checkbox _autoRangeDisplayAlways; + private ClickableColorBox _autoRangeDisplayHue; // ## BEGIN - END ## // AUTOMATIONS // ## BEGIN - END ## // OUTLANDS /* @@ -3800,8 +3802,36 @@ private void BuildDust() _blockWoSArt.SetText(_currentProfile.BlockWoSArt.ToString()); startY += _blockWoSArt.Height + 2; - section7.Add(_lockWoSArtForceAoS = AddCheckBox(null, "Force WoS to Art above (AoS only?) and hue 945", _currentProfile.BlockWoSArtForceAoS, startX, startY)); - startY += _lockWoSArtForceAoS.Height + 2; + section7.Add(_blockWoSArtForceAoS = AddCheckBox(null, "Force WoS to Art above (AoS only?) and hue 945", _currentProfile.BlockWoSArtForceAoS, startX, startY)); + startY += _blockWoSArtForceAoS.Height + 2; + + section7.Add(_blockEnergyF = AddCheckBox(null, "Block Energy Field", _currentProfile.BlockEnergyF, startX, startY)); + startY += _blockEnergyF.Height + 2; + + section7.Add(_blockEnergyFFelOnly = AddCheckBox(null, "Block Energy Field Fel only", _currentProfile.BlockEnergyFFelOnly, startX, startY)); + startY += _blockEnergyFFelOnly.Height + 2; + + section7.Add(AddLabel(null, "Energy Field Art (-info -> DisplayedGraphic): ", startX, startY)); + section7.Add + ( + _blockEnergyFArt = AddInputField + ( + null, + startX, startY, + 50, + TEXTBOX_HEIGHT, + null, + 80, + false, + true, + 50000 + ) + ); + _blockEnergyFArt.SetText(_currentProfile.BlockEnergyFArt.ToString()); + startY += _blockEnergyFArt.Height + 2; + + section7.Add(_blockEnergyFArtForceAoS = AddCheckBox(null, "Force EnergyF to Art above (AoS only?) and hue 293", _currentProfile.BlockEnergyFArtForceAoS, startX, startY)); + startY += _blockEnergyFArtForceAoS.Height + 2; // ## BEGIN - END ## // MISC // ## BEGIN - END ## // MISC2 SettingsSection section8 = AddSettingsSection(box, "-----MISC2-----"); @@ -3835,6 +3865,10 @@ private void BuildDust() section8.Add(_invisibleHousesZ = AddHSlider(null, 1, 100, _currentProfile.InvisibleHousesZ, startX, startY, 200)); startY += _invisibleHousesZ.Height + 2; + section8.Add(AddLabel(null, "Dont make Invisible or Transparent below (Z level)", startX, startY)); + section8.Add(_dontRemoveHouseBelowZ = AddHSlider(null, 1, 100, _currentProfile.DontRemoveHouseBelowZ, startX, startY, 200)); + startY += _dontRemoveHouseBelowZ.Height + 2; + section8.Add(_ignoreCoT = AddCheckBox(null, "Enable ignorelist for circle of transparency:", _currentProfile.IgnoreCoTEnabled, startX, startY)); startY += _ignoreCoT.Height + 2; @@ -4170,6 +4204,16 @@ private void Build765() "greater heal will be cast on you or party member \n " + "Condition: Poisoned and HP smaller than random between 65 - 80 \n " + "Condition: HP smaller than random between 40-70)", startX, startY)); + + // + section5.Add(AddLabel(null, "-autorange (show range depending on archery equipment)", startX, startY)); + section5.Add(AddLabel(null, "(configure range for every ranged weapon in the autorange.txt file!)", startX, startY)); + section5.Add(_autoRangeDisplayAlways = AddCheckBox(null, "always have -autorange ON", _currentProfile.AutoRangeDisplayAlways, startX, startY)); + startY += _autoRangeDisplayAlways.Height + 2; + section5.Add(_autoRangeDisplayHue = AddColorBox(null, startX, startY, _currentProfile.AutoRangeDisplayHue, "")); + startY += _autoRangeDisplayHue.Height + 2; + section5.AddRight(AddLabel(null, "Hue", 0, 0), 2); + // // ## BEGIN - END ## // AUTOMATIONS // ## BEGIN - END ## // OUTLANDS /* @@ -4694,6 +4738,29 @@ private void BuildMods() startY = section8.Bounds.Bottom + 40; + + section9.Add(_uccColoredPouches = AddCheckBox(null, "Are trapped pouches colored from server?", _currentProfile.UOClassicCombatSelf_ColoredPouches, startX, startY)); + startY += _uccColoredPouches.Height + 2; + + section9.Add(AddLabel(null, "Color (decimal not hex): ", startX, startY)); + + section9.Add + ( + _uccColoredPouchesColor = AddInputField + ( + null, + startX, startY, + 50, + TEXTBOX_HEIGHT, + null, + 80, + false, + true, + 90000 + ) + ); + _uccColoredPouchesColor.SetText(_currentProfile.UOClassicCombatSelf_ColoredPouchesColor.ToString()); + //COOLDOWN SETTINGS section9.Add(AddLabel(null, "-----SETTINGS (COOLDOWNS)-----", startX, startY)); @@ -4811,6 +4878,25 @@ private void BuildMods() ); _uccWaitForTarget.SetText(_currentProfile.UOClassicCombatSelf_WaitForTarget.ToString()); + section9.Add(AddLabel(null, "Enhanced Apple Cooldown (ms): ", startX, startY)); + + section9.Add + ( + _uccEAppleCooldown = AddInputField + ( + null, + startX, startY, + 50, + TEXTBOX_HEIGHT, + null, + 80, + false, + true, + 90000 + ) + ); + _uccEAppleCooldown.SetText(_currentProfile.UOClassicCombatSelf_EAppleCooldown.ToString()); + //TRESHOLD SETTINGS SettingsSection section10 = AddSettingsSection(box, "-----SETTINGS (TRESHOLDS)-----"); section10.Y = section9.Bounds.Bottom + 40; @@ -5898,7 +5984,7 @@ private void Apply() _currentProfile.IgnoreStaminaCheck = _ignoreStaminaCheck.IsChecked; _currentProfile.SpecialSetLastTargetCliloc = _SpecialSetLastTargetCliloc.IsChecked; _currentProfile.SpecialSetLastTargetClilocText = _SpecialSetLastTargetClilocText.Text; - _currentProfile.BlockWoSArtForceAoS = _lockWoSArtForceAoS.IsChecked; + _currentProfile.BlockWoSArtForceAoS = _blockWoSArtForceAoS.IsChecked; _currentProfile.BlockWoSArt = uint.Parse(_blockWoSArt.Text); if (_currentProfile.BlockWoS != _blockWoS.IsChecked) { @@ -5928,6 +6014,49 @@ private void Apply() } _currentProfile.BlockWoSFelOnly = _blockWoSFelOnly.IsChecked; } + _currentProfile.BlockEnergyFArtForceAoS = _blockEnergyFArtForceAoS.IsChecked; + _currentProfile.BlockEnergyFArt = uint.Parse(_blockEnergyFArt.Text); + if (_currentProfile.BlockEnergyF != _blockEnergyF.IsChecked) + { + if (_blockEnergyF.IsChecked) + { + for (int i = 0; i < 31; i++) + { + //0x3946 to 0x3964 / 14662 to 14692 + TileDataLoader.Instance.StaticData[0x3946 + i].IsImpassable = true; + } + TileDataLoader.Instance.StaticData[_currentProfile.BlockEnergyFArt].IsImpassable = true; + } + else + { + for (int i = 0; i < 31; i++) + { + TileDataLoader.Instance.StaticData[0x3946 + i].IsImpassable = false; + } + TileDataLoader.Instance.StaticData[_currentProfile.BlockEnergyFArt].IsImpassable = false; + } + _currentProfile.BlockEnergyF = _blockEnergyF.IsChecked; + } + if (_currentProfile.BlockEnergyFFelOnly != _blockEnergyFFelOnly.IsChecked) + { + if (_blockEnergyFFelOnly.IsChecked && World.MapIndex == 0) + { + for (int i = 0; i < 31; i++) + { + TileDataLoader.Instance.StaticData[0x3946 + i].IsImpassable = true; + } + TileDataLoader.Instance.StaticData[_currentProfile.BlockEnergyFArt].IsImpassable = true; + } + else + { + for (int i = 0; i < 31; i++) + { + TileDataLoader.Instance.StaticData[0x3946 + i].IsImpassable = false; + } + TileDataLoader.Instance.StaticData[_currentProfile.BlockEnergyFArt].IsImpassable = false; + } + _currentProfile.BlockEnergyFFelOnly = _blockEnergyFFelOnly.IsChecked; + } // ## BEGIN - END ## // MISC // ## BEGIN - END ## // MACROS _currentProfile.LastTargetRange = _lastTargetRange.Value; @@ -5941,6 +6070,7 @@ private void Apply() _currentProfile.TransparentHousesTransparency = _transparentHousesTransparency.Value; _currentProfile.InvisibleHousesEnabled = _invisibleHouses.IsChecked; _currentProfile.InvisibleHousesZ = _invisibleHousesZ.Value; + _currentProfile.DontRemoveHouseBelowZ = _dontRemoveHouseBelowZ.Value; _currentProfile.IgnoreCoTEnabled = _ignoreCoT.IsChecked; _currentProfile.ShowDeathOnWorldmap = _showDeathOnWorldmap.IsChecked; // ## BEGIN - END ## // MISC2 @@ -6099,12 +6229,15 @@ private void Apply() _currentProfile.UOClassicCombatSelf_DisarmedCooldown = uint.Parse(_uccDisarmedCooldown.Text); // ## BEGIN - END ## // UCCSETTINGS // ## BEGIN - END ## // SELF + _currentProfile.UOClassicCombatSelf_ColoredPouches = _uccColoredPouches.IsChecked; + _currentProfile.UOClassicCombatSelf_ColoredPouchesColor = Convert.ToUInt16(_uccColoredPouchesColor.Text); _currentProfile.UOClassicCombatSelf_ActionCooldown = uint.Parse(_uccActionCooldown.Text); _currentProfile.UOClassicCombatSelf_PoucheCooldown = uint.Parse(_uccPoucheCooldown.Text); _currentProfile.UOClassicCombatSelf_CurepotCooldown = uint.Parse(_uccCurepotCooldown.Text); _currentProfile.UOClassicCombatSelf_HealpotCooldown = uint.Parse(_uccHealpotCooldown.Text); _currentProfile.UOClassicCombatSelf_RefreshpotCooldown = uint.Parse(_uccRefreshpotCooldown.Text); _currentProfile.UOClassicCombatSelf_WaitForTarget = uint.Parse(_uccWaitForTarget.Text); + _currentProfile.UOClassicCombatSelf_EAppleCooldown = uint.Parse(_uccEAppleCooldown.Text); _currentProfile.UOClassicCombatSelf_BandiesHPTreshold = uint.Parse(_uccBandiesHPTreshold.Text); _currentProfile.UOClassicCombatSelf_BandiesPoison = _uccBandiesPoison.IsChecked; @@ -6176,6 +6309,8 @@ private void Apply() // ## BEGIN - END ## // ADVMACROS // ## BEGIN - END ## // AUTOMATIONS _currentProfile.AutoWorldmapMarker = _autoWorldmapMarker.IsChecked; + _currentProfile.AutoRangeDisplayAlways = _autoRangeDisplayAlways.IsChecked; + _currentProfile.AutoRangeDisplayHue = _autoRangeDisplayHue.Hue; // ## BEGIN - END ## // AUTOMATIONS // ## BEGIN - END ## // OUTLANDS /* diff --git a/src/Network/PacketHandlers.cs b/src/Network/PacketHandlers.cs index 20b131f43..49d46712c 100644 --- a/src/Network/PacketHandlers.cs +++ b/src/Network/PacketHandlers.cs @@ -5750,6 +5750,19 @@ private static void UpdateItemSA(ref StackDataReader p) graphic = Convert.ToUInt16(ProfileManager.CurrentProfile.BlockWoSArt); hue = 945; } + if (ProfileManager.CurrentProfile.BlockEnergyFArtForceAoS) + { + if (graphic >= 14662 && graphic <= 14692) //Regular EField //graphic >= 0x3946 && graphic <= 0x3964 + { + graphic = Convert.ToUInt16(ProfileManager.CurrentProfile.BlockEnergyFArt); + hue = 293; + } + if (graphic == 10408 && hue == 0x0125) //Razor CE - WallStaticID - Filters/WallStaticFilter.cs / Razor Enhanced - WallStaticID - Filters.cs / (hue: 0x0125) + { + graphic = Convert.ToUInt16(ProfileManager.CurrentProfile.BlockEnergyFArt); + hue = 293; + } + } // ## BEGIN - END ## // MISC if (serial != World.Player)