From 51adb846e4a922ef0b52ed484893d42e1141d8f5 Mon Sep 17 00:00:00 2001 From: Jade Macho Date: Fri, 5 Apr 2024 22:17:44 +0200 Subject: [PATCH] Update to .NET 8; Check for housing void fog to avoid false positives --- VoidBox/Plugin.cs | 21 ++++++++++++++++++++- VoidBox/VoidBox.csproj | 4 ++-- VoidBox/packages.lock.json | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/VoidBox/Plugin.cs b/VoidBox/Plugin.cs index ccb2a75..538109d 100644 --- a/VoidBox/Plugin.cs +++ b/VoidBox/Plugin.cs @@ -162,7 +162,26 @@ public sealed unsafe class Plugin : IDalamudPlugin var exec = _envStateCopyHook.Original(dest, src); - if (dest->SkyId == 0 || Preview != null) + var replace = Preview != null; + + if (!Service.ClientState.IsLoggedIn) + { + replace |= dest->SkyId == 0; + } + else + { + replace |= + dest->SkyId == 0 && + dest->Fog.Color == new Vector4(0, 0, 0, 1.0f) && + dest->Fog.Distance == 50.0f && + dest->Fog.Thickness == 5.0f && + dest->Fog._unk1 == 1000.0f && + dest->Fog._unk2 == 1.0f && + dest->Fog.Opacity == 0.0f && + dest->Fog.SkyVisibility == 0.0f; + } + + if (replace) { Replace(dest); } diff --git a/VoidBox/VoidBox.csproj b/VoidBox/VoidBox.csproj index 78cb662..41813a5 100644 --- a/VoidBox/VoidBox.csproj +++ b/VoidBox/VoidBox.csproj @@ -3,14 +3,14 @@ 0x0ade - 0.1.0.5 + 0.1.0.6 - net7.0-windows + net8.0-windows x64 enable latest diff --git a/VoidBox/packages.lock.json b/VoidBox/packages.lock.json index 6cf1c73..8ca7ea5 100644 --- a/VoidBox/packages.lock.json +++ b/VoidBox/packages.lock.json @@ -1,7 +1,7 @@ { "version": 1, "dependencies": { - "net7.0-windows7.0": { + "net8.0-windows7.0": { "DalamudPackager": { "type": "Direct", "requested": "[2.1.12, )",