diff --git a/client/MessageRequest.cs b/client/MessageRequest.cs index 07d39ae..a378187 100644 --- a/client/MessageRequest.cs +++ b/client/MessageRequest.cs @@ -11,11 +11,24 @@ public class MessageRequest { public float Y { get; set; } public float Z { get; set; } public Guid PackId { get; set; } + + [JsonProperty("template_1")] public int Template1 { get; set; } + + [JsonProperty("word_1_list")] public int? Word1List { get; set; } + + [JsonProperty("word_1_word")] public int? Word1Word { get; set; } + public int? Conjunction { get; set; } + + [JsonProperty("template_2")] public int? Template2 { get; set; } + + [JsonProperty("word_2_list")] public int? Word2List { get; set; } + + [JsonProperty("word_2_word")] public int? Word2Word { get; set; } } diff --git a/client/Pack.cs b/client/Pack.cs index 11df96f..9d2e44d 100644 --- a/client/Pack.cs +++ b/client/Pack.cs @@ -1,3 +1,4 @@ +using Dalamud.Logging; using YamlDotNet.Serialization.NamingConventions; namespace OrangeGuidanceTomestone; @@ -15,8 +16,9 @@ public class Pack { } .Select(name => { try { - return des.Deserialize(Resourcer.Resource.AsString($"{name}.yaml")); - } catch { + return des.Deserialize(Resourcer.Resource.AsStringUnChecked($"OrangeGuidanceTomestone.packs.{name}.yaml")); + } catch (Exception ex) { + PluginLog.LogError(ex, name); return null; } }) diff --git a/client/PluginUi.cs b/client/PluginUi.cs index afc5bb5..4999ed2 100644 --- a/client/PluginUi.cs +++ b/client/PluginUi.cs @@ -149,7 +149,7 @@ public class PluginUi : IDisposable { this.ClearIfNecessary(); var valid = this.ValidSetup(); - if (valid) { + if (!valid) { ImGui.BeginDisabled(); } @@ -164,7 +164,7 @@ public class PluginUi : IDisposable { Word1List = this._word1.Item1 == -1 ? null : this._word1.Item1, Word1Word = this._word1.Item2 == -1 ? null : this._word1.Item2, Conjunction = this._conj == -1 ? null : this._conj, - Template2 = this._part2, + Template2 = this._part2 == -1 ? null : this._part2, Word2List = this._word2.Item1 == -1 ? null : this._word2.Item1, Word2Word = this._word2.Item2 == -1 ? null : this._word2.Item2, }; @@ -183,7 +183,7 @@ public class PluginUi : IDisposable { }); } - if (valid) { + if (!valid) { ImGui.EndDisabled(); }