Compare commits

..

No commits in common. "c53b4ac3eb86b71c3137b6f34cc1f1a43696415a" and "d4dd60eaf81ddffb85fcdcc707690b5cbc757b8b" have entirely different histories.

4 changed files with 8 additions and 19 deletions

View File

@ -40,7 +40,7 @@ internal sealed unsafe class Context {
var uiModule = Framework.Instance()->GetUiModule(); var uiModule = Framework.Instance()->GetUiModule();
// 6.05: 20D722 // 6.05: 20D722
var func = (delegate* unmanaged<UIModule*, IntPtr>) uiModule->vfunc[33]; var func = (delegate*<UIModule*, IntPtr>) uiModule->vfunc[33];
var toIndex = func(uiModule); var toIndex = func(uiModule);
// 6.05: 20E4CB // 6.05: 20E4CB
var a1 = this.Plugin.Functions.Indexer(toIndex, 0x11); var a1 = this.Plugin.Functions.Indexer(toIndex, 0x11);

View File

@ -174,7 +174,7 @@ internal unsafe class GameFunctions : IDisposable {
agent->AddonId = (uint) addon->ID; agent->AddonId = (uint) addon->ID;
// vcall from E8 ?? ?? ?? ?? 0F B7 C0 48 83 C4 60 // vcall from E8 ?? ?? ?? ?? 0F B7 C0 48 83 C4 60
var vf5 = (delegate* unmanaged<AtkUnitBase*, byte, uint, void>*) ((IntPtr) addon->VTable + 40); var vf5 = (delegate*<AtkUnitBase*, byte, uint, void>*) ((IntPtr) addon->VTable + 40);
// E8872D: lets vf5 actually run // E8872D: lets vf5 actually run
*(byte*) ((IntPtr) atkStage + 0x2B4) |= 2; *(byte*) ((IntPtr) atkStage + 0x2B4) |= 2;
(*vf5)(addon, 0, 15); (*vf5)(addon, 0, 15);

View File

@ -9,10 +9,7 @@ namespace ChatTwo.GameFunctions;
internal sealed unsafe class Party { internal sealed unsafe class Party {
[Signature("E8 ?? ?? ?? ?? 33 C0 EB 51", Fallibility = Fallibility.Fallible)] [Signature("E8 ?? ?? ?? ?? 33 C0 EB 51", Fallibility = Fallibility.Fallible)]
private readonly delegate* unmanaged<IntPtr, ulong, byte*, ushort, byte> _inviteToParty = null!; private readonly delegate* unmanaged<IntPtr, ulong, byte*, ushort, void> _inviteToParty = null!;
[Signature("48 83 EC 38 41 B1 09", Fallibility = Fallibility.Fallible)]
private readonly delegate* unmanaged<IntPtr, ulong, ushort, byte> _inviteToPartyContentId = null!;
[Signature("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 49 8B 56 20", Fallibility = Fallibility.Fallible)] [Signature("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 49 8B 56 20", Fallibility = Fallibility.Fallible)]
private readonly delegate* unmanaged<AgentInterface*, byte*, ushort, ulong, void> _promote = null!; private readonly delegate* unmanaged<AgentInterface*, byte*, ushort, ulong, void> _promote = null!;
@ -27,28 +24,20 @@ internal sealed unsafe class Party {
Siggingway.Siggingway.Initialise(this.Plugin.SigScanner, this); Siggingway.Siggingway.Initialise(this.Plugin.SigScanner, this);
} }
internal void Invite(string name, ushort world, ulong contentId) { internal void Invite(string name, ushort world) {
if (this._inviteToParty == null || this.Plugin.Functions.Indexer == null) { if (this._inviteToParty == null || this.Plugin.Functions.Indexer == null) {
return; return;
} }
var uiModule = Framework.Instance()->GetUiModule(); var uiModule = Framework.Instance()->GetUiModule();
// 6.05: 20D722 // 6.05: 20D722
var func = (delegate* unmanaged<UIModule*, IntPtr>) uiModule->vfunc[33]; var func = (delegate*<UIModule*, IntPtr>) uiModule->vfunc[33];
var toIndex = func(uiModule); var toIndex = func(uiModule);
var a1 = this.Plugin.Functions.Indexer(toIndex, 1); var a1 = this.Plugin.Functions.Indexer(toIndex, 1);
if (contentId != 0) {
// third param is world, but it requires a specific world
// if they're not on that world, it will fail
// pass 0 and it will work on any world EXCEPT for the world the
// current player is on
this._inviteToPartyContentId(a1, contentId, 0);
}
fixed (byte* namePtr = name.ToTerminatedBytes()) { fixed (byte* namePtr = name.ToTerminatedBytes()) {
// this only works if target is on the same world // can specify content id if we have it, but there's no need
this._inviteToParty(a1, contentId, namePtr, world); this._inviteToParty(a1, 0, namePtr, world);
} }
} }

View File

@ -298,7 +298,7 @@ internal sealed class PayloadHandler {
var isInParty = member != default; var isInParty = member != default;
if (isLeader) { if (isLeader) {
if (!isInParty && ImGui.Selectable("Invite to Party")) { if (!isInParty && ImGui.Selectable("Invite to Party")) {
this.Ui.Plugin.Functions.Party.Invite(player.PlayerName, (ushort) player.World.RowId, chunk.Message?.ContentId ?? 0); this.Ui.Plugin.Functions.Party.Invite(player.PlayerName, (ushort) player.World.RowId);
} }
if (isInParty && member != null) { if (isInParty && member != null) {