API12 / .NET 9

This commit is contained in:
Loporrit
2025-03-27 04:13:49 +00:00
parent 46053bf8fa
commit 063eb5082a
5 changed files with 15 additions and 59 deletions

View File

@@ -155,7 +155,7 @@ public unsafe sealed class GameChatHooks : IDisposable
var pronounModule = UIModule.Instance()->GetPronounModule();
var chatString1 = pronounModule->ProcessString(message, true);
var chatString2 = this.ProcessStringStep2(pronounModule, chatString1, 1);
var chatBytes = MemoryHelper.ReadRaw((nint)chatString2->StringPtr, chatString2->Length);
var chatBytes = MemoryHelper.ReadRaw((nint)chatString2->StringPtr.Value, chatString2->Length);
if (chatBytes.Length > 0)
this._chatChannelOverride.ChatMessageHandler?.Invoke(chatBytes);

View File

@@ -1,24 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Dalamud.NET.Sdk/12.0.1">
<PropertyGroup>
<Authors></Authors>
<Company></Company>
<Version>1.9.0</Version>
<Description></Description>
<Copyright></Copyright>
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<Platforms>x64</Platforms>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockfileAssemblies>true</CopyLocalLockfileAssemblies>
<AssemblyName>LoporritSync</AssemblyName>
<Version>1.9.0</Version>
<PackageProjectUrl>https://github.com/loporrit/MareClient/</PackageProjectUrl>
</PropertyGroup>
<PropertyGroup>
@@ -30,7 +15,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DalamudPackager" Version="11.0.0" />
<PackageReference Include="Downloader" Version="3.1.2" />
<PackageReference Include="K4os.Compression.LZ4.Legacy" Version="1.3.8" />
<PackageReference Include="K4os.Compression.LZ4.Streams" Version="1.3.8" />
@@ -38,15 +22,15 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="8.0.11" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.6" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.3" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.7" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.4.0.108396">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.3.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.7.0" />
</ItemGroup>
<ItemGroup Condition="Exists('..\Penumbra.Api\Penumbra.Api.csproj')">
@@ -75,34 +59,6 @@
</ItemGroup>
<ItemGroup>
<Reference Include="FFXIVClientStructs">
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Dalamud">
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ImGui.NET">
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ImGuiScene">
<HintPath>$(DalamudLibPath)ImGuiScene.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Lumina">
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Lumina.Excel">
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="CheapLoc">
<HintPath>$(DalamudLibPath)CheapLoc.dll</HintPath>
<Private>false</Private>

View File

@@ -76,7 +76,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
UiColors = new(() =>
{
return gameData.GetExcelSheet<Lumina.Excel.Sheets.UIColor>(Dalamud.Game.ClientLanguage.English)!
.Where(x => x.RowId != 0 && !(x.RowId >= 500 && (x.UIForeground & 0xFFFFFF00) == 0))
.Where(x => x.RowId != 0 && !(x.RowId >= 500 && (x.Dark & 0xFFFFFF00) == 0))
.ToDictionary(x => (int)x.RowId);
});
mediator.Subscribe<TargetPairMessage>(this, (msg) =>

View File

@@ -432,8 +432,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
_uiShared.DrawColorCombo("Chat text color", Enumerable.Concat([0], uiColors.Keys),
i => i switch
{
0 => (uiColors[ChatService.DefaultColor].UIForeground, "Plugin Default"),
_ => (uiColors[i].UIForeground, $"[{i}] Sample Text")
0 => (uiColors[ChatService.DefaultColor].Dark, "Plugin Default"),
_ => (uiColors[i].Dark, $"[{i}] Sample Text")
},
i => {
_configService.Current.ChatColor = i;
@@ -593,8 +593,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
_uiShared.DrawColorCombo($"Chat text color##{gid}", Enumerable.Concat([0], uiColors.Keys),
i => i switch
{
0 => (uiColors[globalChatColor > 0 ? globalChatColor : ChatService.DefaultColor].UIForeground, "(use global setting)"),
_ => (uiColors[i].UIForeground, $"[{i}] Sample Text")
0 => (uiColors[globalChatColor > 0 ? globalChatColor : ChatService.DefaultColor].Dark, "(use global setting)"),
_ => (uiColors[i].Dark, $"[{i}] Sample Text")
},
i => {
shellConfig.Color = i;