- net8
- Switch to new font api, - Fix null ref on login - Fix game freeze from chat link handler
This commit is contained in:
@@ -143,21 +143,21 @@ internal sealed unsafe class Chat : IDisposable {
|
||||
|
||||
internal Chat(Plugin plugin) {
|
||||
this.Plugin = plugin;
|
||||
this.Plugin.GameInteropProvider.InitializeFromAttributes(this);
|
||||
Plugin.GameInteropProvider.InitializeFromAttributes(this);
|
||||
|
||||
this.ChatLogRefreshHook?.Enable();
|
||||
this.ChangeChannelNameHook?.Enable();
|
||||
this.ReplyInSelectedChatModeHook?.Enable();
|
||||
this.SetChatLogTellTargetHook?.Enable();
|
||||
|
||||
this.Plugin.Framework.Update += this.InterceptKeybinds;
|
||||
this.Plugin.ClientState.Login += this.Login;
|
||||
Plugin.Framework.Update += this.InterceptKeybinds;
|
||||
Plugin.ClientState.Login += this.Login;
|
||||
this.Login();
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
this.Plugin.ClientState.Login -= this.Login;
|
||||
this.Plugin.Framework.Update -= this.InterceptKeybinds;
|
||||
Plugin.ClientState.Login -= this.Login;
|
||||
Plugin.Framework.Update -= this.InterceptKeybinds;
|
||||
|
||||
this.SetChatLogTellTargetHook?.Dispose();
|
||||
this.ReplyInSelectedChatModeHook?.Dispose();
|
||||
@@ -380,7 +380,7 @@ internal sealed unsafe class Chat : IDisposable {
|
||||
var modifierState = (ModifierFlag) 0;
|
||||
foreach (var modifier in Enum.GetValues<ModifierFlag>()) {
|
||||
var modifierKey = GetKeyForModifier(modifier);
|
||||
if (modifierKey != VirtualKey.NO_KEY && this.Plugin.KeyState[modifierKey]) {
|
||||
if (modifierKey != VirtualKey.NO_KEY && Plugin.KeyState[modifierKey]) {
|
||||
modifierState |= modifier;
|
||||
}
|
||||
}
|
||||
@@ -392,7 +392,7 @@ internal sealed unsafe class Chat : IDisposable {
|
||||
}
|
||||
|
||||
void Intercept(VirtualKey key, ModifierFlag modifier) {
|
||||
if (!this.Plugin.KeyState.IsVirtualKeyValid(key)) {
|
||||
if (!Plugin.KeyState.IsVirtualKeyValid(key)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ internal sealed unsafe class Chat : IDisposable {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.Plugin.KeyState[key]) {
|
||||
if (!Plugin.KeyState[key]) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ internal sealed unsafe class Chat : IDisposable {
|
||||
}
|
||||
|
||||
foreach (var (key, (_, keybind)) in turnedOff) {
|
||||
this.Plugin.KeyState[key] = false;
|
||||
Plugin.KeyState[key] = false;
|
||||
|
||||
if (!KeybindsToIntercept.TryGetValue(keybind, out var info)) {
|
||||
continue;
|
||||
@@ -455,7 +455,7 @@ internal sealed unsafe class Chat : IDisposable {
|
||||
}
|
||||
|
||||
string? input = null;
|
||||
if (this.Plugin.GameConfig.TryGet(UiControlOption.DirectChat, out bool option) && option) {
|
||||
if (Plugin.GameConfig.TryGet(UiControlOption.DirectChat, out bool option) && option) {
|
||||
if (this._currentCharacter != null) {
|
||||
// FIXME: this whole system sucks
|
||||
var c = *this._currentCharacter;
|
||||
|
||||
@@ -40,7 +40,7 @@ internal sealed unsafe class Context {
|
||||
|
||||
internal Context(Plugin plugin) {
|
||||
this.Plugin = plugin;
|
||||
this.Plugin.GameInteropProvider.InitializeFromAttributes(this);
|
||||
Plugin.GameInteropProvider.InitializeFromAttributes(this);
|
||||
}
|
||||
|
||||
internal void InviteToNoviceNetwork(string name, ushort world) {
|
||||
|
||||
@@ -71,7 +71,7 @@ internal unsafe class GameFunctions : IDisposable {
|
||||
this.Chat = new Chat(this.Plugin);
|
||||
this.Context = new Context(this.Plugin);
|
||||
|
||||
this.Plugin.GameInteropProvider.InitializeFromAttributes(this);
|
||||
Plugin.GameInteropProvider.InitializeFromAttributes(this);
|
||||
|
||||
this.ResolveTextCommandPlaceholderHook?.Enable();
|
||||
}
|
||||
@@ -117,7 +117,7 @@ internal unsafe class GameFunctions : IDisposable {
|
||||
}
|
||||
|
||||
private void ListCommand(string name, ushort world, string commandName) {
|
||||
var row = this.Plugin.DataManager.GetExcelSheet<World>()!.GetRow(world);
|
||||
var row = Plugin.DataManager.GetExcelSheet<World>()!.GetRow(world);
|
||||
if (row == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ internal sealed unsafe class Party {
|
||||
|
||||
internal Party(Plugin plugin) {
|
||||
this.Plugin = plugin;
|
||||
this.Plugin.GameInteropProvider.InitializeFromAttributes(this);
|
||||
Plugin.GameInteropProvider.InitializeFromAttributes(this);
|
||||
}
|
||||
|
||||
internal void InviteSameWorld(string name, ushort world, ulong contentId) {
|
||||
|
||||
Reference in New Issue
Block a user