Go to file
Anna 7e8f4d26c6 chore: bump version to 1.1.1 2022-01-13 00:54:01 -05:00
Siggingway chore: bump version to 1.1.1 2022-01-13 00:54:01 -05:00
.gitignore chore: initial commit 2022-01-11 05:22:08 -05:00
LICENCE chore: initial commit 2022-01-11 05:22:08 -05:00
README.md chore: change readme code block to cs 2022-01-11 05:33:14 -05:00
Siggingway.sln chore: initial commit 2022-01-11 05:22:08 -05:00
Siggingway.sln.DotSettings chore: initial commit 2022-01-11 05:22:08 -05:00

README.md

Siggingway

Signature attribute for making working with signatures in Dalamud plugins super braindead.

Usage

public class Plugin : IDalamudPlugin {
    [Signature("DE AD ?? EF", DetourName = nameof(MyDetour)]
    private Hook<MyDelegate>? MyHook { get; init; }
    
    [Signature("CA ?? BA BE")]
    private SomeGameFunctionDelegate? _someGameFunction;
    private delegate void SomeGameFunctionDelegate();

    public Plugin(SigScanner scanner) {
        Siggingway.Siggingway.Initialise(scanner, this);
    
        // you still have to enable the hook
        // be sure to check if it's null    
        this.MyHook?.Enable();
    }
    
    public void Dispose() {
        this.MyHook?.Dispose();
    }
    
    private void MyDetour() {
        // this is called by the hook!

        this._someGameFunction?.Invoke();
    }
}