7d5496e959
81 namespace declarations and 100 using directives converted via sed, plus two FQN-aliases (ChatTwoPartyFinderPayload in PayloadHandler.cs and ModifierFlag in KeybindManager.cs) updated. Critical: Language.Designer.cs and HellionStrings.Designer.cs ResourceManager string arguments updated synchronously — these are runtime reflection lookups not caught by the C# compiler. Two intentional ChatTwo references remain: the legacy migration path 'ChatTwo.json' in Plugin.cs (still points to upstream Chat 2's config file by design) and the InternalsVisibleTo declaration in AssemblyInfo.cs (handled in the upcoming repo-folder rename task). The local alias names 'ChatTwoPartyFinderPayload' and 'ChatTwoConflictDetector' are preserved as local symbols; only their target namespaces and references changed.
59 lines
1.9 KiB
C#
Executable File
59 lines
1.9 KiB
C#
Executable File
using HellionChat.Resources;
|
|
using HellionChat.Util;
|
|
using Dalamud.Interface.ImGuiNotification;
|
|
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
|
using FFXIVClientStructs.FFXIV.Client.UI.Info;
|
|
|
|
namespace HellionChat.GameFunctions;
|
|
|
|
internal static unsafe class Party
|
|
{
|
|
internal static void InviteSameWorld(string name, ushort world, ulong contentId)
|
|
{
|
|
// this only works if target is on the same world
|
|
fixed (byte* namePtr = name.ToTerminatedBytes()) {
|
|
InfoProxyPartyInvite.Instance()->InviteToParty(contentId, namePtr, world);
|
|
}
|
|
}
|
|
|
|
internal static void InviteOtherWorld(ulong contentId, ushort worldId = 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
|
|
if (contentId == 0)
|
|
{
|
|
WrapperUtil.AddNotification(Language.PartyInvite_NoId, NotificationType.Warning);
|
|
return;
|
|
}
|
|
|
|
InfoProxyPartyInvite.Instance()->InviteToPartyContentId(contentId, worldId);
|
|
}
|
|
|
|
internal static void InviteInInstance(ulong contentId)
|
|
{
|
|
if (contentId == 0)
|
|
{
|
|
WrapperUtil.AddNotification(Language.PartyInvite_NoId, NotificationType.Warning);
|
|
return;
|
|
}
|
|
|
|
InfoProxyPartyInvite.Instance()->InviteToPartyInInstanceByContentId(contentId);
|
|
}
|
|
|
|
internal static void Kick(string name, ulong contentId)
|
|
{
|
|
fixed (byte* namePtr = name.ToTerminatedBytes()) {
|
|
AgentPartyMember.Instance()->Kick(namePtr, 0, contentId);
|
|
}
|
|
}
|
|
|
|
internal static void Promote(string name, ulong contentId)
|
|
{
|
|
fixed (byte* namePtr = name.ToTerminatedBytes()) {
|
|
AgentPartyMember.Instance()->Promote(namePtr, 0, contentId);
|
|
}
|
|
}
|
|
}
|