From ba9268500e18c6594f313c94971439298c47e05b Mon Sep 17 00:00:00 2001 From: Limiana <5073202+Limiana@users.noreply.github.com> Date: Wed, 13 Nov 2024 01:46:13 +0300 Subject: [PATCH 01/14] Commit all changes --- Splatoon/Gui/Layouts/CGuiLayouts.cs | 456 +++++++++++++-------- Splatoon/Gui/Layouts/LayoutDrawSelector.cs | 44 +- 2 files changed, 300 insertions(+), 200 deletions(-) diff --git a/Splatoon/Gui/Layouts/CGuiLayouts.cs b/Splatoon/Gui/Layouts/CGuiLayouts.cs index 441955f7..2237eb8c 100644 --- a/Splatoon/Gui/Layouts/CGuiLayouts.cs +++ b/Splatoon/Gui/Layouts/CGuiLayouts.cs @@ -1,14 +1,26 @@ using Dalamud.Interface.Colors; using ECommons.LanguageHelpers; -using Newtonsoft.Json; using Splatoon.SplatoonScripting; -using Splatoon.Utility; using static Splatoon.ConfigGui.CGuiLayouts.LayoutDrawSelector; namespace Splatoon; partial class CGui { + public class LayoutFolder + { + public string Name; + public string FullName; + public List Folders = []; + public List Layouts = []; + + public LayoutFolder(string name, string fullName) + { + Name = name; + FullName = fullName; + } + } + internal static string layoutFilter = ""; string PopupRename = ""; //internal static string CurrentGroup = null; @@ -16,6 +28,48 @@ partial class CGui internal static HashSet OpenedGroup = new(); internal static string NewLayoytName = ""; internal static Layout ScrollTo = null; + internal LayoutFolder LayoutFolderStructure; + + void BuildLayoutFolderStructure() + { + LayoutFolderStructure = new("", ""); + foreach(var x in P.Config.LayoutsL) + { + var currentLayout = LayoutFolderStructure; + if(x.Group != "") + { + var path = x.Group.Split("/"); + foreach(var subFolder in path) + { + if(currentLayout.Folders.TryGetFirst(x => x.Name == subFolder, out var result)) + { + currentLayout = result; + } + else + { + var n = new LayoutFolder(subFolder, currentLayout.FullName + "/" + subFolder); + currentLayout.Folders.Add(n); + currentLayout = n; + } + } + } + currentLayout.Layouts.Add(x); + } + OrderFolders(LayoutFolderStructure); + } + + void OrderFolders(LayoutFolder f) + { + f.Folders.Sort((x, y) => FindOrderIndex(x.FullName).CompareTo(FindOrderIndex(y.FullName))); + foreach(var x in f.Folders) OrderFolders(x); + } + + int FindOrderIndex(string fullPath) + { + var i = P.Config.GroupOrder.IndexOf(fullPath); + return i == -1 ? int.MaxValue : i; + } + void DislayLayouts() { { @@ -97,243 +151,289 @@ void DislayLayouts() ImGui.EndPopup(); } ImGui.BeginChild("LayoutsTableSelector"); - foreach (var x in P.Config.LayoutsL) + //DrawNewSelector(); + DrawOldSelector(); + ImGui.EndChild(); + + ImGui.TableNextColumn(); + + ImGui.BeginChild("LayoutsTableEdit", ImGui.GetContentRegionAvail(), false, ImGuiWindowFlags.HorizontalScrollbar); + if(CurrentLayout != null) { - x.ElementsL.RemoveAll(z => z == null); - var deleted = x.ElementsL.RemoveAll(k => k.Delete); - if(deleted > 0) + if(CurrentElement != null && CurrentLayout.ElementsL.Contains(CurrentElement)) { - Notify.Info($"Deleted ?? elements".Loc(deleted)); - if(!P.Config.LayoutsL.Any(l => l.ElementsL.Contains(CurrentElement))) - { - CurrentElement = null; - } + LayoutDrawElement(CurrentLayout, CurrentElement); } - if (x.Group == null) x.Group = ""; - if(x.Group != "" && !P.Config.GroupOrder.Contains(x.Group)) + else { - P.Config.GroupOrder.Add(x.Group); + LayoutDrawHeader(CurrentLayout); } } - P.Config.GroupOrder.RemoveAll(x => x.IsNullOrEmpty()); - Layout[] takenLayouts = P.Config.LayoutsL.ToArray(); - var groupToRemove = -1; - if (!P.Config.FocusMode || CurrentLayout == null) + else + { + ImGuiEx.Text("UI Help:\n- Left panel contains groups, layouts and elements.\n- You can drag and drop layouts, elements and groups to reorder them.\n- Right click on a group to rename or delete it.\n- Right click on a layout/element to delete it.\n- Middle click on layout/element for quick enable/disable".Loc()); + } + ImGui.EndChild(); + + ImGui.EndTable(); + } + ImGui.EndChild(); + } + + private void DrawNewSelector() + { + BuildLayoutFolderStructure(); + ImGui.PushStyleVar(ImGuiStyleVar.IndentSpacing, 10f); + ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(1, 1)); + ImGui.PushStyleVar(ImGuiStyleVar.ItemInnerSpacing, new Vector2(0)); + DrawFolder(LayoutFolderStructure); + ImGui.PopStyleVar(3); + } + + private void DrawFolder(LayoutFolder f) + { + ImGui.PushID(f.FullName); + foreach(var x in f.Folders) + { + ImGui.PushStyleColor(ImGuiCol.Text, ImGuiEx.Vector4FromRGB(0xfae97d)); + if(ImGuiEx.TreeNode(x.Name)) + { + ImGui.PopStyleColor(); + DrawFolder(x); + ImGui.TreePop(); + } + else + { + ImGui.PopStyleColor(); + } + } + foreach(var x in f.Layouts) + { + if(ImGui.TreeNodeEx($"{x.Name}###{x.GUID}", ImGuiTreeNodeFlags.SpanFullWidth | ImGuiTreeNodeFlags.NoTreePushOnOpen | ImGuiTreeNodeFlags.Bullet | (CurrentLayout == x ? ImGuiTreeNodeFlags.Selected : ImGuiTreeNodeFlags.None))) + { + CurrentLayout = x; + ImGui.GetStateStorage().SetInt(ImGui.GetID($"{x.Name}###{x.GUID}"), 0); + } + } + ImGui.PopID(); + } + + + private void DrawOldSelector() + { + + foreach(var x in P.Config.LayoutsL) + { + x.ElementsL.RemoveAll(z => z == null); + var deleted = x.ElementsL.RemoveAll(k => k.Delete); + if(deleted > 0) { - for (var i = 0; i < P.Config.GroupOrder.Count; i++) + Notify.Info($"Deleted ?? elements".Loc(deleted)); + if(!P.Config.LayoutsL.Any(l => l.ElementsL.Contains(CurrentElement))) { - var g = P.Config.GroupOrder[i]; - if (layoutFilter != "" && - !P.Config.LayoutsL.Any(x => x.Group == g && x.GetName().Contains(layoutFilter, StringComparison.OrdinalIgnoreCase))) continue; + CurrentElement = null; + } + } + if(x.Group == null) x.Group = ""; + if(x.Group != "" && !P.Config.GroupOrder.Contains(x.Group)) + { + P.Config.GroupOrder.Add(x.Group); + } + } + P.Config.GroupOrder.RemoveAll(x => x.IsNullOrEmpty()); + Layout[] takenLayouts = P.Config.LayoutsL.ToArray(); + var groupToRemove = -1; + if(!P.Config.FocusMode || CurrentLayout == null) + { + for(var i = 0; i < P.Config.GroupOrder.Count; i++) + { + var g = P.Config.GroupOrder[i]; + if(layoutFilter != "" && + !P.Config.LayoutsL.Any(x => x.Group == g && x.GetName().Contains(layoutFilter, StringComparison.OrdinalIgnoreCase))) continue; - ImGui.PushID(g); - ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudYellow); + ImGui.PushID(g); + ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudYellow); - if (HighlightGroup == g) - { - ImGui.PushStyleColor(ImGuiCol.Header, ImGuiColors.DalamudYellow with { W = 0.5f }); - ImGui.PushStyleColor(ImGuiCol.HeaderActive, ImGuiColors.DalamudYellow with { W = 0.5f }); - ImGui.PushStyleColor(ImGuiCol.HeaderHovered, ImGuiColors.DalamudYellow with { W = 0.5f }); - } - var curpos = ImGui.GetCursorScreenPos(); - var contRegion = ImGui.GetContentRegionAvail().X; - if (ImGui.Selectable($"[{g}]", HighlightGroup == g)) + if(HighlightGroup == g) + { + ImGui.PushStyleColor(ImGuiCol.Header, ImGuiColors.DalamudYellow with { W = 0.5f }); + ImGui.PushStyleColor(ImGuiCol.HeaderActive, ImGuiColors.DalamudYellow with { W = 0.5f }); + ImGui.PushStyleColor(ImGuiCol.HeaderHovered, ImGuiColors.DalamudYellow with { W = 0.5f }); + } + var curpos = ImGui.GetCursorScreenPos(); + var contRegion = ImGui.GetContentRegionAvail().X; + if(ImGui.Selectable($"[{g}]", HighlightGroup == g)) + { + if(!OpenedGroup.Toggle(g)) { - if (!OpenedGroup.Toggle(g)) + if(CurrentLayout?.Group == g) { - if (CurrentLayout?.Group == g) - { - CurrentLayout = null; - CurrentElement = null; - } + CurrentLayout = null; + CurrentElement = null; } } - if (HighlightGroup == g) + } + if(HighlightGroup == g) + { + ImGui.PopStyleColor(3); + HighlightGroup = null; + } + ImGui.PopStyleColor(); + if(ImGui.BeginDragDropSource()) + { + ImGuiDragDrop.SetDragDropPayload("MoveGroup", i); + ImGuiEx.Text($"Moving group\n[??]".Loc(g)); + ImGui.EndDragDropSource(); + } + if(ImGui.BeginDragDropTarget()) + { + if(ImGuiDragDrop.AcceptDragDropPayload("MoveLayout", out int indexOfMovedObj + , ImGuiDragDropFlags.AcceptNoDrawDefaultRect | ImGuiDragDropFlags.AcceptBeforeDelivery)) { - ImGui.PopStyleColor(3); - HighlightGroup = null; + HighlightGroup = g; + if(ImGui.IsMouseReleased(ImGuiMouseButton.Left)) + { + P.Config.LayoutsL[indexOfMovedObj].Group = g; + } } - ImGui.PopStyleColor(); - if (ImGui.BeginDragDropSource()) + if(ImGuiDragDrop.AcceptDragDropPayload("MoveGroup", out int indexOfMovedGroup + , ImGuiDragDropFlags.AcceptNoDrawDefaultRect | ImGuiDragDropFlags.AcceptBeforeDelivery)) { - ImGuiDragDrop.SetDragDropPayload("MoveGroup", i); - ImGuiEx.Text($"Moving group\n[??]".Loc(g)); - ImGui.EndDragDropSource(); + ImGuiUtils.DrawLine(curpos, contRegion); + if(ImGui.IsMouseReleased(ImGuiMouseButton.Left)) + { + var exch = P.Config.GroupOrder[indexOfMovedGroup]; + P.Config.GroupOrder[indexOfMovedGroup] = null; + P.Config.GroupOrder.Insert(i, exch); + P.Config.GroupOrder.RemoveAll(x => x == null); + } } - if (ImGui.BeginDragDropTarget()) + ImGui.EndDragDropTarget(); + } + if(ImGui.IsItemClicked(ImGuiMouseButton.Right)) + { + ImGui.OpenPopup("GroupPopup"); + } + if(ImGui.BeginPopup("GroupPopup")) + { + ImGuiEx.Text($"[{g}]"); + ImGui.SetNextItemWidth(200f); + var result = ImGui.InputTextWithHint("##GroupRename", "Enter new name...".Loc(), ref PopupRename, 100, ImGuiInputTextFlags.EnterReturnsTrue); + PopupRename = PopupRename.SanitizeName(); + ImGui.SameLine(); + if(ImGui.Button("OK".Loc()) || result) { - if (ImGuiDragDrop.AcceptDragDropPayload("MoveLayout", out int indexOfMovedObj - , ImGuiDragDropFlags.AcceptNoDrawDefaultRect | ImGuiDragDropFlags.AcceptBeforeDelivery)) + if(P.Config.GroupOrder.Contains(PopupRename)) { - HighlightGroup = g; - if (ImGui.IsMouseReleased(ImGuiMouseButton.Left)) - { - P.Config.LayoutsL[indexOfMovedObj].Group = g; - } + Notify.Error("Error: this name is already exists".Loc()); } - if (ImGuiDragDrop.AcceptDragDropPayload("MoveGroup", out int indexOfMovedGroup - , ImGuiDragDropFlags.AcceptNoDrawDefaultRect | ImGuiDragDropFlags.AcceptBeforeDelivery)) + else if(PopupRename.Length == 0) { - ImGuiUtils.DrawLine(curpos, contRegion); - if (ImGui.IsMouseReleased(ImGuiMouseButton.Left)) - { - var exch = P.Config.GroupOrder[indexOfMovedGroup]; - P.Config.GroupOrder[indexOfMovedGroup] = null; - P.Config.GroupOrder.Insert(i, exch); - P.Config.GroupOrder.RemoveAll(x => x == null); - } + Notify.Error("Error: empty names are not allowed".Loc()); } - ImGui.EndDragDropTarget(); - } - if (ImGui.IsItemClicked(ImGuiMouseButton.Right)) - { - ImGui.OpenPopup("GroupPopup"); - } - if (ImGui.BeginPopup("GroupPopup")) - { - ImGuiEx.Text($"[{g}]"); - ImGui.SetNextItemWidth(200f); - var result = ImGui.InputTextWithHint("##GroupRename", "Enter new name...".Loc(), ref PopupRename, 100, ImGuiInputTextFlags.EnterReturnsTrue); - PopupRename = PopupRename.SanitizeName(); - ImGui.SameLine(); - if (ImGui.Button("OK".Loc()) || result) + else { - if (P.Config.GroupOrder.Contains(PopupRename)) - { - Notify.Error("Error: this name is already exists".Loc()); - } - else if (PopupRename.Length == 0) + if(OpenedGroup.Contains(g)) { - Notify.Error("Error: empty names are not allowed".Loc()); + OpenedGroup.Add(PopupRename); + OpenedGroup.Remove(g); } - else + foreach(var x in P.Config.LayoutsL) { - if (OpenedGroup.Contains(g)) + if(x.Group == g) { - OpenedGroup.Add(PopupRename); - OpenedGroup.Remove(g); - } - foreach (var x in P.Config.LayoutsL) - { - if (x.Group == g) - { - x.Group = PopupRename; - } - } - P.Config.GroupOrder[i] = PopupRename; - PopupRename = ""; - } - } - if (ImGui.Selectable("Archive group".Loc()) && ImGui.GetIO().KeyCtrl) - { - foreach (var l in P.Config.LayoutsL) - { - if (l.Group == g) - { - P.Archive.LayoutsL.Add(l.JSONClone()); - l.Group = ""; - l.Delete = true; + x.Group = PopupRename; } } - groupToRemove = i; - P.SaveArchive(); + P.Config.GroupOrder[i] = PopupRename; + PopupRename = ""; } - ImGuiEx.Tooltip("Hold CTRL+click".Loc()); - ImGui.Separator(); - if (ImGui.Selectable("Remove group and disband layouts".Loc()) && ImGui.GetIO().KeyCtrl && ImGui.GetIO().KeyShift) + } + if(ImGui.Selectable("Archive group".Loc()) && ImGui.GetIO().KeyCtrl) + { + foreach(var l in P.Config.LayoutsL) { - foreach (var l in P.Config.LayoutsL) + if(l.Group == g) { - if (l.Group == g) - { - l.Group = ""; - } + P.Archive.LayoutsL.Add(l.JSONClone()); + l.Group = ""; + l.Delete = true; } - groupToRemove = i; } - ImGuiEx.Tooltip("Hold CTRL+SHIFT+click".Loc()); - if (ImGui.Selectable("Remove group and it's layouts".Loc()) && ImGui.GetIO().KeyCtrl && ImGui.GetIO().KeyShift) + groupToRemove = i; + P.SaveArchive(); + } + ImGuiEx.Tooltip("Hold CTRL+click".Loc()); + ImGui.Separator(); + if(ImGui.Selectable("Remove group and disband layouts".Loc()) && ImGui.GetIO().KeyCtrl && ImGui.GetIO().KeyShift) + { + foreach(var l in P.Config.LayoutsL) { - foreach (var l in P.Config.LayoutsL) + if(l.Group == g) { - if (l.Group == g) - { - l.Group = ""; - l.Delete = true; - } + l.Group = ""; } - groupToRemove = i; } - ImGuiEx.Tooltip("Hold CTRL+SHIFT+click".Loc()); - if (ImGui.Selectable("Export Group".Loc())) + groupToRemove = i; + } + ImGuiEx.Tooltip("Hold CTRL+SHIFT+click".Loc()); + if(ImGui.Selectable("Remove group and it's layouts".Loc()) && ImGui.GetIO().KeyCtrl && ImGui.GetIO().KeyShift) + { + foreach(var l in P.Config.LayoutsL) { - List Export = new(); - foreach (var l in P.Config.LayoutsL) + if(l.Group == g) { - if (l.Group == g) - { - Export.Add(l.Serialize()); - } + l.Group = ""; + l.Delete = true; } - ImGui.SetClipboardText(Export.Join("\n")); } - ImGui.EndPopup(); + groupToRemove = i; } - for (var n = 0; n < takenLayouts.Length; n++) + ImGuiEx.Tooltip("Hold CTRL+SHIFT+click".Loc()); + if(ImGui.Selectable("Export Group".Loc())) { - var x = takenLayouts[n]; - if (x != null && (x.Group == g)) + List Export = new(); + foreach(var l in P.Config.LayoutsL) { - if (OpenedGroup.Contains(g) || layoutFilter != "") + if(l.Group == g) { - x.DrawSelector(g, n); + Export.Add(l.Serialize()); } - takenLayouts[n] = null; } + ImGui.SetClipboardText(Export.Join("\n")); } - ImGui.PopID(); + ImGui.EndPopup(); } - } - for (var i = 0; i < takenLayouts.Length; i++) - { - var x = takenLayouts[i]; - if (!P.Config.FocusMode || CurrentLayout == x || CurrentLayout == null) + for(var n = 0; n < takenLayouts.Length; n++) { - if (x != null) + var x = takenLayouts[n]; + if(x != null && (x.Group == g)) { - x.DrawSelector(null, i); + if(OpenedGroup.Contains(g) || layoutFilter != "") + { + x.DrawSelector(g, n); + } + takenLayouts[n] = null; } } + ImGui.PopID(); } - if(groupToRemove != -1) - { - P.Config.GroupOrder.RemoveAt(groupToRemove); - } - ImGui.EndChild(); - - ImGui.TableNextColumn(); - - ImGui.BeginChild("LayoutsTableEdit", ImGui.GetContentRegionAvail(), false, ImGuiWindowFlags.HorizontalScrollbar); - if(CurrentLayout != null) + } + for(var i = 0; i < takenLayouts.Length; i++) + { + var x = takenLayouts[i]; + if(!P.Config.FocusMode || CurrentLayout == x || CurrentLayout == null) { - if(CurrentElement != null && CurrentLayout.ElementsL.Contains(CurrentElement)) + if(x != null) { - LayoutDrawElement(CurrentLayout, CurrentElement); - } - else - { - LayoutDrawHeader(CurrentLayout); + x.DrawSelector(null, i); } } - else - { - ImGuiEx.Text("UI Help:\n- Left panel contains groups, layouts and elements.\n- You can drag and drop layouts, elements and groups to reorder them.\n- Right click on a group to rename or delete it.\n- Right click on a layout/element to delete it.\n- Middle click on layout/element for quick enable/disable".Loc()); - } - ImGui.EndChild(); - - ImGui.EndTable(); } - ImGui.EndChild(); + if(groupToRemove != -1) + { + P.Config.GroupOrder.RemoveAt(groupToRemove); + } } internal static bool ImportFromClipboard() diff --git a/Splatoon/Gui/Layouts/LayoutDrawSelector.cs b/Splatoon/Gui/Layouts/LayoutDrawSelector.cs index 9e596e27..13640499 100644 --- a/Splatoon/Gui/Layouts/LayoutDrawSelector.cs +++ b/Splatoon/Gui/Layouts/LayoutDrawSelector.cs @@ -9,20 +9,20 @@ internal static class LayoutDrawSelector { internal static Layout CurrentLayout = null; internal static Element CurrentElement = null; - internal static void DrawSelector(this Layout x, string group, int index) + internal static void DrawSelector(this Layout layout, string group, int index) { - if (CGui.layoutFilter != "" && !x.GetName().Contains(CGui.layoutFilter, StringComparison.OrdinalIgnoreCase)) + if (CGui.layoutFilter != "" && !layout.GetName().Contains(CGui.layoutFilter, StringComparison.OrdinalIgnoreCase)) { - if(CGui.ScrollTo == x) + if(CGui.ScrollTo == layout) { CGui.ScrollTo = null; } return; } - ImGui.PushID(x.GUID); + ImGui.PushID(layout.GUID); { var col = false; - if (!x.Enabled) + if (!layout.Enabled) { col = true; ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudGrey3); @@ -30,25 +30,25 @@ internal static void DrawSelector(this Layout x, string group, int index) ImGui.SetCursorPosX(group == null ? 0 : 10); var curpos = ImGui.GetCursorScreenPos(); var contRegion = ImGui.GetContentRegionAvail().X; - if (CGui.ScrollTo == x) + if (CGui.ScrollTo == layout) { ImGui.SetScrollHereY(); CGui.ScrollTo = null; } - if (ImGui.Selectable($"{x.GetName()}", CurrentLayout == x)) + if (ImGui.Selectable($"{layout.GetName()}", CurrentLayout == layout)) { - if (CurrentLayout == x && CurrentElement == null) + if (CurrentLayout == layout && CurrentElement == null) { CurrentLayout = null; if (P.Config.FocusMode) { - CGui.ScrollTo = x; + CGui.ScrollTo = layout; } } else { CGui.OpenedGroup.Add(group); - CurrentLayout = x; + CurrentLayout = layout; CurrentElement = null; } } @@ -58,7 +58,7 @@ internal static void DrawSelector(this Layout x, string group, int index) } if (ImGui.IsItemClicked(ImGuiMouseButton.Middle)) { - x.Enabled = !x.Enabled; + layout.Enabled = !layout.Enabled; } if (ImGui.IsItemClicked(ImGuiMouseButton.Right)) { @@ -69,7 +69,7 @@ internal static void DrawSelector(this Layout x, string group, int index) if (ImGui.BeginDragDropSource()) { ImGuiDragDrop.SetDragDropPayload("MoveLayout", index); - ImGuiEx.Text($"Moving layout\n??".Loc(x.GetName())); + ImGuiEx.Text($"Moving layout\n??".Loc(layout.GetName())); ImGui.EndDragDropSource(); } if (ImGui.BeginDragDropTarget()) @@ -92,22 +92,22 @@ internal static void DrawSelector(this Layout x, string group, int index) }); if (ImGui.BeginPopup("LayoutContext")) { - ImGuiEx.Text($"Layout ??".Loc(x.GetName())); + ImGuiEx.Text($"Layout ??".Loc(layout.GetName())); if (ImGui.Selectable("Archive layout".Loc())) { - P.Archive.LayoutsL.Add(x.JSONClone()); + P.Archive.LayoutsL.Add(layout.JSONClone()); P.SaveArchive(); - x.Delete = true; + layout.Delete = true; } ImGui.Separator(); if (ImGui.Selectable("Delete layout".Loc())) { - x.Delete = true; + layout.Delete = true; } ImGui.EndPopup(); } } - if (CurrentLayout == x) + if (CurrentLayout == layout) { for (var i = 0;i(ImGui.GetClipboardText())); + layout.ElementsL.Add(JsonConvert.DeserializeObject(ImGui.GetClipboardText())); } catch(Exception e) { From e29df6fa76e1780df8736b1684898fa6d0616297 Mon Sep 17 00:00:00 2001 From: Limiana <5073202+Limiana@users.noreply.github.com> Date: Wed, 13 Nov 2024 01:50:11 +0300 Subject: [PATCH 02/14] 7.1 update (preliminary) --- ECommons | 2 +- NightmareUI | 2 +- Splatoon/Gui/CGui.cs | 4 +-- Splatoon/Gui/CGuiDebug.cs | 4 +-- Splatoon/Gui/Explorer.cs | 2 +- .../Gui/Layouts/Elements/LayoutDrawElement.cs | 4 +-- .../Layouts/Header/Sections/JlockSelector.cs | 2 +- .../Layouts/Header/Sections/ZlockSelector.cs | 4 +-- Splatoon/Modules/Logger.cs | 4 +-- Splatoon/Services/StatusEffectManager.cs | 8 ++--- Splatoon/Splatoon.cs | 4 +-- Splatoon/Splatoon.json | 35 ++++++++++--------- Splatoon/Utility/LayoutUtils.cs | 2 +- 13 files changed, 39 insertions(+), 38 deletions(-) diff --git a/ECommons b/ECommons index cad229e3..ed5805c4 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit cad229e33d3a14f9e9d06c726c8297394563fbf1 +Subproject commit ed5805c40b459d20e5c610c9cc0ea91501da67a3 diff --git a/NightmareUI b/NightmareUI index b73fc77d..da5d38ec 160000 --- a/NightmareUI +++ b/NightmareUI @@ -1 +1 @@ -Subproject commit b73fc77d137a42fe6dbda79f27b7225e5d531e8a +Subproject commit da5d38ecba69e764acb4b1ed17c1bc055766c3d7 diff --git a/Splatoon/Gui/CGui.cs b/Splatoon/Gui/CGui.cs index 81200f75..b2ca674a 100644 --- a/Splatoon/Gui/CGui.cs +++ b/Splatoon/Gui/CGui.cs @@ -39,8 +39,8 @@ public CGui(Splatoon p) { this.p = p; Svc.PluginInterface.UiBuilder.Draw += Draw; - ActionNames = Svc.Data.GetExcelSheet().ToDictionary(x => x.RowId, x => $"{x.RowId} | {x.Name}"); - BuffNames = Svc.Data.GetExcelSheet().ToDictionary(x => x.RowId, x => $"{x.RowId} | {x.Name}"); + ActionNames = Svc.Data.GetExcelSheet().ToDictionary(x => x.RowId, x => $"{x.RowId} | {x.Name}"); + BuffNames = Svc.Data.GetExcelSheet().ToDictionary(x => x.RowId, x => $"{x.RowId} | {x.Name}"); } public void Dispose() diff --git a/Splatoon/Gui/CGuiDebug.cs b/Splatoon/Gui/CGuiDebug.cs index 0a4f58ed..00380c42 100644 --- a/Splatoon/Gui/CGuiDebug.cs +++ b/Splatoon/Gui/CGuiDebug.cs @@ -3,7 +3,7 @@ using ECommons.GameFunctions; using ECommons.MathHelpers; using FFXIVClientStructs.FFXIV.Client.Graphics.Environment; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using Splatoon.Memory; using Splatoon.Utility; using System.Globalization; @@ -58,7 +58,7 @@ void DisplayDebug() { foreach(var x in Svc.Data.GetExcelSheet()) { - var n = x.ContentFinderCondition.Value?.Name?.ToString(); + var n = x.ContentFinderCondition.ValueNullable?.Name.ToString(); if (!n.IsNullOrEmpty()) { ImGuiEx.Text($"{n}"); diff --git a/Splatoon/Gui/Explorer.cs b/Splatoon/Gui/Explorer.cs index ccb5bcd9..bd1b0865 100644 --- a/Splatoon/Gui/Explorer.cs +++ b/Splatoon/Gui/Explorer.cs @@ -128,7 +128,7 @@ internal static void DrawGameObject(IGameObject obj) ImGuiEx.TextCopy($"Status list:".Loc()); foreach(var x in b.StatusList) { - ImGuiEx.TextCopy($" {x.GameData.Name} ({x.StatusId.Format()}), {"Remains".Loc()} = {x.RemainingTime:F1}, Param = {x.Param}, {"Count".Loc()} = {x.StackCount}"); + ImGuiEx.TextCopy($" {x.GameData.ValueNullable?.Name} ({x.StatusId.Format()}), {"Remains".Loc()} = {x.RemainingTime:F1}, Param = {x.Param}, {"Count".Loc()} = {x.StackCount}"); } } } diff --git a/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs b/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs index 7e841d9c..5fa97d0c 100644 --- a/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs +++ b/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs @@ -3,7 +3,7 @@ using Dalamud.Interface.Utility.Raii; using ECommons.GameFunctions; using ECommons.LanguageHelpers; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using Newtonsoft.Json; using Splatoon.RenderEngines; using Splatoon.Serializables; @@ -426,7 +426,7 @@ internal void LayoutDrawElement(Layout l, Element el, bool forceEnable = false) ImGui.SameLine(); if (ImGui.Button("Add".Loc() + "##byactionname" + i + k)) { - foreach (var x in Svc.Data.GetExcelSheet().Union(Svc.Data.GetExcelSheet(ClientLanguage.English))) + foreach (var x in Svc.Data.GetExcelSheet().Union(Svc.Data.GetExcelSheet(ClientLanguage.English))) { if (x.Name.ToString().Equals(ActionName, StringComparison.OrdinalIgnoreCase)) { diff --git a/Splatoon/Gui/Layouts/Header/Sections/JlockSelector.cs b/Splatoon/Gui/Layouts/Header/Sections/JlockSelector.cs index 8a3e8d5b..ebc2a516 100644 --- a/Splatoon/Gui/Layouts/Header/Sections/JlockSelector.cs +++ b/Splatoon/Gui/Layouts/Header/Sections/JlockSelector.cs @@ -26,7 +26,7 @@ internal static void DrawJlockSelector(this Layout layout) } var colorJLock = Svc.ClientState?.LocalPlayer?.ClassJob != null && layout.JobLock != 0 - && !Bitmask.IsBitSet(layout.JobLock, (int)Svc.ClientState.LocalPlayer.ClassJob.Id) + && !Bitmask.IsBitSet(layout.JobLock, (int)Svc.ClientState.LocalPlayer.ClassJob.RowId) && Environment.TickCount64 % 1000 < 500; if (colorJLock) ImGui.PushStyleColor(ImGuiCol.Text, Colors.Red); ImGuiEx.SetNextItemFullWidth(); diff --git a/Splatoon/Gui/Layouts/Header/Sections/ZlockSelector.cs b/Splatoon/Gui/Layouts/Header/Sections/ZlockSelector.cs index dd3e228b..c3f4e45f 100644 --- a/Splatoon/Gui/Layouts/Header/Sections/ZlockSelector.cs +++ b/Splatoon/Gui/Layouts/Header/Sections/ZlockSelector.cs @@ -33,7 +33,7 @@ internal static void DrawZlockSelector(this Layout layout) { ImGuiUtils.ColorButton(Colors.Red); } - string zcfc = P.Zones[Svc.ClientState.TerritoryType].ContentFinderCondition?.Value.Name?.ToString(); + string zcfc = P.Zones[Svc.ClientState.TerritoryType].ContentFinderCondition.ValueNullable?.Name.ToString(); if (P.Zones.ContainsKey(Svc.ClientState.TerritoryType) && ImGui.SmallButton($"Current zone: ??".Loc(GenericHelpers.GetTerritoryName(Svc.ClientState.TerritoryType)))) { layout.ZoneLockH.Toggle(Svc.ClientState.TerritoryType); @@ -41,7 +41,7 @@ internal static void DrawZlockSelector(this Layout layout) ImGuiUtils.UncolorButton(); ImGui.PopStyleColor(); } - foreach (var z in P.Zones.Where(x => x.Value?.PlaceName?.Value?.Name?.ToString().IsNullOrEmpty() == false)) + foreach (var z in P.Zones.Where(x => x.Value.PlaceName.ValueNullable?.Name.ToString().IsNullOrEmpty() == false)) { var s = GenericHelpers.GetTerritoryName(z.Key); if (!s.ToLower().Contains(zlockf)) continue; diff --git a/Splatoon/Modules/Logger.cs b/Splatoon/Modules/Logger.cs index be23ccf1..f3946020 100644 --- a/Splatoon/Modules/Logger.cs +++ b/Splatoon/Modules/Logger.cs @@ -1,5 +1,5 @@ using ECommons; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; namespace Splatoon.Modules; @@ -28,7 +28,7 @@ internal static void OnTerritoryChanged() EndLogging(); if (P.Config.Logging) { - var name = Svc.Data.GetExcelSheet().GetRow(Svc.ClientState.TerritoryType)?.ContentFinderCondition?.Value?.Name?.ToString(); + var name = Svc.Data.GetExcelSheet().GetRowOrDefault(Svc.ClientState.TerritoryType)?.ContentFinderCondition.ValueNullable?.Name.ToString(); if (name != String.Empty && name != null) { BeginLogging(); diff --git a/Splatoon/Services/StatusEffectManager.cs b/Splatoon/Services/StatusEffectManager.cs index 3fad0974..a3afb837 100644 --- a/Splatoon/Services/StatusEffectManager.cs +++ b/Splatoon/Services/StatusEffectManager.cs @@ -1,12 +1,12 @@ using ECommons.EzHookManager; using FFXIVClientStructs.FFXIV.Client.Game; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Status = Lumina.Excel.GeneratedSheets.Status; +using Status = Lumina.Excel.Sheets.Status; namespace Splatoon.Services; public unsafe class StatusEffectManager @@ -44,7 +44,7 @@ private void RemoveStatusDetour(StatusManager* thisPtr, int statusIndex, byte u2 var name = "unk"; if(thisPtr->Owner != null) name = $"{thisPtr->Owner->NameString}/{thisPtr->Owner->NameId}"; var status = thisPtr->Status[statusIndex]; - PluginLog.Debug($"RemoveStatusDetour on: {name}, status={status.StatusId}/{status.Param} {Svc.Data.GetExcelSheet().GetRow(status.StatusId)?.Name}"); + PluginLog.Debug($"RemoveStatusDetour on: {name}, status={status.StatusId}/{status.Param} {Svc.Data.GetExcelSheet().GetRowOrDefault(status.StatusId)?.Name}"); } catch(Exception e) { @@ -59,7 +59,7 @@ private void AddStatusDetour(StatusManager* thisPtr, ushort statusId, ushort par { var name = "unk"; if(thisPtr->Owner != null) name = $"{thisPtr->Owner->NameString}/{thisPtr->Owner->NameId}"; - PluginLog.Debug($"AddStatusDetour on: {name}, status={statusId}/{param} {Svc.Data.GetExcelSheet().GetRow(statusId)?.Name}"); + PluginLog.Debug($"AddStatusDetour on: {name}, status={statusId}/{param} {Svc.Data.GetExcelSheet().GetRowOrDefault(statusId)?.Name}"); } catch(Exception e) { diff --git a/Splatoon/Splatoon.cs b/Splatoon/Splatoon.cs index 3b0b8552..a00cf979 100644 --- a/Splatoon/Splatoon.cs +++ b/Splatoon/Splatoon.cs @@ -15,7 +15,7 @@ using ECommons.ObjectLifeTracker; using ECommons.SimpleGui; using ECommons.Singletons; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using NotificationMasterAPI; using PInvoke; using Splatoon.Gui; @@ -246,7 +246,7 @@ public Splatoon(IDalamudPluginInterface pluginInterface) loader = new Loader(this); } - internal static void OnLogout() + internal static void OnLogout(int a, int b) { ScriptingProcessor.TerritoryChanged(); } diff --git a/Splatoon/Splatoon.json b/Splatoon/Splatoon.json index 5adb65ce..76ed441e 100644 --- a/Splatoon/Splatoon.json +++ b/Splatoon/Splatoon.json @@ -1,20 +1,21 @@ { - "Author": "NightmareXIV", - "Name": "Splatoon", - "Punchline": "Redefining FFXIV navigation with unlimited, precise waymarks.", - "Description": "Splatoon is a powerful accessibility tool. It revolutionizes gameplay with its custom waymark system, offering the ability to create unlimited grouped waymarks, labels, and actor indicators with exacting pixel precision. This feature empowers players by making crucial objects and events more visually discernible, thereby facilitating quicker reactions. However, it's important to note that the plugin does not come pre-loaded with presets. Players have the freedom to craft their own or import existing ones, offering a personalized touch to their gaming experience.", - "Tags": [ - "Utility", - "Accessibility" - ], - "InternalName": "Splatoon", - "RepoUrl": "https://github.com/PunishXIV/Splatoon", - "ApplicableVersion": "any", - "LastUpdate": 1684437468, - "DownloadLinkInstall": "https://love.puni.sh/plugins/Splatoon/latest.zip", - "DownloadLinkUpdate": "https://love.puni.sh/plugins/Splatoon/latest.zip", - "DownloadLinkTesting": "https://love.puni.sh/plugins/Splatoon/latest.zip", - "AcceptsFeedback": true, - "IconUrl": "https://love.puni.sh/resources/splatoon.png" + "Author": "NightmareXIV", + "Name": "Splatoon", + "Punchline": "Redefining FFXIV navigation with unlimited, precise waymarks.", + "Description": "Splatoon is a powerful accessibility tool. It revolutionizes gameplay with its custom waymark system, offering the ability to create unlimited grouped waymarks, labels, and actor indicators with exacting pixel precision. This feature empowers players by making crucial objects and events more visually discernible, thereby facilitating quicker reactions. However, it's important to note that the plugin does not come pre-loaded with presets. Players have the freedom to craft their own or import existing ones, offering a personalized touch to their gaming experience.", + "Tags": [ + "Utility", + "Accessibility" + ], + "InternalName": "Splatoon", + "RepoUrl": "https://github.com/PunishXIV/Splatoon", + "ApplicableVersion": "any", + "LastUpdate": 1684437468, + "DownloadLinkInstall": "https://love.puni.sh/plugins/Splatoon/latest.zip", + "DownloadLinkUpdate": "https://love.puni.sh/plugins/Splatoon/latest.zip", + "DownloadLinkTesting": "https://love.puni.sh/plugins/Splatoon/latest.zip", + "AcceptsFeedback": true, + "IconUrl": "https://love.puni.sh/resources/splatoon.png", + "DalamudApiLevel": 11 } diff --git a/Splatoon/Utility/LayoutUtils.cs b/Splatoon/Utility/LayoutUtils.cs index ec4258d3..36e21e1a 100644 --- a/Splatoon/Utility/LayoutUtils.cs +++ b/Splatoon/Utility/LayoutUtils.cs @@ -268,7 +268,7 @@ public static bool IsLayoutVisible(Layout i) if ((i.ZoneLockH.Count > 0 && !i.ZoneLockH.Contains(Svc.ClientState.TerritoryType)).Invert(i.IsZoneBlacklist)) return false; if (i.Scenes.Count > 0 && !i.Scenes.Contains(*Scene.ActiveScene)) return false; if (i.Phase != 0 && i.Phase != P.Phase) return false; - if (i.JobLock != 0 && !Bitmask.IsBitSet(i.JobLock, (int)Svc.ClientState.LocalPlayer.ClassJob.Id)) return false; + if (i.JobLock != 0 && !Bitmask.IsBitSet(i.JobLock, (int)Svc.ClientState.LocalPlayer.ClassJob.RowId)) return false; if ((i.DCond == 1 || i.DCond == 3) && !Svc.Condition[ConditionFlag.InCombat]) return false; if ((i.DCond == 2 || i.DCond == 3) && !Svc.Condition[ConditionFlag.BoundByDuty]) return false; if (i.DCond == 4 && !(Svc.Condition[ConditionFlag.InCombat] From ace8462827bcaf54c328ceb2c5051610b6dc3941 Mon Sep 17 00:00:00 2001 From: Limiana <5073202+Limiana@users.noreply.github.com> Date: Fri, 15 Nov 2024 03:10:26 +0300 Subject: [PATCH 03/14] 7.1 --- ECommons | 2 +- Splatoon/Gui/CGuiDebug.cs | 2 +- Splatoon/Gui/Explorer.cs | 5 +- .../Gui/Layouts/Elements/LayoutDrawElement.cs | 2 +- Splatoon/Memory/AttachedInfo.cs | 2 +- Splatoon/Memory/Marking.cs | 2 +- Splatoon/Memory/Scene.cs | 1 + Splatoon/Modules/Commands.cs | 2 +- Splatoon/RenderEngines/CommonRenderUtils.cs | 2 +- .../DirectX11/DirectX11Renderer.cs | 1 + Splatoon/Splatoon.cs | 55 ++++++++++--------- Splatoon/Splatoon.csproj | 2 +- Splatoon/Utility/LayoutUtils.cs | 4 +- ffxiv_pictomancy | 2 +- revocationList.txt | 9 +-- 15 files changed, 45 insertions(+), 48 deletions(-) diff --git a/ECommons b/ECommons index ed5805c4..b7282bc1 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit ed5805c40b459d20e5c610c9cc0ea91501da67a3 +Subproject commit b7282bc11ca11c9c8f4ac4fd231857ba97517c17 diff --git a/Splatoon/Gui/CGuiDebug.cs b/Splatoon/Gui/CGuiDebug.cs index 00380c42..e45e5c17 100644 --- a/Splatoon/Gui/CGuiDebug.cs +++ b/Splatoon/Gui/CGuiDebug.cs @@ -173,7 +173,7 @@ void DisplayDebug() ImGuiEx.Text($"{((a is ICharacter chr) ? chr.IsCharacterVisible() : "Not a char")}"); ImGui.SameLine(); ImGui.SetCursorPosX(600f); - ImGuiEx.Text(a is ICharacter chr2 ? $"{chr2.Struct()->CharacterData.ModelCharaId.Format()}" : "Not a char"); + ImGuiEx.Text(a is ICharacter chr2 ? $"{chr2.Struct()->ModelCharaId.Format()}" : "Not a char"); }); } } diff --git a/Splatoon/Gui/Explorer.cs b/Splatoon/Gui/Explorer.cs index bd1b0865..eacb94d1 100644 --- a/Splatoon/Gui/Explorer.cs +++ b/Splatoon/Gui/Explorer.cs @@ -83,14 +83,11 @@ internal static void DrawGameObject(IGameObject obj) ImGuiEx.TextCopy($"{"HP".Loc()}: {c.CurrentHp} / {c.MaxHp}"); ImGuiEx.TextCopy($"{"Name NPC ID".Loc()}: {c.NameId}"); ImGuiEx.TextWrappedCopy($"Customize: {c.Customize.Select(x => $"{x:X2}").Join(" ")}"); - ImGuiEx.TextCopy($"ModelCharaId: {c.Struct()->CharacterData.ModelCharaId}"); - ImGuiEx.TextCopy($"ModelCharaId_2: {c.Struct()->CharacterData.ModelCharaId_2}"); + ImGuiEx.TextCopy($"ModelCharaId: {c.Struct()->ModelCharaId}"); ImGuiEx.TextCopy($"{"Visible".Loc()}: {c.IsCharacterVisible()}"); ImGuiEx.TextCopy($"VfxData: {(nint)c.Struct()->Vfx.VfxData:X16}"); ImGuiEx.TextCopy($"VfxData2: {(nint)c.Struct()->Vfx.VfxData2:X16}"); ImGuiEx.TextCopy($"Omen: {(nint)c.Struct()->Vfx.Omen:X16}"); - ImGuiEx.TextCopy($"ModelSkeletonId: {(nint)c.Struct()->CharacterData.ModelSkeletonId:X16}"); - ImGuiEx.TextCopy($"ModelSkeletonId2: {(nint)c.Struct()->CharacterData.ModelSkeletonId_2:X16}"); ImGuiEx.TextCopy($"TargetObject: {c.TargetObject}"); ImGuiEx.TextCopy($"TargetObjectID: {c.TargetObjectId}"); ImGuiEx.TextCopy($"EventState: {c.Struct()->EventState}"); diff --git a/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs b/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs index 5fa97d0c..aecbcb1d 100644 --- a/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs +++ b/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs @@ -366,7 +366,7 @@ internal void LayoutDrawElement(Layout l, Element el, bool forceEnable = false) el.refActorObjectID = Svc.Targets.Target.EntityId; if (Svc.Targets.Target is ICharacter c) { - el.refActorModelID = (uint)c.Struct()->CharacterData.ModelCharaId; + el.refActorModelID = (uint)c.Struct()->ModelCharaId; el.refActorNPCNameID = c.NameId; } el.refActorNPCID = Svc.Targets.Target.Struct()->GetNameId(); diff --git a/Splatoon/Memory/AttachedInfo.cs b/Splatoon/Memory/AttachedInfo.cs index 6436db5e..7085ee37 100644 --- a/Splatoon/Memory/AttachedInfo.cs +++ b/Splatoon/Memory/AttachedInfo.cs @@ -78,7 +78,7 @@ static nint ActorVfxNewHandler(char* a1, nint a2, nint a3, float a4, char a5, us { if (obj is ICharacter c) { - var text = $"VFX {vfxPath} spawned on {(obj.Address == Svc.ClientState.LocalPlayer?.Address ? "me" : obj.Name.ToString())} npc id={obj.Struct()->GetNameId()}, model id={c.Struct()->CharacterData.ModelCharaId}, name npc id={c.NameId}, position={obj.Position.ToString()}"; + var text = $"VFX {vfxPath} spawned on {(obj.Address == Svc.ClientState.LocalPlayer?.Address ? "me" : obj.Name.ToString())} npc id={obj.Struct()->GetNameId()}, model id={c.Struct()->ModelCharaId}, name npc id={c.NameId}, position={obj.Position.ToString()}"; P.ChatMessageQueue.Enqueue(text); if (P.Config.Logging) Logger.Log(text); } diff --git a/Splatoon/Memory/Marking.cs b/Splatoon/Memory/Marking.cs index b5554ee6..6a8060eb 100644 --- a/Splatoon/Memory/Marking.cs +++ b/Splatoon/Memory/Marking.cs @@ -11,7 +11,7 @@ public class Marking public unsafe static bool HaveMark(ICharacter obj, uint index) { - if (obj.Struct()->CharacterData.ModelCharaId != 0) + if (obj.Struct()->ModelCharaId != 0) { if (Svc.ClientState.LocalPlayer.EntityId == GetMarker(index)) { diff --git a/Splatoon/Memory/Scene.cs b/Splatoon/Memory/Scene.cs index e2e9a611..2f037f83 100644 --- a/Splatoon/Memory/Scene.cs +++ b/Splatoon/Memory/Scene.cs @@ -12,6 +12,7 @@ public static unsafe class Scene internal static byte* ActiveScene = null; internal static void Init() { + PluginLog.Debug($"Init Scene"); var n = (nint)EnvManager.Instance(); if (n == nint.Zero) { diff --git a/Splatoon/Modules/Commands.cs b/Splatoon/Modules/Commands.cs index 2f0c5d2f..7b93dd49 100644 --- a/Splatoon/Modules/Commands.cs +++ b/Splatoon/Modules/Commands.cs @@ -78,7 +78,7 @@ internal unsafe Commands(Splatoon P) el.refActorNameIntl.CurrentLangString = Svc.Targets.Target.Name.ToString(); el.refActorDataID = Svc.Targets.Target.DataId; el.refActorObjectID = Svc.Targets.Target.EntityId; - if (Svc.Targets.Target is ICharacter c) el.refActorModelID = (uint)c.Struct()->CharacterData.ModelCharaId; + if (Svc.Targets.Target is ICharacter c) el.refActorModelID = (uint)c.Struct()->ModelCharaId; Notify.Success("Successfully set target"); } } diff --git a/Splatoon/RenderEngines/CommonRenderUtils.cs b/Splatoon/RenderEngines/CommonRenderUtils.cs index dc9dad65..0ce056b1 100644 --- a/Splatoon/RenderEngines/CommonRenderUtils.cs +++ b/Splatoon/RenderEngines/CommonRenderUtils.cs @@ -22,7 +22,7 @@ internal static string ProcessPlaceholders(this string s, IGameObject go) .Replace("$NAME", go.Name.ToString()) .Replace("$OBJECTID", $"{go.EntityId.Format()}") .Replace("$DATAID", $"{go.DataId.Format()}") - .Replace("$MODELID", $"{(go is ICharacter chr ? chr.Struct()->CharacterData.ModelCharaId : 0).Format()}") + .Replace("$MODELID", $"{(go is ICharacter chr ? chr.Struct()->ModelCharaId : 0).Format()}") .Replace("$HITBOXR", $"{go.HitboxRadius:F1}") .Replace("$KIND", $"{go.ObjectKind}") .Replace("$NPCID", $"{go.Struct()->GetNameId().Format()}") diff --git a/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs b/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs index 551a5782..1488b496 100644 --- a/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs +++ b/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs @@ -21,6 +21,7 @@ internal DirectX11Renderer() } try { + //throw new NotImplementedException(); DirectX11Scene = new(this); } catch (Exception e) diff --git a/Splatoon/Splatoon.cs b/Splatoon/Splatoon.cs index a00cf979..809f8f2f 100644 --- a/Splatoon/Splatoon.cs +++ b/Splatoon/Splatoon.cs @@ -119,37 +119,42 @@ internal void Load(IDalamudPluginInterface pluginInterface) Svc.ClientState.TerritoryChanged += TerritoryChangedEvent; Svc.PluginInterface.UiBuilder.DisableUserUiHide = Config.ShowOnUiHide; LimitGaugeResets = Svc.Data.GetExcelSheet().GetRow(2844).Text.ToString(); - foreach(var x in Svc.Data.GetExcelSheet(ClientLanguage.English) - .Union(Svc.Data.GetExcelSheet(ClientLanguage.French)) - .Union(Svc.Data.GetExcelSheet(ClientLanguage.Japanese)) - .Union(Svc.Data.GetExcelSheet(ClientLanguage.German))) + Task.Run(() => { - if(x.Singular != "") + var dict = new Dictionary(); + var dictAll = new Dictionary(); + foreach(var lang in Enum.GetValues()) { - var n = x.Singular.ToString().ToLower(); - NameNpcIDsAll[n] = x.RowId; - NameNpcIDs[n] = x.RowId; - } - } - var bNames = new HashSet(); - foreach(var lang in Enum.GetValues()) - { - bNames.Clear(); - foreach(var x in Svc.Data.GetExcelSheet(lang)) - { - var n = x.Singular.ToString().ToLower(); - if(bNames.Contains(n)) + foreach(var x in Svc.Data.GetExcelSheet(lang)) { - NameNpcIDs[n] = 0; - PluginLog.Verbose($"Name npc id {n} is ambiguous"); + if(x.Singular != "") + { + var n = x.Singular.ToString().ToLower(); + dictAll[n] = x.RowId; + dict[n] = x.RowId; + } } - else + } + var bNames = new HashSet(); + foreach(var lang in Enum.GetValues()) + { + bNames.Clear(); + foreach(var x in Svc.Data.GetExcelSheet(lang)) { - bNames.Add(n); + var n = x.Singular.ToString().ToLower(); + if(bNames.Contains(n)) + { + dict[n] = 0; + } + else + { + bNames.Add(n); + } } } - } - NameNpcIDs = NameNpcIDs.Where(x => x.Value != 0).ToDictionary(x => x.Key, x => x.Value); + NameNpcIDs = dict.Where(x => x.Value != 0).ToDictionary(x => x.Key, x => x.Value); + NameNpcIDsAll = dictAll; + }); StreamDetector.Start(); AttachedInfo.Init(); Logger.OnTerritoryChanged(); @@ -387,7 +392,7 @@ internal void Tick(IFramework framework) foreach(var t in Svc.Objects) { var ischar = t is ICharacter; - var obj = (t.Name.ToString(), t.EntityId, (ulong)t.Struct()->GetGameObjectId(), t.DataId, ischar ? ((ICharacter)t).Struct()->CharacterData.ModelCharaId : 0, t.Struct()->GetNameId(), ischar ? ((ICharacter)t).NameId : 0, t.ObjectKind); + var obj = (t.Name.ToString(), t.EntityId, (ulong)t.Struct()->GetGameObjectId(), t.DataId, ischar ? ((ICharacter)t).Struct()->ModelCharaId : 0, t.Struct()->GetNameId(), ischar ? ((ICharacter)t).NameId : 0, t.ObjectKind); loggedObjectList.TryAdd(obj, new ObjectInfo()); loggedObjectList[obj].ExistenceTicks++; loggedObjectList[obj].IsChar = ischar; diff --git a/Splatoon/Splatoon.csproj b/Splatoon/Splatoon.csproj index 0bcff570..5d597a46 100644 --- a/Splatoon/Splatoon.csproj +++ b/Splatoon/Splatoon.csproj @@ -2,7 +2,7 @@ NightmareXIV - 3.7.1.9 + 3.7.2.1 diff --git a/Splatoon/Utility/LayoutUtils.cs b/Splatoon/Utility/LayoutUtils.cs index 36e21e1a..da3047b0 100644 --- a/Splatoon/Utility/LayoutUtils.cs +++ b/Splatoon/Utility/LayoutUtils.cs @@ -14,7 +14,7 @@ public static bool IsAttributeMatches(Element e, IGameObject o) if (e.refActorComparisonAnd) { return (e.refActorNameIntl.Get(e.refActorName) == String.Empty || IsNameMatches(e, o)) && - (e.refActorModelID == 0 || (o is ICharacter c && c.Struct()->CharacterData.ModelCharaId == e.refActorModelID)) && + (e.refActorModelID == 0 || (o is ICharacter c && c.Struct()->ModelCharaId == e.refActorModelID)) && (e.refActorObjectID == 0 || o.EntityId == e.refActorObjectID) && (e.refActorDataID == 0 || o.DataId == e.refActorDataID) && (e.refActorNPCID == 0 || o.Struct()->GetNameId() == e.refActorNPCID) && @@ -27,7 +27,7 @@ public static bool IsAttributeMatches(Element e, IGameObject o) else { if (e.refActorComparisonType == 0 && IsNameMatches(e, o)) return true; - if (e.refActorComparisonType == 1 && o is ICharacter c && c.Struct()->CharacterData.ModelCharaId == e.refActorModelID) return true; + if (e.refActorComparisonType == 1 && o is ICharacter c && c.Struct()->ModelCharaId == e.refActorModelID) return true; if (e.refActorComparisonType == 2 && o.EntityId == e.refActorObjectID) return true; if (e.refActorComparisonType == 3 && o.DataId == e.refActorDataID) return true; if (e.refActorComparisonType == 4 && o.Struct()->GetNameId() == e.refActorNPCID) return true; diff --git a/ffxiv_pictomancy b/ffxiv_pictomancy index 967186c3..3ad552ae 160000 --- a/ffxiv_pictomancy +++ b/ffxiv_pictomancy @@ -1 +1 @@ -Subproject commit 967186c3dc8e84a98184091cc567c2d66bfd45fd +Subproject commit 3ad552aeb28f03d7fd0f75e1f7c4ea1ec5257bf3 diff --git a/revocationList.txt b/revocationList.txt index c036b1e1..2f49fad1 100644 --- a/revocationList.txt +++ b/revocationList.txt @@ -1,8 +1 @@ -3.7.0.0 -3.6.0.0 -3.6.0.1 -3.6.0.2 -3.6.0.3 -3.6.0.4 -3.6.0.5 -3.6.0.6 \ No newline at end of file +3.7.2.0 \ No newline at end of file From dc931acc143d90251ea3fe58d2b1ebbb644c9598 Mon Sep 17 00:00:00 2001 From: Limiana <5073202+Limiana@users.noreply.github.com> Date: Fri, 15 Nov 2024 04:37:20 +0300 Subject: [PATCH 04/14] 7.1 --- .gitmodules | 3 +++ FFXIVClientStructs | 1 + 2 files changed, 4 insertions(+) create mode 160000 FFXIVClientStructs diff --git a/.gitmodules b/.gitmodules index 1fb0dbdd..6d147ed2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "ffxiv_pictomancy"] path = ffxiv_pictomancy url = https://github.com/Limiana/ffxiv_pictomancy +[submodule "FFXIVClientStructs"] + path = FFXIVClientStructs + url = https://github.com/Limiana/FFXIVClientStructs diff --git a/FFXIVClientStructs b/FFXIVClientStructs new file mode 160000 index 00000000..b5240ab1 --- /dev/null +++ b/FFXIVClientStructs @@ -0,0 +1 @@ +Subproject commit b5240ab1f8b0170a4637f0a3f99baa9f6bd3966b From 36358d84e3a296d0bcd40dae06c5c7a0d7def983 Mon Sep 17 00:00:00 2001 From: Limiana <5073202+Limiana@users.noreply.github.com> Date: Fri, 15 Nov 2024 04:37:24 +0300 Subject: [PATCH 05/14] 7.1 --- Splatoon.sln | 40 ++++++++++++++++++++++++++++++++++++++++ Splatoon/Splatoon.csproj | 21 +++++++++++++++++---- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/Splatoon.sln b/Splatoon.sln index ced8368e..ad9424f6 100644 --- a/Splatoon.sln +++ b/Splatoon.sln @@ -22,6 +22,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScriptUpdateFileGenerator", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pictomancy", "ffxiv_pictomancy\Pictomancy\Pictomancy.csproj", "{0AEC5DEE-DBF9-46CD-B71B-A61C2BBB04BD}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InteropGenerator", "FFXIVClientStructs\InteropGenerator\InteropGenerator.csproj", "{333E8025-F6AC-449C-830B-7464EB1B64F7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InteropGenerator.Runtime", "FFXIVClientStructs\InteropGenerator.Runtime\InteropGenerator.Runtime.csproj", "{0E499D05-9562-49E0-A268-DE158FD0062A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFXIVClientStructs", "FFXIVClientStructs\FFXIVClientStructs\FFXIVClientStructs.csproj", "{41E16A64-ACAE-4657-94BC-1C466A44E07A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFXIVClientStructs.Generators", "FFXIVClientStructs\FFXIVClientStructs.Generators\FFXIVClientStructs.Generators.csproj", "{A0FC5391-610E-402B-8598-0CB276E3E39A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -75,6 +83,38 @@ Global {0AEC5DEE-DBF9-46CD-B71B-A61C2BBB04BD}.Release|Any CPU.Build.0 = Release|Any CPU {0AEC5DEE-DBF9-46CD-B71B-A61C2BBB04BD}.Release|x64.ActiveCfg = Release|Any CPU {0AEC5DEE-DBF9-46CD-B71B-A61C2BBB04BD}.Release|x64.Build.0 = Release|Any CPU + {333E8025-F6AC-449C-830B-7464EB1B64F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {333E8025-F6AC-449C-830B-7464EB1B64F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {333E8025-F6AC-449C-830B-7464EB1B64F7}.Debug|x64.ActiveCfg = Debug|Any CPU + {333E8025-F6AC-449C-830B-7464EB1B64F7}.Debug|x64.Build.0 = Debug|Any CPU + {333E8025-F6AC-449C-830B-7464EB1B64F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {333E8025-F6AC-449C-830B-7464EB1B64F7}.Release|Any CPU.Build.0 = Release|Any CPU + {333E8025-F6AC-449C-830B-7464EB1B64F7}.Release|x64.ActiveCfg = Release|Any CPU + {333E8025-F6AC-449C-830B-7464EB1B64F7}.Release|x64.Build.0 = Release|Any CPU + {0E499D05-9562-49E0-A268-DE158FD0062A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E499D05-9562-49E0-A268-DE158FD0062A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E499D05-9562-49E0-A268-DE158FD0062A}.Debug|x64.ActiveCfg = Debug|Any CPU + {0E499D05-9562-49E0-A268-DE158FD0062A}.Debug|x64.Build.0 = Debug|Any CPU + {0E499D05-9562-49E0-A268-DE158FD0062A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E499D05-9562-49E0-A268-DE158FD0062A}.Release|Any CPU.Build.0 = Release|Any CPU + {0E499D05-9562-49E0-A268-DE158FD0062A}.Release|x64.ActiveCfg = Release|Any CPU + {0E499D05-9562-49E0-A268-DE158FD0062A}.Release|x64.Build.0 = Release|Any CPU + {41E16A64-ACAE-4657-94BC-1C466A44E07A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {41E16A64-ACAE-4657-94BC-1C466A44E07A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {41E16A64-ACAE-4657-94BC-1C466A44E07A}.Debug|x64.ActiveCfg = Debug|Any CPU + {41E16A64-ACAE-4657-94BC-1C466A44E07A}.Debug|x64.Build.0 = Debug|Any CPU + {41E16A64-ACAE-4657-94BC-1C466A44E07A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41E16A64-ACAE-4657-94BC-1C466A44E07A}.Release|Any CPU.Build.0 = Release|Any CPU + {41E16A64-ACAE-4657-94BC-1C466A44E07A}.Release|x64.ActiveCfg = Release|Any CPU + {41E16A64-ACAE-4657-94BC-1C466A44E07A}.Release|x64.Build.0 = Release|Any CPU + {A0FC5391-610E-402B-8598-0CB276E3E39A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0FC5391-610E-402B-8598-0CB276E3E39A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0FC5391-610E-402B-8598-0CB276E3E39A}.Debug|x64.ActiveCfg = Debug|Any CPU + {A0FC5391-610E-402B-8598-0CB276E3E39A}.Debug|x64.Build.0 = Debug|Any CPU + {A0FC5391-610E-402B-8598-0CB276E3E39A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0FC5391-610E-402B-8598-0CB276E3E39A}.Release|Any CPU.Build.0 = Release|Any CPU + {A0FC5391-610E-402B-8598-0CB276E3E39A}.Release|x64.ActiveCfg = Release|Any CPU + {A0FC5391-610E-402B-8598-0CB276E3E39A}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Splatoon/Splatoon.csproj b/Splatoon/Splatoon.csproj index 5d597a46..70d5b6e7 100644 --- a/Splatoon/Splatoon.csproj +++ b/Splatoon/Splatoon.csproj @@ -19,7 +19,24 @@ $(MSBuildProjectDirectory)\ $(AppOutputBase)=Splatoon\ true + true + + + + $(DalamudLibPath)FFXIVClientStructs.dll + False + + + + + CUSTOMCS + + + + + + @@ -71,10 +88,6 @@ $(DalamudLibPath)Lumina.Excel.dll False - - $(DalamudLibPath)FFXIVClientStructs.dll - False - $(DalamudLibPath)Reloaded.Hooks.Definitions.dll False From 569b922fb3384fdff43ff57efd47b724faa05bd2 Mon Sep 17 00:00:00 2001 From: Limiana <5073202+Limiana@users.noreply.github.com> Date: Fri, 15 Nov 2024 22:18:00 +0300 Subject: [PATCH 06/14] 7.1 --- ECommons | 2 +- Splatoon/Gui/CGui.cs | 2 +- Splatoon/Gui/CGuiDebug.cs | 12 +- .../Gui/Layouts/Elements/LayoutDrawElement.cs | 22 ++-- .../DirectX11/DirectX11Renderer.cs | 2 +- .../RenderEngines/DirectX11/DirectX11Scene.cs | 4 +- .../ImGuiLegacy/ImGuiLegacyScene.cs | 31 +++-- Splatoon/Services/!ServiceManager.cs | 1 + Splatoon/Services/VbmCamera.cs | 120 ++++++++++++++++++ Splatoon/Splatoon.cs | 8 ++ Splatoon/Splatoon.csproj | 2 +- Splatoon/Utility/Utils.cs | 20 +++ 12 files changed, 190 insertions(+), 36 deletions(-) create mode 100644 Splatoon/Services/VbmCamera.cs diff --git a/ECommons b/ECommons index b7282bc1..b99ba7a8 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit b7282bc11ca11c9c8f4ac4fd231857ba97517c17 +Subproject commit b99ba7a861300164b9b293b2bbbd510af0cda8a2 diff --git a/Splatoon/Gui/CGui.cs b/Splatoon/Gui/CGui.cs index b2ca674a..961f3243 100644 --- a/Splatoon/Gui/CGui.cs +++ b/Splatoon/Gui/CGui.cs @@ -223,7 +223,7 @@ private void HTTPExportToClipboard(Element el) private void SetCursorTo(float refX, float refZ, float refY) { - if (Svc.GameGui.WorldToScreen(new Vector3(refX, refZ, refY), out var screenPos)) + if (Utils.WorldToScreen(new Vector3(refX, refZ, refY), out var screenPos)) { var point = new POINT() { x = (int)screenPos.X, y = (int)screenPos.Y }; //Chat.Print(point.X + "/" + point.Y); diff --git a/Splatoon/Gui/CGuiDebug.cs b/Splatoon/Gui/CGuiDebug.cs index e45e5c17..ccecad08 100644 --- a/Splatoon/Gui/CGuiDebug.cs +++ b/Splatoon/Gui/CGuiDebug.cs @@ -112,7 +112,7 @@ void DisplayDebug() { Safe(delegate { - s2wb = Svc.GameGui.WorldToScreen(new Vector3(s2wx, s2wz, s2wy), out Vector2 pos); + s2wb = Utils.WorldToScreen(new Vector3(s2wx, s2wz, s2wy), out Vector2 pos); s2wrx = pos.X; s2wry = pos.Y; }); @@ -123,11 +123,11 @@ void DisplayDebug() { ImGuiEx.Text($"Player+1 distance: {Vector3.Distance(Svc.ClientState.LocalPlayer.Position, Svc.ClientState.LocalPlayer.Position + new Vector3(1, 0, 0))}"); ImGuiEx.Text($"Player+1+1 distance: {Vector3.Distance(Svc.ClientState.LocalPlayer.Position + new Vector3(1, 0, 0), Svc.ClientState.LocalPlayer.Position + new Vector3(2, 0, 0))}"); - Svc.GameGui.WorldToScreen(Svc.ClientState.LocalPlayer.Position, out var v1); - Svc.GameGui.WorldToScreen(Svc.ClientState.LocalPlayer.Position + new Vector3(1, 0, 0), out var v2); - Svc.GameGui.WorldToScreen(Svc.ClientState.LocalPlayer.Position + new Vector3(2, 0, 0), out var v3); - Svc.GameGui.WorldToScreen(Svc.ClientState.LocalPlayer.Position + new Vector3(3, 0, 0), out var v4); - Svc.GameGui.WorldToScreen(Svc.ClientState.LocalPlayer.Position + new Vector3(4, 0, 0), out var v5); + Utils.WorldToScreen(Svc.ClientState.LocalPlayer.Position, out var v1); + Utils.WorldToScreen(Svc.ClientState.LocalPlayer.Position + new Vector3(1, 0, 0), out var v2); + Utils.WorldToScreen(Svc.ClientState.LocalPlayer.Position + new Vector3(2, 0, 0), out var v3); + Utils.WorldToScreen(Svc.ClientState.LocalPlayer.Position + new Vector3(3, 0, 0), out var v4); + Utils.WorldToScreen(Svc.ClientState.LocalPlayer.Position + new Vector3(4, 0, 0), out var v5); ImGuiEx.Text($"Screen distance: {Vector2.Distance(v1, v2)}, {Vector2.Distance(v2, v3)}, {Vector2.Distance(v3, v4)}, {Vector2.Distance(v4, v5)}"); ImGui.Separator(); } diff --git a/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs b/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs index aecbcb1d..42126d34 100644 --- a/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs +++ b/Splatoon/Gui/Layouts/Elements/LayoutDrawElement.cs @@ -424,13 +424,16 @@ internal void LayoutDrawElement(Layout l, Element el, bool forceEnable = false) ImGui.SetNextItemWidth(100f); ImGui.InputText("##ActionName" + i + k, ref ActionName, 100); ImGui.SameLine(); - if (ImGui.Button("Add".Loc() + "##byactionname" + i + k)) + if(ImGui.Button("Add".Loc() + "##byactionname" + i + k)) { - foreach (var x in Svc.Data.GetExcelSheet().Union(Svc.Data.GetExcelSheet(ClientLanguage.English))) - { - if (x.Name.ToString().Equals(ActionName, StringComparison.OrdinalIgnoreCase)) + foreach(var lang in (ClientLanguage?[])[null, ClientLanguage.English]) + { + foreach(var x in Svc.Data.GetExcelSheet(lang)) { - el.refActorCastId.Add(x.RowId); + if(x.Name.ToString().Equals(ActionName, StringComparison.OrdinalIgnoreCase)) + { + el.refActorCastId.Add(x.RowId); + } } } } @@ -470,11 +473,14 @@ internal void LayoutDrawElement(Layout l, Element el, bool forceEnable = false) ImGui.SameLine(); if (ImGui.Button("Add".Loc() + "##bybuffname" + i + k)) { - foreach (var x in Svc.Data.GetExcelSheet().Union(Svc.Data.GetExcelSheet(ClientLanguage.English))) + foreach(var lang in (ClientLanguage?[])[null, ClientLanguage.English]) { - if (x.Name.ToString().Equals(BuffName, StringComparison.OrdinalIgnoreCase)) + foreach(var x in Svc.Data.GetExcelSheet(lang)) { - el.refActorBuffId.Add(x.RowId); + if(x.Name.ToString().Equals(BuffName, StringComparison.OrdinalIgnoreCase)) + { + el.refActorBuffId.Add(x.RowId); + } } } } diff --git a/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs b/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs index 1488b496..fd6ca585 100644 --- a/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs +++ b/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs @@ -21,7 +21,7 @@ internal DirectX11Renderer() } try { - //throw new NotImplementedException(); + throw new NotImplementedException(); DirectX11Scene = new(this); } catch (Exception e) diff --git a/Splatoon/RenderEngines/DirectX11/DirectX11Scene.cs b/Splatoon/RenderEngines/DirectX11/DirectX11Scene.cs index bcd8cbb7..220e7368 100644 --- a/Splatoon/RenderEngines/DirectX11/DirectX11Scene.cs +++ b/Splatoon/RenderEngines/DirectX11/DirectX11Scene.cs @@ -277,7 +277,7 @@ public void DrawLine(DisplayObjectLine line, PctDrawList drawList) public void DrawTextWorld(DisplayObjectText e) { - if (Svc.GameGui.WorldToScreen( + if (Utils.WorldToScreen( new Vector3(e.x, e.z, e.y), out var pos)) { @@ -309,7 +309,7 @@ public void DrawText(DisplayObjectText e, Vector2 pos) public void DrawPoint(DisplayObjectDot e) { - if (Svc.GameGui.WorldToScreen(new Vector3(e.x, e.y, e.z), out var pos)) + if (Utils.WorldToScreen(new Vector3(e.x, e.y, e.z), out var pos)) ImGui.GetWindowDrawList().AddCircleFilled( new Vector2(pos.X, pos.Y), e.thickness, diff --git a/Splatoon/RenderEngines/ImGuiLegacy/ImGuiLegacyScene.cs b/Splatoon/RenderEngines/ImGuiLegacy/ImGuiLegacyScene.cs index 878188c7..d78f0daa 100644 --- a/Splatoon/RenderEngines/ImGuiLegacy/ImGuiLegacyScene.cs +++ b/Splatoon/RenderEngines/ImGuiLegacy/ImGuiLegacyScene.cs @@ -1,5 +1,4 @@ using Dalamud.Game.ClientState.Conditions; -using ECommons.Configuration; using static Splatoon.RenderEngines.ImGuiLegacy.ImGuiLegacyDisplayObjects; namespace Splatoon.RenderEngines.ImGuiLegacy; @@ -136,7 +135,7 @@ void Draw() internal Vector3 TranslateToScreen(double x, double y, double z) { Vector2 temp; - Svc.GameGui.WorldToScreen( + Utils.WorldToScreen( new Vector3((float)x, (float)y, (float)z), out temp ); @@ -193,7 +192,7 @@ private void DrawLineWorld(DisplayObjectLine e) private (Vector2? posA, Vector2? posB) GetAdjustedLine(Vector3 pointA, Vector3 pointB) { - var resultA = Svc.GameGui.WorldToScreen(new Vector3(pointA.X, pointA.Z, pointA.Y), out var posA); + var resultA = Utils.WorldToScreen(new Vector3(pointA.X, pointA.Z, pointA.Y), out var posA); if (!resultA && !P.DisableLineFix) { var posA2 = GetLineClosestToVisiblePoint(pointA, @@ -207,7 +206,7 @@ private void DrawLineWorld(DisplayObjectLine e) posA = posA2.Value; } } - var resultB = Svc.GameGui.WorldToScreen(new Vector3(pointB.X, pointB.Z, pointB.Y), out var posB); + var resultB = Utils.WorldToScreen(new Vector3(pointB.X, pointB.Z, pointB.Y), out var posB); if (!resultB && !P.DisableLineFix) { var posB2 = GetLineClosestToVisiblePoint(pointB, @@ -250,12 +249,12 @@ private void DrawRectWorld(DisplayObjectRect e) //oof private Vector2? GetLineClosestToVisiblePoint(Vector3 currentPos, Vector3 targetPos, float eps) { - if (!Svc.GameGui.WorldToScreen(targetPos, out var res)) return null; + if (!Utils.WorldToScreen(targetPos, out var res)) return null; while (true) { var mid = (currentPos + targetPos) / 2; - if (Svc.GameGui.WorldToScreen(mid, out var pos)) + if (Utils.WorldToScreen(mid, out var pos)) { if ((res - pos).Length() < eps) return res; targetPos = mid; @@ -269,7 +268,7 @@ private void DrawRectWorld(DisplayObjectRect e) //oof { if (curSegment > numSegments) return null; var nextPos = currentPos + delta; - if (Svc.GameGui.WorldToScreen(new Vector3(nextPos.X, nextPos.Z, nextPos.Y), out var pos)) + if (Utils.WorldToScreen(new Vector3(nextPos.X, nextPos.Z, nextPos.Y), out var pos)) { var preciseVector = GetLineClosestToVisiblePoint(currentPos, (nextPos - currentPos) / P.Config.lineSegments, 0, P.Config.lineSegments); return preciseVector.HasValue ? preciseVector.Value : pos; @@ -282,7 +281,7 @@ private void DrawRectWorld(DisplayObjectRect e) //oof public void DrawTextWorld(DisplayObjectText e) { - if (Svc.GameGui.WorldToScreen( + if (Utils.WorldToScreen( new Vector3(e.x, e.z, e.y), out var pos)) { @@ -315,7 +314,7 @@ public void DrawText(DisplayObjectText e, Vector2 pos) public void DrawRingWorld(DisplayObjectCircle e) { var seg = P.Config.segments / 2; - Svc.GameGui.WorldToScreen(new Vector3( + Utils.WorldToScreen(new Vector3( e.x + e.radius * (float)Math.Sin(CamAngleX), e.z, e.y + e.radius * (float)Math.Cos(CamAngleX) @@ -324,7 +323,7 @@ public void DrawRingWorld(DisplayObjectCircle e) var elements = new Vector2?[P.Config.segments]; for (var i = 0; i < P.Config.segments; i++) { - visible = Svc.GameGui.WorldToScreen( + visible = Utils.WorldToScreen( new Vector3(e.x + e.radius * (float)Math.Sin(Math.PI / seg * i), e.z, e.y + e.radius * (float)Math.Cos(Math.PI / seg * i) @@ -358,10 +357,10 @@ public void DrawConeWorld(DisplayObjectCone e) (e.y, e.z) = (e.z, e.y); Vector2 v; - Svc.GameGui.WorldToScreen(new Vector3(e.x, e.y, e.z), out v); + Utils.WorldToScreen(new Vector3(e.x, e.y, e.z), out v); drawList.PathLineTo(v); - Svc.GameGui.WorldToScreen(new Vector3(e.x + e.radius * MathF.Cos(e.startRad), e.y, e.z + e.radius * MathF.Sin(e.startRad)), out v); + Utils.WorldToScreen(new Vector3(e.x + e.radius * MathF.Cos(e.startRad), e.y, e.z + e.radius * MathF.Sin(e.startRad)), out v); drawList.PathLineTo(v); for (var i = e.startRad; i < e.endRad; i += MathF.PI / 2) @@ -380,9 +379,9 @@ public void DrawConeWorld(DisplayObjectCone e) var endPoint = new Vector3( e.x + e.radius * MathF.Cos(i + theta), e.y, e.z + e.radius * MathF.Sin(i + theta)); - Svc.GameGui.WorldToScreen(arcMid1, out var v1); - Svc.GameGui.WorldToScreen(arcMid2, out var v2); - Svc.GameGui.WorldToScreen(endPoint, out v); + Utils.WorldToScreen(arcMid1, out var v1); + Utils.WorldToScreen(arcMid2, out var v2); + Utils.WorldToScreen(endPoint, out v); drawList.PathBezierCubicCurveTo(v1, v2, v); } @@ -398,7 +397,7 @@ public void DrawConeWorld(DisplayObjectCone e) public void DrawPoint(DisplayObjectDot e) { - if (Svc.GameGui.WorldToScreen(new Vector3(e.x, e.z, e.y), out var pos)) + if (Utils.WorldToScreen(new Vector3(e.x, e.z, e.y), out var pos)) ImGui.GetWindowDrawList().AddCircleFilled( new Vector2(pos.X, pos.Y), e.thickness, diff --git a/Splatoon/Services/!ServiceManager.cs b/Splatoon/Services/!ServiceManager.cs index 2846cc06..9273bb7f 100644 --- a/Splatoon/Services/!ServiceManager.cs +++ b/Splatoon/Services/!ServiceManager.cs @@ -9,5 +9,6 @@ namespace Splatoon.Services; public static class S { internal static RenderManager RenderManager { get; private set; } + internal static VbmCamera VbmCamera { get; private set; } //internal static StatusEffectManager StatusEffectManager { get; private set; } } diff --git a/Splatoon/Services/VbmCamera.cs b/Splatoon/Services/VbmCamera.cs new file mode 100644 index 00000000..9273050f --- /dev/null +++ b/Splatoon/Services/VbmCamera.cs @@ -0,0 +1,120 @@ +using Dalamud.Interface.Utility; +using Dalamud.Utility; +using ECommons; +using ECommons.EzEventManager; +using FFXIVClientStructs.FFXIV.Client.Game.Control; +using FFXIVClientStructs.FFXIV.Client.Graphics.Kernel; +using ImGuiNET; +using PInvoke; + +namespace Splatoon.Services; + +internal unsafe class VbmCamera +{ + public static VbmCamera? Instance; + + public Vector3 Origin; + public Matrix4x4 View; + public Matrix4x4 Proj; + public Matrix4x4 ViewProj; + public Vector4 NearPlane; + public float CameraAzimuth; // facing north = 0, facing west = pi/4, facing south = +-pi/2, facing east = -pi/4 + public float CameraAltitude; // facing horizontally = 0, facing down = pi/4, facing up = -pi/4 + public Vector2 ViewportSize; + + private readonly List<(Vector2 from, Vector2 to, uint col)> _worldDrawLines = []; + + private VbmCamera() + { + new EzFrameworkUpdate(Update); + } + + public unsafe void Update() + { + var controlCamera = CameraManager.Instance()->GetActiveCamera(); + var renderCamera = controlCamera != null ? controlCamera->SceneCamera.RenderCamera : null; + if(renderCamera == null) + return; + + Origin = renderCamera->Origin; + View = renderCamera->ViewMatrix; + View.M44 = 1; // for whatever reason, game doesn't initialize it... + Proj = renderCamera->ProjectionMatrix; + ViewProj = View * Proj; + + // note that game uses reverse-z by default, so we can't just get full plane equation by reading column 3 of vp matrix + // so just calculate it manually: column 3 of view matrix is plane equation for a plane equation going through origin + // proof: + // plane equation p is such that p.dot(Q, 1) = 0 if Q lines on the plane => pw = -Q.dot(n); for view matrix, V43 is -origin.dot(forward) + // plane equation for near plane has Q.dot(n) = O.dot(n) - near => pw = V43 + near + NearPlane = new(View.M13, View.M23, View.M33, View.M43 + renderCamera->NearPlane); + + CameraAzimuth = MathF.Atan2(View.M13, View.M33); + CameraAltitude = MathF.Asin(View.M23); + var device = FFXIVClientStructs.FFXIV.Client.Graphics.Kernel.Device.Instance(); + ViewportSize = new(device->Width, device->Height); + } + + public bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos) + { + // Read current ViewProjectionMatrix plus game window size + var windowPos = ImGuiHelpers.MainViewport.Pos; + var viewProjectionMatrix = this.ViewProj; + var device = Device.Instance(); + float width = device->Width; + float height = device->Height; + + var pCoords = Vector4.Transform(new Vector4(worldPos, 1.0f), viewProjectionMatrix); + var inFront = pCoords.W > 0.0f; + var inView = false; + if(Math.Abs(pCoords.W) < float.Epsilon) + { + screenPos = Vector2.Zero; + inView = false; + return false; + } + + pCoords *= MathF.Abs(1.0f / pCoords.W); + screenPos = new Vector2(pCoords.X, pCoords.Y); + + screenPos.X = (0.5f * width * (screenPos.X + 1f)) + windowPos.X; + screenPos.Y = (0.5f * height * (1f - screenPos.Y)) + windowPos.Y; + + inView = inFront && + screenPos.X > windowPos.X && screenPos.X < windowPos.X + width && + screenPos.Y > windowPos.Y && screenPos.Y < windowPos.Y + height; + + return inFront && inView; + } + + /*public bool ScreenToWorld(Vector3 start, out Vector2 screenPos) + { + var windowPos = ImGuiHelpers.MainViewport.Pos; + var p1p = Vector4.Transform(start, ViewProj); + var p1c = XY(p1p) * (1 / p1p.W); + var p1screen = new Vector2(0.5f * ViewportSize.X * (1 + p1c.X), 0.5f * ViewportSize.Y * (1 - p1c.Y)) + windowPos; + + var inFront = p1p.W > 0.0f; + var inView = false; + if(Math.Abs(p1p.W) < float.Epsilon) + { + screenPos = Vector2.Zero; + inView = false; + } + + screenPos = p1screen; + inView = inFront && + screenPos.X > windowPos.X && screenPos.X < windowPos.X + this.ViewportSize.X && + screenPos.Y > windowPos.Y && screenPos.Y < windowPos.Y + this.ViewportSize.Y; + return inView && IsOnScreen(start); + }*/ + static Vector2 XY(Vector4 v) => new(v.X, v.Y); + + private bool IsOnScreen(Vector3 a) + { + var an = Vector4.Dot(new(a, 1), NearPlane); + if(an >= 0) + return false; + return true; + } +} \ No newline at end of file diff --git a/Splatoon/Splatoon.cs b/Splatoon/Splatoon.cs index 809f8f2f..4028f2bb 100644 --- a/Splatoon/Splatoon.cs +++ b/Splatoon/Splatoon.cs @@ -13,6 +13,7 @@ using ECommons.LanguageHelpers; using ECommons.MathHelpers; using ECommons.ObjectLifeTracker; +using ECommons.Reflection; using ECommons.SimpleGui; using ECommons.Singletons; using Lumina.Excel.Sheets; @@ -246,6 +247,13 @@ public Splatoon(IDalamudPluginInterface pluginInterface) { P = this; Svc.Init(pluginInterface); +#if CUSTOMCS + PluginLog.Warning($"Using custom FFXIVClientStructs"); + var gameVersion = DalamudReflector.TryGetDalamudStartInfo(out var ver) ? ver.GameVersion.ToString() : "unknown"; + InteropGenerator.Runtime.Resolver.GetInstance.Setup(Svc.SigScanner.SearchBase, gameVersion, new(Svc.PluginInterface.ConfigDirectory.FullName + "/cs.json")); + FFXIVClientStructs.Interop.Generated.Addresses.Register(); + InteropGenerator.Runtime.Resolver.GetInstance.Resolve(); +#endif var cfg = EzConfig.LoadConfiguration(EzConfig.DefaultConfigurationFileName); Localization.Init(cfg.PluginLanguage); loader = new Loader(this); diff --git a/Splatoon/Splatoon.csproj b/Splatoon/Splatoon.csproj index 70d5b6e7..c25e8dbb 100644 --- a/Splatoon/Splatoon.csproj +++ b/Splatoon/Splatoon.csproj @@ -2,7 +2,7 @@ NightmareXIV - 3.7.2.1 + 3.7.2.3 diff --git a/Splatoon/Utility/Utils.cs b/Splatoon/Utility/Utils.cs index 575d5694..aa4f37b7 100644 --- a/Splatoon/Utility/Utils.cs +++ b/Splatoon/Utility/Utils.cs @@ -2,6 +2,7 @@ using Dalamud.Game.ClientState.Statuses; using ECommons.GameFunctions; using ECommons.MathHelpers; +using FFXIVClientStructs.FFXIV.Client.Graphics.Scene; using Newtonsoft.Json; using Splatoon.RenderEngines; using Splatoon.Structures; @@ -12,6 +13,25 @@ namespace Splatoon.Utility; public static unsafe class Utils { + public static bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos) + { + return S.VbmCamera.WorldToScreen(worldPos, out screenPos); + /*worldPos = default; + screenPos = default; + var cam = CameraManager.Instance(); + if(cam != null) + { + var current = cam->CurrentCamera; + if(current != null) + { + var result = current->WorldToScreen(worldPos, out var screenPosCs); + screenPos = screenPosCs; + return result; + } + } + return false;*/ + } + public static byte[] BrotliCompress(byte[] bytes) { using(var memoryStream = new MemoryStream()) From 1c2ebcdd96362a39d8f07b346ccb2b943bc4b23f Mon Sep 17 00:00:00 2001 From: Redmoonwow <50778349+Redmoonwow@users.noreply.github.com> Date: Sat, 16 Nov 2024 04:59:53 +0900 Subject: [PATCH 07/14] [fix] Scripts 7.1 fixes (#190) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [fix] 7.1 fixes * Update R2S Venom Love Pair Split.cs * Update R4S Chain Lightning.cs * Update R4S Witch Hunt.cs * Update DSR Dooms.cs * Update DSR Wrath.cs * Update P2 Sanctity Of The Ward Second.cs * Update P5 Death of the Heavens.cs * Update P6 AutoTargetSwitcher.cs * Update P10S Tethers.cs * Update P11S Multiscript.cs * Update P12S Limit Cut.cs * Update P12S Wing Cleaves.cs * Update BSOD Adjuster.cs * Update Cosmo Meteor Adjuster.cs * Update Dynamis Delta.cs * Update P6 Wroth Flames.cs * Update P10S Tethers.cs * Update P11S Multiscript.cs * Update Hello World MoveGuide.cs * Update P5 Delta Hello Guide.cs * Update P6 MultiScript.cs * Update Party Synergy.cs * Update TEA P2 1211 Transition.cs * Update TEA P4 Fate Projection α.cs * Update TEA_P2_Transition.cs * Update UCOB Tethers.cs * Update TEA_P2_Transition.cs * Update UCOB Tethers.cs * Update ScriptEventLogger.cs --------- Co-authored-by: Limiana <5073202+Limiana@users.noreply.github.com> --- .../Dawntrail/R2S Venom Love Pair Split.cs | 6 +- .../Duties/Dawntrail/R4S Chain Lightning.cs | 4 +- .../Duties/Dawntrail/R4S Witch Hunt.cs | 4 +- SplatoonScripts/Duties/Endwalker/DSR Dooms.cs | 4 +- SplatoonScripts/Duties/Endwalker/DSR Wrath.cs | 4 +- .../P2 Sanctity Of The Ward Second.cs | 8 +- .../P5 Death of the Heavens.cs | 6 +- .../P6 AutoTargetSwitcher.cs | 6 +- .../Dragonsong's Reprise/P6 Wroth Flames.cs | 6 +- .../Duties/Endwalker/P10S Tethers.cs | 4 +- .../Duties/Endwalker/P11S Multiscript.cs | 6 +- .../Duties/Endwalker/P12S Limit Cut.cs | 8 +- .../Duties/Endwalker/P12S Wing Cleaves.cs | 4 +- .../The Omega Protocol/BSOD Adjuster.cs | 6 +- .../Cosmo Meteor Adjuster.cs | 4 +- .../The Omega Protocol/Dynamis Delta.cs | 80 ++++----- .../Hello World MoveGuide.cs | 8 +- .../P5 Delta Hello Guide.cs | 8 +- .../The Omega Protocol/P6 MultiScript.cs | 10 +- .../The Omega Protocol/Party Synergy.cs | 8 +- .../TEA P2 1211 Transition.cs | 164 +++++++++--------- .../TEA P4 Fate Projection \316\261.cs" | 8 +- .../TEA_P2_Transition.cs | 4 +- .../Duties/Stormblood/UCOB Tethers.cs | 24 +-- SplatoonScripts/Generic/ScriptEventLogger.cs | 6 +- 25 files changed, 197 insertions(+), 203 deletions(-) diff --git a/SplatoonScripts/Duties/Dawntrail/R2S Venom Love Pair Split.cs b/SplatoonScripts/Duties/Dawntrail/R2S Venom Love Pair Split.cs index efe3403d..8d493f95 100644 --- a/SplatoonScripts/Duties/Dawntrail/R2S Venom Love Pair Split.cs +++ b/SplatoonScripts/Duties/Dawntrail/R2S Venom Love Pair Split.cs @@ -23,7 +23,7 @@ private enum PairSplit } public override HashSet? ValidTerritories { get; } = [1228]; - public override Metadata? Metadata => new(2, "Redmoon"); + public override Metadata? Metadata => new(3, "Redmoon"); const uint PoisonResistanceDownDebuffID = 3935; bool IsShow = false; @@ -67,12 +67,12 @@ public override void OnActionEffectEvent(ActionEffectSet set) if (set.Action == null || (set.Source == null)) return; if (set.Source.DataId == 0) return; - if ((set.Action.RowId == 37256) && (set.Source.DataId == 16945)) + if ((set.Action.Value.RowId == 37256) && (set.Source.DataId == 16945)) { HideElement(); } - if ((set.Action.RowId == 39691) && (set.Source.DataId == 16943)) + if ((set.Action.Value.RowId == 39691) && (set.Source.DataId == 16943)) { HideElement(); } diff --git a/SplatoonScripts/Duties/Dawntrail/R4S Chain Lightning.cs b/SplatoonScripts/Duties/Dawntrail/R4S Chain Lightning.cs index 99049f1e..ededf67c 100644 --- a/SplatoonScripts/Duties/Dawntrail/R4S Chain Lightning.cs +++ b/SplatoonScripts/Duties/Dawntrail/R4S Chain Lightning.cs @@ -18,7 +18,7 @@ namespace SplatoonScriptsOfficial.Duties.Dawntrail; public class R4S_Chain_Lightning : SplatoonScript { public override HashSet? ValidTerritories { get; } = [1232]; - public override Metadata? Metadata => new(2, "NightmareXIV"); + public override Metadata? Metadata => new(3, "NightmareXIV"); uint TowerID = 13061; List> Towers = []; Layout VoidZone = null!; @@ -93,7 +93,7 @@ public override void OnVFXSpawn(uint target, string vfxPath) public override void OnActionEffectEvent(ActionEffectSet set) { - //PluginLog.Information($"Cast: {set.Action.RowId}"); + //PluginLog.Information($"Cast: {set.Action.Value.RowId}"); if(set.Action?.RowId.EqualsAny(38426u, 38427u) == true) { PluginLog.Information($"Cast detected"); diff --git a/SplatoonScripts/Duties/Dawntrail/R4S Witch Hunt.cs b/SplatoonScripts/Duties/Dawntrail/R4S Witch Hunt.cs index 933a33a9..14c9abcb 100644 --- a/SplatoonScripts/Duties/Dawntrail/R4S Witch Hunt.cs +++ b/SplatoonScripts/Duties/Dawntrail/R4S Witch Hunt.cs @@ -22,7 +22,7 @@ namespace SplatoonScriptsOfficial.Duties.Dawntrail; public class R4S_Witch_Hunt : SplatoonScript { public override HashSet? ValidTerritories { get; } = [1232]; - public override Metadata? Metadata => new(4, "NightmareXIV"); + public override Metadata? Metadata => new(5, "NightmareXIV"); uint CastNarrowing = 38369; uint CastWidening = 38368; @@ -202,7 +202,7 @@ public override void OnUpdate() public override void OnActionEffectEvent(ActionEffectSet set) { if(IsUnsafeMiddle == null || set.Action == null) return; - if(set.Action.RowId.EqualsAny(this.CastSwitcher)) + if(set.Action.Value.RowId.EqualsAny(this.CastSwitcher)) { IsUnsafeMiddle = !IsUnsafeMiddle.Value; NumSwitches++; diff --git a/SplatoonScripts/Duties/Endwalker/DSR Dooms.cs b/SplatoonScripts/Duties/Endwalker/DSR Dooms.cs index 09582f95..affc0771 100644 --- a/SplatoonScripts/Duties/Endwalker/DSR Dooms.cs +++ b/SplatoonScripts/Duties/Endwalker/DSR Dooms.cs @@ -21,7 +21,7 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker public class DSR_Dooms : SplatoonScript { public override HashSet ValidTerritories => new() { 968 }; - public override Metadata? Metadata => new(5, "Enthusiastus"); + public override Metadata? Metadata => new(6, "Enthusiastus"); List DoomElements = new(); List NoDoomElements = new(); @@ -231,7 +231,7 @@ private void ActionEffect_ActionEffectEvent(ActionEffectSet set) { /* if (set.Action == null) return; - if (set.Action.RowId == 25544) + if (set.Action.Value.RowId == 25544) { //DuoLog.Information($"Position locked!"); positionDynamic = false; diff --git a/SplatoonScripts/Duties/Endwalker/DSR Wrath.cs b/SplatoonScripts/Duties/Endwalker/DSR Wrath.cs index 29b928bd..fdeba476 100644 --- a/SplatoonScripts/Duties/Endwalker/DSR Wrath.cs +++ b/SplatoonScripts/Duties/Endwalker/DSR Wrath.cs @@ -19,7 +19,7 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker public class DSR_Wrath : SplatoonScript { public override HashSet ValidTerritories => new() { 968 }; - public override Metadata? Metadata => new(2, "Enthusiastus"); + public override Metadata? Metadata => new(3, "Enthusiastus"); Element? SkydiveTargetElement; Element? NoSkydiveTargetElement; @@ -190,7 +190,7 @@ private void ActionEffect_ActionEffectEvent(ActionEffectSet set) { /* if (set.Action == null) return; - if (set.Action.RowId == 25544) + if (set.Action.Value.RowId == 25544) { //DuoLog.Information($"Position locked!"); positionDynamic = false; diff --git a/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P2 Sanctity Of The Ward Second.cs b/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P2 Sanctity Of The Ward Second.cs index 2affa868..78672469 100644 --- a/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P2 Sanctity Of The Ward Second.cs +++ b/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P2 Sanctity Of The Ward Second.cs @@ -61,7 +61,7 @@ private enum SpreadDirection public List MyTowers = new(); public override HashSet? ValidTerritories => [968]; - public override Metadata? Metadata => new(2, "Garume"); + public override Metadata? Metadata => new(3, "Garume"); private Config C => Controller.GetConfig(); @@ -261,7 +261,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) if (set.Action == null) return; - if (set.Action.RowId == 25575) + if (set.Action.Value.RowId == 25575) { _isFirstTowerPhase = true; var position = Player.Position.ToVector2(); @@ -271,7 +271,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) for (var i = 0; i < MyTowers.Count; i++) SetOffPosition($"bait{i + 1}", MyTowers[i].Position); } - if (set.Action.RowId == 29564) + if (set.Action.Value.RowId == 29564) { _isFirstTowerPhase = false; _isSecondTowerPhase = true; @@ -407,4 +407,4 @@ private class Config : IEzConfig public Vector4 BaitColor2 = 0xFFFFFF00.ToVector4(); public Vector4 PredictBaitColor = EColor.Red; } -} \ No newline at end of file +} diff --git a/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P5 Death of the Heavens.cs b/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P5 Death of the Heavens.cs index 5081b045..0a530ade 100644 --- a/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P5 Death of the Heavens.cs +++ b/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P5 Death of the Heavens.cs @@ -47,7 +47,7 @@ public unsafe class P5_Death_of_the_Heavens : SplatoonScript private PlaystationMarker _myMarker = PlaystationMarker.Circle; public override HashSet? ValidTerritories => [968]; private Config C => Controller.GetConfig(); - public override Metadata? Metadata => new(4, "Garume"); + public override Metadata? Metadata => new(5, "Garume"); private IBattleChara? Thordan => Svc.Objects.OfType() .FirstOrDefault(x => x.NameId == 0xE30 && x.IsCharacterVisible()); @@ -489,7 +489,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) if (set.Action is null) return; - switch (set.Action.RowId) + switch (set.Action.Value.RowId) { case 27540: Controller.Schedule(() => @@ -611,4 +611,4 @@ public static bool HasDoom(this IPlayerCharacter p) { return p.StatusList.Any(x => x.StatusId == 2976); } -} \ No newline at end of file +} diff --git a/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 AutoTargetSwitcher.cs b/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 AutoTargetSwitcher.cs index 6f5ead23..338442bd 100644 --- a/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 AutoTargetSwitcher.cs +++ b/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 AutoTargetSwitcher.cs @@ -29,7 +29,7 @@ public class P6_AutoTargetSwitcher : SplatoonScript private float _lastMinPercentage; public override HashSet? ValidTerritories => [968]; - public override Metadata? Metadata => new(4, "Garume"); + public override Metadata? Metadata => new(5, "Garume"); private Config C => Controller.GetConfig(); private IBattleChara? Nidhogg => Svc.Objects.Where(o => o.IsTargetable) @@ -126,7 +126,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) { if (set.Action is null) return; - switch (set.Action.RowId) + switch (set.Action.Value.RowId) { case 27954 or 27955 or 27956 or 27957: _breathCount++; @@ -274,4 +274,4 @@ private class Config : IEzConfig public int Interval = 300; public bool TimingMode = true; } -} \ No newline at end of file +} diff --git a/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 Wroth Flames.cs b/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 Wroth Flames.cs index a741ce4a..ec7ada76 100644 --- a/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 Wroth Flames.cs +++ b/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 Wroth Flames.cs @@ -50,7 +50,7 @@ public class P6_Wroth_Flames : SplatoonScript private State _state = State.None; public override HashSet? ValidTerritories => [968]; - public override Metadata? Metadata => new(4, "Garume"); + public override Metadata? Metadata => new(5, "Garume"); private Config C => Controller.GetConfig(); @@ -62,7 +62,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) { if (_state != State.None) return; if (set.Action is null) return; - if (set.Action.RowId == WrothFlamesCastId) _state = State.Start; + if (set.Action.Value.RowId == WrothFlamesCastId) _state = State.Start; } public override void OnStartingCast(uint source, uint castId) @@ -446,4 +446,4 @@ private class Config : IEzConfig public string[] Priority = ["", "", "", "", "", "", "", ""]; public bool ShouldCheckOnStart; } -} \ No newline at end of file +} diff --git a/SplatoonScripts/Duties/Endwalker/P10S Tethers.cs b/SplatoonScripts/Duties/Endwalker/P10S Tethers.cs index 097b0373..18a6dfcf 100644 --- a/SplatoonScripts/Duties/Endwalker/P10S Tethers.cs +++ b/SplatoonScripts/Duties/Endwalker/P10S Tethers.cs @@ -22,7 +22,7 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker public class P10S_Tethers : SplatoonScript { public override HashSet ValidTerritories => new() { 1150 }; - public override Metadata? Metadata => new(3, "NightmareXIV"); + public override Metadata? Metadata => new(5, "NightmareXIV"); List Tethers = new(); public class TetherData @@ -49,7 +49,7 @@ public override void OnEnable() private void ActionEffect_ActionEffectEvent(ECommons.Hooks.ActionEffectTypes.ActionEffectSet set) { - if(set.Action.RowId == 33432) + if(set.Action.Value.RowId == 33432) { Off(); } diff --git a/SplatoonScripts/Duties/Endwalker/P11S Multiscript.cs b/SplatoonScripts/Duties/Endwalker/P11S Multiscript.cs index abd73019..eef075eb 100644 --- a/SplatoonScripts/Duties/Endwalker/P11S Multiscript.cs +++ b/SplatoonScripts/Duties/Endwalker/P11S Multiscript.cs @@ -26,7 +26,7 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker public class P11S_Multiscript : SplatoonScript { public override HashSet ValidTerritories => new() { 1152 }; - public override Metadata? Metadata => new(4, "NightmareXIV"); + public override Metadata? Metadata => new(6, "NightmareXIV"); const string DarkVFX = "vfx/common/eff/m0830_dark_castloopc0k1.avfx"; const string LightVFX = "vfx/common/eff/m0830_light_castloopc0k1.avfx"; @@ -158,8 +158,8 @@ private void ActionEffect_ActionEffectEvent(ActionEffectSet set) { if(set.Source != null && set.Source is IBattleNpc b) { - //DuoLog.Information($"{set.Action.RowId} - {set.Action.Name} ({b.Name})"); - if(C.EnableProteanLinger && set.Action.RowId.EqualsAny(33257, 33256)) //protean + //DuoLog.Information($"{set.Action.Value.RowId} - {set.Action.Name} ({b.Name})"); + if(C.EnableProteanLinger && set.Action.Value.RowId.EqualsAny(33257, 33256)) //protean { new TickScheduler(() => { diff --git a/SplatoonScripts/Duties/Endwalker/P12S Limit Cut.cs b/SplatoonScripts/Duties/Endwalker/P12S Limit Cut.cs index fe56c8c1..55a65db1 100644 --- a/SplatoonScripts/Duties/Endwalker/P12S Limit Cut.cs +++ b/SplatoonScripts/Duties/Endwalker/P12S Limit Cut.cs @@ -21,7 +21,7 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker public class P12S_Limit_Cut : SplatoonScript { public override HashSet ValidTerritories => new() { 1154 }; - public override Metadata? Metadata => new(1, "NightmareXIV"); + public override Metadata? Metadata => new(2, "NightmareXIV"); const uint Puddle = 33527; const uint Laser = 33520; bool mechanicActive = false; @@ -147,17 +147,17 @@ private void ActionEffect_ActionEffectEvent(ActionEffectSet set) if (!mechanicActive) return; if(set.Source?.ObjectKind != Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Player) { - if(set.Action.RowId == Puddle) + if(set.Action.Value.RowId == Puddle) { //DuoLog.Information($"Puddle on {set.Target?.Name}"); puddleNum++; } - if(set.Action.RowId == Laser) + if(set.Action.Value.RowId == Laser) { //DuoLog.Information($"Laser"); laserNum++; } - //DuoLog.Information($"Cast: {set.Action.RowId} {set.Action.Name} on {set.Target}"); + //DuoLog.Information($"Cast: {set.Action.Value.RowId} {set.Action.Name} on {set.Target}"); } } } diff --git a/SplatoonScripts/Duties/Endwalker/P12S Wing Cleaves.cs b/SplatoonScripts/Duties/Endwalker/P12S Wing Cleaves.cs index 09c2c1f5..96095223 100644 --- a/SplatoonScripts/Duties/Endwalker/P12S Wing Cleaves.cs +++ b/SplatoonScripts/Duties/Endwalker/P12S Wing Cleaves.cs @@ -21,7 +21,7 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker public class P12S_Wing_Cleaves : SplatoonScript { public override HashSet ValidTerritories => new() { 1153, 1154 }; - public override Metadata? Metadata => new(6, "NightmareXIV"); + public override Metadata? Metadata => new(7, "NightmareXIV"); Queue Cleaves = new(); bool isSpin = false; Vector3 firstPos; @@ -48,7 +48,7 @@ public override void OnEnable() private void ActionEffect_ActionEffectEvent(ActionEffectSet set) { if (set.Action == null) return; - if (Casts.Contains(set.Action.RowId)) + if (Casts.Contains(set.Action.Value.RowId)) { ////DuoLog.Information($"Cast"); GenericHelpers.Safe(() => diff --git a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/BSOD Adjuster.cs b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/BSOD Adjuster.cs index 3a34bd75..6c9b3149 100644 --- a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/BSOD Adjuster.cs +++ b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/BSOD Adjuster.cs @@ -19,7 +19,7 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol; internal class BSOD_Adjuster :SplatoonScript { public override HashSet ValidTerritories => new() { 1122 }; - public override Metadata? Metadata => new(2, "Redmoon"); + public override Metadata? Metadata => new(3, "Redmoon"); public class CastID { @@ -113,7 +113,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) if(!_mechanicActive || set.Action == null) return; - if(set.Action.RowId == CastID.StackMarker) + if(set.Action.Value.RowId == CastID.StackMarker) { try { @@ -204,7 +204,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) return; } - if(set.Action.RowId == CastID.StackCannon) + if(set.Action.Value.RowId == CastID.StackCannon) { Controller.GetRegisteredElements().Each(x => x.Value.Enabled = false); _stackedList.Clear(); diff --git a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Cosmo Meteor Adjuster.cs b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Cosmo Meteor Adjuster.cs index d2675018..aec98c5a 100644 --- a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Cosmo Meteor Adjuster.cs +++ b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Cosmo Meteor Adjuster.cs @@ -21,7 +21,7 @@ internal unsafe class Cosmo_Meteor_Adjuster :SplatoonScript { #region PublicDef public override HashSet ValidTerritories => new() { 1122 }; - public override Metadata? Metadata => new(1, "Redmoon"); + public override Metadata? Metadata => new(2, "Redmoon"); #endregion #region PrivateDef @@ -138,7 +138,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) if(set.Action == null) return; - if(set.Action.RowId == CastID.CosmoMeteorFlare) + if(set.Action.Value.RowId == CastID.CosmoMeteorFlare) { this.OnReset(); } diff --git a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Dynamis Delta.cs b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Dynamis Delta.cs index 2f8bd032..c571ebeb 100644 --- a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Dynamis Delta.cs +++ b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Dynamis Delta.cs @@ -17,11 +17,11 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol { - public unsafe class Dynamis_Delta : SplatoonScript + public unsafe class Dynamis_Delta :SplatoonScript { public override HashSet ValidTerritories => new() { 1122 }; - public override Metadata? Metadata => new(9, "NightmareXIV"); + public override Metadata? Metadata => new(10, "NightmareXIV"); Config Conf => Controller.GetConfig(); @@ -61,7 +61,7 @@ public override void OnSetup() { for(var i = 0; i < 8; i++) { - Controller.RegisterElement($"Debug{i}", new(0) { Enabled = false}); + Controller.RegisterElement($"Debug{i}", new(0) { Enabled = false }); } Controller.RegisterElementFromCode("Bait", "{\"Name\":\"\",\"Enabled\":false,\"radius\":0.0,\"color\":3355508735,\"overlayBGColor\":4278190080,\"overlayTextColor\":4294967295,\"overlayFScale\":2.0,\"thicc\":5.0,\"overlayText\":\"BAIT\",\"tether\":true}"); Controller.RegisterElementFromCode("Alert", "{\"Enabled\":false,\"Name\":\"\",\"type\":1,\"radius\":0.0,\"overlayBGColor\":4278190080,\"overlayTextColor\":4294967295,\"overlayVOffset\":3.0,\"overlayFScale\":2.0,\"thicc\":0.0,\"overlayText\":\"WARNING\",\"refActorType\":1}"); @@ -78,13 +78,13 @@ public override void OnSetup() public override void OnUpdate() { Off(); - if (Controller.Scene == 6) + if(Controller.Scene == 6) { var beetle = GetBeetle(); var final = GetFinalOmega(); if(beetle != null || FakeParty.Get().Any(x => x.HasEffect(Effects.GreenTether))) { - if (Stage == 0 && (HasEffect(Effects.UpcomingBlueTether) || HasEffect(Effects.UpcomingGreenTether))) + if(Stage == 0 && (HasEffect(Effects.UpcomingBlueTether) || HasEffect(Effects.UpcomingGreenTether))) { PlayerHands.Clear(); var p = FakeParty.Get().ToArray(); @@ -116,12 +116,12 @@ public override void OnUpdate() } if(Svc.Objects.Count(x => x.DataId.EqualsAny(HandRed, HandBlue)) == 8) { - DuoLog.Information($"Snapshotting: you are {(myTether==Effects.UpcomingBlueTether?"blue":"green")} " + (isMeClose ? "close" : "far")); + DuoLog.Information($"Snapshotting: you are {(myTether == Effects.UpcomingBlueTether ? "blue" : "green")} " + (isMeClose ? "close" : "far")); foreach(var player in FakeParty.Get()) { var h = Svc.Objects.Where(x => x.DataId.EqualsAny(HandRed, HandBlue)).OrderBy(x => Vector3.Distance(x.Position, player.Position)).First(); PlayerHands[player.EntityId] = h.DataId; - PluginLog.Information($"Player {player} {player.Position}, hand {h} {h.Position} {(PlayerHands[player.EntityId]==HandBlue?"blue":"red")}"); + PluginLog.Information($"Player {player} {player.Position}, hand {h} {h.Position} {(PlayerHands[player.EntityId] == HandBlue ? "blue" : "red")}"); } Stage = 1; DuoLog.Information("Stage 1"); @@ -129,19 +129,19 @@ public override void OnUpdate() } else if(Stage == 1) { - if (isMeClose && PlayerHands[GetClosestPlayer().EntityId] == PlayerHands[Svc.ClientState.LocalPlayer.EntityId]) + if(isMeClose && PlayerHands[GetClosestPlayer().EntityId] == PlayerHands[Svc.ClientState.LocalPlayer.EntityId]) { Alert("Swap to other side!", GradientColor.Get(ImGuiColors.ParsedPink, 0xFF000000.ToVector4(), 200)); } else { - if (myTether == Effects.UpcomingBlueTether) + if(myTether == Effects.UpcomingBlueTether) { - if (HasEffect(Effects.UpcomingBlueTether)) + if(HasEffect(Effects.UpcomingBlueTether)) { Alert("Prepare to break tether then stack!"); var pl = GetClosestPlayer(); - if (Controller.TryGetElementByName("Stack partner", out var e) && pl != null) + if(Controller.TryGetElementByName("Stack partner", out var e) && pl != null) { e.Enabled = true; e.SetRefPosition(pl.Position); @@ -152,16 +152,16 @@ public override void OnUpdate() { Alert("STACK WITH YOUR PARTNER FAST", GradientColor.Get(0xff000000.ToVector4(), ImGuiColors.ParsedPurple, 200)); var pl = GetClosestPlayer(); - if (Controller.TryGetElementByName("Stack partner", out var e) && pl != null) + if(Controller.TryGetElementByName("Stack partner", out var e) && pl != null) { e.Enabled = true; e.SetRefPosition(pl.Position); e.color = GradientColor.Get(Colors.Red.ToVector4(), ImGuiColors.DalamudYellow, 200).ToUint(); } } - if (HasEffect(Effects.BlueTether)) + if(HasEffect(Effects.BlueTether)) { - if (IsAnyoneUnsafe) + if(IsAnyoneUnsafe) { Alert("Await for debuff before breaking!", Colors.Red.ToVector4()); } @@ -175,7 +175,7 @@ public override void OnUpdate() { Alert("Stack together"); var pl = GetClosestPlayer(); - if (Controller.TryGetElementByName("Stack partner", out var e) && pl != null) + if(Controller.TryGetElementByName("Stack partner", out var e) && pl != null) { e.Enabled = true; e.SetRefPosition(pl.Position); @@ -193,12 +193,12 @@ public override void OnUpdate() else if(Stage == 2) { var arms = GetArms().ToArray(); - if (arms.Length == 6) + if(arms.Length == 6) { IBattleChara? myArm = null; if(myTether == Effects.UpcomingBlueTether) { - if (isMeClose) + if(isMeClose) { Alert("Middle, bait Beyond Defense", ImGuiColors.DalamudRed); } @@ -210,7 +210,7 @@ public override void OnUpdate() } else { - if (isMeClose) + if(isMeClose) { Alert("Bait designated arm", ImGuiColors.DalamudOrange); myArm = arms.OrderBy(x => Vector3.Distance(x.Position, final.Position)).ToArray()[2..4].OrderBy(x => Vector3.Distance(Player.Position, x.Position)).First(); @@ -235,9 +235,9 @@ public override void OnUpdate() } else if(Stage == 3) { - if (HasEffect(Effects.BlueTether)) + if(HasEffect(Effects.BlueTether)) { - if (IsAnyoneUnsafe) + if(IsAnyoneUnsafe) { Alert("Await for debuff before breaking!", Colors.Red.ToVector4()); } @@ -248,7 +248,7 @@ public override void OnUpdate() } if(myTether == Effects.UpcomingBlueTether) { - if (!HasEffect(Effects.TwiceRuin)) + if(!HasEffect(Effects.TwiceRuin)) { Alert("Stack in middle", ImGuiColors.HealerGreen); } @@ -262,7 +262,7 @@ public override void OnUpdate() { Alert("Spread for monitors baits", ImGuiColors.HealerGreen); } - if (!FakeParty.Get().Any(x => x.HasEffect(Effects.MonitorLeft) || x.HasEffect(Effects.MonitorRight))) + if(!FakeParty.Get().Any(x => x.HasEffect(Effects.MonitorLeft) || x.HasEffect(Effects.MonitorRight))) { Stage = 4; DuoLog.Information("Stage 4"); @@ -270,11 +270,11 @@ public override void OnUpdate() } else if(Stage == 4) { - if (HasEffect(Effects.NearWorld)) + if(HasEffect(Effects.NearWorld)) { Alert("NEAR WORLD", ImGuiColors.HealerGreen); } - else if (HasEffect(Effects.FarWorld)) + else if(HasEffect(Effects.FarWorld)) { Alert("FAR WORLD", ImGuiColors.ParsedBlue); } @@ -286,11 +286,11 @@ public override void OnUpdate() } else { - if (isMeClose) + if(isMeClose) { - if (HasEffect(Effects.GreenTether)) + if(HasEffect(Effects.GreenTether)) { - if (IsAnyoneUnsafe) + if(IsAnyoneUnsafe) { Alert("Await for debuff before breaking!", Colors.Red.ToVector4()); } @@ -318,9 +318,9 @@ public override void OnUpdate() } else if(Stage == 5) { - if (HasEffect(Effects.GreenTether)) + if(HasEffect(Effects.GreenTether)) { - if (IsAnyoneUnsafe) + if(IsAnyoneUnsafe) { Alert("Await for debuff before breaking!", Colors.Red.ToVector4()); } @@ -355,14 +355,14 @@ IPlayerCharacter GetClosestPlayer() public override void OnSettingsDraw() { ImGui.Checkbox("Disable alert on top of your head", ref Conf.DisableAlert); - if (ImGui.CollapsingHeader("Debug")) + if(ImGui.CollapsingHeader("Debug")) { ImGui.InputInt("Stage", ref Stage); - if (ImGui.RadioButton("Green", myTether == Effects.UpcomingGreenTether)) + if(ImGui.RadioButton("Green", myTether == Effects.UpcomingGreenTether)) { myTether = Effects.UpcomingGreenTether; } - if (ImGui.RadioButton("Blue", myTether == Effects.UpcomingBlueTether)) + if(ImGui.RadioButton("Blue", myTether == Effects.UpcomingBlueTether)) { myTether = Effects.UpcomingBlueTether; } @@ -372,9 +372,9 @@ public override void OnSettingsDraw() void Alert(string? text = null, Vector4? color = null) { - if (Controller.TryGetElementByName("Alert", out var e)) + if(Controller.TryGetElementByName("Alert", out var e)) { - if (text == null || Conf.DisableAlert) + if(text == null || Conf.DisableAlert) { e.Enabled = false; } @@ -399,7 +399,7 @@ IEnumerable GetArms() { foreach(var x in Svc.Objects) { - if (x is IBattleChara b && b.DataId.EqualsAny(15719, 15718)) yield return x as IBattleChara; + if(x is IBattleChara b && b.DataId.EqualsAny(15719, 15718)) yield return x as IBattleChara; } } @@ -408,21 +408,21 @@ void Off() Controller.GetRegisteredElements().Each(x => x.Value.Enabled = false); } - IBattleChara? GetBeetle() => Svc.Objects.FirstOrDefault(x => x is IBattleChara c && c.Struct()->Character.CharacterData.ModelCharaId == 3771) as IBattleChara; + IBattleChara? GetBeetle() => Svc.Objects.FirstOrDefault(x => x is IBattleChara c && c.Struct()->Character.ModelCharaId == 3771) as IBattleChara; - IBattleChara? GetFinalOmega() => Svc.Objects.FirstOrDefault(x => x is IBattleChara c && c.Struct()->Character.CharacterData.ModelCharaId == 3775) as IBattleChara; + IBattleChara? GetFinalOmega() => Svc.Objects.FirstOrDefault(x => x is IBattleChara c && c.Struct()->Character.ModelCharaId == 3775) as IBattleChara; bool HasEffect(uint id) => Player.StatusList.Any(x => x.StatusId == id); - bool HasEffect(uint id, float remainsMin, float remainsMax) => Player.StatusList.Any(x => x.StatusId == id && x.RemainingTime.InRange(remainsMin,remainsMax)); + bool HasEffect(uint id, float remainsMin, float remainsMax) => Player.StatusList.Any(x => x.StatusId == id && x.RemainingTime.InRange(remainsMin, remainsMax)); float GetAngleRelativeToObject(IGameObject source, IGameObject target, bool invert = false) { var angle = MathHelper.GetRelativeAngle(source.Position, target.Position); var angleRot = source.Rotation.RadToDeg(); - return (angle - angleRot + (invert?(360+180):360) ) % 360; + return (angle - angleRot + (invert ? (360 + 180) : 360)) % 360; } - public class Config : IEzConfig + public class Config :IEzConfig { public bool Debug = false; public bool DisableAlert = false; diff --git a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Hello World MoveGuide.cs b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Hello World MoveGuide.cs index b8e333fa..28299b3a 100644 --- a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Hello World MoveGuide.cs +++ b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Hello World MoveGuide.cs @@ -33,7 +33,7 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol; internal unsafe class Hello_World_MoveGuide :SplatoonScript { - public override Metadata? Metadata => new(1, "Redmoon"); + public override Metadata? Metadata => new(2, "Redmoon"); public override HashSet ValidTerritories => new() { 1122 }; private enum State @@ -148,19 +148,19 @@ public override void OnActionEffectEvent(ActionEffectSet set) if (set.Action == null) return; - if (set.Action.RowId == CastIDs.HelloWorld) + if (set.Action.Value.RowId == CastIDs.HelloWorld) { HideAll(); state = State.HelloWorldCasted; LocalUpdate(); } - if (state == State.LatentDefectCasting && set.Action.RowId == CastIDs.LatentDefect) + if (state == State.LatentDefectCasting && set.Action.Value.RowId == CastIDs.LatentDefect) { HideAll(); state = State.BreakPatchNear; LocalUpdate(); } - if (state == State.WaitingRot && set.Action.RowId == CastIDs.CriticalRedRot) + if (state == State.WaitingRot && set.Action.Value.RowId == CastIDs.CriticalRedRot) { HideAll(); state = State.Waiting; diff --git a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P5 Delta Hello Guide.cs b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P5 Delta Hello Guide.cs index dd64835e..b021fb59 100644 --- a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P5 Delta Hello Guide.cs +++ b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P5 Delta Hello Guide.cs @@ -23,7 +23,7 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol; internal unsafe class P5_Delta_Hello_Guide :SplatoonScript { public override HashSet? ValidTerritories { get; } = new HashSet { 1122 }; - public override Metadata? Metadata => new Metadata(4, "Redmoon"); + public override Metadata? Metadata => new Metadata(5, "Redmoon"); #region Types private class PartyData @@ -227,7 +227,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) { if(set.Action == null || _gimmickPhase == GimmickPhase.None) return; - switch(set.Action.RowId) + switch(set.Action.Value.RowId) { case CastID.ShieldCombo: _gimmickPhase = GimmickPhase.DeltaFirstHalfStackTiming; @@ -284,8 +284,8 @@ public override void OnObjectCreation(nint newObjectPtr) // Find beetle and final if(_beetle == null || _final == null) { - _beetle = Svc.Objects.FirstOrDefault(x => x is IBattleNpc c && c.Struct()->Character.CharacterData.ModelCharaId == beetleModelId) as IBattleNpc; - _final = Svc.Objects.FirstOrDefault(x => x is IBattleNpc c && c.Struct()->Character.CharacterData.ModelCharaId == finalModelId) as IBattleNpc; + _beetle = Svc.Objects.FirstOrDefault(x => x is IBattleNpc c && c.Struct()->Character.ModelCharaId == beetleModelId) as IBattleNpc; + _final = Svc.Objects.FirstOrDefault(x => x is IBattleNpc c && c.Struct()->Character.ModelCharaId == finalModelId) as IBattleNpc; if(_beetle == null || _final == null) { diff --git a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P6 MultiScript.cs b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P6 MultiScript.cs index 7cd124ed..8d381214 100644 --- a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P6 MultiScript.cs +++ b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P6 MultiScript.cs @@ -81,7 +81,7 @@ public enum SpreadMarker #endregion #region publicDefine - public override Metadata Metadata => new(4, "Redmoon"); + public override Metadata Metadata => new(5, "Redmoon"); public override HashSet? ValidTerritories => new() { 1122 }; #endregion @@ -225,11 +225,11 @@ public override void OnActionEffectEvent(ActionEffectSet set) { if(set.Action == null) return; - if(set.Action.RowId == CastID.CosmoDive || set.Action.RowId == CastID.WaveCannonStack) + if(set.Action.Value.RowId == CastID.CosmoDive || set.Action.Value.RowId == CastID.WaveCannonStack) { ChangeGimmick(Gimmick.FlashWind); } - else if(set.Action.RowId == CastID.WaveCannonSpread) + else if(set.Action.Value.RowId == CastID.WaveCannonSpread) { if(EzThrottler.Throttle("WaveCannonSpread", 500)) { @@ -244,11 +244,11 @@ public override void OnActionEffectEvent(ActionEffectSet set) EzThrottler.Throttle("WaveCannonSpread", 500, true); } } - else if(set.Action.RowId == CastID.BlindFaith) + else if(set.Action.Value.RowId == CastID.BlindFaith) { _isP6Started = true; } - else if(set.Action.RowId == CastID.CosmoMeteorSpread) + else if(set.Action.Value.RowId == CastID.CosmoMeteorSpread) { ++_cosmoMeteorCount; if(_cosmoMeteorCount >= 8) diff --git a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Party Synergy.cs b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Party Synergy.cs index e9de6eec..6167d0b0 100644 --- a/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Party Synergy.cs +++ b/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Party Synergy.cs @@ -35,7 +35,7 @@ public class Party_Synergy :SplatoonScript { // public public override HashSet ValidTerritories => new() { 1122 }; - public override Metadata? Metadata => new(4, "NightmareXIV"); + public override Metadata? Metadata => new(5, "NightmareXIV"); public enum State { @@ -175,15 +175,15 @@ public override void OnActionEffectEvent(ActionEffectSet set) return; // Party Synergy - if (set.Action.RowId == CastID.PartySynergy) + if (set.Action.Value.RowId == CastID.PartySynergy) { state = State.PartySynergyCasted; } - else if (set.Action.RowId == CastID.OpticalLaser) + else if (set.Action.Value.RowId == CastID.OpticalLaser) { state = State.OpticalLaserCasted; } - else if (set.Action.RowId == CastID.DisCharge) + else if (set.Action.Value.RowId == CastID.DisCharge) { state = State.None; HideAll(); diff --git a/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P2 1211 Transition.cs b/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P2 1211 Transition.cs index 84473fc3..74e3d41a 100644 --- a/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P2 1211 Transition.cs +++ b/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P2 1211 Transition.cs @@ -1,7 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; using ECommons; using ECommons.Configuration; using ECommons.DalamudServices; @@ -13,10 +9,14 @@ using Splatoon; using Splatoon.Memory; using Splatoon.SplatoonScripting; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; namespace SplatoonScriptsOfficial.Duties.Shadowbringers.The_Epic_Of_Alexander; -public class TEA_P2_1211_Transition : SplatoonScript +public class TEA_P2_1211_Transition :SplatoonScript { private const uint HawkBlastActionEffectId = 18480; @@ -64,13 +64,13 @@ public class TEA_P2_1211_Transition : SplatoonScript private int _myNumber; public override HashSet ValidTerritories => [887]; - public override Metadata Metadata => new(5, "Garume"); + public override Metadata Metadata => new(6, "Garume"); private Config C => Controller.GetConfig(); public override void OnSetup() { - for (var i = 1; i <= 8; i++) + for(var i = 1; i <= 8; i++) { var bait = new Element(0) { @@ -81,7 +81,7 @@ public override void OnSetup() Controller.RegisterElement($"Bait{i}", bait); } - for (var i = 1; i <= 7; i++) + for(var i = 1; i <= 7; i++) { var safe = new Element(0) { @@ -125,10 +125,10 @@ public override void OnSetup() public override void OnVFXSpawn(uint target, string vfxPath) { - if (vfxPath.StartsWith("vfx/lockon/eff/m0361trg_a")) + if(vfxPath.StartsWith("vfx/lockon/eff/m0361trg_a")) { - if (AttachedInfo.VFXInfos.TryGetValue(Svc.ClientState.LocalPlayer.Address, out var info)) - if (info.OrderBy(x => x.Value.Age) + if(AttachedInfo.VFXInfos.TryGetValue(Svc.ClientState.LocalPlayer.Address, out var info)) + if(info.OrderBy(x => x.Value.Age) .TryGetFirst(x => x.Key.StartsWith("vfx/lockon/eff/m0361trg_a"), out var effect)) _myNumber = int.Parse(effect.Key.Replace("vfx/lockon/eff/m0361trg_a", "")[0].ToString()); @@ -138,19 +138,19 @@ public override void OnVFXSpawn(uint target, string vfxPath) public override void OnActionEffectEvent(ActionEffectSet set) { - if (!_mechanicActive || set.Action.RowId != HawkBlastActionEffectId) return; + if(!_mechanicActive || set.Action.Value.RowId != HawkBlastActionEffectId) return; _hawkBlastCount++; - if (_myNumber == 0 || _hawkBlastCount >= 19) return; - if (_firstBlastDirection == HawkBlastDirection.None) + if(_myNumber == 0 || _hawkBlastCount >= 19) return; + if(_firstBlastDirection == HawkBlastDirection.None) { - if (Vector2.Distance(set.Position.ToVector2(), new Vector2(100f, 85f)) < 5f) + if(Vector2.Distance(set.Position.ToVector2(), new Vector2(100f, 85f)) < 5f) _firstBlastDirection = C.N_S_PriorizeDirection; - else if (Vector2.Distance(set.Position.ToVector2(), new Vector2(110f, 90f)) < 5f) + else if(Vector2.Distance(set.Position.ToVector2(), new Vector2(110f, 90f)) < 5f) _firstBlastDirection = C.NE_SW_PriorizeDirection; - else if (Vector2.Distance(set.Position.ToVector2(), new Vector2(115f, 100f)) < 5f) + else if(Vector2.Distance(set.Position.ToVector2(), new Vector2(115f, 100f)) < 5f) _firstBlastDirection = C.E_W_PriorizeDirection; - else if (Vector2.Distance(set.Position.ToVector2(), new Vector2(110f, 110f)) < 5f) + else if(Vector2.Distance(set.Position.ToVector2(), new Vector2(110f, 110f)) < 5f) _firstBlastDirection = C.SE_NW_PriorizeDirection; else return; @@ -161,13 +161,13 @@ public override void OnActionEffectEvent(ActionEffectSet set) Controller.GetRegisteredElements().Where(x => !x.Key.StartsWith("Flare")).Each(x => x.Value.Enabled = false); - for (var i = 0; i < 8; i++) + for(var i = 0; i < 8; i++) { var bait = Controller.GetElementByName($"Bait{i + 1}"); bait!.Enabled = true; bait.tether = false; RotatedElement(ref bait, _baitPositions[i + 1], _firstBlastDirection); - if (i + 1 == _myNumber) + if(i + 1 == _myNumber) { bait.overlayText = C.BaitMessageIS.Get(); bait.overlayFScale = 2f; @@ -179,7 +179,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) } } - for (var i = 0; i < 7; i++) + for(var i = 0; i < 7; i++) { var safe = Controller.GetElementByName($"Safe{i + 1}"); safe!.Enabled = true; @@ -188,68 +188,68 @@ public override void OnActionEffectEvent(ActionEffectSet set) } // display safe and bait positions - switch (_hawkBlastCount) + switch(_hawkBlastCount) { // To Safe 1 case 1 or 2: - EnableTetherElement("Safe1", "<1>"); - break; + EnableTetherElement("Safe1", "<1>"); + break; // To Safe 2 case 3 or 4: - EnableTetherElement("Safe2", "<1>"); - break; + EnableTetherElement("Safe2", "<1>"); + break; // To Safe 3 and Bait 1 case 5 or 6 when _myNumber == 1: - EnableTetherElement("Bait1", "<1>"); - break; + EnableTetherElement("Bait1", "<1>"); + break; case 5 or 6 when _myNumber == 2: - EnableTetherElement("Bait2", "<1>"); - break; + EnableTetherElement("Bait2", "<1>"); + break; case 5 or 6: - EnableTetherElement("Safe3", "<1>"); - break; + EnableTetherElement("Safe3", "<1>"); + break; // To Safe 4 case 7 or 8: - EnableTetherElement("Safe4", "<1>"); - break; + EnableTetherElement("Safe4", "<1>"); + break; // To Safe 4 and Bait 2 case 9 or 10 when _myNumber == 3: - EnableTetherElement("Bait3", "<1>"); - break; + EnableTetherElement("Bait3", "<1>"); + break; case 9 or 10 when _myNumber == 4: - EnableTetherElement("Bait4", "<1>"); - break; + EnableTetherElement("Bait4", "<1>"); + break; case 9 or 10: - EnableTetherElement("Safe4", "<1>"); - break; + EnableTetherElement("Safe4", "<1>"); + break; // To Safe 5 case 11 or 12: - EnableTetherElement("Safe5", "<1>"); - break; + EnableTetherElement("Safe5", "<1>"); + break; // To Safe 6 and Bait 3 case 13 or 14 when _myNumber == 5: - EnableTetherElement("Bait6", "<1>"); - break; + EnableTetherElement("Bait6", "<1>"); + break; case 13 or 14 when _myNumber == 6: - EnableTetherElement("Bait6", "<1>"); - break; + EnableTetherElement("Bait6", "<1>"); + break; case 13 or 14: - EnableTetherElement("Safe6", "<1>"); - break; + EnableTetherElement("Safe6", "<1>"); + break; // To Safe 7 and Bait 4 case 15 or 16 or 17 when _myNumber == 7: - EnableTetherElement("Bait7", "<1>"); - break; + EnableTetherElement("Bait7", "<1>"); + break; case 15 or 16 or 17 when _myNumber == 8: - EnableTetherElement("Bait8", "<1>"); - break; + EnableTetherElement("Bait8", "<1>"); + break; case 15 or 16 or 17: - EnableTetherElement("Safe7", "<1>"); - break; + EnableTetherElement("Safe7", "<1>"); + break; } - if (C.ShoulDisplayFlares) - switch (_hawkBlastCount) + if(C.ShoulDisplayFlares) + switch(_hawkBlastCount) { // display flares case 1: @@ -258,20 +258,20 @@ public override void OnActionEffectEvent(ActionEffectSet set) case 10: case 12: case 14: - SetNextFlareElement("Flare_a", set.Position.ToVector2()); - break; + SetNextFlareElement("Flare_a", set.Position.ToVector2()); + break; case 2: case 4: case 6: case 11: case 13: case 15: - SetNextFlareElement("Flare_b", set.Position.ToVector2()); - break; + SetNextFlareElement("Flare_b", set.Position.ToVector2()); + break; case 7: case 16: - SetNextFlareElement("Flare_a", set.Position.ToVector2(), false); - break; + SetNextFlareElement("Flare_a", set.Position.ToVector2(), false); + break; case 8: case 17: { @@ -292,7 +292,7 @@ public override void OnActionEffectEvent(ActionEffectSet set) } } - if (_hawkBlastCount >= 18) Controller.GetRegisteredElements().Each(x => x.Value.Enabled = false); + if(_hawkBlastCount >= 18) Controller.GetRegisteredElements().Each(x => x.Value.Enabled = false); } public override void OnReset() @@ -327,15 +327,15 @@ private void RotatedElement(ref Element element, Vector2 position, HawkBlastDire var center = new Vector2(100f, 100f); var x = position.X - center.X; var y = position.Y - center.Y; - var x2 = x * Math.Cos(rotationDegree * Math.PI / 180) - y * Math.Sin(rotationDegree * Math.PI / 180); - var y2 = x * Math.Sin(rotationDegree * Math.PI / 180) + y * Math.Cos(rotationDegree * Math.PI / 180); + var x2 = (x * Math.Cos(rotationDegree * Math.PI / 180)) - (y * Math.Sin(rotationDegree * Math.PI / 180)); + var y2 = (x * Math.Sin(rotationDegree * Math.PI / 180)) + (y * Math.Cos(rotationDegree * Math.PI / 180)); element.offX = (float)(x2 + center.X); element.offY = (float)(y2 + center.Y); } private void EnableTetherElement(string elementName, string actorPlaceholder) { - if (Controller.TryGetElementByName(elementName, out var element)) + if(Controller.TryGetElementByName(elementName, out var element)) { element.Enabled = true; element.tether = true; @@ -346,13 +346,13 @@ private void EnableTetherElement(string elementName, string actorPlaceholder) private void SetNextFlareElement(string elementName, Vector2 current, bool enabled = true) { - if (Controller.TryGetElementByName(elementName, out var element)) + if(Controller.TryGetElementByName(elementName, out var element)) { element.Enabled = enabled; var nextFlare = new Vector2(100f, 100f); - for (var i = 0; i < _flarePositions.Length; i++) + for(var i = 0; i < _flarePositions.Length; i++) { - if (!(Vector2.Distance(current, _flarePositions[i]) < 5f)) continue; + if(!(Vector2.Distance(current, _flarePositions[i]) < 5f)) continue; nextFlare = _flarePositions[(i + 1) % _flarePositions.Length]; break; } @@ -361,14 +361,14 @@ private void SetNextFlareElement(string elementName, Vector2 current, bool enabl element.offY = nextFlare.Y; } } - + public override void OnSettingsDraw() { ImGui.Text("Bait Message"); - ImGuiEx.HelpMarker(Loc(en:"The message that will be displayed on your bait.", jp:"あなたの番号の立ち位置に表示されるメッセージ。")); + ImGuiEx.HelpMarker(Loc(en: "The message that will be displayed on your bait.", jp: "あなたの番号の立ち位置に表示されるメッセージ。")); var showString = C.BaitMessageIS.Get(); C.BaitMessageIS.ImGuiEdit(ref showString, "The message that will be displayed on your bait."); - + ImGui.Text("Start Direction"); ImGui.Indent(); @@ -379,7 +379,7 @@ public override void OnSettingsDraw() ImGui.SameLine(); ImGui.RadioButton("South##south_dir", ref n_s_dir, 1); C.N_S_PriorizeDirection = n_s_dir == 0 ? HawkBlastDirection.North : HawkBlastDirection.South; - + ImGui.Text("Northeast-Southwest"); ImGui.SameLine(); var ne_sw_dir = C.NE_SW_PriorizeDirection == HawkBlastDirection.Northeast ? 0 : 1; @@ -387,7 +387,7 @@ public override void OnSettingsDraw() ImGui.SameLine(); ImGui.RadioButton("Southwest##sw_dir", ref ne_sw_dir, 1); C.NE_SW_PriorizeDirection = ne_sw_dir == 0 ? HawkBlastDirection.Northeast : HawkBlastDirection.Southwest; - + ImGui.Text("West-East"); ImGui.SameLine(); var w_e_dir = C.E_W_PriorizeDirection == HawkBlastDirection.West ? 0 : 1; @@ -395,7 +395,7 @@ public override void OnSettingsDraw() ImGui.SameLine(); ImGui.RadioButton("East##east_dir", ref w_e_dir, 1); C.E_W_PriorizeDirection = w_e_dir == 0 ? HawkBlastDirection.West : HawkBlastDirection.East; - + ImGui.Text("Northwest-Southeast"); ImGui.SameLine(); var nw_se_dir = C.SE_NW_PriorizeDirection == HawkBlastDirection.Southeast ? 0 : 1; @@ -403,16 +403,16 @@ public override void OnSettingsDraw() ImGui.SameLine(); ImGui.RadioButton("Southeast##se_dir", ref nw_se_dir, 1); C.SE_NW_PriorizeDirection = nw_se_dir == 0 ? HawkBlastDirection.Southeast : HawkBlastDirection.Northwest; - + ImGui.Unindent(); - - + + ImGui.Text("Display Flares"); - ImGuiEx.HelpMarker(Loc(en:"Display flares on the ground to indicate the next safe spot.", jp:"次の安全地帯を示すために地面にフレアを表示します。")); + ImGuiEx.HelpMarker(Loc(en: "Display flares on the ground to indicate the next safe spot.", jp: "次の安全地帯を示すために地面にフレアを表示します。")); ImGui.Checkbox("##displayFlares", ref C.ShoulDisplayFlares); } - private enum HawkBlastDirection : byte + private enum HawkBlastDirection :byte { None, North, @@ -425,7 +425,7 @@ private enum HawkBlastDirection : byte Northwest } - private class Config : IEzConfig + private class Config :IEzConfig { //public string BaitMessage = "Turn to face the outside here."; public InternationalString BaitMessageIS = new(); @@ -435,4 +435,4 @@ private class Config : IEzConfig public HawkBlastDirection E_W_PriorizeDirection = HawkBlastDirection.East; public HawkBlastDirection SE_NW_PriorizeDirection = HawkBlastDirection.Southeast; } -} \ No newline at end of file +} diff --git "a/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P4 Fate Projection \316\261.cs" "b/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P4 Fate Projection \316\261.cs" index 578d3539..3b0177f9 100644 --- "a/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P4 Fate Projection \316\261.cs" +++ "b/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P4 Fate Projection \316\261.cs" @@ -35,7 +35,7 @@ public class TEA_P4_Fate_Projection_α : SplatoonScript .FirstOrDefault(x => x is { NameId: 0x2352, IsCasting: true, CastActionId: 18858 }); public override HashSet? ValidTerritories => [887]; - public override Metadata? Metadata => new(2, "Garume"); + public override Metadata? Metadata => new(3, "Garume"); private string GetFutureActionText(FutureActionType type) @@ -246,9 +246,9 @@ public override void OnActionEffectEvent(ActionEffectSet set) if (!_isStartFateProjectionCasting) return; if (set is { Action: not null, Source: not null, Target: not null }) { - PluginLog.Warning("ActionId: " + set.Action.RowId); + PluginLog.Warning("ActionId: " + set.Action.Value.RowId); - var futureAction = set.Action.RowId switch + var futureAction = set.Action.Value.RowId switch { 19213 => FutureActionType.FirstMotion, 19214 => FutureActionType.FirstStillness, @@ -277,4 +277,4 @@ private enum FutureActionType : byte Nothing, UnKnown } -} \ No newline at end of file +} diff --git a/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA_P2_Transition.cs b/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA_P2_Transition.cs index cb74953d..c873ea42 100644 --- a/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA_P2_Transition.cs +++ b/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA_P2_Transition.cs @@ -22,7 +22,7 @@ namespace SplatoonScriptsOfficial.Duties.Shadowbringers.The_Epic_Of_Alexander public class TEA_P2_Transition : SplatoonScript { public override HashSet ValidTerritories => new() { 887 }; - public override Metadata? Metadata => new(2, "Madou Shoujo"); + public override Metadata? Metadata => new(4, "Madou Shoujo"); private string ElementNamePrefix = "TEA_P2_Transition_Bait_Position"; // ActionEffectId of the exaflare. private uint HawkBlast = 18480; @@ -177,7 +177,7 @@ private void ActionEffect_ActionEffectEvent(ActionEffectSet set) if (!MechanicActive) return; - if (set.Action.RowId == HawkBlast) + if (set.Action.Value.RowId == HawkBlast) { BlastCount++; diff --git a/SplatoonScripts/Duties/Stormblood/UCOB Tethers.cs b/SplatoonScripts/Duties/Stormblood/UCOB Tethers.cs index 98125167..5f72d932 100644 --- a/SplatoonScripts/Duties/Stormblood/UCOB Tethers.cs +++ b/SplatoonScripts/Duties/Stormblood/UCOB Tethers.cs @@ -6,27 +6,21 @@ using ECommons.DalamudServices; using ECommons.ExcelServices.TerritoryEnumeration; using ECommons.GameFunctions; -using ECommons.Hooks.ActionEffectTypes; using ECommons.ImGuiMethods; -using ECommons.Logging; using ImGuiNET; -using Lumina.Excel.GeneratedSheets; using Splatoon.SplatoonScripting; -using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Numerics; -using System.Text; -using System.Threading.Tasks; namespace SplatoonScriptsOfficial.Duties.Stormblood { - public class UCOB_Tethers : SplatoonScript + public class UCOB_Tethers :SplatoonScript { public override HashSet ValidTerritories => new() { Raids.the_Unending_Coil_of_Bahamut_Ultimate }; HashSet TetheredPlayers = new(); - public override Metadata? Metadata => new(3, "NightmareXIV"); + public override Metadata? Metadata => new(5, "NightmareXIV"); public override void OnSetup() { @@ -36,7 +30,7 @@ public override void OnSetup() public override void OnTetherCreate(uint source, uint target, uint data2, uint data3, uint data5) { - if (IsBahamut(target, out _) && data3 == 4 && data5 == 15) + if(IsBahamut(target, out _) && data3 == 4 && data5 == 15) { //DuoLog.Information($"Tether: {data2}, {data3}, {data5}"); TetheredPlayers.Add(source); @@ -58,7 +52,7 @@ public override void OnUpdate() bool IsBahamut(uint oid, [NotNullWhen(true)] out IBattleChara? bahamut) { - if (oid.TryGetObject(out var obj) && obj is IBattleChara o && o.NameId == 3210) + if(oid.TryGetObject(out var obj) && obj is IBattleChara o && o.NameId == 3210) { bahamut = o; return true; @@ -79,12 +73,12 @@ void Reset() void UpdateTethers() { - if (TetheredPlayers.Count == 2) + if(TetheredPlayers.Count == 2) { var tetheredPlayers = TetheredPlayers.ToArray(); var omega = GetBahamut(); { - if (Controller.TryGetElementByName("Tether1", out var e)) + if(Controller.TryGetElementByName("Tether1", out var e)) { e.Enabled = true; e.SetRefPosition(omega.Position); @@ -94,7 +88,7 @@ void UpdateTethers() } } { - if (Controller.TryGetElementByName("Tether2", out var e)) + if(Controller.TryGetElementByName("Tether2", out var e)) { e.Enabled = true; e.SetRefPosition(omega.Position); @@ -118,13 +112,13 @@ public override void OnSettingsDraw() ImGui.SameLine(); ImGui.ColorEdit4("Invalid tether colors", ref Conf.InvalidTetherColor2, ImGuiColorEditFlags.NoInputs); ImGui.SetNextItemWidth(100f); - if (ImGui.CollapsingHeader("Debug")) + if(ImGui.CollapsingHeader("Debug")) { ImGuiEx.Text($"Tethers: {TetheredPlayers.Select(x => x.GetObject()?.ToString() ?? $"unk{x}").Join("\n")}"); } } - public class Config : IEzConfig + public class Config :IEzConfig { public Vector4 ValidTetherColor = ImGuiColors.ParsedGreen; public Vector4 InvalidTetherColor1 = ImGuiColors.DalamudOrange; diff --git a/SplatoonScripts/Generic/ScriptEventLogger.cs b/SplatoonScripts/Generic/ScriptEventLogger.cs index f72ef093..3cb6c425 100644 --- a/SplatoonScripts/Generic/ScriptEventLogger.cs +++ b/SplatoonScripts/Generic/ScriptEventLogger.cs @@ -13,7 +13,7 @@ namespace SplatoonScriptsOfficial.Generic; internal class ScriptEventLogger :SplatoonScript { public override HashSet? ValidTerritories { get; } = null; - public override Metadata? Metadata => new(4, "Redmoon"); + public override Metadata? Metadata => new(5, "Redmoon"); private Config Conf => Controller.GetConfig(); @@ -205,9 +205,9 @@ public override void OnActionEffectEvent(ActionEffectSet set) return; if(set.Target == null) - PluginLog.Information($"OnActionEffectEvent: {set.Action.Name}({set.Action.RowId}) - Source: {set.Source.Name}{set.Source.Position}(GID: {set.Source.GameObjectId} DID: {set.Source.DataId})"); + PluginLog.Information($"OnActionEffectEvent: {set.Action.Value.Name}({set.Action.Value.RowId}) - Source: {set.Source.Name}{set.Source.Position}(GID: {set.Source.GameObjectId} DID: {set.Source.DataId})"); else - PluginLog.Information($"OnActionEffectEvent: {set.Action.Name}({set.Action.RowId}) - Source: {set.Source.Name}{set.Source.Position}(GID: {set.Source.GameObjectId} DID: {set.Source.DataId}) - Target: {set.Target.Name}{set.Target.Position}(GID: {set.Target.GameObjectId} DID: {set.Target.DataId})"); + PluginLog.Information($"OnActionEffectEvent: {set.Action.Value.Name}({set.Action.Value.RowId}) - Source: {set.Source.Name}{set.Source.Position}(GID: {set.Source.GameObjectId} DID: {set.Source.DataId}) - Target: {set.Target.Name}{set.Target.Position}(GID: {set.Target.GameObjectId} DID: {set.Target.DataId})"); } #if false From b87cc0bcde2c213cac586e50a01435c2e2a95901 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 15 Nov 2024 20:00:33 +0000 Subject: [PATCH 08/14] Update SplatoonScripts/update.csv --- SplatoonScripts/update.csv | 48 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/SplatoonScripts/update.csv b/SplatoonScripts/update.csv index 800e0b80..e2d897df 100644 --- a/SplatoonScripts/update.csv +++ b/SplatoonScripts/update.csv @@ -1,23 +1,23 @@ SplatoonScriptsOfficial.Duties.Stormblood@UCOB_Twisters,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Stormblood/UCOB Twisters.cs -SplatoonScriptsOfficial.Duties.Stormblood@UCOB_Tethers,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Stormblood/UCOB Tethers.cs +SplatoonScriptsOfficial.Duties.Stormblood@UCOB_Tethers,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Stormblood/UCOB Tethers.cs SplatoonScriptsOfficial.Duties.Stormblood@UCOB_dragon_baits,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Stormblood/UCOB dragon baits.cs SplatoonScriptsOfficial.Duties.Stormblood@UCOB_Heavensfall_Trio_Towers,6,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Stormblood/UCOB Heavensfall Trio Towers.cs -SplatoonScriptsOfficial.Duties.Shadowbringers.The_Epic_Of_Alexander@TEA_P2_1211_Transition,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P2 1211 Transition.cs +SplatoonScriptsOfficial.Duties.Shadowbringers.The_Epic_Of_Alexander@TEA_P2_1211_Transition,6,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P2 1211 Transition.cs SplatoonScriptsOfficial.Duties.Shadowbringers.The_Epic_Of_Alexander@TEA_P2_Nisi,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P2 Nisi.cs SplatoonScriptsOfficial.Duties.Shadowbringers.The_Epic_Of_Alexander@TEA_P2_Temporal_Stasis,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P2 Temporal Stasis.cs -SplatoonScriptsOfficial.Duties.Shadowbringers.The_Epic_Of_Alexander@TEA_P2_Transition,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA_P2_Transition.cs +SplatoonScriptsOfficial.Duties.Shadowbringers.The_Epic_Of_Alexander@TEA_P2_Transition,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA_P2_Transition.cs SplatoonScriptsOfficial.Duties.Shadowbringers.The_Epic_Of_Alexander@TEA_P3_Wormhole_Formation,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Shadowbringers/The Epic Of Alexander/TEA P3 Wormhole Formation.cs -SplatoonScriptsOfficial.Duties.Endwalker@P10S_Tethers,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P10S Tethers.cs +SplatoonScriptsOfficial.Duties.Endwalker@P10S_Tethers,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P10S Tethers.cs SplatoonScriptsOfficial.Duties.Endwalker@P12S_Caloric_Theory,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P12S Caloric Theory.cs SplatoonScriptsOfficial.Duties.Endwalker@P12S_Pangenesis,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P12S Pangenesis.cs -SplatoonScriptsOfficial.Duties.Endwalker@DSR_Dooms,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/DSR Dooms.cs +SplatoonScriptsOfficial.Duties.Endwalker@DSR_Dooms,6,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/DSR Dooms.cs SplatoonScriptsOfficial.Duties.Endwalker@P8S2_Dominion,8,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P8S2 Dominion.cs SplatoonScriptsOfficial.Duties.Endwalker@DSR_P6_Cauterize_Unsafe,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/DSR_P6_Cauterize_Unsafe.cs -SplatoonScriptsOfficial.Duties.Endwalker@P12S_Wing_Cleaves,6,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P12S Wing Cleaves.cs +SplatoonScriptsOfficial.Duties.Endwalker@P12S_Wing_Cleaves,7,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P12S Wing Cleaves.cs SplatoonScriptsOfficial.Duties.Endwalker@DSR_Towers,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/DSR Towers.cs SplatoonScriptsOfficial.Duties.Endwalker@Aloalo_Bombs,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Aloalo Bombs.cs -SplatoonScriptsOfficial.Duties.Endwalker@P12S_Limit_Cut,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P12S Limit Cut.cs -SplatoonScriptsOfficial.Duties.Endwalker@P11S_Multiscript,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P11S Multiscript.cs +SplatoonScriptsOfficial.Duties.Endwalker@P12S_Limit_Cut,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P12S Limit Cut.cs +SplatoonScriptsOfficial.Duties.Endwalker@P11S_Multiscript,6,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P11S Multiscript.cs SplatoonScriptsOfficial.Duties.Endwalker@P8S2_Dancer_HC_Step,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P8S2 Dancer HC Step.cs SplatoonScriptsOfficial.Duties.Endwalker@P12S_Superchain,7,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P12S Superchain.cs SplatoonScriptsOfficial.Duties.Endwalker@P9S_JP_LC_Strat,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P9S JP LC Strat.cs @@ -26,48 +26,48 @@ SplatoonScriptsOfficial.Duties.Endwalker@P12S_Classical_Concepts,2,https://githu SplatoonScriptsOfficial.Duties.Endwalker@P12S_Tethers,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P12S Tethers.cs SplatoonScriptsOfficial.Duties.Endwalker@P8S2_Limitless_Desolation,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P8S2 Limitless Desolation.cs SplatoonScriptsOfficial.Duties.Endwalker@P9S_Dualspell_InOut,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P9S Dualspell InOut.cs -SplatoonScriptsOfficial.Duties.Endwalker@DSR_Wrath,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/DSR Wrath.cs +SplatoonScriptsOfficial.Duties.Endwalker@DSR_Wrath,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/DSR Wrath.cs SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P5_Wrath_of_the_Heavens,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P5 Wrath of the Heavens.cs -SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P6_AutoTargetSwitcher,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 AutoTargetSwitcher.cs +SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P6_AutoTargetSwitcher,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 AutoTargetSwitcher.cs SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P2_Sanctity_Of_The_Ward_First,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P2 Sanctity Of The Ward First.cs SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P5_Caster_Limit_Break,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P5 Caster Limit Break.cs -SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P6_Wroth_Flames,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 Wroth Flames.cs -SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P2_Sanctity_Of_The_Ward_Second,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P2 Sanctity Of The Ward Second.cs -SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P5_Death_of_the_Heavens,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P5 Death of the Heavens.cs +SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P6_Wroth_Flames,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 Wroth Flames.cs +SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P2_Sanctity_Of_The_Ward_Second,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P2 Sanctity Of The Ward Second.cs +SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P5_Death_of_the_Heavens,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P5 Death of the Heavens.cs SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P3_Dive_from_Grace,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P3 Dive from Grace.cs SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P6_Wyrmsbreath_First,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 Wyrmsbreath First.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Dynamis_Sigma,7,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Dynamis Sigma.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Hello_Near_Far_World,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Hello Near Far World.cs -SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Cosmo_Meteor_Adjuster,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Cosmo Meteor Adjuster.cs +SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Cosmo_Meteor_Adjuster,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Cosmo Meteor Adjuster.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Pantokrator,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Pantokrator.cs -SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@P5_Delta_Hello_Guide,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P5 Delta Hello Guide.cs +SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@P5_Delta_Hello_Guide,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P5 Delta Hello Guide.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Hello_World,9,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Hello World.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Beyond_Defense,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Beyond Defense.cs -SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@P6_MultiScript,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P6 MultiScript.cs +SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@P6_MultiScript,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/P6 MultiScript.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Exasquares,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Exasquares.cs -SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Party_Synergy,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Party Synergy.cs +SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Party_Synergy,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Party Synergy.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Pantokrator_invincible_Reminder,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Pantokrator invincible Reminder.cs -SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Hello_World_MoveGuide,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Hello World MoveGuide.cs +SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Hello_World_MoveGuide,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Hello World MoveGuide.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Oversampled_Wave_Cannon,8,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Oversampled Wave Cannon.cs -SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@BSOD_Adjuster,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/BSOD Adjuster.cs +SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@BSOD_Adjuster,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/BSOD Adjuster.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Program_Loop,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Program Loop.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@MF_Target_Enforcer,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/MF Target Enforcer.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Limitless_Synergy,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Limitless Synergy.cs -SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Dynamis_Delta,9,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Dynamis Delta.cs +SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Dynamis_Delta,0,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Dynamis Delta.cs SplatoonScriptsOfficial.Duties.Dawntrail@EX2_Projection_of_Triumph,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/EX2 Projection of Triumph.cs SplatoonScriptsOfficial.Duties.Dawntrail@R1S_Raining_Cats,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R1S Raining Cats.cs -SplatoonScriptsOfficial.Duties.Dawntrail@R2S_Venom_Love_Pair_Split,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R2S Venom Love Pair Split.cs +SplatoonScriptsOfficial.Duties.Dawntrail@R2S_Venom_Love_Pair_Split,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R2S Venom Love Pair Split.cs SplatoonScriptsOfficial.Duties.Dawntrail@R1S_Multiscript,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R1S Multiscript.cs SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Sunrise_Sabbath,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Sunrise Sabbath.cs SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Electrope_Edge,9,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Electrope Edge.cs -SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Witch_Hunt,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Witch Hunt.cs +SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Witch_Hunt,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Witch Hunt.cs SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Midnight_Sabbath,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Midnight Sabbath.cs SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Unsafe_Cannon,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Unsafe Cannon.cs -SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Chain_Lightning,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Chain Lightning.cs +SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Chain_Lightning,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Chain Lightning.cs SplatoonScriptsOfficial.Duties.Dawntrail@R1S_Protean_Highlight,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R1S Protean Highlight.cs SplatoonScriptsOfficial.Generic@ActReminder,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ActReminder.cs SplatoonScriptsOfficial.Generic@AutoFateSync,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/AutoFateSync.cs -SplatoonScriptsOfficial.Generic@ScriptEventLogger,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ScriptEventLogger.cs +SplatoonScriptsOfficial.Generic@ScriptEventLogger,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ScriptEventLogger.cs SplatoonScriptsOfficial.Generic@ShowEmote,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ShowEmote.cs SplatoonScriptsOfficial.Generic@CastExplorer,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/CastExplorer.cs SplatoonScriptsOfficial.Generic@AutoTargetSwitcher,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/AutoTargetSwitcher.cs From 6b54b4ed79c867a793af3ba7cfd3321feeae5ae3 Mon Sep 17 00:00:00 2001 From: Garume <80187947+Garume@users.noreply.github.com> Date: Sat, 16 Nov 2024 05:02:14 +0900 Subject: [PATCH 09/14] Another Aloalo Scripts (#188) * [add] boss1 scripts * [add] some option * [improve] support to sevrage * Rename SplatoonScripts/Duties/Endwalker/Another Aloalo/Aloalo Bombs.cs to SplatoonScripts/Duties/Endwalker/Aloalo Bombs.cs --------- Co-authored-by: Limiana <5073202+Limiana@users.noreply.github.com> --- .../Endwalker/Another Aloalo/Boss1 Roar.cs | 382 ++++++++++++++++++ .../Boss1 Spring Crystal Tower.cs | 173 ++++++++ 2 files changed, 555 insertions(+) create mode 100644 SplatoonScripts/Duties/Endwalker/Another Aloalo/Boss1 Roar.cs create mode 100644 SplatoonScripts/Duties/Endwalker/Another Aloalo/Boss1 Spring Crystal Tower.cs diff --git a/SplatoonScripts/Duties/Endwalker/Another Aloalo/Boss1 Roar.cs b/SplatoonScripts/Duties/Endwalker/Another Aloalo/Boss1 Roar.cs new file mode 100644 index 00000000..e4b274f2 --- /dev/null +++ b/SplatoonScripts/Duties/Endwalker/Another Aloalo/Boss1 Roar.cs @@ -0,0 +1,382 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using Dalamud.Game.ClientState.Objects.SubKinds; +using Dalamud.Game.ClientState.Objects.Types; +using Dalamud.Game.Text; +using Dalamud.Game.Text.SeStringHandling; +using Dalamud.Interface.Components; +using ECommons; +using ECommons.ChatMethods; +using ECommons.Configuration; +using ECommons.DalamudServices; +using ECommons.DalamudServices.Legacy; +using ECommons.GameFunctions; +using ECommons.GameHelpers; +using ECommons.Hooks; +using ECommons.Hooks.ActionEffectTypes; +using ECommons.ImGuiMethods; +using ECommons.Logging; +using ECommons.MathHelpers; +using FFXIVClientStructs.FFXIV.Client.Game; +using ImGuiNET; +using Splatoon; +using Splatoon.SplatoonScripting; + +namespace SplatoonScriptsOfficial.Duties.Endwalker; + +public class Boss1_Roar : SplatoonScript +{ + public enum Clockwise + { + Clockwise, + CounterClockwise + } + + public enum Direction + { + North, + East, + South, + West + } + + private const uint RoarId = 35524; + private readonly Dictionary _enemyDebuffs = new(); + + + private readonly Dictionary _playerDebuffs = new(); + + private readonly Dictionary _solvedDirections = new(); + private State _state = State.None; + + public override HashSet? ValidTerritories => [1179, 1180]; + public override Metadata? Metadata => new(1, "Garume"); + + private Config C => Controller.GetConfig(); + + public override void OnDirectorUpdate(DirectorUpdateCategory category) + { + if (category.EqualsAny(DirectorUpdateCategory.Commence, DirectorUpdateCategory.Recommence, + DirectorUpdateCategory.Wipe)) Reset(); + } + + public override void OnCombatEnd() + { + Reset(); + } + + private void Reset() + { + _playerDebuffs.Clear(); + _enemyDebuffs.Clear(); + _solvedDirections.Clear(); + _state = State.None; + } + + public override void OnStartingCast(uint source, uint castId) + { + if (castId == RoarId) _state = State.Start; + } + + public override void OnActionEffectEvent(ActionEffectSet set) + { + if (set.Action is { RowId: 35528 }) _state = State.End; + } + + public override void OnRemoveBuffEffect(uint sourceId, Status Status) + { + if (_state != State.Spread) return; + if (Status.StatusId == 3748) + { + _state = State.Bait; + var myDirection = _solvedDirections.FirstOrDefault(x => x.Key == Player.Name).Value; + var position = myDirection switch + { + Direction.North => new Vector2(0, -12), + Direction.East => new Vector2(12, 0), + Direction.South => new Vector2(0, 12), + Direction.West => new Vector2(-12, 0), + _ => Vector2.Zero + }; + + if (Controller.TryGetElementByName("Bait", out var element)) + { + element.SetOffPosition(position.ToVector3()); + element.radius = 1f; + element.Enabled = true; + } + } + } + + + public override void OnSetup() + { + var element = new Element(0) + { + thicc = 6f, + tether = true + }; + Controller.RegisterElement("Bait", element); + } + + public override void OnUpdate() + { + if (_state is State.Spread or State.Bait) + Controller.GetRegisteredElements() + .Each(x => x.Value.color = GradientColor.Get(C.BaitColor1, C.BaitColor2).ToUint()); + else + Controller.GetRegisteredElements().Each(x => x.Value.Enabled = false); + } + + public override void OnGainBuffEffect(uint sourceId, Status Status) + { + if (_state != State.Start) return; + switch (Status.StatusId) + { + // Bind + case 3788: + _playerDebuffs[sourceId] = Debuff.Bind; + break; + // Bubble + case 3743: + _playerDebuffs[sourceId] = Debuff.Bubble; + break; + default: + { + if (sourceId.GetObject() is IBattleChara { DataId: 0x40A1 } or { DataId: 0x40A8 }) + { + var enemy = (IBattleChara)sourceId.GetObject()!; + if (enemy.Position.X < -5) + _enemyDebuffs[Direction.West] = Debuff.Bubble; + else if (enemy.Position.X > 5) + _enemyDebuffs[Direction.East] = Debuff.Bubble; + else if (enemy.Position.Z > 5) + _enemyDebuffs[Direction.South] = Debuff.Bubble; + else if (enemy.Position.Z < -5) _enemyDebuffs[Direction.North] = Debuff.Bubble; + } + + break; + } + } + + if (_playerDebuffs.Count == 4 && _enemyDebuffs.Count == 2) + { + var directions = Enum.GetValues().ToList(); + foreach (var direction in directions) _enemyDebuffs.TryAdd(direction, Debuff.Bind); + + var start = directions.IndexOf(C.StartDirection); + var adjustedDirections = directions.Skip(start).Concat(directions.Take(start)).ToList(); + if (C.Clockwise == Clockwise.CounterClockwise) adjustedDirections.Reverse(); + + var fakeParty = FakeParty.Get().ToArray(); + foreach (var member in C.PartyMembers) + { + if (fakeParty.FirstOrDefault(x => x.Name.ToString() == member) is not { } player) continue; + if (_playerDebuffs.TryGetValue(player.EntityId, out var debuff)) + { + var direction = adjustedDirections.First(x => _enemyDebuffs[x] != debuff); + _solvedDirections[member] = direction; + adjustedDirections.Remove(direction); + } + } + + if (_solvedDirections.Count != 4) + DuoLog.Warning($"[{GetType().Name.Replace("_", " ")}] Failed to solve directions."); + + var myDirection = _solvedDirections.FirstOrDefault(x => x.Key == Player.Name).Value; + var position = (myDirection, C.SafeFromEnemyClockwise) switch + { + (Direction.North, Clockwise.Clockwise) => new Vector2(10, -10), + (Direction.North, Clockwise.CounterClockwise) => new Vector2(-10, -10), + (Direction.East, Clockwise.Clockwise) => new Vector2(10, 10), + (Direction.East, Clockwise.CounterClockwise) => new Vector2(10, -10), + (Direction.South, Clockwise.Clockwise) => new Vector2(-10, 10), + (Direction.South, Clockwise.CounterClockwise) => new Vector2(10, 10), + (Direction.West, Clockwise.Clockwise) => new Vector2(-10, -10), + (Direction.West, Clockwise.CounterClockwise) => new Vector2(-10, 10), + _ => Vector2.Zero + }; + + if (Controller.TryGetElementByName("Bait", out var element)) + { + element.SetOffPosition(position.ToVector3()); + element.radius = 2f; + element.Enabled = true; + } + + _state = State.Spread; + } + } + + private bool DrawPriorityList() + { + if (C.PartyMembers.Length != 4) + C.PartyMembers = ["", "", "", ""]; + + ImGuiEx.Text("Priority list"); + ImGui.SameLine(); + ImGuiEx.Spacing(); + if (ImGui.Button("Perform test")) SelfTest(); + + ImGui.PushID("prio"); + ImGui.Text("Clockwise"); + for (var i = 0; i < C.PartyMembers.Length; i++) + { + ImGui.PushID($"prioelement{i}"); + ImGui.Text($"Character {i + 1}"); + ImGui.SameLine(); + ImGui.SetNextItemWidth(200); + ImGui.InputText($"##Character{i}", ref C.PartyMembers[i], 50); + ImGui.SameLine(); + ImGui.SetNextItemWidth(150); + if (ImGui.BeginCombo("##partysel", "Select from party")) + { + foreach (var x in FakeParty.Get()) + if (ImGui.Selectable(x.Name.ToString())) + C.PartyMembers[i] = x.Name.ToString(); + ImGui.EndCombo(); + } + + ImGui.SameLine(); + if (ImGui.Button($" T ##{i}") && Svc.Targets.Target is IPlayerCharacter pc) + C.PartyMembers[i] = pc.Name.ToString(); + ImGuiEx.Tooltip("Fill name from your current target"); + + ImGui.PopID(); + } + + ImGui.Text("Counter Clockwise"); + + ImGui.PopID(); + return false; + } + + private void SelfTest() + { + Svc.Chat.PrintChat(new XivChatEntry + { + Message = new SeStringBuilder() + .AddUiForeground($"= {GetType().Name.Replace("_", " ")} self-test =", (ushort)UIColor.LightBlue).Build() + }); + var party = FakeParty.Get().ToArray(); + var isCorrect = C.PartyMembers.All(x => !string.IsNullOrEmpty(x)); + + if (!isCorrect) + { + Svc.Chat.PrintChat(new XivChatEntry + { + Message = new SeStringBuilder() + .AddUiForeground("Priority list is not filled correctly.", (ushort)UIColor.Red).Build() + }); + return; + } + + if (party.Length != 8) + { + isCorrect = false; + Svc.Chat.PrintChat(new XivChatEntry + { + Message = new SeStringBuilder() + .AddUiForeground("Can only be tested in content.", (ushort)UIColor.Red).Build() + }); + } + + foreach (var player in party) + if (C.PartyMembers.All(x => x != player.Name.ToString())) + { + isCorrect = false; + Svc.Chat.PrintChat(new XivChatEntry + { + Message = new SeStringBuilder() + .AddUiForeground($"Player {player.Name} is not in the priority list.", (ushort)UIColor.Red) + .Build() + }); + } + + if (isCorrect) + Svc.Chat.PrintChat(new XivChatEntry + { + Message = new SeStringBuilder() + .AddUiForeground("Test Success!", (ushort)UIColor.Green).Build() + }); + else + Svc.Chat.PrintChat(new XivChatEntry + { + Message = new SeStringBuilder() + .AddUiForeground("!!! Test failed !!!", (ushort)UIColor.Red).Build() + }); + } + + + public override void OnSettingsDraw() + { + if (ImGuiEx.CollapsingHeader("General")) + { + ImGui.Text("Party Members"); + DrawPriorityList(); + ImGui.Separator(); + ImGuiEx.EnumCombo("Clockwise", ref C.Clockwise); + ImGuiEx.EnumCombo("Start Direction", ref C.StartDirection); + ImGuiEx.EnumCombo("Safe from Enemy Clockwise", ref C.SafeFromEnemyClockwise); + ImGuiEx.Tooltip("Clockwise direction to be safe from enemy"); + ImGui.Text("Bait Color:"); + ImGuiComponents.HelpMarker( + "Change the color of the bait and the text that will be displayed on your bait.\nSetting different values makes it rainbow."); + ImGui.Indent(); + ImGui.ColorEdit4("Color 1", ref C.BaitColor1, ImGuiColorEditFlags.NoInputs); + ImGui.SameLine(); + ImGui.ColorEdit4("Color 2", ref C.BaitColor2, ImGuiColorEditFlags.NoInputs); + ImGui.Unindent(); + } + + if (ImGuiEx.CollapsingHeader("Debug")) + { + if (ImGui.Button("Reset")) Reset(); + + ImGui.Text($"State: {_state}"); + ImGui.Text("Player Debuffs"); + ImGui.Indent(); + foreach (var (key, value) in _playerDebuffs) + ImGui.Text($"{key.GetObject()?.Name} - {value}"); + ImGui.Unindent(); + ImGui.Text("Enemy Debuffs"); + ImGui.Indent(); + foreach (var (key, value) in _enemyDebuffs) + ImGui.Text($"{key} - {value}"); + ImGui.Unindent(); + + ImGui.Text("Solved Directions"); + ImGui.Indent(); + foreach (var (key, value) in _solvedDirections) + ImGui.Text($"{key} - {value}"); + ImGui.Unindent(); + } + } + + private enum Debuff + { + Bind, + Bubble + } + + private enum State + { + None, + Start, + Spread, + Bait, + End + } + + private class Config : IEzConfig + { + public Vector4 BaitColor1 = 0xFFFF00FF.ToVector4(); + public Vector4 BaitColor2 = 0xFFFFFF00.ToVector4(); + public Clockwise Clockwise = Clockwise.Clockwise; + public string[] PartyMembers = ["", "", "", ""]; + public Clockwise SafeFromEnemyClockwise = Clockwise.Clockwise; + public Direction StartDirection = Direction.North; + } +} \ No newline at end of file diff --git a/SplatoonScripts/Duties/Endwalker/Another Aloalo/Boss1 Spring Crystal Tower.cs b/SplatoonScripts/Duties/Endwalker/Another Aloalo/Boss1 Spring Crystal Tower.cs new file mode 100644 index 00000000..b715396d --- /dev/null +++ b/SplatoonScripts/Duties/Endwalker/Another Aloalo/Boss1 Spring Crystal Tower.cs @@ -0,0 +1,173 @@ +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using Dalamud.Interface.Components; +using ECommons; +using ECommons.Configuration; +using ECommons.DalamudServices; +using ECommons.Hooks; +using ECommons.Hooks.ActionEffectTypes; +using ECommons.ImGuiMethods; +using ECommons.MathHelpers; +using ImGuiNET; +using Splatoon; +using Splatoon.SplatoonScripting; + +namespace SplatoonScriptsOfficial.Duties.Endwalker; + +public class Boss1_Spring_Crystal_Tower : SplatoonScript +{ + private int _crustalCastingCount; + + private State _state = State.None; + public override HashSet? ValidTerritories => [1179, 1180]; + public override Metadata? Metadata => new(2, "Garume"); + + private Config C => Controller.GetConfig(); + + public override void OnActionEffectEvent(ActionEffectSet set) + { + if (set.Action is { RowId: 35496 }) + { + _crustalCastingCount++; + if (_crustalCastingCount != 3) return; + var crystals = Svc.Objects.Where(x => x.DataId is 0x409D or 0x40A4).ToArray(); + var hasBubbleCrystals = crystals.Where(x => float.Abs(x.Position.X) < 11f); + + var isEast = crystals.All(x => x.Position.X > 0); + var isNorth = hasBubbleCrystals.Any(x => x.Position.Z < -10); + var bubbleDirection = isEast ? Direction.East : Direction.West; + var isDiagonal = bubbleDirection != C.Direction; + + var xOffset = isEast ? 1f : -1f; + var yOffset = isNorth ? 1f : -1f; + var diagonalOffset = isDiagonal ? -1f : 1f; + var position = C.PrioritizeCenter + ? new Vector2(14f, 0f) * diagonalOffset + : new Vector2(10f * xOffset, 14f * yOffset) * diagonalOffset; + + if (Controller.TryGetElementByName("Bait", out var element)) + { + element.SetRefPosition(position.ToVector3()); + element.Enabled = true; + + element.overlayText = isDiagonal ? string.Empty : C.GoingToBubbleMessage.Get(); + } + + _state = State.Start; + } + + if (set.Action is { RowId : 35499 } or { RowId: 35547 } && _state is State.Start) + _state = State.End; + } + + public override void OnUpdate() + { + if (_state is State.Start) + Controller.GetRegisteredElements() + .Each(x => x.Value.color = GradientColor.Get(C.BaitColor1, C.BaitColor2).ToUint()); + else + Controller.GetRegisteredElements().Each(x => x.Value.Enabled = false); + } + + public override void OnDirectorUpdate(DirectorUpdateCategory category) + { + if (category.EqualsAny(DirectorUpdateCategory.Commence, DirectorUpdateCategory.Recommence, + DirectorUpdateCategory.Wipe)) Reset(); + } + + public override void OnCombatEnd() + { + Reset(); + } + + + private void Reset() + { + _state = State.None; + _crustalCastingCount = 0; + } + + public override void OnSetup() + { + var element = new Element(0) + { + radius = 2f, + thicc = 6f, + tether = true + }; + Controller.RegisterElement("Bait", element); + } + + public override void OnSettingsDraw() + { + if (ImGuiEx.CollapsingHeader("General")) + { + ImGui.Indent(); + ImGui.Text("Direction"); + ImGuiEx.EnumCombo("##Direction", ref C.Direction); + ImGui.Checkbox("Prioritize Center", ref C.PrioritizeCenter); + ImGui.Text("Bait Color:"); + ImGuiComponents.HelpMarker( + "Change the color of the bait and the text that will be displayed on your bait.\nSetting different values makes it rainbow."); + ImGui.Indent(); + ImGui.ColorEdit4("Color 1", ref C.BaitColor1, ImGuiColorEditFlags.NoInputs); + ImGui.SameLine(); + ImGui.ColorEdit4("Color 2", ref C.BaitColor2, ImGuiColorEditFlags.NoInputs); + ImGui.Unindent(); + ImGui.Text("Going to Bubble Message"); + ImGuiEx.HelpMarker( + "Change the message that will be displayed when you should go to the bubble."); + var message = C.GoingToBubbleMessage.Get(); + ImGui.Indent(); + C.GoingToBubbleMessage.ImGuiEdit(ref message, + "The message will be displayed when you should go to the bubble."); + ImGui.Unindent(); + ImGui.Unindent(); + } + + if (ImGuiEx.CollapsingHeader("Debug")) + { + ImGui.Indent(); + if (ImGui.Button("Reset")) Reset(); + ImGui.Text($"State: {_state}"); + + var crystals = Svc.Objects.Where(x => x.DataId is 0x409D or 0x40A4).ToArray(); + var hasBubbleCrystals = crystals.Where(x => float.Abs(x.Position.X) < 11f); + var isEast = crystals.All(x => x.Position.X > 0); + var isNorth = hasBubbleCrystals.Any(x => x.Position.Z < -10); + + ImGui.Text($"East: {isEast}"); + ImGui.Text($"North: {isNorth}"); + ImGui.Unindent(); + } + } + + private enum Direction + { + West, + East + } + + private enum State + { + None, + Start, + End + } + + private class Config : IEzConfig + { + public readonly InternationalString GoingToBubbleMessage = new() + { + En = "Going to Bubble", + Jp = "バブルに入る" + }; + + public Vector4 BaitColor1 = 0xFFFF00FF.ToVector4(); + public Vector4 BaitColor2 = 0xFFFFFF00.ToVector4(); + public Direction Direction = Direction.West; + + public bool PrioritizeCenter; + } +} \ No newline at end of file From 0fd768e73f89433d4f3f8c6a3586d6aea26d5d10 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 15 Nov 2024 20:02:46 +0000 Subject: [PATCH 10/14] Update SplatoonScripts/update.csv --- SplatoonScripts/update.csv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SplatoonScripts/update.csv b/SplatoonScripts/update.csv index e2d897df..cae68166 100644 --- a/SplatoonScripts/update.csv +++ b/SplatoonScripts/update.csv @@ -36,6 +36,8 @@ SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P2_Sanctity_Of_The SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P5_Death_of_the_Heavens,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P5 Death of the Heavens.cs SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P3_Dive_from_Grace,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P3 Dive from Grace.cs SplatoonScriptsOfficial.Duties.Endwalker.Dragonsong_s_Reprise@P6_Wyrmsbreath_First,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Dragonsong's Reprise/P6 Wyrmsbreath First.cs +SplatoonScriptsOfficial.Duties.Endwalker@Boss1_Roar,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Another Aloalo/Boss1 Roar.cs +SplatoonScriptsOfficial.Duties.Endwalker@Boss1_Spring_Crystal_Tower,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Another Aloalo/Boss1 Spring Crystal Tower.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Dynamis_Sigma,7,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Dynamis Sigma.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Hello_Near_Far_World,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Hello Near Far World.cs SplatoonScriptsOfficial.Duties.Endwalker.The_Omega_Protocol@Cosmo_Meteor_Adjuster,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/The Omega Protocol/Cosmo Meteor Adjuster.cs From c6aac5c665cab8603c05e0354209b1fc54f3f62a Mon Sep 17 00:00:00 2001 From: Limiana <5073202+Limiana@users.noreply.github.com> Date: Fri, 15 Nov 2024 23:03:14 +0300 Subject: [PATCH 11/14] 7.1 --- .../DirectX11/DirectX11Renderer.cs | 1 - .../RenderEngines/DirectX11/DirectX11Scene.cs | 2 +- Splatoon/Services/VbmCamera.cs | 33 ------------------- Splatoon/Splatoon.csproj | 2 +- ffxiv_pictomancy | 2 +- 5 files changed, 3 insertions(+), 37 deletions(-) diff --git a/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs b/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs index fd6ca585..551a5782 100644 --- a/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs +++ b/Splatoon/RenderEngines/DirectX11/DirectX11Renderer.cs @@ -21,7 +21,6 @@ internal DirectX11Renderer() } try { - throw new NotImplementedException(); DirectX11Scene = new(this); } catch (Exception e) diff --git a/Splatoon/RenderEngines/DirectX11/DirectX11Scene.cs b/Splatoon/RenderEngines/DirectX11/DirectX11Scene.cs index 220e7368..bc60a0ac 100644 --- a/Splatoon/RenderEngines/DirectX11/DirectX11Scene.cs +++ b/Splatoon/RenderEngines/DirectX11/DirectX11Scene.cs @@ -16,7 +16,7 @@ public DirectX11Scene(DirectX11Renderer dx11renderer) { DirectX11Renderer = dx11renderer; Svc.PluginInterface.UiBuilder.Draw += Draw; - PictoService.Initialize(Svc.PluginInterface); + PictoService.Initialize(Svc.PluginInterface, () => S.VbmCamera.ViewProj); } public void Dispose() diff --git a/Splatoon/Services/VbmCamera.cs b/Splatoon/Services/VbmCamera.cs index 9273050f..5fc72ec3 100644 --- a/Splatoon/Services/VbmCamera.cs +++ b/Splatoon/Services/VbmCamera.cs @@ -11,8 +11,6 @@ namespace Splatoon.Services; internal unsafe class VbmCamera { - public static VbmCamera? Instance; - public Vector3 Origin; public Matrix4x4 View; public Matrix4x4 Proj; @@ -86,35 +84,4 @@ public bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos) return inFront && inView; } - - /*public bool ScreenToWorld(Vector3 start, out Vector2 screenPos) - { - var windowPos = ImGuiHelpers.MainViewport.Pos; - var p1p = Vector4.Transform(start, ViewProj); - var p1c = XY(p1p) * (1 / p1p.W); - var p1screen = new Vector2(0.5f * ViewportSize.X * (1 + p1c.X), 0.5f * ViewportSize.Y * (1 - p1c.Y)) + windowPos; - - var inFront = p1p.W > 0.0f; - var inView = false; - if(Math.Abs(p1p.W) < float.Epsilon) - { - screenPos = Vector2.Zero; - inView = false; - } - - screenPos = p1screen; - inView = inFront && - screenPos.X > windowPos.X && screenPos.X < windowPos.X + this.ViewportSize.X && - screenPos.Y > windowPos.Y && screenPos.Y < windowPos.Y + this.ViewportSize.Y; - return inView && IsOnScreen(start); - }*/ - static Vector2 XY(Vector4 v) => new(v.X, v.Y); - - private bool IsOnScreen(Vector3 a) - { - var an = Vector4.Dot(new(a, 1), NearPlane); - if(an >= 0) - return false; - return true; - } } \ No newline at end of file diff --git a/Splatoon/Splatoon.csproj b/Splatoon/Splatoon.csproj index c25e8dbb..7cc2104e 100644 --- a/Splatoon/Splatoon.csproj +++ b/Splatoon/Splatoon.csproj @@ -19,7 +19,7 @@ $(MSBuildProjectDirectory)\ $(AppOutputBase)=Splatoon\ true - true + false diff --git a/ffxiv_pictomancy b/ffxiv_pictomancy index 3ad552ae..f4cdbb81 160000 --- a/ffxiv_pictomancy +++ b/ffxiv_pictomancy @@ -1 +1 @@ -Subproject commit 3ad552aeb28f03d7fd0f75e1f7c4ea1ec5257bf3 +Subproject commit f4cdbb81b6e0cff1342afa46bd2c6eebd8a6e1e2 From b494d2e9fac911b1755dbd45e220344db5562377 Mon Sep 17 00:00:00 2001 From: Limiana <5073202+Limiana@users.noreply.github.com> Date: Fri, 15 Nov 2024 23:11:40 +0300 Subject: [PATCH 12/14] Update scripts --- .../Duties/Dawntrail/R1S Protean Highlight.cs | 4 +-- .../Duties/Endwalker/DSR Towers.cs | 4 +-- SplatoonScripts/Generic/AetherSight.cs | 29 ++++++++++--------- .../Generic/ArtisanCraftCommand.cs | 9 +++--- SplatoonScripts/Generic/CheckEmote.cs | 5 ++-- SplatoonScripts/Generic/Makeplace2List.cs | 14 +++++---- SplatoonScripts/Generic/NoSproutIcon.cs | 3 +- SplatoonScripts/Generic/ShowEmote.cs | 19 ++++-------- SplatoonScripts/Generic/WorldWaiter.cs | 3 +- SplatoonScripts/Generic/ZoneNameToast.cs | 10 +++---- SplatoonScripts/Tests/DMParser.cs | 4 +-- SplatoonScripts/Tests/GenericTest4.cs | 16 +++++----- SplatoonScripts/Tests/IPCExample.cs | 6 ++-- SplatoonScripts/Tests/OnBuffEffectTest.cs | 22 -------------- SplatoonScripts/Tests/SendSpawnedObjects.cs | 6 ++-- 15 files changed, 66 insertions(+), 88 deletions(-) delete mode 100644 SplatoonScripts/Tests/OnBuffEffectTest.cs diff --git a/SplatoonScripts/Duties/Dawntrail/R1S Protean Highlight.cs b/SplatoonScripts/Duties/Dawntrail/R1S Protean Highlight.cs index b9831abc..45ddf5ba 100644 --- a/SplatoonScripts/Duties/Dawntrail/R1S Protean Highlight.cs +++ b/SplatoonScripts/Duties/Dawntrail/R1S Protean Highlight.cs @@ -27,7 +27,7 @@ namespace SplatoonScriptsOfficial.Duties.Dawntrail; public unsafe class R1S_Protean_Highlight : SplatoonScript { public override HashSet? ValidTerritories { get; } = [1226]; - public override Metadata? Metadata => new(2, "NightmareXIV"); + public override Metadata? Metadata => new(3, "NightmareXIV"); IBattleNpc? BlackCat => Svc.Objects.OfType().FirstOrDefault(x => x.IsTargetable && x.NameId == 12686); int CrossingStage = 0; @@ -169,7 +169,7 @@ void DrawCrossings(bool inverted) public override void OnActionEffectEvent(ActionEffectSet set) { - if(!FakeParty.Get().Select(x => x.Address).Contains(set.Source?.Address ?? -1)) PluginLog.Information($"Cast: {ExcelActionHelper.GetActionName(set.Action!.RowId, true)}"); + if(!FakeParty.Get().Select(x => x.Address).Contains(set.Source?.Address ?? -1)) PluginLog.Information($"Cast: {ExcelActionHelper.GetActionName(set.Action?.RowId ?? 0, true)}"); if(set.Action?.RowId.EqualsAny(37948u, 37976u) == true) { Controller.Schedule(() => diff --git a/SplatoonScripts/Duties/Endwalker/DSR Towers.cs b/SplatoonScripts/Duties/Endwalker/DSR Towers.cs index d2d26be6..66f45c74 100644 --- a/SplatoonScripts/Duties/Endwalker/DSR Towers.cs +++ b/SplatoonScripts/Duties/Endwalker/DSR Towers.cs @@ -10,7 +10,7 @@ using ECommons.Hooks.ActionEffectTypes; using ECommons.Logging; using ImGuiNET; -using Lumina.Excel.GeneratedSheets2; +using Lumina.Excel.Sheets; using Microsoft.VisualBasic.ApplicationServices; using Splatoon; using Splatoon.SplatoonScripting; @@ -26,7 +26,7 @@ namespace SplatoonScriptsOfficial.Duties.Endwalker public class DSR_Towers : SplatoonScript { public override HashSet ValidTerritories => new() { 968 }; - public override Metadata? Metadata => new(2, "Enthusiastus"); + public override Metadata? Metadata => new(3, "Enthusiastus"); Element? SolutionElement; diff --git a/SplatoonScripts/Generic/AetherSight.cs b/SplatoonScripts/Generic/AetherSight.cs index 2707e43d..ef0a96b7 100644 --- a/SplatoonScripts/Generic/AetherSight.cs +++ b/SplatoonScripts/Generic/AetherSight.cs @@ -3,20 +3,21 @@ using ECommons.DalamudServices; using ECommons.ExcelServices; using ECommons.Logging; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using Splatoon.SplatoonScripting; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Action = Lumina.Excel.GeneratedSheets.Action; +using Action = Lumina.Excel.Sheets.Action; namespace SplatoonScriptsOfficial.Generic; public class AetherSight : SplatoonScript { public override HashSet? ValidTerritories { get; } = null; + public override Metadata? Metadata { get; } = new(2, "NightmareXIV"); public override void OnUpdate() { this.Controller.ClearRegisteredElements(); @@ -26,26 +27,26 @@ public override void OnUpdate() i++; if(x.IsCasting) { - var data = Svc.Data.GetExcelSheet()!.GetRow(x.CastActionId); - if(data != null && (data.EffectRange < 30 || !data.CastType.EqualsAny(2, 5))) + var data = Svc.Data.GetExcelSheet()!.GetRowOrDefault(x.CastActionId); + if(data != null && (data.Value.EffectRange < 30 || !data.Value.CastType.EqualsAny(2, 5))) { - if(data.CastType == 2) //circle + if(data.Value.CastType == 2) //circle { this.Controller.RegisterElement($"Circle{i}", new(1) { refActorComparisonType = 2, refActorObjectID = x.EntityId, - radius = data.EffectRange, + radius = data.Value.EffectRange, }); } - else if(data.CastType == 3)//cone + else if(data.Value.CastType == 3)//cone { - var angle = DetermineConeAngle(data); + var angle = DetermineConeAngle(data.Value); this.Controller.RegisterElement($"Cone{i}", new(4) { refActorComparisonType = 2, refActorObjectID = x.EntityId, - radius = data.EffectRange + x.HitboxRadius, + radius = data.Value.EffectRange + x.HitboxRadius, coneAngleMin = -angle / 2, coneAngleMax = angle / 2, }); @@ -55,25 +56,25 @@ public override void OnUpdate() } } - private int DetermineConeAngle(Lumina.Excel.GeneratedSheets.Action data) + private int DetermineConeAngle(Lumina.Excel.Sheets.Action data) { - var omen = data.Omen.Value; + var omen = data.Omen.ValueNullable; if(omen == null) { PluginLog.Log($"[AutoHints] No omen data for {data.RowId} '{data.Name}'..."); return 180; } - var path = omen.Path.ToString(); + var path = omen.Value.Path.ToString(); var pos = path.IndexOf("fan", StringComparison.Ordinal); if(pos < 0 || pos + 6 > path.Length) { - PluginLog.Log($"[AutoHints] Can't determine angle from omen ({path}/{omen.PathAlly}) for {data.RowId} '{data.Name}'..."); + PluginLog.Log($"[AutoHints] Can't determine angle from omen ({path}/{omen.Value.PathAlly}) for {data.RowId} '{data.Name}'..."); return 180; } if(!int.TryParse(path.AsSpan(pos + 3, 3), out var angle)) { - PluginLog.Log($"[AutoHints] Can't determine angle from omen ({path}/{omen.PathAlly}) for {data.RowId} '{data.Name}'..."); + PluginLog.Log($"[AutoHints] Can't determine angle from omen ({path}/{omen.Value.PathAlly}) for {data.RowId} '{data.Name}'..."); return 180; } diff --git a/SplatoonScripts/Generic/ArtisanCraftCommand.cs b/SplatoonScripts/Generic/ArtisanCraftCommand.cs index 85d0e24d..6057edd5 100644 --- a/SplatoonScripts/Generic/ArtisanCraftCommand.cs +++ b/SplatoonScripts/Generic/ArtisanCraftCommand.cs @@ -2,7 +2,7 @@ using ECommons.DalamudServices; using ECommons.EzIpcManager; using ECommons.Logging; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using Splatoon.SplatoonScripting; using System; using System.Collections.Generic; @@ -11,6 +11,7 @@ namespace SplatoonScriptsOfficial.Generic; public class ArtisanCraftCommand : SplatoonScript { + public override Metadata? Metadata { get; } = new(2, "NightmareXIV"); public override HashSet? ValidTerritories { get; } = null; #nullable disable [EzIPC] Action CraftItem; @@ -35,11 +36,11 @@ private void OnCommand(string command, string arguments) { amt = 1; } - var recipe = Svc.Data.GetExcelSheet().FirstOrDefault(x => arguments.EqualsIgnoreCase(x.ItemResult.Value.Name.ExtractText())) ?? Svc.Data.GetExcelSheet().FirstOrDefault(x => x.ItemResult.Value.Name.ExtractText().Contains(arguments, StringComparison.OrdinalIgnoreCase)); + var recipe = Svc.Data.GetExcelSheet().FirstOrNull(x => arguments.EqualsIgnoreCase(x.ItemResult.Value.Name.ExtractText())) ?? Svc.Data.GetExcelSheet().FirstOrNull(x => x.ItemResult.Value.Name.ExtractText().Contains(arguments, StringComparison.OrdinalIgnoreCase)); if(recipe != null) { - DuoLog.Information($"Crafting {recipe.ItemResult.Value.Name} x{amt}"); - CraftItem((ushort)recipe.RowId, amt); + DuoLog.Information($"Crafting {recipe.Value.ItemResult.Value.Name} x{amt}"); + CraftItem((ushort)recipe.Value.RowId, amt); } else { diff --git a/SplatoonScripts/Generic/CheckEmote.cs b/SplatoonScripts/Generic/CheckEmote.cs index 137afea1..26af5e13 100644 --- a/SplatoonScripts/Generic/CheckEmote.cs +++ b/SplatoonScripts/Generic/CheckEmote.cs @@ -2,7 +2,7 @@ using ECommons.DalamudServices; using ECommons.GameFunctions; using ECommons.ImGuiMethods; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using Splatoon.SplatoonScripting; using System; using System.Collections.Generic; @@ -13,13 +13,14 @@ namespace SplatoonScriptsOfficial.Generic; public unsafe class CheckEmote : SplatoonScript { + public override Metadata? Metadata { get; } = new(2, "NightmareXIV"); public override HashSet? ValidTerritories { get; } = []; public override void OnSettingsDraw() { if(Svc.Targets.Target is IPlayerCharacter pc) { var em = pc.Struct()->EmoteController.EmoteId; - ImGuiEx.Text($"Emote: {em}/{Svc.Data.GetExcelSheet().GetRow(em)?.Name}"); + ImGuiEx.Text($"Emote: {em}/{Svc.Data.GetExcelSheet().GetRowOrDefault(em)?.Name}"); } } } diff --git a/SplatoonScripts/Generic/Makeplace2List.cs b/SplatoonScripts/Generic/Makeplace2List.cs index 515df432..d5180467 100644 --- a/SplatoonScripts/Generic/Makeplace2List.cs +++ b/SplatoonScripts/Generic/Makeplace2List.cs @@ -10,13 +10,13 @@ using ECommons.Logging; using System.Numerics; using ECommons.DalamudServices; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; namespace SplatoonScriptsOfficial.Generic; public class Makeplace2List : SplatoonScript { public override HashSet? ValidTerritories { get; } = [uint.MaxValue]; - + public override Metadata? Metadata { get; } = new(2, "NightmareXIV"); public override void OnSettingsDraw() { @@ -51,8 +51,12 @@ public override void OnSettingsDraw() var dyesStr = new StringBuilder(); foreach(var x in items) { - var item = ExcelItemHelper.Get(x.Key); - (item.IsUntradable ? untradeable : (item.Lot && item.PriceLow > 0 ? vendor : tradeable)).AppendLine($"{item.Name} - x{x.Value}"); + var itemNullable = ExcelItemHelper.Get(x.Key); + if(itemNullable != null) + { + var item = itemNullable.Value; + (item.IsUntradable ? untradeable : (item.Lot && item.PriceLow > 0 ? vendor : tradeable)).AppendLine($"{item.Name} - x{x.Value}"); + } } foreach(var x in dyeItems) { @@ -76,7 +80,7 @@ string FindDye(string k) var cg = (int)(color.Y * 255); var cb = (int)(color.Z * 255); var ca = (int)(color.W * 255); - if(k == $"{cr:X2}{cg:X2}{cb:X2}{ca:X2}") return x.Name; + if(k == $"{cr:X2}{cg:X2}{cb:X2}{ca:X2}") return x.Name.ToString(); } return null; } diff --git a/SplatoonScripts/Generic/NoSproutIcon.cs b/SplatoonScripts/Generic/NoSproutIcon.cs index af3a00e9..9fef4c1c 100644 --- a/SplatoonScripts/Generic/NoSproutIcon.cs +++ b/SplatoonScripts/Generic/NoSproutIcon.cs @@ -13,6 +13,7 @@ namespace SplatoonScriptsOfficial.Generic; public class NoSproutIcon : SplatoonScript { + public override Metadata? Metadata { get; } = new(2, "NightmareXIV"); public override HashSet? ValidTerritories { get; } = null; public Config C => this.Controller.GetConfig(); @@ -34,7 +35,7 @@ void OnLogin() public override void OnUpdate() { - if(Svc.ClientState.LocalPlayer != null && Svc.ClientState.LocalPlayer.OnlineStatus.Id == 32 && C.EnabledCIDs.Contains(Svc.ClientState.LocalContentId)) + if(Svc.ClientState.LocalPlayer != null && Svc.ClientState.LocalPlayer.OnlineStatus.RowId == 32 && C.EnabledCIDs.Contains(Svc.ClientState.LocalContentId)) { if(GenericHelpers.IsScreenReady() && Player.Interactable && EzThrottler.Throttle("NaStatusOff", 10000)) { diff --git a/SplatoonScripts/Generic/ShowEmote.cs b/SplatoonScripts/Generic/ShowEmote.cs index bfbe1b74..274e90a7 100644 --- a/SplatoonScripts/Generic/ShowEmote.cs +++ b/SplatoonScripts/Generic/ShowEmote.cs @@ -1,25 +1,16 @@ -using Dalamud.Game.ClientState.Objects.SubKinds; -using Dalamud.Game.ClientState.Objects.Types; -using Dalamud.Hooking; +using Dalamud.Hooking; using Dalamud.Utility.Signatures; using ECommons; using ECommons.Configuration; using ECommons.DalamudServices; using ECommons.DalamudServices.Legacy; -using ECommons.EzHookManager; using ECommons.GameFunctions; -using ECommons.GameHelpers; -using ECommons.Logging; -using FFXIVClientStructs.FFXIV.Client.Game.Control; -using FFXIVClientStructs.FFXIV.Client.Game.Event; using FFXIVClientStructs.FFXIV.Client.Game.Object; -using FFXIVClientStructs.FFXIV.Client.UI.Agent; using ImGuiNET; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using Splatoon.SplatoonScripting; using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using System.Linq; #nullable disable @@ -28,7 +19,7 @@ namespace SplatoonScriptsOfficial.Generic; public unsafe class ShowEmote : SplatoonScript { public override HashSet ValidTerritories => null; - public override Metadata Metadata => new(3, "NightmareXIV"); + public override Metadata Metadata => new(4, "NightmareXIV"); private delegate long OnEmoteFuncDelegate(IntPtr a1, GameObject* source, ushort emoteId, GameObjectId targetId, long a5); [Signature("40 53 56 41 54 41 57 48 83 EC 38", DetourName = nameof(OnEmoteFuncDetour))] @@ -57,12 +48,12 @@ private long OnEmoteFuncDetour(IntPtr a1, GameObject* source, ushort emoteId, Ga { if(targetId == Svc.ClientState.LocalPlayer?.EntityId) { - var emoteName = Svc.Data.GetExcelSheet()?.GetRow(emoteId)?.Name; + var emoteName = Svc.Data.GetExcelSheet()?.GetRowOrDefault(emoteId)?.Name; Svc.Chat.Print($">> {GenericHelpers.Read(source->Name)} uses {emoteName} on you."); } else if(Controller.GetConfig().ShowOnOthers) { - var emoteName = Svc.Data.GetExcelSheet()?.GetRow(emoteId)?.Name; + var emoteName = Svc.Data.GetExcelSheet()?.GetRowOrDefault(emoteId)?.Name; var target = Svc.Objects.FirstOrDefault(x => (ulong)x.Struct()->GetGameObjectId() == (ulong)targetId); Svc.Chat.Print($">> {GenericHelpers.Read(source->Name)} uses {emoteName}" + (target != null ? $" on {target.Name}" : "")); } diff --git a/SplatoonScripts/Generic/WorldWaiter.cs b/SplatoonScripts/Generic/WorldWaiter.cs index 5276343d..c718754c 100644 --- a/SplatoonScripts/Generic/WorldWaiter.cs +++ b/SplatoonScripts/Generic/WorldWaiter.cs @@ -12,6 +12,7 @@ namespace SplatoonScriptsOfficial.Generic; public class WorldWaiter : SplatoonScript { + public override Metadata? Metadata { get; } = new(2, "NightmareXIV"); public override HashSet? ValidTerritories { get; } = null; int World = 0; @@ -20,7 +21,7 @@ public override void OnUpdate() { if(World > 0) { - if(Player.Interactable && GenericHelpers.IsScreenReady() && Svc.ClientState.LocalPlayer?.CurrentWorld.Id == World) + if(Player.Interactable && GenericHelpers.IsScreenReady() && Svc.ClientState.LocalPlayer?.CurrentWorld.RowId == World) { Environment.Exit(0); } diff --git a/SplatoonScripts/Generic/ZoneNameToast.cs b/SplatoonScripts/Generic/ZoneNameToast.cs index 91218a3f..6ea83f35 100644 --- a/SplatoonScripts/Generic/ZoneNameToast.cs +++ b/SplatoonScripts/Generic/ZoneNameToast.cs @@ -1,7 +1,7 @@ using ECommons; using ECommons.DalamudServices; using FFXIVClientStructs.FFXIV.Component.GUI; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using Splatoon.SplatoonScripting; using System; using System.Collections.Generic; @@ -13,7 +13,7 @@ namespace SplatoonScriptsOfficial.Generic { public class ZoneNameToast : SplatoonScript { - public override Metadata? Metadata => new(2, "NightmareXIV"); + public override Metadata? Metadata => new(3, "NightmareXIV"); public override HashSet ValidTerritories => new(); public override void OnEnable() { @@ -31,11 +31,11 @@ private unsafe void ClientState_TerritoryChanged(ushort e) { return; }*/ - var t = Svc.Data.GetExcelSheet()?.GetRow(e); + var t = Svc.Data.GetExcelSheet()?.GetRowOrDefault(e); if(t != null) { - var name = t.PlaceName.Value?.Name.ToString(); - var cfc = t.ContentFinderCondition.Value?.Name.ToString(); + var name = t.Value.PlaceName.ValueNullable?.Name.ToString(); + var cfc = t.Value.ContentFinderCondition.ValueNullable?.Name.ToString(); if (!name.IsNullOrEmpty()) { if(!cfc.IsNullOrEmpty() && name != cfc) diff --git a/SplatoonScripts/Tests/DMParser.cs b/SplatoonScripts/Tests/DMParser.cs index 5e1d8128..9d7ba56f 100644 --- a/SplatoonScripts/Tests/DMParser.cs +++ b/SplatoonScripts/Tests/DMParser.cs @@ -13,7 +13,7 @@ public class DMParser : SplatoonScript { public override HashSet? ValidTerritories { get; } = new(); - public override Metadata? Metadata => new(1, "NightmareXIV"); + public override Metadata? Metadata => new(2, "NightmareXIV"); public override void OnEnable() { @@ -32,7 +32,7 @@ private void Chat_ChatMessage(Dalamud.Game.Text.XivChatType type, int timestamp, var player = sender.Payloads.OfType().FirstOrDefault(); if (player != null) { - PluginLog.Information($"Detected {type}. Detected player name={player.PlayerName} and home world={player.World.RowId} ({player.World.Name})"); + PluginLog.Information($"Detected {type}. Detected player name={player.PlayerName} and home world={player.World.RowId} ({player.World.Value.Name})"); } else { diff --git a/SplatoonScripts/Tests/GenericTest4.cs b/SplatoonScripts/Tests/GenericTest4.cs index b1d3ac72..a1f1de2e 100644 --- a/SplatoonScripts/Tests/GenericTest4.cs +++ b/SplatoonScripts/Tests/GenericTest4.cs @@ -10,7 +10,7 @@ using FFXIVClientStructs.FFXIV.Client.UI.Agent; using FFXIVClientStructs.FFXIV.Component.GUI; using ImGuiNET; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using Splatoon.SplatoonScripting; using System; using System.Collections.Generic; @@ -20,8 +20,8 @@ namespace SplatoonScriptsOfficial.Tests; public unsafe class GenericTest4 : SplatoonScript { public override HashSet? ValidTerritories => new(); - - int a1; + public override Metadata? Metadata { get; } = new(2, "NightmareXIV"); + int a1; string Filter = ""; public override void OnSettingsDraw() @@ -32,7 +32,7 @@ public override void OnSettingsDraw() return; } ImGui.InputInt("Duty ID", ref a1); - if(ImGui.BeginCombo("Duty", Svc.Data.GetExcelSheet().GetRow((uint)a1)?.Name?.ExtractText())) + if(ImGui.BeginCombo("Duty", Svc.Data.GetExcelSheet().GetRowOrDefault((uint)a1)?.Name.ExtractText())) { ImGui.InputText($"Filter", ref Filter, 50); foreach(var x in Svc.Data.GetExcelSheet()) @@ -40,7 +40,7 @@ public override void OnSettingsDraw() var name = x.Name.ExtractText(); if (Filter != "" && !name.Contains(Filter, StringComparison.OrdinalIgnoreCase)) continue; if (name == "") continue; - if (x.TerritoryType.Value.TerritoryIntendedUse == (uint)TerritoryIntendedUseEnum.Quest_Battle || x.TerritoryType.Value.TerritoryIntendedUse == (uint)TerritoryIntendedUseEnum.Quest_Battle_2) continue; + if (x.TerritoryType.Value.TerritoryIntendedUse.RowId == (uint)TerritoryIntendedUseEnum.Quest_Battle || x.TerritoryType.Value.TerritoryIntendedUse.RowId == (uint)TerritoryIntendedUseEnum.Quest_Battle_2) continue; if (ImGui.Selectable(x.Name.ExtractText())) { a1 = (int)x.RowId; @@ -128,8 +128,8 @@ public bool OpenDF(uint cfc) { if (GenericHelpers.TryGetAddonByName("ContentsFinder", out var addon) && GenericHelpers.IsAddonReady(&addon->AtkUnitBase)) { - var cfcData = Svc.Data.GetExcelSheet().GetRow(cfc); - if (cfcData == null || cfcData.Name.ExtractText() == "") throw new ArgumentOutOfRangeException(nameof(cfc)); + var cfcData = Svc.Data.GetExcelSheet().GetRowOrDefault(cfc); + if (cfcData == null || cfcData.Value.Name.ExtractText() == "") throw new ArgumentOutOfRangeException(nameof(cfc)); var list = addon->AtkUnitBase.GetNodeById(52)->GetAsAtkComponentList(); var length = addon->NumEntries; var reader = new ReaderAddonContentsFinder(&addon->AtkUnitBase); @@ -140,7 +140,7 @@ public bool OpenDF(uint cfc) if (Regex.IsMatch(duty.DutyLevel, @"^Lv\. ([0-9]{1,3})$")) { cnt++; - if (duty.DutyName == cfcData.Name.ExtractText()) + if (duty.DutyName == cfcData.Value.Name.ExtractText()) { Callback.Fire(&addon->AtkUnitBase, true, 3, cnt); return true; diff --git a/SplatoonScripts/Tests/IPCExample.cs b/SplatoonScripts/Tests/IPCExample.cs index 037256ad..a9f890d3 100644 --- a/SplatoonScripts/Tests/IPCExample.cs +++ b/SplatoonScripts/Tests/IPCExample.cs @@ -4,7 +4,7 @@ using ECommons.EzIpcManager; using ECommons.GameHelpers; using ImGuiNET; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using Splatoon.SplatoonScripting; using System; using System.Collections.Generic; @@ -14,8 +14,8 @@ namespace SplatoonScriptsOfficial.Tests; public class IPCExample : SplatoonScript { [EzIPC] Action AddOrUpdateMoodle = null!; - public override HashSet? ValidTerritories { get; } = []; - + public override HashSet? ValidTerritories { get; } = []; + public override Metadata? Metadata { get; } = new(2, "NightmareXIV"); public override void OnSetup() { EzIPC.Init(this, "Moodles"); diff --git a/SplatoonScripts/Tests/OnBuffEffectTest.cs b/SplatoonScripts/Tests/OnBuffEffectTest.cs deleted file mode 100644 index c5a0f023..00000000 --- a/SplatoonScripts/Tests/OnBuffEffectTest.cs +++ /dev/null @@ -1,22 +0,0 @@ -using ECommons.Logging; -using Splatoon.SplatoonScripting; -using Splatoon.Structures; -using System.Collections.Generic; - -namespace SplatoonScriptsOfficial.Tests; -internal class OnBuffEffectTest :SplatoonScript -{ - public override HashSet? ValidTerritories => null; - - public override void OnGainBuffEffect(uint sourceId, IReadOnlyList gainStatusInfos) - { - var gameObject = sourceId.GetObject(); - PluginLog.Information($"OnGainBuffEffect: [{gameObject.Name}({sourceId})] {string.Join(", ", gainStatusInfos)}"); - } - - public override void OnRemoveBuffEffect(uint sourceId, IReadOnlyList removeStatusInfos) - { - var gameObject = sourceId.GetObject(); - PluginLog.Information($"OnRemoveBuffEffect: [{gameObject.Name}({sourceId})] {string.Join(", ", removeStatusInfos)}"); - } -} diff --git a/SplatoonScripts/Tests/SendSpawnedObjects.cs b/SplatoonScripts/Tests/SendSpawnedObjects.cs index 5857cebf..64b3dd4f 100644 --- a/SplatoonScripts/Tests/SendSpawnedObjects.cs +++ b/SplatoonScripts/Tests/SendSpawnedObjects.cs @@ -19,7 +19,7 @@ public unsafe class SendSpawnedObjects : SplatoonScript { public override HashSet ValidTerritories => new(); HttpClient Client; - + public override Metadata? Metadata { get; } = new(2, "NightmareXIV"); public override void OnEnable() { Client = new() @@ -39,7 +39,7 @@ public override void OnActionEffect(uint ActionID, ushort animationID, ActionEff var str = new StringBuilder("effect|") .Append(ActionID) .Append('|') - .Append(Svc.Data.GetExcelSheet()?.GetRow(ActionID)?.Name ?? "") + .Append(Svc.Data.GetExcelSheet()?.GetRowOrDefault(ActionID)?.Name ?? "") .Append('|') .Append(sourceID.GetObject()?.Name.ToString()) .Append('|') @@ -109,7 +109,7 @@ public override void OnObjectCreation(nint newObjectPtr) $"{obj.EntityId}", $"{obj.DataId}", $"{obj.Struct()->GetNameId()}", - chr == null?"":$"{chr.Struct()->CharacterData.ModelCharaId}", + chr == null?"":$"{chr.Struct()->ModelCharaId}", chr == null?"":$"{chr.GetTransformationID()}", $"{obj.Position.X}", $"{obj.Position.Y}", From ebe5fe963ef3c586d6a797dc7158ff702a9f480d Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 15 Nov 2024 20:12:17 +0000 Subject: [PATCH 13/14] Update SplatoonScripts/update.csv --- SplatoonScripts/update.csv | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/SplatoonScripts/update.csv b/SplatoonScripts/update.csv index cae68166..93a1b77e 100644 --- a/SplatoonScripts/update.csv +++ b/SplatoonScripts/update.csv @@ -14,7 +14,7 @@ SplatoonScriptsOfficial.Duties.Endwalker@DSR_Dooms,6,https://github.com/PunishXI SplatoonScriptsOfficial.Duties.Endwalker@P8S2_Dominion,8,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P8S2 Dominion.cs SplatoonScriptsOfficial.Duties.Endwalker@DSR_P6_Cauterize_Unsafe,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/DSR_P6_Cauterize_Unsafe.cs SplatoonScriptsOfficial.Duties.Endwalker@P12S_Wing_Cleaves,7,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P12S Wing Cleaves.cs -SplatoonScriptsOfficial.Duties.Endwalker@DSR_Towers,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/DSR Towers.cs +SplatoonScriptsOfficial.Duties.Endwalker@DSR_Towers,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/DSR Towers.cs SplatoonScriptsOfficial.Duties.Endwalker@Aloalo_Bombs,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/Aloalo Bombs.cs SplatoonScriptsOfficial.Duties.Endwalker@P12S_Limit_Cut,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P12S Limit Cut.cs SplatoonScriptsOfficial.Duties.Endwalker@P11S_Multiscript,6,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Endwalker/P11S Multiscript.cs @@ -66,18 +66,27 @@ SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Witch_Hunt,5,https://github.com/Pun SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Midnight_Sabbath,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Midnight Sabbath.cs SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Unsafe_Cannon,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Unsafe Cannon.cs SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Chain_Lightning,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Chain Lightning.cs -SplatoonScriptsOfficial.Duties.Dawntrail@R1S_Protean_Highlight,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R1S Protean Highlight.cs +SplatoonScriptsOfficial.Duties.Dawntrail@R1S_Protean_Highlight,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R1S Protean Highlight.cs SplatoonScriptsOfficial.Generic@ActReminder,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ActReminder.cs SplatoonScriptsOfficial.Generic@AutoFateSync,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/AutoFateSync.cs SplatoonScriptsOfficial.Generic@ScriptEventLogger,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ScriptEventLogger.cs -SplatoonScriptsOfficial.Generic@ShowEmote,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ShowEmote.cs +SplatoonScriptsOfficial.Generic@ShowEmote,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ShowEmote.cs +SplatoonScriptsOfficial.Generic@AetherSight,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/AetherSight.cs SplatoonScriptsOfficial.Generic@CastExplorer,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/CastExplorer.cs +SplatoonScriptsOfficial.Generic@WorldWaiter,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/WorldWaiter.cs +SplatoonScriptsOfficial.Generic@Makeplace2List,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/Makeplace2List.cs +SplatoonScriptsOfficial.Generic@CheckEmote,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/CheckEmote.cs SplatoonScriptsOfficial.Generic@AutoTargetSwitcher,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/AutoTargetSwitcher.cs SplatoonScriptsOfficial.Generic@PluginInstallerWindowCollapsible,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/PluginInstallerWindowCollapsible.cs -SplatoonScriptsOfficial.Generic@ZoneNameToast,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ZoneNameToast.cs +SplatoonScriptsOfficial.Generic@ZoneNameToast,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ZoneNameToast.cs SplatoonScriptsOfficial.Generic@QuestHighlighter,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/QuestHighlighter.cs SplatoonScriptsOfficial.Generic@ShowTooltipOnKey,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ShowTooltipOnKey.cs SplatoonScriptsOfficial.Generic@ForceSetDirection,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ForceSetDirection.cs -SplatoonScriptsOfficial.Tests@DMParser,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Tests/DMParser.cs +SplatoonScriptsOfficial.Generic@NoSproutIcon,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/NoSproutIcon.cs +SplatoonScriptsOfficial.Generic@ArtisanCraftCommand,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Generic/ArtisanCraftCommand.cs +SplatoonScriptsOfficial.Tests@IPCExample,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Tests/IPCExample.cs +SplatoonScriptsOfficial.Tests@DMParser,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Tests/DMParser.cs SplatoonScriptsOfficial.Tests@GenericTest7,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Tests/GenericTest7.cs +SplatoonScriptsOfficial.Tests@SendSpawnedObjects,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Tests/SendSpawnedObjects.cs +SplatoonScriptsOfficial.Tests@GenericTest4,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Tests/GenericTest4.cs SplatoonScriptsOfficial.Tests@GenericTest6,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Tests/GenericTest6.cs \ No newline at end of file From f521adb68ba737ae3c63362ff8d765fe032db03c Mon Sep 17 00:00:00 2001 From: Limiana <5073202+Limiana@users.noreply.github.com> Date: Sat, 16 Nov 2024 07:03:16 +0300 Subject: [PATCH 14/14] Whitelist latest version --- Splatoon/Splatoon.csproj | 2 +- versions.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Splatoon/Splatoon.csproj b/Splatoon/Splatoon.csproj index 7cc2104e..3213e601 100644 --- a/Splatoon/Splatoon.csproj +++ b/Splatoon/Splatoon.csproj @@ -2,7 +2,7 @@ NightmareXIV - 3.7.2.3 + 3.7.2.4 diff --git a/versions.txt b/versions.txt index 2a49c5f2..582656cd 100644 --- a/versions.txt +++ b/versions.txt @@ -1 +1 @@ -2024.08.21.0000.0000:3.7.0.3 +2024.11.06.0000.0000:3.7.2.4