Skip to content

Commit 66cf82c

Browse files
committed
update to latest patch
1 parent d689fb0 commit 66cf82c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+246
-157
lines changed

WoLua/Constants/LogTag.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace PrincessRTFM.WoLua.Constants;
1+
namespace VariableVixen.WoLua.Constants;
22

33
public static class LogTag {
44
public const string

WoLua/Constants/Metamethod.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace PrincessRTFM.WoLua.Constants;
1+
namespace VariableVixen.WoLua.Constants;
22

33
public static class Metamethod {
44
public const string

WoLua/Constants/StatusText.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Dalamud.Game.Text;
22
using Dalamud.Game.Text.SeStringHandling;
33

4-
namespace PrincessRTFM.WoLua.Constants;
4+
namespace VariableVixen.WoLua.Constants;
55

66
public static class StatusText {
77
public static string IconScripts { get; } = SeIconChar.CrossWorld.ToIconString();

WoLua/ExcelContainer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
using Lumina.Excel;
55
using Lumina.Excel.Sheets;
66

7-
namespace PrincessRTFM.WoLua;
7+
namespace VariableVixen.WoLua;
88

99
public static class ExcelContainer {
10-
private static Lazy<ExcelSheet<T>> init<T>() where T: struct, IExcelRow<T> {
10+
private static Lazy<ExcelSheet<T>> init<T>() where T : struct, IExcelRow<T> {
1111
return new(() => {
1212
if (Service.DataManager is null)
1313
throw new InvalidOperationException("Cannot load excel sheet without DataManager instance", new NullReferenceException("Service.DataManager does not exist"));

WoLua/Game/GameFunctionBase.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
using Dalamud.Hooking;
66

7-
using PrincessRTFM.WoLua.Constants;
7+
using VariableVixen.WoLua.Constants;
88

9-
namespace PrincessRTFM.WoLua.Game;
9+
namespace VariableVixen.WoLua.Game;
1010

1111
public abstract class GameFunctionBase<T> where T : Delegate {
12-
private readonly IntPtr addr = IntPtr.Zero;
13-
public IntPtr Address => this.addr;
12+
private readonly nint addr = nint.Zero;
13+
public nint Address => this.addr;
1414
private T? function;
15-
public bool Valid => this.function is not null || this.Address != IntPtr.Zero;
15+
public bool Valid => this.function is not null || this.Address != nint.Zero;
1616
public T? Delegate {
1717
get {
1818
if (this.function is not null)
1919
return this.function;
20-
if (this.Address != IntPtr.Zero) {
20+
if (this.Address != nint.Zero) {
2121
this.function = Marshal.GetDelegateForFunctionPointer<T>(this.Address);
2222
return this.function;
2323
}
@@ -36,7 +36,7 @@ internal GameFunctionBase(string sig, int offset = 0) {
3636
}
3737
}
3838
[SuppressMessage("Reliability", "CA2020:Prevent from behavioral change", Justification = "If this explodes, we SHOULD be throwing")]
39-
internal GameFunctionBase(IntPtr address, int offset = 0) {
39+
internal GameFunctionBase(nint address, int offset = 0) {
4040
this.addr = address + offset; // this will throw on overflow
4141
ulong totalOffset = (ulong)this.Address.ToInt64() - (ulong)Service.Scanner.Module.BaseAddress.ToInt64();
4242
Service.Log.Information($"[{LogTag.PluginCore}] {this.GetType().Name} loaded; address = 0x{this.Address.ToInt64():X16}, base memory offset = 0x{totalOffset:X16}");
@@ -45,5 +45,5 @@ internal GameFunctionBase(IntPtr address, int offset = 0) {
4545
public dynamic? Invoke(params dynamic[] parameters)
4646
=> this.Delegate?.DynamicInvoke(parameters);
4747

48-
public Hook<T> Hook(T handler) => Service.Interop.HookFromAddress<T>(this.Address, handler);
48+
public Hook<T> Hook(T handler) => Service.Interop.HookFromAddress(this.Address, handler);
4949
}

WoLua/Game/PlaySound.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace PrincessRTFM.WoLua.Game;
1+
namespace VariableVixen.WoLua.Game;
22

33
public delegate ulong SoundFunc(int soundId, ulong unknown1, ulong unknown2);
44

WoLua/Game/ServerChat.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using FFXIVClientStructs.FFXIV.Client.System.String;
1010
using FFXIVClientStructs.FFXIV.Client.UI;
1111

12-
namespace PrincessRTFM.WoLua.Game;
12+
namespace VariableVixen.WoLua.Game;
1313

1414
internal class ServerChat {
1515
private static class Signatures {
@@ -18,8 +18,8 @@ private static class Signatures {
1818
}
1919

2020

21-
private delegate void ProcessChatBoxDelegate(IntPtr uiModule, IntPtr message, IntPtr unused, byte a4);
22-
private readonly unsafe delegate* unmanaged<Utf8String*, int, IntPtr, void> sanitiseString = null!;
21+
private delegate void ProcessChatBoxDelegate(nint uiModule, nint message, nint unused, byte a4);
22+
private readonly unsafe delegate* unmanaged<Utf8String*, int, nint, void> sanitiseString = null!;
2323

2424
private ProcessChatBoxDelegate? processChatBox { get; }
2525

@@ -33,7 +33,7 @@ internal unsafe ServerChat(ISigScanner scanner) {
3333
}
3434

3535
if (scanner.TryScanText(Signatures.SanitiseString, out nint sanitisePtr)) {
36-
this.sanitiseString = (delegate* unmanaged<Utf8String*, int, IntPtr, void>)sanitisePtr;
36+
this.sanitiseString = (delegate* unmanaged<Utf8String*, int, nint, void>)sanitisePtr;
3737
Service.Log?.Information("Found signature for chat sanitisation");
3838
}
3939
else {
@@ -53,7 +53,7 @@ public unsafe void SendMessageUnsafe(byte[] message) {
5353
nint mem1 = Marshal.AllocHGlobal(400);
5454
Marshal.StructureToPtr(payload, mem1, false);
5555

56-
this.processChatBox((IntPtr)uiModule, mem1, IntPtr.Zero, 0);
56+
this.processChatBox((nint)uiModule, mem1, nint.Zero, 0);
5757

5858
Marshal.FreeHGlobal(mem1);
5959
}
@@ -78,7 +78,7 @@ public unsafe string SanitiseText(string text) {
7878

7979
Utf8String* uText = Utf8String.FromString(text);
8080

81-
this.sanitiseString(uText, 0x27F, IntPtr.Zero);
81+
this.sanitiseString(uText, 0x27F, nint.Zero);
8282
string sanitised = uText->ToString();
8383

8484
uText->Dtor();
@@ -92,7 +92,7 @@ public unsafe string SanitiseText(string text) {
9292
[StructLayout(LayoutKind.Explicit)]
9393
private readonly struct ChatPayload: IDisposable {
9494
[FieldOffset(0)]
95-
private readonly IntPtr textPtr;
95+
private readonly nint textPtr;
9696

9797
[FieldOffset(16)]
9898
private readonly ulong textLen;

WoLua/Game/Sound.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace PrincessRTFM.WoLua.Game;
1+
namespace VariableVixen.WoLua.Game;
22

33
public enum Sound: byte {
44
None = 0x00,

WoLua/Hooks.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using FFXIVClientStructs.FFXIV.Client.Game.Object;
66
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
77

8-
namespace PrincessRTFM.WoLua;
8+
namespace VariableVixen.WoLua;
99

1010
public class Hooks: IDisposable {
1111
private bool disposed;
@@ -16,7 +16,7 @@ public unsafe IGameObject? UITarget {
1616
if (pronouns is null)
1717
return null;
1818
GameObject* actor = pronouns->UiMouseOverTarget;
19-
return actor is null ? null : Service.Objects.CreateObjectReference((IntPtr)actor);
19+
return actor is null ? null : Service.Objects.CreateObjectReference((nint)actor);
2020
}
2121
}
2222

WoLua/Lua/ActionQueue.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66

77
using MoonSharp.Interpreter;
88

9-
using PrincessRTFM.WoLua.Constants;
10-
using PrincessRTFM.WoLua.Lua.Actions;
9+
using VariableVixen.WoLua.Lua;
1110

12-
namespace PrincessRTFM.WoLua.Lua;
11+
using VariableVixen.WoLua.Constants;
12+
using VariableVixen.WoLua.Lua.Actions;
13+
14+
namespace VariableVixen.WoLua.Lua;
1315

1416
[SuppressMessage("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "It's a queue for script actions")]
1517
public class ActionQueue: IDisposable {

0 commit comments

Comments
 (0)