refactor: update for 6.3
This commit is contained in:
parent
3e8ebcb836
commit
2982c182fa
|
@ -18,7 +18,7 @@ using Lumina.Excel.GeneratedSheets;
|
||||||
namespace Glamaholic {
|
namespace Glamaholic {
|
||||||
internal class GameFunctions : IDisposable {
|
internal class GameFunctions : IDisposable {
|
||||||
private static class Signatures {
|
private static class Signatures {
|
||||||
internal const string SetGlamourPlateSlot = "E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 48 8B 46 10";
|
internal const string SetGlamourPlateSlot = "E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 48 8B 46 10 8B 1B";
|
||||||
internal const string ModifyGlamourPlateSlot = "48 89 74 24 ?? 57 48 83 EC 20 80 79 30 00";
|
internal const string ModifyGlamourPlateSlot = "48 89 74 24 ?? 57 48 83 EC 20 80 79 30 00";
|
||||||
internal const string ClearGlamourPlateSlot = "80 79 30 00 4C 8B C1";
|
internal const string ClearGlamourPlateSlot = "80 79 30 00 4C 8B C1";
|
||||||
internal const string IsInArmoire = "E8 ?? ?? ?? ?? 84 C0 74 16 8B CB";
|
internal const string IsInArmoire = "E8 ?? ?? ?? ?? 84 C0 74 16 8B CB";
|
||||||
|
@ -132,13 +132,14 @@ namespace Glamaholic {
|
||||||
var agents = Framework.Instance()->GetUiModule()->GetAgentModule();
|
var agents = Framework.Instance()->GetUiModule()->GetAgentModule();
|
||||||
var dresserAgent = agents->GetAgentByInternalId(AgentId.MiragePrismPrismBox);
|
var dresserAgent = agents->GetAgentByInternalId(AgentId.MiragePrismPrismBox);
|
||||||
|
|
||||||
|
// these offsets in 6.3-HF1: AD2BEB
|
||||||
var itemsStart = *(IntPtr*) ((IntPtr) dresserAgent + 0x28);
|
var itemsStart = *(IntPtr*) ((IntPtr) dresserAgent + 0x28);
|
||||||
if (itemsStart == IntPtr.Zero) {
|
if (itemsStart == IntPtr.Zero) {
|
||||||
return _dresserContents ?? list;
|
return _dresserContents ?? list;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < 800; i++) {
|
for (var i = 0; i < 800; i++) {
|
||||||
var glamItem = *(GlamourItem*) (itemsStart + i * 28);
|
var glamItem = *(GlamourItem*) (itemsStart + i * 136);
|
||||||
if (glamItem.ItemId == 0) {
|
if (glamItem.ItemId == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -433,15 +434,15 @@ namespace Glamaholic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Explicit, Size = 28)]
|
[StructLayout(LayoutKind.Explicit, Size = 136)]
|
||||||
internal readonly struct GlamourItem {
|
internal readonly struct GlamourItem {
|
||||||
[FieldOffset(4)]
|
[FieldOffset(0x70)]
|
||||||
internal readonly uint Index;
|
internal readonly uint Index;
|
||||||
|
|
||||||
[FieldOffset(8)]
|
[FieldOffset(0x74)]
|
||||||
internal readonly uint ItemId;
|
internal readonly uint ItemId;
|
||||||
|
|
||||||
[FieldOffset(26)]
|
[FieldOffset(0x86)]
|
||||||
internal readonly byte StainId;
|
internal readonly byte StainId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net7.0-windows</TargetFramework>
|
||||||
<Version>1.9.9</Version>
|
<Version>1.9.9</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
@ -54,8 +54,8 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DalamudPackager" Version="2.1.8"/>
|
<PackageReference Include="DalamudPackager" Version="2.1.10"/>
|
||||||
<PackageReference Include="Fody" Version="6.6.3" PrivateAssets="all"/>
|
<PackageReference Include="Fody" Version="6.6.4" PrivateAssets="all"/>
|
||||||
<PackageReference Include="Resourcer.Fody" Version="1.8.0" PrivateAssets="all"/>
|
<PackageReference Include="Resourcer.Fody" Version="1.8.0" PrivateAssets="all"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -63,4 +63,4 @@
|
||||||
<EmbeddedResource Include="help.txt"/>
|
<EmbeddedResource Include="help.txt"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
|
@ -96,7 +96,7 @@ namespace Glamaholic {
|
||||||
void SetTryOnSave(bool save) {
|
void SetTryOnSave(bool save) {
|
||||||
var tryOnAgent = (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.Tryon);
|
var tryOnAgent = (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.Tryon);
|
||||||
if (tryOnAgent != IntPtr.Zero) {
|
if (tryOnAgent != IntPtr.Zero) {
|
||||||
*(byte*) (tryOnAgent + 0x2E2) = (byte) (save ? 1 : 0);
|
*(byte*) (tryOnAgent + 0x30A) = (byte) (save ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
{
|
{
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"net6.0-windows7.0": {
|
"net7.0-windows7.0": {
|
||||||
"DalamudPackager": {
|
"DalamudPackager": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[2.1.8, )",
|
"requested": "[2.1.10, )",
|
||||||
"resolved": "2.1.8",
|
"resolved": "2.1.10",
|
||||||
"contentHash": "YqagNXs9InxmqkXzq7kLveImxnodkBEicAhydMXVp7dFjC7xb76U6zGgAax4/BWIWfZeWzr5DJyQSev31kj81A=="
|
"contentHash": "S6NrvvOnLgT4GDdgwuKVJjbFo+8ZEj+JsEYk9ojjOR/MMfv1dIFpT8aRJQfI24rtDcw1uF+GnSSMN4WW1yt7fw=="
|
||||||
},
|
},
|
||||||
"Fody": {
|
"Fody": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[6.6.3, )",
|
"requested": "[6.6.4, )",
|
||||||
"resolved": "6.6.3",
|
"resolved": "6.6.4",
|
||||||
"contentHash": "X1WKKgSNYVtLzdO8dK3YWmfmljA4L0soePcWNouq9X6WbVF4bmivuJdlhTZx/2L3ml6tMvhFe8skIbVQ24PAYA=="
|
"contentHash": "vLZS+oa+ndUHYPlx/8n9bBTT3dHkCF0riml4paKq4D663+cZd47x1uagQo32D/gKFZ/sfmV1oqKaLmH0elxq4A=="
|
||||||
},
|
},
|
||||||
"Resourcer.Fody": {
|
"Resourcer.Fody": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
|
|
Loading…
Reference in New Issue