Skip to content

Commit

Permalink
API 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Infiziert90 committed Nov 13, 2024
1 parent 2e2f1a8 commit fd2c478
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions DeathRoll/DeathRoll.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.13" />
<PackageReference Include="DalamudPackager" Version="11.0.0" />
<PackageReference Include="NAudio.Core" Version="2.2.1" />
<PackageReference Include="NAudio.Vorbis" Version="1.5.0" />
<PackageReference Include="NAudio.Wasapi" Version="2.2.1" />
<PackageReference Include="NAudio.WinMM" Version="2.2.1" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.4" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
<Reference Include="FFXIVClientStructs">
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
<Private>false</Private>
Expand Down
6 changes: 2 additions & 4 deletions DeathRoll/HookManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
using FFXIVClientStructs.FFXIV.Component.Text;
using FFXIVClientStructs.STD;
using Lumina.Excel.GeneratedSheets;
using Lumina.Excel.Sheets;

namespace DeathRoll;

Expand All @@ -16,7 +16,7 @@ public unsafe class HookManager
private Hook<RandomPrintLogDelegate>? RandomPrintLogHook { get; set; }
private delegate void RandomPrintLogDelegate(RaptureLogModule* module, int logMessageId, byte* playerName, byte sex, StdDeque<TextParameter>* parameter, byte flags, ushort homeWorldId);

[Signature("48 89 5C 24 ?? 48 89 6C 24 ?? 56 57 41 56 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 ?? ?? ?? ?? 44 0F B7 8C 24", DetourName = nameof(DicePrintLogDetour))]
[Signature("48 89 5C 24 ?? 48 89 74 24 ?? 55 57 41 54 41 55 41 56 48 8D 6C 24 ?? 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 45 ?? 0F B7 7D", DetourName = nameof(DicePrintLogDetour))]
private Hook<DicePrintLogDelegate>? DicePrintLogHook { get; set; }
private delegate void DicePrintLogDelegate(RaptureLogModule* module, ushort chatType, byte* userName, void* unused, ushort worldId, ulong accountId, ulong contentId, ushort roll, ushort outOf, uint entityId, byte ident);

Expand Down Expand Up @@ -81,6 +81,4 @@ private void DicePrintLogDetour(RaptureLogModule* module, ushort chatType, byte*

DicePrintLogHook!.Original(module, chatType, playerName, unused, worldId, accountId, contentId, roll, outOf, entityId, ident);
}


}
8 changes: 4 additions & 4 deletions DeathRoll/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ public void PluginCommand(string _, string args)
public static string GetTargetName()
{
var target = TargetManager.SoftTarget ?? TargetManager.Target;
if (target is not IPlayerCharacter pc || pc.HomeWorld.GameData == null)
if (target is not IPlayerCharacter pc || pc.HomeWorld.ValueNullable == null)
return string.Empty;

return $"{pc.Name}\uE05D{pc.HomeWorld.GameData.Name}";
return $"{pc.Name}\uE05D{pc.HomeWorld.Value.Name}";
}

public void ProcessIncomingMessage(string fullName, int roll, int outOf)
Expand All @@ -181,8 +181,8 @@ public void ProcessIncomingMessage(string fullName, int roll, int outOf)
return;

var local = ClientState.LocalPlayer;
if (local?.HomeWorld.GameData?.Name != null)
LocalPlayer = $"{local.Name}\uE05D{local.HomeWorld.GameData.Name}";
if (local?.HomeWorld.ValueNullable?.Name != null)
LocalPlayer = $"{local.Name}\uE05D{local.HomeWorld.Value.Name}";

if (Configuration.ActiveBlocklist && Configuration.SavedBlocklist.Contains(fullName.Replace("\uE05D", "@")))
{
Expand Down
12 changes: 6 additions & 6 deletions DeathRoll/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net8.0-windows7.0": {
"DalamudPackager": {
"type": "Direct",
"requested": "[2.1.13, )",
"resolved": "2.1.13",
"contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ=="
"requested": "[11.0.0, )",
"resolved": "11.0.0",
"contentHash": "bjT7XUlhIJSmsE/O76b7weUX+evvGQctbQB8aKXt94o+oPWxHpCepxAGMs7Thow3AzCyqWs7cOpp9/2wcgRRQA=="
},
"NAudio.Core": {
"type": "Direct",
Expand Down Expand Up @@ -45,9 +45,9 @@
},
"SixLabors.ImageSharp": {
"type": "Direct",
"requested": "[3.1.4, )",
"resolved": "3.1.4",
"contentHash": "lFIdxgGDA5iYkUMRFOze7BGLcdpoLFbR+a20kc1W7NepvzU7ejtxtWOg9RvgG7kb9tBoJ3ONYOK6kLil/dgF1w=="
"requested": "[3.1.5, )",
"resolved": "3.1.5",
"contentHash": "lNtlq7dSI/QEbYey+A0xn48z5w4XHSffF8222cC4F4YwTXfEImuiBavQcWjr49LThT/pRmtWJRcqA/PlL+eJ6g=="
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
Expand Down

0 comments on commit fd2c478

Please sign in to comment.