├── .github └── FUNDING.yml ├── QuestAWAY ├── res │ └── icon.png ├── Atk2DAreaMap.cs ├── QuestAWAY.json ├── packages.lock.json ├── Configuration.cs ├── Bitmask.cs ├── Gui │ ├── ConfigGui.cs │ ├── DevSettings.cs │ ├── ZoneSettings.cs │ └── MainSettings.cs ├── MemoryReplacer.cs ├── QuestAWAY.csproj ├── PluginAddressResolver.cs ├── QuestAWAY.cs └── Static.cs ├── .gitmodules ├── CONTRIBUTING.md ├── QuestAWAY.sln ├── .gitattributes └── .gitignore /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | ko_fi: nightmarexiv 4 | -------------------------------------------------------------------------------- /QuestAWAY/res/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andyvorld/QuestAWAY/master/QuestAWAY/res/icon.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ECommons"] 2 | path = ECommons 3 | url = https://github.com/NightmareXIV/ECommons 4 | -------------------------------------------------------------------------------- /QuestAWAY/Atk2DAreaMap.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using FFXIVClientStructs.FFXIV.Component.GUI; 3 | 4 | namespace QuestAWAY; 5 | 6 | [StructLayout(LayoutKind.Explicit)] 7 | public unsafe struct Atk2DAreaMap 8 | { 9 | [FieldOffset(0x70)] public AtkComponentNode* AtkComponentNode; 10 | } -------------------------------------------------------------------------------- /QuestAWAY/QuestAWAY.json: -------------------------------------------------------------------------------- 1 | { 2 | "Author": "NightmareXIV, Chalkos", 3 | "Name": "QuestAWAY", 4 | "InternalName": "QuestAWAY", 5 | "Description": "Removes unwanted icons from your map. Not only quests, any icons.", 6 | "ApplicableVersion": "any", 7 | "RepoUrl": "https://github.com/NightmareXIV/QuestAWAY", 8 | "LoadPriority": 0, 9 | "Punchline": "Removes unwanted icons from your map." 10 | } -------------------------------------------------------------------------------- /QuestAWAY/packages.lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dependencies": { 4 | "net7.0-windows7.0": { 5 | "DalamudPackager": { 6 | "type": "Direct", 7 | "requested": "[2.1.12, )", 8 | "resolved": "2.1.12", 9 | "contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg==" 10 | }, 11 | "ecommons": { 12 | "type": "Project" 13 | } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /QuestAWAY/Configuration.cs: -------------------------------------------------------------------------------- 1 | using Dalamud.Configuration; 2 | using Dalamud.Plugin; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace QuestAWAY 10 | { 11 | [Serializable] 12 | class Configuration : IPluginConfiguration 13 | { 14 | public int Version { get; set; } = 1; 15 | 16 | public bool Enabled = true; 17 | public bool Minimap = true; 18 | public bool Bigmap = true; 19 | public bool QuickEnable = true; 20 | public HashSet HiddenTextures = new(); 21 | public string CustomPathes = ""; 22 | public bool HideFateCircles = false; 23 | public bool HideAreaMarkers = false; 24 | public bool AetheryteInFront = false; 25 | public Dictionary ZoneSettings = new(); 26 | 27 | public void Save() 28 | { 29 | Svc.PluginInterface.SavePluginConfig(this); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /QuestAWAY/Bitmask.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace QuestAWAY 8 | { 9 | class Bitmask 10 | { 11 | public static bool IsBitSet(short b, byte pos) 12 | { 13 | return (b & (1 << pos)) != 0; 14 | } 15 | 16 | public static void SetBit(ref short b, byte pos) 17 | { 18 | b |= (short)(1 << pos); 19 | } 20 | 21 | public static void ResetBit(ref short b, byte pos) 22 | { 23 | b &= (short)~(1 << pos); 24 | } 25 | public static bool IsBitSet(uint b, byte pos) 26 | { 27 | return (b & (1 << pos)) != 0; 28 | } 29 | 30 | public static void SetBit(ref uint b, byte pos) 31 | { 32 | b |= (uint)(1 << pos); 33 | } 34 | 35 | public static void ResetBit(ref uint b, byte pos) 36 | { 37 | b &= (uint)~(1 << pos); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /QuestAWAY/Gui/ConfigGui.cs: -------------------------------------------------------------------------------- 1 | using Dalamud.Interface; 2 | using Dalamud.Interface.Windowing; 3 | using ECommons.ImGuiMethods; 4 | using ImGuiNET; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Diagnostics; 8 | using System.Linq; 9 | using System.Numerics; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | using static QuestAWAY.QuestAWAY; 13 | 14 | namespace QuestAWAY.Gui 15 | { 16 | internal class ConfigGui : Window 17 | { 18 | public ConfigGui() : base("QuestAWAY configuration") 19 | { 20 | KoFiButton.IsOfficialPlugin = true; 21 | } 22 | 23 | public override void OnClose() 24 | { 25 | base.OnClose(); 26 | P.cfg.Save(); 27 | } 28 | 29 | public override void PreDraw() 30 | { 31 | base.PreDraw(); 32 | ImGui.SetNextWindowSize(new Vector2(500, 500), ImGuiCond.FirstUseEver); 33 | } 34 | 35 | public override void Draw() 36 | { 37 | P.reprocessAreaMap = true; 38 | P.reprocessNaviMap = true; 39 | KoFiButton.DrawRight(); 40 | ImGuiEx.EzTabBar("questaway", true, 41 | ("Global settings", MainSettings.Draw, null, true), 42 | ("Per-zone settings", ZoneSettings.Draw, null, true), 43 | ("Developer functions", DevSettings.Draw, null, true) 44 | ); 45 | 46 | 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Thank you for considering contributing to this project! 2 | ## Before you proceed with pull request, please consider the following: 3 | ### Do not refactor 4 | Even if current code is unoptimal, please avoid refactoring existing code. 5 | - Do not replace opcodes with hooks 6 | - Do not replace static data with dynamic data 7 | - Do not optimize utility functions 8 | - Do not replace if trees with switch statements 9 | - Do not change accessibility modifiers 10 | - Do not replace manual ImGui.Begin calls with windows 11 | If you know how to significantly improve something, please create an issue describing method of improvement instead. 12 | 13 | ### Keep your additions in uniform with the rest of the code 14 | Even if it's not the most optimal, please consider doing this. If you're adding commands, UI elements or IPC methods in addition to the existing ones, please ensure that they are coded similar to existing ones. If you're adding new functions, please ensure that they are working similar to existing ones. 15 | 16 | ### If possible, keep additions contained 17 | If you would add new functions, please create own classes for them and keep them contained. The plugin should not become dependent on added functions; the plugin's ability to work should not be harmed if added functions become unavailable and have to be disabled. 18 | 19 | ### No configuration resets 20 | Users should not experience any partial or full configuration resets upon updating. 21 | 22 | ## Most welcomed changes 23 | Please feel free to: 24 | - Correct spelling mistakes 25 | - Adjust UI components sizes if you find out that they are not properly rendered on some screens 26 | -------------------------------------------------------------------------------- /QuestAWAY/MemoryReplacer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Dalamud; 5 | using Dalamud.Logging; 6 | 7 | namespace QuestAWAY; 8 | 9 | public class MemoryReplacer : IDisposable 10 | { 11 | public IntPtr Address { get; private set; } = IntPtr.Zero; 12 | private readonly byte[] newBytes; 13 | private readonly byte[] oldBytes; 14 | public bool IsEnabled { get; private set; } = false; 15 | public bool IsValid => Address != IntPtr.Zero; 16 | 17 | public MemoryReplacer(string sig, byte[] bytes, bool startEnabled = false) 18 | { 19 | var addr = IntPtr.Zero; 20 | try 21 | { 22 | addr = Svc.SigScanner.ScanText(sig); 23 | } 24 | catch 25 | { 26 | PluginLog.LogError($"Failed to find signature {sig}"); 27 | } 28 | 29 | if (addr == IntPtr.Zero) return; 30 | 31 | Address = addr; 32 | newBytes = bytes; 33 | SafeMemory.ReadBytes(addr, bytes.Length, out oldBytes); 34 | 35 | if (startEnabled) 36 | Enable(); 37 | } 38 | 39 | public void Enable() 40 | { 41 | if (!IsValid) return; 42 | SafeMemory.WriteBytes(Address, newBytes); 43 | IsEnabled = true; 44 | } 45 | 46 | public void Disable() 47 | { 48 | if (!IsValid) return; 49 | SafeMemory.WriteBytes(Address, oldBytes); 50 | IsEnabled = false; 51 | } 52 | 53 | public void Toggle() 54 | { 55 | if (!IsEnabled) 56 | Enable(); 57 | else 58 | Disable(); 59 | } 60 | 61 | public void Dispose() 62 | { 63 | if (IsEnabled) 64 | Disable(); 65 | } 66 | } -------------------------------------------------------------------------------- /QuestAWAY.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31612.314 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuestAWAY", "QuestAWAY\QuestAWAY.csproj", "{493B237C-6D78-4A83-AE28-EC29A2AF02A7}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECommons", "ECommons\ECommons\ECommons.csproj", "{A91A8928-1427-42CC-B1D3-CF975CDDF0C8}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|x64 = Debug|x64 14 | Release|Any CPU = Release|Any CPU 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {493B237C-6D78-4A83-AE28-EC29A2AF02A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {493B237C-6D78-4A83-AE28-EC29A2AF02A7}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {493B237C-6D78-4A83-AE28-EC29A2AF02A7}.Debug|x64.ActiveCfg = Debug|x64 21 | {493B237C-6D78-4A83-AE28-EC29A2AF02A7}.Debug|x64.Build.0 = Debug|x64 22 | {493B237C-6D78-4A83-AE28-EC29A2AF02A7}.Release|Any CPU.ActiveCfg = Release|x64 23 | {493B237C-6D78-4A83-AE28-EC29A2AF02A7}.Release|Any CPU.Build.0 = Release|x64 24 | {493B237C-6D78-4A83-AE28-EC29A2AF02A7}.Release|x64.ActiveCfg = Release|x64 25 | {493B237C-6D78-4A83-AE28-EC29A2AF02A7}.Release|x64.Build.0 = Release|x64 26 | {A91A8928-1427-42CC-B1D3-CF975CDDF0C8}.Debug|Any CPU.ActiveCfg = Debug|x64 27 | {A91A8928-1427-42CC-B1D3-CF975CDDF0C8}.Debug|Any CPU.Build.0 = Debug|x64 28 | {A91A8928-1427-42CC-B1D3-CF975CDDF0C8}.Debug|x64.ActiveCfg = Debug|x64 29 | {A91A8928-1427-42CC-B1D3-CF975CDDF0C8}.Debug|x64.Build.0 = Debug|x64 30 | {A91A8928-1427-42CC-B1D3-CF975CDDF0C8}.Release|Any CPU.ActiveCfg = Release|x64 31 | {A91A8928-1427-42CC-B1D3-CF975CDDF0C8}.Release|Any CPU.Build.0 = Release|x64 32 | {A91A8928-1427-42CC-B1D3-CF975CDDF0C8}.Release|x64.ActiveCfg = Release|x64 33 | {A91A8928-1427-42CC-B1D3-CF975CDDF0C8}.Release|x64.Build.0 = Release|x64 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {C0736393-10CF-44E8-8EE6-CC2A66BD535A} 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /QuestAWAY/Gui/DevSettings.cs: -------------------------------------------------------------------------------- 1 | using ImGuiNET; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.Linq; 6 | using System.Numerics; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace QuestAWAY.Gui 11 | { 12 | internal class DevSettings 13 | { 14 | internal static void Draw() 15 | { 16 | ImGui.Checkbox("[dev] Enable texture collecting", ref P.collect); 17 | if (P.collect) 18 | { 19 | if (ImGui.Button("Reset")) 20 | { 21 | P.texSet.Clear(); 22 | } 23 | ImGui.SameLine(); 24 | ImGui.Checkbox("Display textures", ref P.collectDisplay); 25 | if (P.collectDisplay) 26 | { 27 | foreach (var e in P.texSet) 28 | { 29 | ImGuiDrawImage(e); 30 | ImGui.SameLine(); 31 | if (!Static.MapIcons.Contains(e)) ImGui.PushStyleColor(ImGuiCol.Button, 0xff0000ff); 32 | if (ImGui.Button("Copy: " + e)) 33 | { 34 | ImGui.SetClipboardText(e); 35 | } 36 | if (!Static.MapIcons.Contains(e)) ImGui.PopStyleColor(); 37 | } 38 | } 39 | var s = string.Join("\n", P.texSet); 40 | ImGui.InputTextMultiline("##QADATA", ref s, 1000000, new Vector2(300f, 100f)); 41 | } 42 | 43 | ImGui.Separator(); 44 | if (ImGui.Button("Clear hidden textures list" + (ImGui.GetIO().KeyCtrl ? "" : " (hold ctrl and click)")) && ImGui.GetIO().KeyCtrl) 45 | { 46 | P.cfg.HiddenTextures.Clear(); 47 | P.BuildHiddenByteSet(); 48 | } 49 | ImGui.Checkbox("Profiling", ref P.profiling); 50 | if (P.profiling) 51 | { 52 | ImGui.Text("Total time: " + P.totalTime); 53 | ImGui.Text("Total ticks: " + P.totalTicks); 54 | ImGui.Text("Tick avg: " + P.totalTime / (float)P.totalTicks); 55 | ImGui.Text("MS avg: " + P.totalTime / (float)P.totalTicks / Stopwatch.Frequency * 1000 + " ms"); 56 | if (ImGui.Button("Reset##SW")) 57 | { 58 | P.totalTicks = 0; 59 | P.totalTime = 0; 60 | } 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /QuestAWAY/QuestAWAY.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NightmareXIV 5 | 2.0.0.4 6 | 7 | 8 | 9 | net7.0-windows 10 | x64 11 | latest 12 | true 13 | false 14 | true 15 | false 16 | bin\$(Configuration)\ 17 | CS1591 18 | true 19 | true 20 | 21 | 22 | 23 | 24 | true 25 | 26 | 27 | 28 | $(appdata)\XIVLauncher\addon\Hooks\dev\ 29 | 30 | 31 | 32 | 33 | $(DalamudLibPath)Newtonsoft.Json.dll 34 | False 35 | 36 | 37 | $(DalamudLibPath)Dalamud.dll 38 | False 39 | 40 | 41 | $(DalamudLibPath)ImGui.NET.dll 42 | False 43 | 44 | 45 | $(DalamudLibPath)Lumina.dll 46 | False 47 | 48 | 49 | $(DalamudLibPath)Lumina.Excel.dll 50 | False 51 | 52 | 53 | $(DalamudLibPath)FFXIVClientStructs.dll 54 | False 55 | 56 | 57 | $(DalamudLibPath)ImGuiScene.dll 58 | False 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | Always 77 | 78 | 79 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /QuestAWAY/PluginAddressResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Dalamud.Game; 3 | using ECommons.Logging; 4 | 5 | namespace QuestAWAY; 6 | 7 | internal class PluginAddressResolver 8 | { 9 | // to update this sig: 10 | // breakpoint Component::GUI::AtkResNode_SetVisibility with parameters (x, 1) 11 | // where x is an AtkResNode (Multipurpose Component Node) currently visible on the map (use dalamud to copy the ptr) 12 | // check the stack to see where it is being called 13 | // should be from a function that ends with: 14 | // Component::GUI::AtkResNode_SetVisibility(v15, 1); 15 | // Component::GUI::AtkResNode_SetRotationDegrees(v15); 16 | // sub_1405517F0(*a1); 17 | // sig that function 18 | private const string MapAreaSetVisibilityAndRotation = "E8 ?? ?? ?? ?? 66 0F 6E 44 24 ?? 48 8B CE"; 19 | 20 | // to update this sig: 21 | // breakpoint Component__GUI__AtkTooltipManager_ShowTooltip 22 | // slowly mouseover an icon on the minimap and nothing else, check the stack for the caller 23 | // in IDA search for references, only has 1 in patch 6.1, appears in a condition 24 | // on the first branch of that condition is an offset (a1 + 14872) 25 | // check what writes to that address, mouseover the minimap and take the code address that does a write everytime the mouse moves 26 | // in that code address there should be something like "result = sub_141030B80(a1, *a2, a2[1]);" , in 6.1 it is the first function call 27 | // sig that sub_141030B80 28 | private const string NaviMapOnMouseMove = "E8 ?? ?? ?? ?? 8B F0 3B 87"; 29 | 30 | // in NaviMapOnMouseMove function, there's 3 ifs. this function is the second condition in all of them 31 | private const string CheckAtkCollisionNodeIntersect = "E8 ?? ?? ?? ?? 84 C0 75 B9"; 32 | 33 | // to update this sig: 34 | // from AreaMap ReceiveEvent, enter the function called when a2==5 and a3==20 35 | // the the only unnamed function there 36 | private const string AreaMapOnMouseMove = "48 8B C4 53 56 48 83 EC 78"; 37 | 38 | private const string AddonAreaMapOnUpdate = "48 8B C4 48 89 48 08 55 57"; 39 | private const string AddonAreaMapOnRefresh = "4C 8B DC 55 56 41 56 41 57 49 8D 6B A1"; 40 | private const string AddonNaviMapOnUpdate = "48 8B C4 55 48 81 EC ?? ?? ?? ?? F6 81"; 41 | 42 | // change 0F 95 SETNZ into 0F 94 SETZ 43 | public const string AreaMapCtrl = "0F 95 C0 3A 83 ?? ?? ?? ?? 74 ?? 83 8B"; 44 | 45 | public IntPtr AddonAreaMapOnUpdateAddress { get; private set; } 46 | public IntPtr AddonNaviMapOnUpdateAddress { get; private set; } 47 | public IntPtr NaviMapOnMouseMoveAddress { get; private set; } 48 | public IntPtr CheckAtkCollisionNodeIntersectAddress { get; private set; } 49 | public IntPtr AreaMapOnMouseMoveAddress { get; private set; } 50 | 51 | /// 52 | internal void Setup64Bit(ISigScanner scanner) 53 | { 54 | AddonAreaMapOnUpdateAddress = scanner.ScanText(AddonAreaMapOnUpdate); 55 | AddonNaviMapOnUpdateAddress = scanner.ScanText(AddonNaviMapOnUpdate); 56 | NaviMapOnMouseMoveAddress = scanner.ScanText(NaviMapOnMouseMove); 57 | CheckAtkCollisionNodeIntersectAddress = scanner.ScanText(CheckAtkCollisionNodeIntersect); 58 | AreaMapOnMouseMoveAddress = scanner.ScanText(AreaMapOnMouseMove); 59 | 60 | PluginLog.Verbose("===== QuestAWAY ====="); 61 | PluginLog.Verbose($"{nameof(AddonAreaMapOnUpdateAddress)} {AddonAreaMapOnUpdateAddress:X}"); 62 | PluginLog.Verbose($"{nameof(AddonNaviMapOnUpdateAddress)} {AddonNaviMapOnUpdateAddress:X}"); 63 | PluginLog.Verbose($"{nameof(NaviMapOnMouseMoveAddress)} {NaviMapOnMouseMoveAddress:X}"); 64 | PluginLog.Verbose($"{nameof(CheckAtkCollisionNodeIntersectAddress)} {CheckAtkCollisionNodeIntersectAddress:X}"); 65 | PluginLog.Verbose($"{nameof(AreaMapOnMouseMoveAddress)} {AreaMapOnMouseMoveAddress:X}"); 66 | } 67 | } -------------------------------------------------------------------------------- /QuestAWAY/Gui/ZoneSettings.cs: -------------------------------------------------------------------------------- 1 | using Dalamud.Interface.Colors; 2 | using ECommons; 3 | using ECommons.ImGuiMethods; 4 | using ImGuiNET; 5 | using Lumina.Excel.GeneratedSheets; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace QuestAWAY.Gui 13 | { 14 | internal class ZoneSettings 15 | { 16 | internal static uint zoneConfigId = 0; 17 | static bool OnlyCreated = false; 18 | static string Filter = ""; 19 | 20 | internal static void Draw() 21 | { 22 | ImGuiEx.SetNextItemFullWidth(); 23 | if (ImGui.BeginCombo("##zSelector", zoneConfigId == 0 ? "Select zone..." : TerritoryName.GetTerritoryName(zoneConfigId))) 24 | { 25 | ImGui.SetNextItemWidth(150f); 26 | ImGui.InputTextWithHint("##fltr", "Filter...", ref Filter, 50); 27 | ImGui.SameLine(); 28 | 29 | ImGui.Checkbox("Only zones with custom settings created", ref OnlyCreated); 30 | 31 | ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudViolet); 32 | if(Svc.ClientState.LocalPlayer != null && ImGui.Selectable($"Current: {TerritoryName.GetTerritoryName(Svc.ClientState.TerritoryType)}")) 33 | { 34 | zoneConfigId = Svc.ClientState.TerritoryType; 35 | } 36 | ImGui.PopStyleColor(); 37 | foreach(var x in Svc.Data.GetExcelSheet()) 38 | { 39 | var col = P.cfg.ZoneSettings.ContainsKey(x.RowId); 40 | if(col) 41 | { 42 | ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.HealerGreen); 43 | } 44 | if ((Filter == string.Empty || TerritoryName.GetTerritoryName(x.RowId).Contains(Filter, StringComparison.OrdinalIgnoreCase)) && (!OnlyCreated || col) && x.PlaceName.Value.Name.ToString() != "") 45 | { 46 | if (ImGui.Selectable(TerritoryName.GetTerritoryName(x.RowId))) 47 | { 48 | zoneConfigId = x.RowId; 49 | } 50 | if(zoneConfigId == x.RowId && ImGui.IsWindowAppearing()) 51 | { 52 | ImGui.SetScrollHereY(); 53 | } 54 | } 55 | if (col) 56 | { 57 | ImGui.PopStyleColor(); 58 | } 59 | } 60 | ImGui.EndCombo(); 61 | } 62 | if (P.cfg.ZoneSettings.TryGetValue(zoneConfigId, out var zoneSettings)) 63 | { 64 | ImGuiEx.Text(ImGuiColors.DalamudYellow, $"You are editing profile for zone {TerritoryName.GetTerritoryName(zoneConfigId)}."); 65 | ImGui.SameLine(); 66 | if(ImGui.SmallButton("Delete settings") && ImGui.GetIO().KeyCtrl) 67 | { 68 | P.cfg.ZoneSettings.Remove(zoneConfigId); 69 | P.ClientState_TerritoryChanged(Svc.ClientState.TerritoryType); 70 | } 71 | ImGuiEx.Tooltip("Hold CTRL and click"); 72 | if (zoneConfigId != Svc.ClientState.TerritoryType) 73 | { 74 | ImGuiEx.Text(ImGuiColors.DalamudRed, "This is different zone than you are currently in."); 75 | } 76 | MainSettings.DrawProfile(zoneSettings); 77 | } 78 | else 79 | { 80 | ImGuiEx.Text($"For selected zone there are no custom settings. Global settings are used."); 81 | if(zoneConfigId != 0 && ImGui.Button("Create custom settings")) 82 | { 83 | P.cfg.ZoneSettings.Add(zoneConfigId, new()); 84 | P.ClientState_TerritoryChanged(Svc.ClientState.TerritoryType); 85 | } 86 | } 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /QuestAWAY/Gui/MainSettings.cs: -------------------------------------------------------------------------------- 1 | using Dalamud.Interface; 2 | using Dalamud.Interface.Colors; 3 | using Dalamud.Interface.Utility; 4 | using ECommons.ImGuiMethods; 5 | using ImGuiNET; 6 | using Newtonsoft.Json; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Numerics; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace QuestAWAY.Gui 15 | { 16 | internal class MainSettings 17 | { 18 | internal static void Draw() 19 | { 20 | ImGuiEx.Text(ImGuiColors.DalamudYellow, "You are editing global profile."); 21 | if (P.cfg.ZoneSettings.ContainsKey(Svc.ClientState.TerritoryType)) 22 | { 23 | ImGuiEx.Text(ImGuiColors.DalamudRed, "There are custom settings for current zone. Global settings are not effective."); 24 | } 25 | DrawProfile(P.cfg); 26 | } 27 | 28 | internal static void DrawProfile(Configuration config) 29 | { 30 | if (ImGui.Button("Copy settings to clipboard")) 31 | { 32 | Safe(delegate 33 | { 34 | var copy = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(config)); 35 | copy.ZoneSettings = null; 36 | ImGui.SetClipboardText(JsonConvert.SerializeObject(copy)); 37 | }); 38 | } 39 | ImGui.SameLine(); 40 | if (ImGui.Button("Paste settings from clipboard") && ImGui.GetIO().KeyCtrl) 41 | { 42 | Safe(delegate 43 | { 44 | var imp = JsonConvert.DeserializeObject(ImGui.GetClipboardText()); 45 | config.QuickEnable = imp.QuickEnable; 46 | config.Enabled = imp.Enabled; 47 | config.AetheryteInFront = imp.AetheryteInFront; 48 | config.Bigmap = imp.Bigmap; 49 | config.Minimap = imp.Minimap; 50 | config.CustomPathes = imp.CustomPathes; 51 | config.HideAreaMarkers = imp.HideAreaMarkers; 52 | config.HideFateCircles = imp.HideFateCircles; 53 | config.HiddenTextures = imp.HiddenTextures; 54 | QuestAWAY.ApplyMemoryReplacer(); 55 | }); 56 | } 57 | ImGuiEx.Tooltip("Hold CTRL and click button"); 58 | ImGui.Checkbox("Plugin enabled", ref config.Enabled); 59 | ImGui.Checkbox("Hide icons on big map", ref config.Bigmap); 60 | ImGui.Checkbox("Hide icons on minimap", ref config.Minimap); 61 | ImGui.Checkbox("Display quick enable/disable on big map", ref config.QuickEnable); 62 | if (ImGui.Checkbox("Aetherytes always in front on big map", ref config.AetheryteInFront)) 63 | { 64 | QuestAWAY.ApplyMemoryReplacer(); 65 | } 66 | ImGui.Text("Additional pathes to hide (one per line, without _hr1 and .tex)"); 67 | ImGui.InputTextMultiline("##QAUSERADD", ref config.CustomPathes, 1000000, new Vector2(300f, 100f)); 68 | ImGui.Text("Special hiding options:"); 69 | ImGui.Checkbox("Hide fate circles", ref config.HideFateCircles); 70 | ImGui.Checkbox("Hide subarea markers, but keep text", ref config.HideAreaMarkers); 71 | ImGui.Text("Icons to hide:"); 72 | ImGui.SameLine(); 73 | ImGui.Checkbox("Only selected", ref P.onlySelected); 74 | ImGui.SameLine(); 75 | ImGui.SetNextItemWidth(100f); 76 | if (ImGui.BeginCombo("##QASELOPT", "Select...")) 77 | { 78 | if (ImGui.Selectable("All")) 79 | { 80 | config.HiddenTextures.UnionWith(Static.MapIcons); 81 | P.BuildHiddenByteSet(); 82 | } 83 | if (ImGui.Selectable("None")) 84 | { 85 | config.HiddenTextures.Clear(); 86 | P.BuildHiddenByteSet(); 87 | } 88 | ImGui.EndCombo(); 89 | } 90 | //ImGui.BeginChild("##QAWAYCHILD"); 91 | ImGuiHelpers.ScaledDummy(10f); 92 | var width = ImGui.GetColumnWidth(); 93 | var numColumns = Math.Max((int)(width / 100), 2); 94 | ImGui.Columns(numColumns); 95 | for (var i = 0; i < numColumns; i++) 96 | { 97 | ImGui.SetColumnWidth(i, width / numColumns); 98 | } 99 | foreach (var e in Static.MapIcons) 100 | { 101 | var b = config.HiddenTextures.Contains(e); 102 | if (!P.onlySelected || config.HiddenTextures.Contains(e)) 103 | { 104 | ImGui.Checkbox("##" + e, ref b); 105 | ImGui.SameLine(); 106 | ImGui.SetCursorPosY(ImGui.GetCursorPosY() - 11); 107 | ImGuiDrawImage(e + "_hr1"); 108 | if (ImGui.IsItemHovered() && ImGui.GetMouseDragDelta() == Vector2.Zero) 109 | { 110 | ImGui.SetMouseCursor(ImGuiMouseCursor.Hand); 111 | if (Static.MapIconNames[e].Length > 0 || ImGui.GetIO().KeyCtrl) 112 | { 113 | ImGui.SetTooltip(Static.MapIconNames[e].Length > 0 ? Static.MapIconNames[e] : e); 114 | } 115 | if (ImGui.IsMouseDoubleClicked(ImGuiMouseButton.Right)) 116 | { 117 | ImGui.SetClipboardText(e); 118 | } 119 | if (ImGui.IsMouseReleased(ImGuiMouseButton.Left)) 120 | { 121 | b = !b; 122 | } 123 | } 124 | 125 | ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 11); 126 | ImGui.NextColumn(); 127 | if (config.HiddenTextures.Contains(e) && !b) 128 | { 129 | config.HiddenTextures.Remove(e); 130 | P.BuildHiddenByteSet(); 131 | } 132 | if (!config.HiddenTextures.Contains(e) && b) 133 | { 134 | config.HiddenTextures.Add(e); 135 | P.BuildHiddenByteSet(); 136 | } 137 | } 138 | } 139 | ImGui.Columns(1); 140 | //ImGui.EndChild(); 141 | } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /QuestAWAY/QuestAWAY.cs: -------------------------------------------------------------------------------- 1 | using Dalamud; 2 | using Dalamud.Game.Command; 3 | using Dalamud.Game.Internal; 4 | using Dalamud.Interface; 5 | using Dalamud.Logging; 6 | using Dalamud.Plugin; 7 | using FFXIVClientStructs.FFXIV.Client.Graphics; 8 | using FFXIVClientStructs.FFXIV.Component.GUI; 9 | using ImGuiNET; 10 | using ImGuiScene; 11 | using System; 12 | using System.Collections.Generic; 13 | using System.Diagnostics; 14 | using System.Linq; 15 | using System.Numerics; 16 | using System.Runtime.ExceptionServices; 17 | using System.Runtime.InteropServices; 18 | using System.Text; 19 | using System.Threading; 20 | using System.Threading.Tasks; 21 | using Dalamud.Hooking; 22 | using Dalamud.Interface.Windowing; 23 | using QuestAWAY.Gui; 24 | using ECommons; 25 | using Dalamud.Interface.Utility; 26 | using ECommons.Schedulers; 27 | using Dalamud.Interface.Internal; 28 | 29 | namespace QuestAWAY 30 | { 31 | unsafe class QuestAWAY : IDalamudPlugin 32 | { 33 | public string Name => "QuestAWAY"; 34 | internal static QuestAWAY P; 35 | internal bool collect = false; 36 | internal bool collectDisplay = false; 37 | internal HashSet texSet = new HashSet(); 38 | internal HashSet userDefinedTextureSet = new HashSet(); 39 | internal Vector2 quickMenuPos = new Vector2(0f, 0f); 40 | internal Vector2 quickMenuSize = Vector2.Zero; 41 | internal Dictionary textures; 42 | internal Configuration cfg; 43 | internal static Vector2 Vector2Scale = new Vector2(48f, 48f); 44 | internal bool onlySelected = false; 45 | internal bool openQuickEnable = false; 46 | internal byte[][] cfgHideSet = { }; 47 | internal volatile bool reprocessNaviMap = true; 48 | internal volatile bool reprocessAreaMap = true; 49 | internal long tick = 0; 50 | internal bool profiling = false; 51 | internal long totalTime; 52 | internal long totalTicks; 53 | internal byte[][] fateTexture; 54 | internal byte[] areaMarkerTexture; 55 | internal Stopwatch stopwatch; 56 | internal WindowSystem windowSystem; 57 | internal ConfigGui configGui; 58 | 59 | PluginAddressResolver addressResolver = new PluginAddressResolver(); 60 | private Hook AddonAreaMapOnUpdateHook; 61 | private Hook AddonNaviMapOnUpdateHook; 62 | private Hook NaviMapOnMouseMoveHook; 63 | private Hook CheckAtkCollisionNodeIntersectHook; 64 | private Hook AreaMapOnMouseMoveHook; 65 | 66 | public static MemoryReplacer AreaMapCtrlAlwaysOn; 67 | 68 | public static Configuration CurrentProfile; 69 | 70 | public void Dispose() 71 | { 72 | //Dalamud doesn't lets reload plugin if exception is thrown by Dispose method. It is unwanted behavior, bypassing it. 73 | //Individual try-catches let as many things execute as possible 74 | Safe(() => { 75 | Svc.Framework.Update -= Tick; 76 | Svc.PluginInterface.UiBuilder.Draw -= Draw; 77 | Svc.PluginInterface.UiBuilder.Draw -= windowSystem.Draw; 78 | Svc.ClientState.TerritoryChanged -= ClientState_TerritoryChanged; 79 | }); 80 | Safe(AddonAreaMapOnUpdateHook.Dispose); 81 | Safe(AddonNaviMapOnUpdateHook.Dispose); 82 | Safe(NaviMapOnMouseMoveHook.Dispose); 83 | Safe(AreaMapOnMouseMoveHook.Dispose); 84 | Safe(CheckAtkCollisionNodeIntersectHook.Dispose); 85 | Safe(cfg.Save); 86 | 87 | Safe(AreaMapCtrlAlwaysOn.Dispose); 88 | 89 | Safe(() => 90 | { 91 | CurrentProfile.Enabled = false; 92 | reprocessNaviMap = true; 93 | reprocessAreaMap = true; 94 | ProcessMinimap((AtkUnitBase*)Svc.GameGui.GetAddonByName("_NaviMap", 1)); 95 | ProcessAreaMap((AtkUnitBase*)Svc.GameGui.GetAddonByName("AreaMap", 1)); 96 | 97 | Svc.Commands.RemoveHandler("/questaway"); 98 | foreach (var t in textures.Values) 99 | { 100 | t.Dispose(); 101 | } 102 | }); 103 | ECommonsMain.Dispose(); 104 | P = null; 105 | } 106 | 107 | public QuestAWAY(DalamudPluginInterface pluginInterface) 108 | { 109 | ECommonsMain.Init(pluginInterface, this); 110 | P = this; 111 | //this is because Dalamud can now execute constructor in different thread, which we never want 112 | new TickScheduler(delegate 113 | { 114 | windowSystem = new(); 115 | configGui = new(); 116 | windowSystem.AddWindow(configGui); 117 | textures = new(); 118 | cfg = pluginInterface.GetPluginConfig() as Configuration ?? new(); 119 | Static.PaddingVector = ImGui.GetStyle().WindowPadding; 120 | 121 | // hook setup 122 | addressResolver.Setup64Bit(Svc.SigScanner); 123 | #pragma warning disable CS0618 124 | AddonAreaMapOnUpdateHook = 125 | Svc.Hook.HookFromAddress(addressResolver.AddonAreaMapOnUpdateAddress, 126 | AddonAreaMapOnUpdateDetour); 127 | AddonNaviMapOnUpdateHook = 128 | Svc.Hook.HookFromAddress(addressResolver.AddonNaviMapOnUpdateAddress, 129 | AddonNaviMapOnUpdateDetour); 130 | NaviMapOnMouseMoveHook = 131 | Svc.Hook.HookFromAddress(addressResolver.NaviMapOnMouseMoveAddress, 132 | NaviMapOnMouseMoveDetour); 133 | CheckAtkCollisionNodeIntersectHook = Svc.Hook.HookFromAddress( 134 | addressResolver.CheckAtkCollisionNodeIntersectAddress, CheckAtkCollisionNodeIntersectDetour); 135 | AreaMapOnMouseMoveHook = 136 | Svc.Hook.HookFromAddress(addressResolver.AreaMapOnMouseMoveAddress, 137 | AreaMapOnMouseMoveDetour); 138 | AddonAreaMapOnUpdateHook.Enable(); 139 | NaviMapOnMouseMoveHook.Enable(); 140 | CheckAtkCollisionNodeIntersectHook.Disable(); 141 | AddonNaviMapOnUpdateHook.Enable(); 142 | AreaMapOnMouseMoveHook.Enable(); 143 | AreaMapCtrlAlwaysOn = new(PluginAddressResolver.AreaMapCtrl, new byte[] { 0x0F, 0x94 }); 144 | Svc.Framework.Update += Tick; 145 | Svc.PluginInterface.UiBuilder.Draw += Draw; 146 | Svc.PluginInterface.UiBuilder.Draw += windowSystem.Draw; 147 | Svc.PluginInterface.UiBuilder.OpenConfigUi += delegate { configGui.IsOpen = true; }; 148 | stopwatch = new Stopwatch(); 149 | Svc.Commands.AddHandler("/questaway", new CommandInfo(delegate { configGui.IsOpen = !configGui.IsOpen; }) 150 | { 151 | HelpMessage = "open/close configuration" 152 | }); 153 | Svc.ClientState.TerritoryChanged += ClientState_TerritoryChanged; 154 | ClientState_TerritoryChanged(Svc.ClientState.TerritoryType); 155 | }); 156 | } 157 | 158 | internal void ClientState_TerritoryChanged(ushort e) 159 | { 160 | if(!cfg.ZoneSettings.TryGetValue(e, out CurrentProfile)) 161 | { 162 | CurrentProfile = cfg; 163 | } 164 | ApplyMemoryReplacer(); 165 | BuildHiddenByteSet(); 166 | } 167 | 168 | internal static void ApplyMemoryReplacer() 169 | { 170 | if (CurrentProfile.AetheryteInFront) 171 | { 172 | if (!AreaMapCtrlAlwaysOn.IsEnabled) 173 | { 174 | AreaMapCtrlAlwaysOn.Enable(); 175 | } 176 | } 177 | else 178 | { 179 | if (AreaMapCtrlAlwaysOn.IsEnabled) 180 | { 181 | AreaMapCtrlAlwaysOn.Disable(); 182 | } 183 | } 184 | } 185 | 186 | private delegate byte CheckAtkCollisionNodeIntersectDelegate(AtkNineGridNode* node, void* a2, void* a3, 187 | void* a4); 188 | 189 | private byte CheckAtkCollisionNodeIntersectDetour(AtkNineGridNode* node, void* a2, void* a3, void* a4) 190 | { 191 | if (node != null && node->AtkResNode.ParentNode != null) 192 | { 193 | // make intersection check fail if the map (both of them) icon is transparent 194 | return node->AtkResNode.ParentNode->Color.A != 0 195 | ? CheckAtkCollisionNodeIntersectHook.Original(node, a2, a3, a4) 196 | : (byte)0; 197 | } 198 | 199 | return CheckAtkCollisionNodeIntersectHook.Original(node, a2, a3, a4); 200 | } 201 | 202 | private delegate IntPtr AreaMapOnMouseMoveDelegate(IntPtr unk1, IntPtr unk2); 203 | 204 | private IntPtr AreaMapOnMouseMoveDetour(IntPtr unk1, IntPtr unk2) 205 | { 206 | // optimization: only hook CheckAtkCollisionNodeIntersect when mouseovering the AreaMap 207 | CheckAtkCollisionNodeIntersectHook.Enable(); 208 | var result = AreaMapOnMouseMoveHook.Original(unk1, unk2); 209 | CheckAtkCollisionNodeIntersectHook.Disable(); 210 | return result; 211 | } 212 | 213 | private delegate IntPtr NaviMapOnMouseMoveDelegate(IntPtr unk1, IntPtr unk2, IntPtr unk3); 214 | 215 | private IntPtr NaviMapOnMouseMoveDetour(IntPtr unk1, IntPtr unk2, IntPtr unk3) 216 | { 217 | // optimization: only hook CheckAtkCollisionNodeIntersect when mouseovering the minimap 218 | CheckAtkCollisionNodeIntersectHook.Enable(); 219 | var result = NaviMapOnMouseMoveHook.Original(unk1, unk2, unk3); 220 | CheckAtkCollisionNodeIntersectHook.Disable(); 221 | return result; 222 | } 223 | 224 | private delegate IntPtr AddonNaviMapOnUpdateDelegate(AtkUnitBase* addonNaviMap, IntPtr unk2, IntPtr unk3); 225 | 226 | private IntPtr AddonNaviMapOnUpdateDetour(AtkUnitBase* addonNaviMap, IntPtr unk2, IntPtr unk3) 227 | { 228 | // runs every frame (i think) if the minimap is visible 229 | var result = AddonNaviMapOnUpdateHook.Original(addonNaviMap, unk2, unk3); 230 | 231 | ProfilingContinue(); 232 | ProcessMinimap(addonNaviMap); 233 | ProfilingPause(); 234 | 235 | return result; 236 | } 237 | 238 | private delegate IntPtr AddonAreaMapOnUpdateDelegate(AtkUnitBase* addonAreaMap, IntPtr unk2, IntPtr unk3); 239 | 240 | private IntPtr AddonAreaMapOnUpdateDetour(AtkUnitBase* addonAreaMap, IntPtr unk2, IntPtr unk3) 241 | { 242 | // runs every frame if the area map is open and loaded 243 | var result = AddonAreaMapOnUpdateHook.Original(addonAreaMap, unk2, unk3); 244 | 245 | ProfilingContinue(); 246 | ProcessAreaMap(addonAreaMap); 247 | ProfilingPause(); 248 | 249 | return result; 250 | } 251 | 252 | private void Draw() 253 | { 254 | if (openQuickEnable) 255 | { 256 | bool b = true; 257 | ImGui.PushStyleVar(ImGuiStyleVar.WindowPadding, Vector2.Zero); 258 | ImGui.PushStyleVar(ImGuiStyleVar.WindowMinSize, Vector2.Zero); 259 | ImGuiHelpers.SetNextWindowPosRelativeMainViewport(quickMenuPos); 260 | ImGui.Begin("QuestAWAY quick enable", ref b, 261 | ImGuiWindowFlags.NoBackground 262 | | ImGuiWindowFlags.NoNavFocus 263 | | ImGuiWindowFlags.AlwaysUseWindowPadding 264 | | ImGuiWindowFlags.AlwaysAutoResize 265 | | ImGuiWindowFlags.NoScrollbar 266 | | ImGuiWindowFlags.NoTitleBar 267 | | ImGuiWindowFlags.NoFocusOnAppearing 268 | ); 269 | if (Static.ImGuiToggleButton(FontAwesomeIcon.ExclamationCircle, (CurrentProfile.Enabled ? "Disable" : "Enable") + " QuestAWAY", ref CurrentProfile.Enabled)) 270 | { 271 | reprocessAreaMap = true; 272 | reprocessNaviMap = true; 273 | } 274 | ImGui.SameLine(); 275 | if (Static.ImGuiIconButton(FontAwesomeIcon.Cog, "QuestAWAY settings")) 276 | { 277 | configGui.IsOpen = true; 278 | } 279 | quickMenuSize = ImGui.GetWindowSize(); 280 | ImGui.End(); 281 | ImGui.PopStyleVar(2); 282 | } 283 | } 284 | 285 | private void ProfilingContinue() 286 | { 287 | if (!profiling) return; 288 | stopwatch.Start(); 289 | } 290 | 291 | private void ProfilingPause() 292 | { 293 | if (!profiling) return; 294 | stopwatch.Stop(); 295 | } 296 | 297 | private void ProfilingRestart() 298 | { 299 | if (!profiling) return; 300 | 301 | totalTime += stopwatch.ElapsedTicks+1; 302 | totalTicks++; 303 | stopwatch.Restart(); 304 | } 305 | 306 | public void Tick(object _) 307 | { 308 | try 309 | { 310 | ProfilingRestart(); 311 | var o = Svc.GameGui.GetAddonByName("AreaMap", 1); 312 | if (o != IntPtr.Zero) 313 | { 314 | var masterWindow = (AtkUnitBase*)o; 315 | if (masterWindow->IsVisible && masterWindow->UldManager.NodeListCount > 3) 316 | { 317 | var mapCNode = (AtkComponentNode*)masterWindow->UldManager.NodeList[3]; 318 | openQuickEnable = CurrentProfile.QuickEnable; 319 | if (openQuickEnable) 320 | { 321 | quickMenuPos.X = masterWindow->X + mapCNode->AtkResNode.X * masterWindow->Scale + mapCNode->AtkResNode.Width * masterWindow->Scale / 2 - quickMenuSize.X / 2; 322 | quickMenuPos.Y = masterWindow->Y + mapCNode->AtkResNode.Y * masterWindow->Scale - quickMenuSize.Y; 323 | } 324 | } 325 | else 326 | { 327 | openQuickEnable = false; 328 | } 329 | } 330 | else 331 | { 332 | openQuickEnable = false; 333 | } 334 | ProfilingPause(); 335 | } 336 | catch (Exception e) 337 | { 338 | PluginLog.Error("=== Error during QuestAway plugin execution ===" + e.Message + "\n" + e.StackTrace); 339 | Svc.Chat.Print("[QuestAway] An error occurred, please send your log to developer."); 340 | } 341 | } 342 | 343 | void ProcessAreaMap(AtkUnitBase* masterWindow) 344 | { 345 | if ((!CurrentProfile.Enabled || !CurrentProfile.Bigmap) && !reprocessAreaMap) return; 346 | 347 | if (masterWindow != null 348 | && masterWindow->IsVisible 349 | && masterWindow->UldManager.NodeListCount > 3) 350 | { 351 | var mapCNode = (AtkComponentNode*)masterWindow->UldManager.NodeList[3]; 352 | for (var i = 6; i < mapCNode->Component->UldManager.NodeListCount; i++) 353 | { 354 | ProcessShit((AtkComponentNode*)mapCNode->Component->UldManager.NodeList[i], !(CurrentProfile.Enabled && CurrentProfile.Bigmap), true); 355 | } 356 | reprocessAreaMap = false; 357 | } 358 | } 359 | 360 | void ProcessMinimap(AtkUnitBase* masterWindow) 361 | { 362 | if ((!CurrentProfile.Enabled || !CurrentProfile.Minimap) && !reprocessNaviMap) return; 363 | 364 | if (masterWindow != null 365 | && masterWindow->IsVisible 366 | && masterWindow->UldManager.NodeListCount > 2) 367 | { 368 | var mapCNode = (AtkComponentNode*)masterWindow->UldManager.NodeList[2]; 369 | for (var i = 4; i < mapCNode->Component->UldManager.NodeListCount; i++) 370 | { 371 | ProcessShit((AtkComponentNode*)mapCNode->Component->UldManager.NodeList[i], 372 | !(CurrentProfile.Enabled && CurrentProfile.Minimap)); 373 | } 374 | reprocessNaviMap = false; 375 | } 376 | } 377 | 378 | void ProcessShit(AtkComponentNode* mapIconNode, bool showUnconditionally = false, bool isAreaMap = false) 379 | { 380 | if (!mapIconNode->AtkResNode.IsVisible) return; 381 | if (mapIconNode->Component->UldManager.NodeListCount <= 4) return; 382 | AtkImageNode* imageNode; 383 | if (mapIconNode->Component->UldManager.NodeList[4]->Type == NodeType.Image) 384 | { 385 | imageNode = (AtkImageNode*)mapIconNode->Component->UldManager.NodeList[4]; 386 | } 387 | else if(mapIconNode->Component->UldManager.NodeList[3]->Type == NodeType.Image) 388 | { 389 | imageNode = (AtkImageNode*)mapIconNode->Component->UldManager.NodeList[3]; 390 | } 391 | else 392 | { 393 | return; 394 | } 395 | var textureInfo = imageNode->PartsList->Parts[imageNode->PartId].UldAsset; 396 | if (textureInfo->AtkTexture.TextureType == TextureType.Resource) 397 | { 398 | if (collect) texSet.Add(Marshal.PtrToStringAnsi((IntPtr)textureInfo->AtkTexture.Resource->TexFileResourceHandle->ResourceHandle.FileName.BufferPtr).Replace(".tex", "").Replace("_hr1", "")); 399 | var fNamePtr = textureInfo->AtkTexture.Resource->TexFileResourceHandle->ResourceHandle.FileName.BufferPtr; 400 | if (!showUnconditionally) 401 | { 402 | /*if(StartsWithAny(fNamePtr, fateTexture)) 403 | { 404 | PluginLog.Information($"{imageNode->AtkResNode.AddBlue}, {imageNode->AtkResNode.AddRed}, {imageNode->AtkResNode.AddGreen}, {imageNode->AtkResNode.MultiplyBlue}, {imageNode->AtkResNode.MultiplyRed}, {imageNode->AtkResNode.MultiplyGreen}, "); 405 | }*/ 406 | if ( 407 | StartsWithAny(fNamePtr, cfgHideSet) 408 | || 409 | (CurrentProfile.HideFateCircles && StartsWithAny(fNamePtr, fateTexture) 410 | && imageNode->AtkResNode.AddBlue == 128 && imageNode->AtkResNode.AddGreen == 48 && imageNode->AtkResNode.MultiplyBlue == 100 && imageNode->AtkResNode.MultiplyGreen == 60) 411 | ) 412 | { 413 | if (mapIconNode->AtkResNode.Color.A != 0) mapIconNode->AtkResNode.Color.A = 0; 414 | } 415 | else 416 | { 417 | if (mapIconNode->AtkResNode.Color.A == 0) mapIconNode->AtkResNode.Color.A = 0xff; 418 | } 419 | 420 | if (isAreaMap && (CurrentProfile.HideAreaMarkers || reprocessAreaMap) && StartsWith(fNamePtr, areaMarkerTexture)) 421 | { 422 | if (CurrentProfile.HideAreaMarkers) 423 | { 424 | if (imageNode->AtkResNode.Color.A != 0) imageNode->AtkResNode.Color.A = 0; 425 | } 426 | else 427 | { 428 | if (imageNode->AtkResNode.Color.A == 0) imageNode->AtkResNode.Color.A = 0xff; 429 | } 430 | } 431 | } 432 | else 433 | { 434 | if (mapIconNode->AtkResNode.Color.A == 0) mapIconNode->AtkResNode.Color.A = 0xff; 435 | if (StartsWith(fNamePtr, areaMarkerTexture) && imageNode->AtkResNode.Color.A == 0) imageNode->AtkResNode.Color.A = 0xff; 436 | } 437 | } 438 | } 439 | 440 | internal bool StartsWithAny(byte* sPtr, byte[][] set) 441 | { 442 | foreach (var b in set) 443 | { 444 | if (StartsWith(sPtr, b)) return true; 445 | } 446 | return false; 447 | } 448 | 449 | internal bool StartsWith(byte* sPtr, byte[] b) 450 | { 451 | for (int i = 0; i < b.Length; i++) 452 | { 453 | if (*(sPtr + i) != b[i]) break; 454 | if (i == b.Length - 1) return true; 455 | } 456 | return false; 457 | } 458 | 459 | internal void BuildHiddenByteSet() 460 | { 461 | fateTexture = new byte[][] { Encoding.ASCII.GetBytes("ui/icon/060000/060496"), Encoding.ASCII.GetBytes("ui/icon/060000/060495") }; 462 | areaMarkerTexture = Encoding.ASCII.GetBytes("ui/icon/060000/060442"); 463 | var userLines = CurrentProfile.CustomPathes.Split('\n'); 464 | for (var n = 0; n < userLines.Length; n++) 465 | { 466 | userLines[n] = userLines[n].Trim(); 467 | } 468 | var userLinesSet = userLines.ToHashSet(); 469 | userLinesSet.RemoveWhere((string line) => { return line.Length == 0; }); 470 | userLinesSet.UnionWith(CurrentProfile.HiddenTextures); 471 | 472 | cfgHideSet = new byte[userLinesSet.Count][]; 473 | var i = 0; 474 | foreach(var e in userLinesSet) 475 | { 476 | cfgHideSet[i++] = Encoding.ASCII.GetBytes(e); 477 | } 478 | } 479 | } 480 | } 481 | -------------------------------------------------------------------------------- /QuestAWAY/Static.cs: -------------------------------------------------------------------------------- 1 | global using static ECommons.GenericHelpers; 2 | global using ECommons.DalamudServices; 3 | global using static QuestAWAY.Static; 4 | global using static QuestAWAY.QuestAWAY; 5 | using Dalamud.Interface; 6 | using Dalamud.Logging; 7 | using ImGuiNET; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Numerics; 12 | using System.Text; 13 | using System.Threading.Tasks; 14 | 15 | namespace QuestAWAY 16 | { 17 | public static class Static 18 | { 19 | public const uint ActiveToggleButtonColor = 0x6600b500; 20 | 21 | internal static void ImGuiDrawImage(string partialPath) 22 | { 23 | try 24 | { 25 | if (!P.textures.ContainsKey(partialPath)) 26 | { 27 | P.textures[partialPath] = Svc.Texture.GetTextureFromGame(partialPath + ".tex"); 28 | } 29 | ImGui.Image(P.textures[partialPath].ImGuiHandle, Vector2Scale, Vector2.Zero, Vector2.One, Vector4.One); 30 | } 31 | catch (Exception ex) 32 | { 33 | Svc.Chat.Print("[QuestAWAY error] " + ex.Message + "\n" + ex.StackTrace); 34 | } 35 | } 36 | 37 | public static bool ImGuiToggleButton(string text, ref bool flag) 38 | { 39 | var state = false; 40 | var colored = false; 41 | if (flag) 42 | { 43 | colored = true; 44 | ImGui.PushStyleColor(ImGuiCol.Button, ActiveToggleButtonColor); 45 | ImGui.PushStyleColor(ImGuiCol.ButtonActive, ActiveToggleButtonColor); 46 | ImGui.PushStyleColor(ImGuiCol.ButtonHovered, ActiveToggleButtonColor); 47 | } 48 | if (ImGui.Button(text)) 49 | { 50 | flag = !flag; 51 | state = true; 52 | } 53 | if (colored) 54 | { 55 | ImGui.PopStyleColor(3); 56 | } 57 | return state; 58 | } 59 | public static bool ImGuiToggleButton(FontAwesomeIcon icon, string tooltip, ref bool flag) 60 | { 61 | var state = false; 62 | var colored = false; 63 | if (flag) 64 | { 65 | colored = true; 66 | ImGui.PushStyleColor(ImGuiCol.Button, ActiveToggleButtonColor); 67 | ImGui.PushStyleColor(ImGuiCol.ButtonActive, ActiveToggleButtonColor); 68 | ImGui.PushStyleColor(ImGuiCol.ButtonHovered, ActiveToggleButtonColor); 69 | } 70 | if (ImGuiIconButton(icon, tooltip)) 71 | { 72 | flag = !flag; 73 | state = true; 74 | } 75 | if (colored) 76 | { 77 | ImGui.PopStyleColor(3); 78 | } 79 | return state; 80 | } 81 | 82 | public static Vector2 PaddingVector; 83 | public static bool ImGuiIconButton(FontAwesomeIcon icon, string tooltip) 84 | { 85 | ImGui.PushFont(UiBuilder.IconFont); 86 | var result = ImGui.Button($"{icon.ToIconString()}##{icon.ToIconString()}-{tooltip}"); 87 | ImGui.PopFont(); 88 | 89 | 90 | if (tooltip != null) 91 | ImGuiTextTooltip(tooltip); 92 | 93 | 94 | return result; 95 | } 96 | 97 | public static void ImGuiTextTooltip(string text) 98 | { 99 | if (ImGui.IsItemHovered()) 100 | { 101 | ImGui.PushStyleVar(ImGuiStyleVar.WindowPadding, PaddingVector); 102 | ImGui.BeginTooltip(); 103 | ImGui.TextUnformatted(text); 104 | ImGui.EndTooltip(); 105 | ImGui.PopStyleVar(); 106 | } 107 | } 108 | 109 | public static Dictionary MapIconNames = new Dictionary() 110 | { 111 | { "ui/icon/060000/060091", "Gemstone trader" }, 112 | { "ui/icon/060000/060311", "Chocobo porter" }, 113 | { "ui/icon/060000/060314", "" }, 114 | #region Guild Icons 115 | { "ui/icon/060000/060318", "Botanists' guild" }, 116 | { "ui/icon/060000/060319", "Conjurers' guild" }, 117 | { "ui/icon/060000/060320", "Archers' guild" }, 118 | { "ui/icon/060000/060321", "Carpenters' guild" }, 119 | { "ui/icon/060000/060322", "Lancers' guild" }, 120 | { "ui/icon/060000/060326", "Leatherworkers' guild" }, 121 | { "ui/icon/060000/060330", "Arcanists' guild" }, 122 | { "ui/icon/060000/060331", "Mauradeurs' guild" }, 123 | { "ui/icon/060000/060333", "Fishers' guild" }, 124 | { "ui/icon/060000/060334", "Armorers' guild" }, 125 | { "ui/icon/060000/060335", "Culinarians' guild" }, 126 | { "ui/icon/060000/060337", "Blacksmiths' guild" }, 127 | { "ui/icon/060000/060339", "Ferry docks" }, 128 | { "ui/icon/060000/060342", "Gladiators' guild" }, 129 | { "ui/icon/060000/060344", "Thaumaturges' guild" }, 130 | { "ui/icon/060000/060345", "Goldsmiths' guild" }, 131 | { "ui/icon/060000/060346", "Miners' guild" }, 132 | { "ui/icon/060000/060347", "Pugilists' guild" }, 133 | { "ui/icon/060000/060348", "Weavers' guild" }, 134 | { "ui/icon/060000/060352", "Airship landing" }, 135 | { "ui/icon/060000/060362", "Rogues' guild" }, 136 | { "ui/icon/060000/060363", "Astrologians' guild" }, 137 | { "ui/icon/060000/060364", "Machinists' guild" }, 138 | #endregion 139 | { "ui/icon/060000/060404", "" }, 140 | { "ui/icon/060000/060412", "General purpose merchant" }, 141 | { "ui/icon/060000/060414", "Dungeon" }, 142 | { "ui/icon/060000/060421", "Party member marker"}, 143 | { "ui/icon/060000/060422", "" }, 144 | { "ui/icon/060000/060425", "Retainer bell" }, 145 | { "ui/icon/060000/060426", "Retainer NPC" }, 146 | { "ui/icon/060000/060427", "Linkshell aquisition" }, 147 | { "ui/icon/060000/060428", "Raid" }, 148 | { "ui/icon/060000/060430", "City Aetheryte" }, 149 | { "ui/icon/060000/060434", "Repairs" }, 150 | { "ui/icon/060000/060436", "Inn room" }, 151 | { "ui/icon/060000/060441", "Adjoining area marker" }, 152 | { "ui/icon/060000/060442", "Subarea marker" }, 153 | { "ui/icon/060000/060443", "Player marker" }, 154 | { "ui/icon/060000/060446", "Upstairs marker" }, 155 | { "ui/icon/060000/060447", "Downstairs marker" }, 156 | { "ui/icon/060000/060448", "Settlement" }, 157 | { "ui/icon/060000/060449", "Amalj'aa Stronghold" }, 158 | { "ui/icon/060000/060450", "Ixali Stronghold" }, 159 | { "ui/icon/060000/060451", "Kobold Stronghold" }, 160 | { "ui/icon/060000/060453", "Aetheryte" }, 161 | { "ui/icon/060000/060456", "Ferry docks" }, 162 | { "ui/icon/060000/060457", "Next area" }, 163 | { "ui/icon/060000/060458", "FATE NPC" }, 164 | { "ui/icon/060000/060459", "" }, 165 | { "ui/icon/060000/060460", "Free Company chest" }, 166 | { "ui/icon/060000/060467", "Gate to next area" }, 167 | { "ui/icon/060000/060473", "Specialist NPC" }, 168 | { "ui/icon/060000/060495", "Quest area marker" }, 169 | { "ui/icon/060000/060496", "Quest area marker" }, 170 | #region FATE Icons 171 | { "ui/icon/060000/060501", "Mobbing FATE" }, 172 | { "ui/icon/060000/060502", "Boss FATE" }, 173 | { "ui/icon/060000/060503", "Collect items FATE" }, 174 | { "ui/icon/060000/060504", "Defense FATE" }, 175 | { "ui/icon/060000/060505", "Special/Escort FATE" }, 176 | { "ui/icon/060000/060506", "Chase FATE" }, 177 | { "ui/icon/060000/060507", "Chase FATE" }, 178 | { "ui/icon/060000/060512", "Collect FATE turn-in NPC marker" }, 179 | #endregion 180 | { "ui/icon/060000/060545", "" }, 181 | { "ui/icon/060000/060551", "Delivery Moogle" }, 182 | { "ui/icon/060000/060554", "Sahagin Stronghold" }, 183 | { "ui/icon/060000/060555", "Sylph Stronghold" }, 184 | { "ui/icon/060000/060561", "Marker placed by user" }, 185 | #region Grand company 186 | { "ui/icon/060000/060567", "Grand company: Maelstrom" }, 187 | { "ui/icon/060000/060568", "Grand company: Order of the Twin Adder" }, 188 | { "ui/icon/060000/060569", "Grand company: Immortal Flames" }, 189 | #endregion 190 | { "ui/icon/060000/060570", "Market board" }, 191 | { "ui/icon/060000/060571", "Hunting log" }, 192 | { "ui/icon/060000/060581", "Weather forecast" }, 193 | { "ui/icon/060000/060582", "Gold Saucer employee" }, 194 | { "ui/icon/060000/060600", "Vundu/Gundu Stronghold" }, 195 | { "ui/icon/060000/060601", "Gnath/Loth Stronghold" }, 196 | { "ui/icon/060000/060603", "Qalyana Stronghold" }, 197 | { "ui/icon/060000/060604", "Red Stronghold" }, 198 | #region FC Housing Icons 199 | { "ui/icon/060000/060751", "Free Company cottage - locked" }, 200 | { "ui/icon/060000/060752", "Free Company house - locked" }, 201 | { "ui/icon/060000/060753", "Free Company mansion - locked" }, 202 | { "ui/icon/060000/060754", "Free Company cottage" }, 203 | { "ui/icon/060000/060755", "Free Company house" }, 204 | { "ui/icon/060000/060756", "Free Company mansion" }, 205 | { "ui/icon/060000/060757", "Free Company housing lot purchased - awaiting Permit" }, 206 | #endregion 207 | { "ui/icon/060000/060758", "Housing lot available for purchase" }, 208 | #region User FC Housing Icons 209 | { "ui/icon/060000/060761", "User Free Company cottage - locked" }, 210 | { "ui/icon/060000/060762", "User Free Company house - locked" }, 211 | { "ui/icon/060000/060763", "User Free Company mansion - locked" }, 212 | { "ui/icon/060000/060764", "User Free Company cottage" }, 213 | { "ui/icon/060000/060765", "User Free Company house" }, 214 | { "ui/icon/060000/060766", "User Free Company mansion" }, 215 | { "ui/icon/060000/060767", "User Free Company housing lot purchased - awaiting Permit" }, 216 | #endregion 217 | { "ui/icon/060000/060768", "Resident caretaker" }, 218 | #region Individual Housing Icons 219 | { "ui/icon/060000/060769", "Individual cottage - locked" }, 220 | { "ui/icon/060000/060770", "Individual house - locked" }, 221 | { "ui/icon/060000/060771", "Individual mansion - locked" }, 222 | { "ui/icon/060000/060772", "Individual cottage" }, 223 | { "ui/icon/060000/060773", "Individual house" }, 224 | { "ui/icon/060000/060774", "Individual mansion" }, 225 | { "ui/icon/060000/060775", "Housing lot purchased - awaiting Permit" }, 226 | #endregion 227 | #region User Individual Housing Icons 228 | { "ui/icon/060000/060776", "User Individual cottage - locked" }, 229 | { "ui/icon/060000/060777", "User Individual house - locked" }, 230 | { "ui/icon/060000/060778", "User Individual mansion - locked" }, 231 | { "ui/icon/060000/060779", "User Individual cottage" }, 232 | { "ui/icon/060000/060780", "User Individual house" }, 233 | { "ui/icon/060000/060781", "User Individual mansion" }, 234 | { "ui/icon/060000/060782", "User housing lot purchased - awaiting Permit" }, 235 | #endregion 236 | #region Shared Individual Housing Icons 237 | { "ui/icon/060000/060783", "Shared Individual cottage - locked" }, 238 | { "ui/icon/060000/060784", "Shared Individual house - locked" }, 239 | { "ui/icon/060000/060785", "Shared Individual mansion - locked" }, 240 | { "ui/icon/060000/060786", "Shared Individual cottage" }, 241 | { "ui/icon/060000/060787", "Shared Individual house" }, 242 | { "ui/icon/060000/060788", "Shared Individual mansion" }, 243 | #endregion 244 | #region Apartment Icons 245 | { "ui/icon/060000/060789", "Apartment building" }, 246 | { "ui/icon/060000/060791", "Rented apartment building" }, 247 | #endregion 248 | { "ui/icon/060000/060910", "Materia melder" }, 249 | { "ui/icon/060000/060926", "Wonderous tails" }, 250 | { "ui/icon/060000/060927", "Custom delivery" }, 251 | { "ui/icon/060000/060934", "EXP Bonus" }, 252 | { "ui/icon/060000/060935", "Exchange NPC" }, 253 | { "ui/icon/060000/060958", "Notorious monster - Eureka" }, 254 | { "ui/icon/060000/060959", "Aetheryte - Eureka" }, 255 | { "ui/icon/060000/060960", "Masked Rose" }, 256 | { "ui/icon/060000/060968", "Magia melder" }, 257 | { "ui/icon/060000/060971", "Exit - Eureka" }, 258 | { "ui/icon/060000/060983", "Blue Mage activity" }, 259 | { "ui/icon/060000/060986", "" }, 260 | { "ui/icon/060000/060987", "Gemstone trader" }, 261 | { "ui/icon/060000/060988", "" }, 262 | { "ui/icon/060000/060993", "" }, 263 | { "ui/icon/061000/061731", "Eureka Expedition" }, 264 | { "ui/icon/063000/063903", "" }, 265 | { "ui/icon/063000/063905", "" }, 266 | { "ui/icon/063000/063919", "" }, 267 | { "ui/icon/063000/063920", "" }, 268 | { "ui/icon/063000/063921", "Lore quest" }, 269 | { "ui/icon/063000/063922", "Itinerant Moogle" }, 270 | { "ui/icon/063000/063934", "Unavailable studium delivery" }, 271 | { "ui/icon/063000/063932", "Studium delivery" }, 272 | { "ui/icon/063000/063971", "Deep-Dungeon entry" }, 273 | { "ui/icon/063000/063972", "The Forbidden Land, Eureka" }, 274 | #region Island Icons 275 | { "ui/icon/063000/063964", "Island logs" }, 276 | { "ui/icon/063000/063963", "Island leafs" }, 277 | { "ui/icon/063000/063965", "Island crystals" }, 278 | { "ui/icon/063000/063966", "Island crops" }, 279 | #endregion 280 | #region Linked Quest Icons 281 | { "ui/icon/070000/070961", "Linked main scenario quest" }, 282 | { "ui/icon/070000/070962", "Unavailable linked main scenario quest" }, 283 | { "ui/icon/070000/070963", "Linked main scenario quest in progress" }, 284 | { "ui/icon/070000/070964", "Unavailable linked main scenario quest in progress" }, 285 | { "ui/icon/070000/070965", "Linked side quest" }, 286 | { "ui/icon/070000/070966", "Unavailable linked side quest" }, 287 | { "ui/icon/070000/070967", "Linked repeatable side quest" }, 288 | { "ui/icon/070000/070968", "Unavailable linked repeatable side quest" }, 289 | { "ui/icon/070000/070969", "Linked side quest in progress" }, 290 | { "ui/icon/070000/070970", "Unavailable linked side quest in progress" }, 291 | { "ui/icon/070000/070971", "Linked key quest" }, 292 | { "ui/icon/070000/070972", "Unavailable linked key quest" }, 293 | { "ui/icon/070000/070973", "Linked repeatable key quest" }, 294 | { "ui/icon/070000/070974", "Unavailable linked repeatable key quest" }, 295 | { "ui/icon/070000/070975", "Linked key quest in progress" }, 296 | { "ui/icon/070000/070976", "Unavailable linked key quest in progress" }, 297 | #endregion 298 | #region MSQ Icons 299 | { "ui/icon/071000/071001", "Main scenario quest" }, 300 | { "ui/icon/071000/071002", "Repeatable main scenario quest" }, 301 | { "ui/icon/071000/071003", "Main scenario quest in progress" }, 302 | { "ui/icon/071000/071004", "Main scenario quest-related mob" }, 303 | { "ui/icon/071000/071005", "Completed main scenario quest" }, 304 | { "ui/icon/071000/071006", "Main scenario quest interaction" }, 305 | { "ui/icon/071000/071011", "Unavailable main scenario quest" }, 306 | { "ui/icon/071000/071012", "Unavailable repeatable main scenario quest" }, 307 | { "ui/icon/071000/071013", "Unavailable main scenario quest in progress" }, 308 | { "ui/icon/071000/071015", "Unavailable completed main scenario quest" }, 309 | { "ui/icon/071000/071016", "Unavailable main scenario quest interaction" }, 310 | #endregion 311 | #region Quest Icons 312 | { "ui/icon/071000/071021", "Side quest" }, 313 | { "ui/icon/071000/071022", "Repeatable side quest" }, 314 | { "ui/icon/071000/071023", "Side quest in progress" }, 315 | { "ui/icon/071000/071024", "Side quest-related mob" }, 316 | { "ui/icon/071000/071025", "Completed side quest" }, 317 | { "ui/icon/071000/071026", "Side quest interaction" }, 318 | { "ui/icon/071000/071031", "Unavailable side quest" }, 319 | { "ui/icon/071000/071032", "Unavailable repeatable side quest" }, 320 | { "ui/icon/071000/071033", "Unavailable side quest in progress" }, 321 | { "ui/icon/071000/071034", "Unavailable side quest-related mob" }, 322 | { "ui/icon/071000/071035", "Unavailable completed side quest" }, 323 | { "ui/icon/071000/071036", "Side quest interaction" }, 324 | #endregion 325 | #region Levemete Icons 326 | { "ui/icon/071000/071041", "Levemete" }, 327 | { "ui/icon/071000/071042", "Repeatable Levemete" }, 328 | { "ui/icon/071000/071043", "Levemete in progress" }, 329 | { "ui/icon/071000/071044", "Levemete related marker" }, 330 | { "ui/icon/071000/071045", "Completed Levemete" }, 331 | { "ui/icon/071000/071046", "Levemete interaction" }, 332 | { "ui/icon/071000/071051", "Unavailable Levemete" }, 333 | { "ui/icon/071000/071052", "Unavailable repeatable Levemete" }, 334 | { "ui/icon/071000/071053", "Unavailable Levemete in progress" }, 335 | { "ui/icon/071000/071054", "Unavailable Levemete related marker" }, 336 | { "ui/icon/071000/071055", "Unavailable completed Levemete" }, 337 | { "ui/icon/071000/071056", "Unavailable Levemete interaction" }, 338 | #endregion 339 | #region Lore Icons 340 | { "ui/icon/071000/071061", "Lore quest" }, 341 | { "ui/icon/071000/071062", "Repeatable lore quest" }, 342 | { "ui/icon/071000/071063", "Lore quest in progress" }, 343 | { "ui/icon/071000/071064", "Lore quest related marker" }, 344 | { "ui/icon/071000/071065", "Completed lore quest" }, 345 | { "ui/icon/071000/071066", "Lore interaction" }, 346 | { "ui/icon/071000/071071", "Unavailable lore quest" }, 347 | { "ui/icon/071000/071072", "Unavailable repeatable lore quest" }, 348 | { "ui/icon/071000/071073", "Unavailable lore quest in progress" }, 349 | { "ui/icon/071000/071074", "Unavailable lore quest related marker" }, 350 | { "ui/icon/071000/071075", "Unavailable completed lore quest" }, 351 | { "ui/icon/071000/071076", "Unavailable lore interaction" }, 352 | #endregion 353 | #region Behest Icons 354 | { "ui/icon/071000/071081", "Behest" }, 355 | { "ui/icon/071000/071082", "Repeatable Behest" }, 356 | { "ui/icon/071000/071083", "Behest in progress" }, 357 | { "ui/icon/071000/071084", "Behest related marker" }, 358 | { "ui/icon/071000/071085", "Completed Behest" }, 359 | { "ui/icon/071000/071086", "Behest interaction" }, 360 | { "ui/icon/071000/071091", "Unavailable Behest" }, 361 | { "ui/icon/071000/071092", "Unavailable repeatable Behest" }, 362 | { "ui/icon/071000/071093", "Unavailable Behest in progress" }, 363 | { "ui/icon/071000/071094", "Unavailable Behest related marker" }, 364 | { "ui/icon/071000/071095", "Unavailable completed Behest" }, 365 | { "ui/icon/071000/071096", "Unavailable Behest interaction" }, 366 | #endregion 367 | #region Triple Triad Icons 368 | { "ui/icon/071000/071101", "Triple Triad match" }, 369 | { "ui/icon/071000/071102", "Triple Triad match - won" }, 370 | #endregion 371 | #region GATE Icons 372 | { "ui/icon/071000/071111", "GATE" }, 373 | { "ui/icon/071000/071112", "Completed GATE" }, 374 | #endregion 375 | #region Beginner quest Icons 376 | { "ui/icon/071000/071121", "Beginner quest" }, 377 | { "ui/icon/071000/071122", "Repeatable beginner quest" }, 378 | { "ui/icon/071000/071123", "Beginner quest in progress" }, 379 | { "ui/icon/071000/071124", "Beginner quest related marker" }, 380 | { "ui/icon/071000/071125", "Completed beginner quest" }, 381 | { "ui/icon/071000/071126", "Beginner quest interaction" }, 382 | { "ui/icon/071000/071131", "Unavailable beginner quest" }, 383 | { "ui/icon/071000/071132", "Unavailable repeatable beginner quest" }, 384 | { "ui/icon/071000/071133", "Unavailable beginner quest in progress" }, 385 | { "ui/icon/071000/071134", "Unavailable beginner quest related marker" }, 386 | { "ui/icon/071000/071135", "Unavailable completed beginner quest" }, 387 | { "ui/icon/071000/071136", "Unavailable beginner quest interaction" }, 388 | #endregion 389 | #region Feature quest Icons 390 | { "ui/icon/071000/071141", "Key quest" }, 391 | { "ui/icon/071000/071142", "Repeatable key quest" }, 392 | { "ui/icon/071000/071143", "Key quest in progress" }, 393 | { "ui/icon/071000/071145", "Completed key quest" }, 394 | { "ui/icon/071000/071146", "Key quest interaction" }, 395 | { "ui/icon/071000/071151", "Unavailable key quest" }, 396 | { "ui/icon/071000/071152", "Unavailable repeatable key quest" }, 397 | { "ui/icon/071000/071153", "Unavailable key quest in progress" }, 398 | { "ui/icon/071000/071155", "Unavailable completed key quest" }, 399 | { "ui/icon/071000/071156", "Unavailable key quest interaction" }, 400 | #endregion 401 | }; 402 | 403 | public static SortedSet MapIcons = new SortedSet(MapIconNames.Keys); 404 | } 405 | } 406 | --------------------------------------------------------------------------------