Compare commits
14 Commits
2.0.2.76-D
...
merge-abel
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
514668724f | ||
|
|
55d62ff52a | ||
| 17dd8a307b | |||
| 24d0c38f59 | |||
| 4da2548e03 | |||
| b6b9c81a57 | |||
| a824d94ffe | |||
| 4b13dfe8d4 | |||
| 979443d9bb | |||
| 92cb861710 | |||
| aeed8503c2 | |||
| 44bb53023e | |||
| 05b91ed243 | |||
| cfc5c1e0f3 |
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<Authors></Authors>
|
||||
<Company></Company>
|
||||
<Version>2.0.2.76</Version>
|
||||
<Version>2.0.3</Version>
|
||||
<Description></Description>
|
||||
<Copyright></Copyright>
|
||||
<PackageProjectUrl>https://github.com/Light-Public-Syncshells/LightlessClient</PackageProjectUrl>
|
||||
@@ -24,15 +24,6 @@
|
||||
<Compile Remove="PlayerData\Export\**" />
|
||||
<EmbeddedResource Remove="PlayerData\Export\**" />
|
||||
<None Remove="PlayerData\Export\**" />
|
||||
<EmbeddedResource Update="Resources\Resources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<Compile Update="Resources\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -77,6 +68,8 @@
|
||||
</None>
|
||||
<EmbeddedResource Include="Changelog\changelog.yaml" />
|
||||
<EmbeddedResource Include="Changelog\credits.yaml" />
|
||||
<EmbeddedResource Include="Localization\de.json" />
|
||||
<EmbeddedResource Include="Localization\fr.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeEditing/Localization/Localizable/@EntryValue">Yes</s:String>
|
||||
<s:String x:Key="/Default/CodeEditing/Localization/LocalizableInspector/@EntryValue">Pessimistic</s:String></wpf:ResourceDictionary>
|
||||
44
LightlessSync/Localization/Strings.cs
Normal file
44
LightlessSync/Localization/Strings.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using CheapLoc;
|
||||
|
||||
namespace LightlessSync.Localization;
|
||||
|
||||
public static class Strings
|
||||
{
|
||||
public static ToSStrings ToS { get; set; } = new();
|
||||
|
||||
public class ToSStrings
|
||||
{
|
||||
public readonly string AgreeLabel = Loc.Localize("AgreeLabel", "I agree");
|
||||
public readonly string AgreementLabel = Loc.Localize("AgreementLabel", "Agreement of Usage of Service");
|
||||
public readonly string ButtonWillBeAvailableIn = Loc.Localize("ButtonWillBeAvailableIn", "'I agree' button will be available in");
|
||||
public readonly string LanguageLabel = Loc.Localize("LanguageLabel", "Language");
|
||||
|
||||
public readonly string Paragraph1 = Loc.Localize("Paragraph1",
|
||||
"All of the mod files currently active on your character as well as your current character state will be uploaded to the service you registered yourself at automatically. " +
|
||||
"The plugin will exclusively upload the necessary mod files and not the whole mod.");
|
||||
|
||||
public readonly string Paragraph2 = Loc.Localize("Paragraph2",
|
||||
"If you are on a data capped internet connection, higher fees due to data usage depending on the amount of downloaded and uploaded mod files might occur. " +
|
||||
"Mod files will be compressed on up- and download to save on bandwidth usage. Due to varying up- and download speeds, changes in characters might not be visible immediately. " +
|
||||
"Files present on the service that already represent your active mod files will not be uploaded again.");
|
||||
|
||||
public readonly string Paragraph3 = Loc.Localize("Paragraph3",
|
||||
"The mod files you are uploading are confidential and will not be distributed to parties other than the ones who are requesting the exact same mod files. " +
|
||||
"Please think about who you are going to pair since it is unavoidable that they will receive and locally cache the necessary mod files that you have currently in use. " +
|
||||
"Locally cached mod files will have arbitrary file names to discourage attempts at replicating the original mod.");
|
||||
|
||||
public readonly string Paragraph4 = Loc.Localize("Paragraph4",
|
||||
"The plugin creator tried their best to keep you secure. However, there is no guarantee for 100% security. Do not blindly pair your client with everyone.");
|
||||
|
||||
public readonly string Paragraph5 = Loc.Localize("Paragraph5",
|
||||
"Mod files that are saved on the service will remain on the service as long as there are requests for the files from clients. " +
|
||||
"After a period of not being used, the mod files will be automatically deleted. " +
|
||||
"You will also be able to wipe all the files you have personally uploaded on request. " +
|
||||
"The service holds no information about which mod files belong to which mod.");
|
||||
|
||||
public readonly string Paragraph6 = Loc.Localize("Paragraph6",
|
||||
"This service is provided as-is. In case of abuse join the Lightless Sync Discord.");
|
||||
|
||||
public readonly string ReadLabel = Loc.Localize("ReadLabel", "READ THIS CAREFULLY");
|
||||
}
|
||||
}
|
||||
46
LightlessSync/Localization/de.json
Normal file
46
LightlessSync/Localization/de.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"LanguageLabel": {
|
||||
"message": "Language",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"AgreementLabel": {
|
||||
"message": "Nutzungsbedingungen",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"ReadLabel": {
|
||||
"message": "BITTE LIES DIES SORGFÄLTIG",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph1": {
|
||||
"message": "Alle Moddateien, die aktuell auf deinem Charakter aktiv sind und dein Charakterzustand werden automatisch zu dem Service, an dem du dich registriert hast, hochgeladen. Das Plugin wird ausschließlich die nötigen Moddateien hochladen und nicht die gesamte Modifikation.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph2": {
|
||||
"message": "Falls du mit einer getakteten Internetverbindung verbunden bist, können durch den Datentransfer von Hoch- und Runtergeladenen Moddateien höhere Kosten entstehen. Moddateien werden beim Hoch- und Runterladen komprimiert um Bandbreite zu sparen. Durch unterschiedliche Hoch- und Runterladgeschwindigkeiten ist es möglich, dass Änderungen an Charakteren nicht sofort sichtbar sind. Dateien die bereits auf dem Service existieren, werden nicht nochmals hochgeladen.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph3": {
|
||||
"message": "Die Moddateien die du hochlädst sind vertraulich und werden nicht mit anderen Nutzern geteilt, die nicht die exakt selben Dateien anfordern. Bitte überlege dir sorgfältig mit wem du deinen Identifikationscode teilst, da es unvermeidlich ist, dass die andere Person deine Moddateien erhält und lokal zwischenspeichert. Lokal zwischengespeicherte Dateien haben willkürrliche Namen um vor Versuchen abzuschrecken die originalen Moddateien aus diesen wiederherzustellen.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph4": {
|
||||
"message": "Der Ersteller des Plugins hat sein Bestes getan, um deine Sicherheit zu gewährleisten. Es gibt jedoch keine Garantie für 100%ige Sicherheit. Teile deinen Identifikationscode nicht blind mit jedem.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph5": {
|
||||
"message": "Moddateien, die auf dem Service gespeichert sind, verbleiben auf dem Service, solange es Anforderungen für diese Dateien gibt. Nach einer Zeitspanne in der die Dateien nicht verwendet wurden, werden diese automatisch gelöscht. Du hast auch die Möglichkeit manuell alle Dateien auf dem Service zu löschen. Der Service hat keine Informationen welche Moddateien zu welcher Modifikation gehören.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph6": {
|
||||
"message": "Dieser Dienst wird ohne Gewähr angeboten. Im Falle eines Missbrauchs tretet dem Lightless Sync Discord bei.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"AgreeLabel": {
|
||||
"message": "Ich Stimme zu",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"ButtonWillBeAvailableIn": {
|
||||
"message": "\"Ich stimme zu\" Knopf verfügbar in",
|
||||
"description": "ToSStrings..ctor"
|
||||
}
|
||||
}
|
||||
46
LightlessSync/Localization/fr.json
Normal file
46
LightlessSync/Localization/fr.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"LanguageLabel": {
|
||||
"message": "Language",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"AgreementLabel": {
|
||||
"message": "Conditions d'Utilisation",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"ReadLabel": {
|
||||
"message": "LISEZ CES INFORMATIONS ATTENTIVEMENT",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph1": {
|
||||
"message": "Tous les fichiers moddés actuellement en cours d'utilisation ainsi que le statut actuel de votre personnage vont être mix en ligne via le service sur lequel vous vous êtes automatiquement enregistré. Seuls les fichiers nécessaires seront téléversés par le plugin et non pas le mod en entier.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph2": {
|
||||
"message": "Si le débit de votre connexion internet est limité, le téléchargement et téléversement d'un grand nombre de fichiers peut entraîner des coûts supplémentaires. Les fichiers seront compressés au chargement et versement pour réduire l'impact sur votre bande passants. Selon la rapidité de vos téléchargements et téléversements, les changements ne seront peut-être pas visibles instantanément sur les personnages. Les fichiers déja présents sur le service qui correspondent à ceux de vos mods en cours d'utilisation ne seront pas remis en ligne.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph3": {
|
||||
"message": "Les fichiers que vous allez partager sont confidentiels et ne seront envoyés qu'aux utilisateurs qui feront une requête exacte de ceux-çi. Nous vous demandons de (re)considérer qui sera synchronisé avec vous, puisqu'ils recevront et stockeront inévitablement en local les fichiers nécéssaires utilisés à cet instant. Les noms des fichiers stockés localement sont changés de manière arbitraire afin de décourager toute tentative de réplication des originaux.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph4": {
|
||||
"message": "Le créateur de ce plugin a tenté de sécuriser l'application du mieux possible. Cependant, il ne peut pas garantir une protection 100% infaillible. Pour votre sécurité, ne vous synchronisez pas aveuglément et avec n'importe qui.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph5": {
|
||||
"message": "Les fichiers sauvegardés sur le service resteront en ligne tant que des utilisateurs en feront usage. Ils seront effacés automatiquement après une certaine période d'inactivité. Vous pouvez également demander l'effacement de tous les fichiers que vous avez mis en ligne vous-même. Le service en soi ne contient aucune information pouvant identifier quel fichier appartient à quel mod.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"Paragraph6": {
|
||||
"message": "Ce service et ses composants vous sont fournis en l'état. En cas d'abus rejoindre le serveur Discord Lightless Sync.",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"AgreeLabel": {
|
||||
"message": "J'accept",
|
||||
"description": "ToSStrings..ctor"
|
||||
},
|
||||
"ButtonWillBeAvailableIn": {
|
||||
"message": "Bouton \"J'accept\" disposible dans",
|
||||
"description": "ToSStrings..ctor"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using Dalamud.Utility;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Character;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Character;
|
||||
using LightlessSync.API.Data.Enum;
|
||||
using LightlessSync.FileCache;
|
||||
using LightlessSync.Interop.Ipc;
|
||||
@@ -12,8 +11,6 @@ using LightlessSync.Services.Mediator;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.ExceptionServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace LightlessSync.PlayerData.Factories;
|
||||
|
||||
@@ -126,37 +123,21 @@ public class PlayerDataFactory
|
||||
{
|
||||
if (playerPointer == IntPtr.Zero)
|
||||
return true;
|
||||
|
||||
if (!IsPointerValid(playerPointer))
|
||||
return true;
|
||||
|
||||
var character = (Character*)playerPointer;
|
||||
if (character == null)
|
||||
return true;
|
||||
|
||||
var gameObject = &character->GameObject;
|
||||
if (gameObject == null)
|
||||
return true;
|
||||
|
||||
if (!IsPointerValid((IntPtr)gameObject))
|
||||
return true;
|
||||
|
||||
return gameObject->DrawObject == null;
|
||||
}
|
||||
|
||||
private static bool IsPointerValid(IntPtr ptr)
|
||||
{
|
||||
if (ptr == IntPtr.Zero)
|
||||
return false;
|
||||
|
||||
try
|
||||
{
|
||||
_ = Marshal.ReadByte(ptr);
|
||||
return true;
|
||||
var character = (Character*)playerPointer;
|
||||
if (character == null)
|
||||
return true;
|
||||
|
||||
var gameObject = &character->GameObject;
|
||||
if (gameObject == null)
|
||||
return true;
|
||||
|
||||
return gameObject->DrawObject == null;
|
||||
}
|
||||
catch
|
||||
catch (AccessViolationException)
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -556,31 +537,13 @@ public class PlayerDataFactory
|
||||
|
||||
var hash = g.Key;
|
||||
|
||||
var resolvedPath = g.Select(f => f.ResolvedPath).Distinct(StringComparer.OrdinalIgnoreCase);
|
||||
var papPathSummary = string.Join(", ", resolvedPath);
|
||||
if (papPathSummary.IsNullOrEmpty())
|
||||
papPathSummary = "<unknown pap path>";
|
||||
|
||||
Dictionary<string, List<ushort>>? papIndices = null;
|
||||
|
||||
await _papParseLimiter.WaitAsync(ct).ConfigureAwait(false);
|
||||
try
|
||||
{
|
||||
var cacheEntity = _fileCacheManager.GetFileCacheByHash(hash);
|
||||
var papPath = cacheEntity?.ResolvedFilepath;
|
||||
|
||||
if (!string.IsNullOrEmpty(papPath) && File.Exists(papPath))
|
||||
{
|
||||
var havokBytes = await Task.Run(() => XivDataAnalyzer.ReadHavokBytesFromPap(papPath), ct)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
if (havokBytes is { Length: > 8 })
|
||||
{
|
||||
papIndices = await _dalamudUtil.RunOnFrameworkThread(
|
||||
() => _modelAnalyzer.ParseHavokBytesOnFrameworkThread(havokBytes, hash, persistToConfig: false))
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
papIndices = await Task.Run(() => _modelAnalyzer.GetBoneIndicesFromPap(hash), ct)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -590,61 +553,43 @@ public class PlayerDataFactory
|
||||
if (papIndices == null || papIndices.Count == 0)
|
||||
continue;
|
||||
|
||||
if (papIndices.All(k => k.Value.DefaultIfEmpty().Max() <= 105))
|
||||
continue;
|
||||
|
||||
if (_logger.IsEnabled(LogLevel.Debug))
|
||||
{
|
||||
try
|
||||
{
|
||||
var papBuckets = papIndices
|
||||
.Where(kvp => kvp.Value is { Count: > 0 })
|
||||
.Select(kvp => new
|
||||
{
|
||||
Raw = kvp.Key,
|
||||
Key = XivDataAnalyzer.CanonicalizeSkeletonKey(kvp.Key),
|
||||
Indices = kvp.Value
|
||||
})
|
||||
.Where(x => x.Indices is { Count: > 0 })
|
||||
.GroupBy(x => string.IsNullOrEmpty(x.Key) ? x.Raw : x.Key!, StringComparer.OrdinalIgnoreCase)
|
||||
.Select(grp =>
|
||||
{
|
||||
var all = grp.SelectMany(v => v.Indices).ToList();
|
||||
var min = all.Count > 0 ? all.Min() : 0;
|
||||
var max = all.Count > 0 ? all.Max() : 0;
|
||||
var raws = string.Join(',', grp.Select(v => v.Raw).Distinct(StringComparer.OrdinalIgnoreCase));
|
||||
return $"{grp.Key}(min={min},max={max},raw=[{raws}])";
|
||||
})
|
||||
.ToList();
|
||||
var papBuckets = papIndices
|
||||
.Select(kvp => new
|
||||
{
|
||||
Raw = kvp.Key,
|
||||
Key = XivDataAnalyzer.CanonicalizeSkeletonKey(kvp.Key),
|
||||
Indices = kvp.Value
|
||||
})
|
||||
.Where(x => x.Indices is { Count: > 0 })
|
||||
.GroupBy(x => string.IsNullOrEmpty(x.Key) ? x.Raw : x.Key!, StringComparer.OrdinalIgnoreCase)
|
||||
.Select(grp =>
|
||||
{
|
||||
var all = grp.SelectMany(v => v.Indices).ToList();
|
||||
var min = all.Count > 0 ? all.Min() : 0;
|
||||
var max = all.Count > 0 ? all.Max() : 0;
|
||||
var raws = string.Join(',', grp.Select(v => v.Raw).Distinct(StringComparer.OrdinalIgnoreCase));
|
||||
return $"{grp.Key}(min={min},max={max},raw=[{raws}])";
|
||||
})
|
||||
.ToList();
|
||||
|
||||
_logger.LogDebug("SEND pap buckets for hash={hash}: {b}",
|
||||
hash,
|
||||
string.Join(" | ", papBuckets));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogDebug(ex, "Error logging PAP bucket details for hash={hash}", hash);
|
||||
}
|
||||
_logger.LogDebug("SEND pap buckets for hash={hash}: {b}",
|
||||
hash,
|
||||
string.Join(" | ", papBuckets));
|
||||
}
|
||||
|
||||
bool isCompatible = false;
|
||||
string reason = string.Empty;
|
||||
try
|
||||
{
|
||||
isCompatible = XivDataAnalyzer.IsPapCompatible(localBoneSets, papIndices, mode, allowBasedShift, allownNightIndex, out reason);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Error checking PAP compatibility for hash={hash}, path={path}. Treating as incompatible.", hash, papPathSummary);
|
||||
reason = $"Exception during compatibility check: {ex.Message}";
|
||||
isCompatible = false;
|
||||
}
|
||||
|
||||
if (isCompatible)
|
||||
if (XivDataAnalyzer.IsPapCompatible(localBoneSets, papIndices, mode, allowBasedShift, allownNightIndex, out var reason))
|
||||
continue;
|
||||
|
||||
noValidationFailed++;
|
||||
|
||||
_logger.LogWarning(
|
||||
"Animation PAP is not compatible with local skeletons; dropping mappings for {papPath}. Reason: {reason}",
|
||||
papPathSummary,
|
||||
"Animation PAP hash {hash} is not compatible with local skeletons; dropping all mappings for this hash. Reason: {reason}",
|
||||
hash,
|
||||
reason);
|
||||
|
||||
var removedGamePaths = fragment.FileReplacements
|
||||
@@ -689,8 +634,8 @@ public class PlayerDataFactory
|
||||
return new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase).AsReadOnly();
|
||||
}
|
||||
|
||||
var forwardPathsLower = forwardPaths.Length == 0 ? [] : forwardPaths.Select(p => p.ToLowerInvariant()).ToArray();
|
||||
var reversePathsLower = reversePaths.Length == 0 ? [] : reversePaths.Select(p => p.ToLowerInvariant()).ToArray();
|
||||
var forwardPathsLower = forwardPaths.Length == 0 ? Array.Empty<string>() : forwardPaths.Select(p => p.ToLowerInvariant()).ToArray();
|
||||
var reversePathsLower = reversePaths.Length == 0 ? Array.Empty<string>() : reversePaths.Select(p => p.ToLowerInvariant()).ToArray();
|
||||
|
||||
Dictionary<string, List<string>> resolvedPaths = new(forwardPaths.Length + reversePaths.Length, StringComparer.Ordinal);
|
||||
if (handler.ObjectKind != ObjectKind.Player)
|
||||
|
||||
@@ -78,6 +78,7 @@ public sealed class GameObjectHandler : DisposableMediatorSubscriberBase, IHighP
|
||||
if (msg.Address == Address)
|
||||
{
|
||||
_haltProcessing = false;
|
||||
Refresh();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -113,16 +114,16 @@ public sealed class GameObjectHandler : DisposableMediatorSubscriberBase, IHighP
|
||||
public async Task ActOnFrameworkAfterEnsureNoDrawAsync(Action<Dalamud.Game.ClientState.Objects.Types.ICharacter> act, CancellationToken token)
|
||||
{
|
||||
while (await _dalamudUtil.RunOnFrameworkThread(() =>
|
||||
{
|
||||
EnsureLatestObjectState();
|
||||
if (CurrentDrawCondition != DrawCondition.None) return true;
|
||||
var gameObj = _dalamudUtil.CreateGameObject(Address);
|
||||
if (gameObj is Dalamud.Game.ClientState.Objects.Types.ICharacter chara)
|
||||
{
|
||||
act.Invoke(chara);
|
||||
}
|
||||
return false;
|
||||
}).ConfigureAwait(false))
|
||||
{
|
||||
EnsureLatestObjectState();
|
||||
if (CurrentDrawCondition != DrawCondition.None) return true;
|
||||
var gameObj = _dalamudUtil.CreateGameObject(Address);
|
||||
if (gameObj is Dalamud.Game.ClientState.Objects.Types.ICharacter chara)
|
||||
{
|
||||
act.Invoke(chara);
|
||||
}
|
||||
return false;
|
||||
}).ConfigureAwait(false))
|
||||
{
|
||||
await Task.Delay(250, token).ConfigureAwait(false);
|
||||
}
|
||||
@@ -169,13 +170,19 @@ public sealed class GameObjectHandler : DisposableMediatorSubscriberBase, IHighP
|
||||
return $"{owned}/{ObjectKind}:{Name} ({Address:X},{DrawObjectAddress:X})";
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
|
||||
Mediator.Publish(new GameObjectHandlerDestroyedMessage(this, _isOwnedObject));
|
||||
}
|
||||
|
||||
private void CheckAndUpdateObject() => CheckAndUpdateObject(allowPublish: true);
|
||||
|
||||
private unsafe void CheckAndUpdateObject(bool allowPublish)
|
||||
private unsafe void CheckAndUpdateObject(bool allowPublish = true)
|
||||
{
|
||||
var prevAddr = Address;
|
||||
var prevDrawObj = DrawObjectAddress;
|
||||
string? nameString = null;
|
||||
|
||||
Address = _getAddress();
|
||||
|
||||
@@ -186,9 +193,10 @@ public sealed class GameObjectHandler : DisposableMediatorSubscriberBase, IHighP
|
||||
EntityId = gameObject->EntityId;
|
||||
|
||||
var chara = (Character*)Address;
|
||||
nameString = chara->GameObject.NameString;
|
||||
if (!string.IsNullOrEmpty(nameString) && !string.Equals(nameString, Name, StringComparison.Ordinal))
|
||||
Name = nameString;
|
||||
var newName = chara->GameObject.NameString;
|
||||
|
||||
if (!string.IsNullOrEmpty(newName) && !string.Equals(newName, Name, StringComparison.Ordinal))
|
||||
Name = newName;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -206,18 +214,16 @@ public sealed class GameObjectHandler : DisposableMediatorSubscriberBase, IHighP
|
||||
if (Address != IntPtr.Zero && DrawObjectAddress != IntPtr.Zero)
|
||||
{
|
||||
var chara = (Character*)Address;
|
||||
var drawObj = (DrawObject*)DrawObjectAddress;
|
||||
var objType = drawObj->Object.GetObjectType();
|
||||
var isHuman = objType == ObjectType.CharacterBase
|
||||
&& ((CharacterBase*)drawObj)->GetModelType() == CharacterBase.ModelType.Human;
|
||||
|
||||
nameString ??= ((Character*)Address)->GameObject.NameString;
|
||||
var nameChange = !string.Equals(nameString, Name, StringComparison.Ordinal);
|
||||
if (nameChange) Name = nameString;
|
||||
|
||||
var name = chara->GameObject.NameString;
|
||||
bool nameChange = !string.Equals(name, Name, StringComparison.Ordinal);
|
||||
if (nameChange)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
bool equipDiff = false;
|
||||
|
||||
if (isHuman)
|
||||
if (((DrawObject*)DrawObjectAddress)->Object.GetObjectType() == ObjectType.CharacterBase
|
||||
&& ((CharacterBase*)DrawObjectAddress)->GetModelType() == CharacterBase.ModelType.Human)
|
||||
{
|
||||
var classJob = chara->CharacterData.ClassJob;
|
||||
if (classJob != _classJob)
|
||||
@@ -227,7 +233,7 @@ public sealed class GameObjectHandler : DisposableMediatorSubscriberBase, IHighP
|
||||
Mediator.Publish(new ClassJobChangedMessage(this));
|
||||
}
|
||||
|
||||
equipDiff = CompareAndUpdateEquipByteData((byte*)&((Human*)drawObj)->Head);
|
||||
equipDiff = CompareAndUpdateEquipByteData((byte*)&((Human*)DrawObjectAddress)->Head);
|
||||
|
||||
ref var mh = ref chara->DrawData.Weapon(WeaponSlot.MainHand);
|
||||
ref var oh = ref chara->DrawData.Weapon(WeaponSlot.OffHand);
|
||||
@@ -252,11 +258,12 @@ public sealed class GameObjectHandler : DisposableMediatorSubscriberBase, IHighP
|
||||
|
||||
bool customizeDiff = false;
|
||||
|
||||
if (isHuman)
|
||||
if (((DrawObject*)DrawObjectAddress)->Object.GetObjectType() == ObjectType.CharacterBase
|
||||
&& ((CharacterBase*)DrawObjectAddress)->GetModelType() == CharacterBase.ModelType.Human)
|
||||
{
|
||||
var gender = ((Human*)drawObj)->Customize.Sex;
|
||||
var raceId = ((Human*)drawObj)->Customize.Race;
|
||||
var tribeId = ((Human*)drawObj)->Customize.Tribe;
|
||||
var gender = ((Human*)DrawObjectAddress)->Customize.Sex;
|
||||
var raceId = ((Human*)DrawObjectAddress)->Customize.Race;
|
||||
var tribeId = ((Human*)DrawObjectAddress)->Customize.Tribe;
|
||||
|
||||
if (_isOwnedObject && ObjectKind == ObjectKind.Player
|
||||
&& (gender != Gender || raceId != RaceId || tribeId != TribeId))
|
||||
@@ -267,7 +274,7 @@ public sealed class GameObjectHandler : DisposableMediatorSubscriberBase, IHighP
|
||||
TribeId = tribeId;
|
||||
}
|
||||
|
||||
customizeDiff = CompareAndUpdateCustomizeData(((Human*)drawObj)->Customize.Data);
|
||||
customizeDiff = CompareAndUpdateCustomizeData(((Human*)DrawObjectAddress)->Customize.Data);
|
||||
if (customizeDiff)
|
||||
Logger.LogTrace("Checking [{this}] customize data as human from draw obj, result: {diff}", this, customizeDiff);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,6 @@ internal sealed class PairHandlerAdapter : DisposableMediatorSubscriberBase, IPa
|
||||
private DateTime _nextActorLookupUtc = DateTime.MinValue;
|
||||
private static readonly TimeSpan ActorLookupInterval = TimeSpan.FromSeconds(1);
|
||||
private static readonly SemaphoreSlim ActorInitializationLimiter = new(1, 1);
|
||||
private static readonly SemaphoreSlim _papParseLimiter = new(1, 1);
|
||||
private const int FullyLoadedTimeoutMsPlayer = 30000;
|
||||
private const int FullyLoadedTimeoutMsOther = 5000;
|
||||
private readonly object _actorInitializationGate = new();
|
||||
@@ -2911,13 +2910,13 @@ internal sealed class PairHandlerAdapter : DisposableMediatorSubscriberBase, IPa
|
||||
|
||||
var mode = _configService.Current.AnimationValidationMode;
|
||||
var allowBasedShift = _configService.Current.AnimationAllowOneBasedShift;
|
||||
var allowNeighborIndex = _configService.Current.AnimationAllowNeighborIndexTolerance;
|
||||
var allownNightIndex = _configService.Current.AnimationAllowNeighborIndexTolerance;
|
||||
|
||||
if (mode == AnimationValidationMode.Unsafe || papOnly.Count == 0)
|
||||
return 0;
|
||||
|
||||
var boneIndices = await _dalamudUtil.RunOnFrameworkThread(
|
||||
() => _modelAnalyzer.GetSkeletonBoneIndices(handlerForApply))
|
||||
() => _modelAnalyzer.GetSkeletonBoneIndices(handlerForApply))
|
||||
.ConfigureAwait(false);
|
||||
|
||||
if (boneIndices == null || boneIndices.Count == 0)
|
||||
@@ -2931,86 +2930,47 @@ internal sealed class PairHandlerAdapter : DisposableMediatorSubscriberBase, IPa
|
||||
foreach (var (rawKey, list) in boneIndices)
|
||||
{
|
||||
var key = XivDataAnalyzer.CanonicalizeSkeletonKey(rawKey);
|
||||
if (string.IsNullOrEmpty(key) || list == null || list.Count == 0)
|
||||
continue;
|
||||
if (string.IsNullOrEmpty(key)) continue;
|
||||
|
||||
if (!localBoneSets.TryGetValue(key, out var set))
|
||||
localBoneSets[key] = set = new HashSet<ushort>();
|
||||
localBoneSets[key] = set = [];
|
||||
|
||||
foreach (var v in list)
|
||||
set.Add(v);
|
||||
}
|
||||
|
||||
if (localBoneSets.Count == 0)
|
||||
{
|
||||
var removedCount = papOnly.Count;
|
||||
papOnly.Clear();
|
||||
return removedCount;
|
||||
}
|
||||
|
||||
int removed = 0;
|
||||
|
||||
var groups = papOnly
|
||||
.Where(kvp => !string.IsNullOrEmpty(kvp.Key.Hash))
|
||||
.GroupBy(kvp => kvp.Key.Hash!, StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
|
||||
foreach (var grp in groups)
|
||||
foreach (var hash in papOnly.Keys.Select(k => k.Hash).Where(h => !string.IsNullOrEmpty(h)).Distinct(StringComparer.OrdinalIgnoreCase).ToList())
|
||||
{
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
var hash = grp.Key;
|
||||
|
||||
var papPath = grp.Select(x => x.Value)
|
||||
.FirstOrDefault(p => !string.IsNullOrEmpty(p) && File.Exists(p));
|
||||
|
||||
if (string.IsNullOrEmpty(papPath))
|
||||
continue;
|
||||
|
||||
var havokBytes = await Task.Run(() => XivDataAnalyzer.ReadHavokBytesFromPap(papPath), token)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
if (havokBytes is not { Length: > 8 })
|
||||
continue;
|
||||
|
||||
Dictionary<string, List<ushort>>? papIndices;
|
||||
|
||||
await _papParseLimiter.WaitAsync(token).ConfigureAwait(false);
|
||||
try
|
||||
{
|
||||
papIndices = await _dalamudUtil.RunOnFrameworkThread(
|
||||
() => _modelAnalyzer.ParseHavokBytesOnFrameworkThread(havokBytes, hash, persistToConfig: false))
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_papParseLimiter.Release();
|
||||
}
|
||||
var papIndices = await _dalamudUtil.RunOnFrameworkThread(
|
||||
() => _modelAnalyzer.GetBoneIndicesFromPap(hash!))
|
||||
.ConfigureAwait(false);
|
||||
|
||||
if (papIndices == null || papIndices.Count == 0)
|
||||
continue;
|
||||
|
||||
if (papIndices.All(k => k.Value == null || k.Value.Count == 0 || k.Value.Max() <= 105))
|
||||
if (papIndices.All(k => k.Value.DefaultIfEmpty().Max() <= 105))
|
||||
continue;
|
||||
|
||||
if (XivDataAnalyzer.IsPapCompatible(localBoneSets, papIndices, mode, allowBasedShift, allowNeighborIndex, out var reason))
|
||||
if (XivDataAnalyzer.IsPapCompatible(localBoneSets, papIndices, mode, allowBasedShift, allownNightIndex, out var reason))
|
||||
continue;
|
||||
|
||||
var keysToRemove = grp.Select(x => x.Key).ToList();
|
||||
var keysToRemove = papOnly.Keys.Where(k => string.Equals(k.Hash, hash, StringComparison.OrdinalIgnoreCase)).ToList();
|
||||
foreach (var k in keysToRemove)
|
||||
papOnly.Remove(k);
|
||||
|
||||
removed += keysToRemove.Count;
|
||||
|
||||
if (_blockedPapHashes.TryAdd(hash, 0))
|
||||
Logger.LogWarning("Blocked remote object PAP {papPath} (hash {hash}) for {handler}: {reason}",
|
||||
papPath, hash, GetLogIdentifier(), reason);
|
||||
if (_blockedPapHashes.TryAdd(hash!, 0))
|
||||
Logger.LogWarning("Blocked remote object PAP (hash {hash}) for {handler}: {reason}", hash, GetLogIdentifier(), reason);
|
||||
|
||||
if (charaData.FileReplacements.TryGetValue(ObjectKind.Player, out var list))
|
||||
{
|
||||
list.RemoveAll(r =>
|
||||
string.Equals(r.Hash, hash, StringComparison.OrdinalIgnoreCase) &&
|
||||
r.GamePaths.Any(p => p.EndsWith(".pap", StringComparison.OrdinalIgnoreCase)));
|
||||
list.RemoveAll(r => string.Equals(r.Hash, hash, StringComparison.OrdinalIgnoreCase)
|
||||
&& r.GamePaths.Any(p => p.EndsWith(".pap", StringComparison.OrdinalIgnoreCase)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3024,7 +2984,6 @@ internal sealed class PairHandlerAdapter : DisposableMediatorSubscriberBase, IPa
|
||||
return removed;
|
||||
}
|
||||
|
||||
|
||||
private async Task ApplyCustomizeAsync(nint address, string customizeData, ObjectKind kind)
|
||||
{
|
||||
_customizeIds[kind] = await _ipcManager.CustomizePlus.SetBodyScaleAsync(address, customizeData).ConfigureAwait(false);
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace LightlessSync.Resources;
|
||||
|
||||
public static class LocalizationExtensions
|
||||
{
|
||||
public static string F(this string mask, params object[] args)
|
||||
{
|
||||
return string.Format(mask, args);
|
||||
}
|
||||
}
|
||||
171
LightlessSync/Resources/Resources.Designer.cs
generated
171
LightlessSync/Resources/Resources.Designer.cs
generated
@@ -1,171 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace LightlessSync.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LightlessSync.Resources.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to I agree.
|
||||
/// </summary>
|
||||
public static string ToSStrings_AgreeLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_AgreeLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Agreement of Usage of Service.
|
||||
/// </summary>
|
||||
public static string ToSStrings_AgreementLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_AgreementLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 'I agree' button will be available in.
|
||||
/// </summary>
|
||||
public static string ToSStrings_ButtonWillBeAvailableIn {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_ButtonWillBeAvailableIn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Language.
|
||||
/// </summary>
|
||||
public static string ToSStrings_LanguageLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_LanguageLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to All of the mod files currently active on your character as well as your current character state will be uploaded to the service you registered yourself at automatically. The plugin will exclusively upload the necessary mod files and not the whole mod..
|
||||
/// </summary>
|
||||
public static string ToSStrings_Paragraph1 {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_Paragraph1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to If you are on a data capped internet connection, higher fees due to data usage depending on the amount of downloaded and uploaded mod files might occur. Mod files will be compressed on up- and download to save on bandwidth usage. Due to varying up- and download speeds, changes in characters might not be visible immediately. Files present on the service that already represent your active mod files will not be uploaded again..
|
||||
/// </summary>
|
||||
public static string ToSStrings_Paragraph2 {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_Paragraph2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The mod files you are uploading are confidential and will not be distributed to parties other than the ones who are requesting the exact same mod files. Please think about who you are going to pair since it is unavoidable that they will receive and locally cache the necessary mod files that you have currently in use. Locally cached mod files will have arbitrary file names to discourage attempts at replicating the original mod..
|
||||
/// </summary>
|
||||
public static string ToSStrings_Paragraph3 {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_Paragraph3", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The plugin creator tried their best to keep you secure. However, there is no guarantee for 100% security. Do not blindly pair your client with everyone..
|
||||
/// </summary>
|
||||
public static string ToSStrings_Paragraph4 {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_Paragraph4", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mod files that are saved on the service will remain on the service as long as there are requests for the files from clients. After a period of not being used, the mod files will be automatically deleted. You will also be able to wipe all the files you have personally uploaded on request. The service holds no information about which mod files belong to which mod..
|
||||
/// </summary>
|
||||
public static string ToSStrings_Paragraph5 {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_Paragraph5", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This service is provided as-is. In case of abuse join the Lightless Sync Discord..
|
||||
/// </summary>
|
||||
public static string ToSStrings_Paragraph6 {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_Paragraph6", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to READ THIS CAREFULLY.
|
||||
/// </summary>
|
||||
public static string ToSStrings_ReadLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("ToSStrings_ReadLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Users Online.
|
||||
/// </summary>
|
||||
public static string Users_Online {
|
||||
get {
|
||||
return ResourceManager.GetString("Users_Online", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<root>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ToSStrings_LanguageLabel" xml:space="preserve">
|
||||
<value>Language</value>
|
||||
</data>
|
||||
<data name="ToSStrings_AgreementLabel" xml:space="preserve">
|
||||
<value>Nutzungsbedingungen</value>
|
||||
</data>
|
||||
<data name="ToSStrings_ReadLabel" xml:space="preserve">
|
||||
<value>BITTE LIES DIES SORGFÄLTIG</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph1" xml:space="preserve">
|
||||
<value>Alle Moddateien, die aktuell auf deinem Charakter aktiv sind und dein Charakterzustand werden automatisch zu dem Service, an dem du dich registriert hast, hochgeladen. Das Plugin wird ausschließlich die nötigen Moddateien hochladen und nicht die gesamte Modifikation.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph2" xml:space="preserve">
|
||||
<value>Falls du mit einer getakteten Internetverbindung verbunden bist, können durch den Datentransfer von Hoch- und Runtergeladenen Moddateien höhere Kosten entstehen. Moddateien werden beim Hoch- und Runterladen komprimiert um Bandbreite zu sparen. Durch unterschiedliche Hoch- und Runterladgeschwindigkeiten ist es möglich, dass Änderungen an Charakteren nicht sofort sichtbar sind. Dateien die bereits auf dem Service existieren, werden nicht nochmals hochgeladen.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph3" xml:space="preserve">
|
||||
<value>Die Moddateien die du hochlädst sind vertraulich und werden nicht mit anderen Nutzern geteilt, die nicht die exakt selben Dateien anfordern. Bitte überlege dir sorgfältig mit wem du deinen Identifikationscode teilst, da es unvermeidlich ist, dass die andere Person deine Moddateien erhält und lokal zwischenspeichert. Lokal zwischengespeicherte Dateien haben willkürrliche Namen um vor Versuchen abzuschrecken die originalen Moddateien aus diesen wiederherzustellen.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph4" xml:space="preserve">
|
||||
<value>Der Ersteller des Plugins hat sein Bestes getan, um deine Sicherheit zu gewährleisten. Es gibt jedoch keine Garantie für 100%ige Sicherheit. Teile deinen Identifikationscode nicht blind mit jedem.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph5" xml:space="preserve">
|
||||
<value>Moddateien, die auf dem Service gespeichert sind, verbleiben auf dem Service, solange es Anforderungen für diese Dateien gibt. Nach einer Zeitspanne in der die Dateien nicht verwendet wurden, werden diese automatisch gelöscht. Du hast auch die Möglichkeit manuell alle Dateien auf dem Service zu löschen. Der Service hat keine Informationen welche Moddateien zu welcher Modifikation gehören.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph6" xml:space="preserve">
|
||||
<value>Dieser Dienst wird ohne Gewähr angeboten. Im Falle eines Missbrauchs tretet dem Lightless Sync Discord bei.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_AgreeLabel" xml:space="preserve">
|
||||
<value>Ich Stimme zu</value>
|
||||
</data>
|
||||
<data name="ToSStrings_ButtonWillBeAvailableIn" xml:space="preserve">
|
||||
<value>"Ich stimme zu" Knopf verfügbar in</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,47 +0,0 @@
|
||||
<root>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ToSStrings_LanguageLabel" xml:space="preserve">
|
||||
<value>Language</value>
|
||||
</data>
|
||||
<data name="ToSStrings_AgreementLabel" xml:space="preserve">
|
||||
<value>Conditions d'Utilisation</value>
|
||||
</data>
|
||||
<data name="ToSStrings_ReadLabel" xml:space="preserve">
|
||||
<value>LISEZ CES INFORMATIONS ATTENTIVEMENT</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph1" xml:space="preserve">
|
||||
<value>Tous les fichiers moddés actuellement en cours d'utilisation ainsi que le statut actuel de votre personnage vont être mix en ligne via le service sur lequel vous vous êtes automatiquement enregistré. Seuls les fichiers nécessaires seront téléversés par le plugin et non pas le mod en entier.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph2" xml:space="preserve">
|
||||
<value>Si le débit de votre connexion internet est limité, le téléchargement et téléversement d'un grand nombre de fichiers peut entraîner des coûts supplémentaires. Les fichiers seront compressés au chargement et versement pour réduire l'impact sur votre bande passants. Selon la rapidité de vos téléchargements et téléversements, les changements ne seront peut-être pas visibles instantanément sur les personnages. Les fichiers déja présents sur le service qui correspondent à ceux de vos mods en cours d'utilisation ne seront pas remis en ligne.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph3" xml:space="preserve">
|
||||
<value>Les fichiers que vous allez partager sont confidentiels et ne seront envoyés qu'aux utilisateurs qui feront une requête exacte de ceux-çi. Nous vous demandons de (re)considérer qui sera synchronisé avec vous, puisqu'ils recevront et stockeront inévitablement en local les fichiers nécéssaires utilisés à cet instant. Les noms des fichiers stockés localement sont changés de manière arbitraire afin de décourager toute tentative de réplication des originaux.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph4" xml:space="preserve">
|
||||
<value>Le créateur de ce plugin a tenté de sécuriser l'application du mieux possible. Cependant, il ne peut pas garantir une protection 100% infaillible. Pour votre sécurité, ne vous synchronisez pas aveuglément et avec n'importe qui.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph5" xml:space="preserve">
|
||||
<value>Les fichiers sauvegardés sur le service resteront en ligne tant que des utilisateurs en feront usage. Ils seront effacés automatiquement après une certaine période d'inactivité. Vous pouvez également demander l'effacement de tous les fichiers que vous avez mis en ligne vous-même. Le service en soi ne contient aucune information pouvant identifier quel fichier appartient à quel mod.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph6" xml:space="preserve">
|
||||
<value>Ce service et ses composants vous sont fournis en l'état. En cas d'abus rejoindre le serveur Discord Lightless Sync.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_AgreeLabel" xml:space="preserve">
|
||||
<value>J'accept</value>
|
||||
</data>
|
||||
<data name="ToSStrings_ButtonWillBeAvailableIn" xml:space="preserve">
|
||||
<value>Bouton "J'accept" disposible dans</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ToSStrings_AgreeLabel" xml:space="preserve">
|
||||
<value>I agree</value>
|
||||
</data>
|
||||
<data name="ToSStrings_AgreementLabel" xml:space="preserve">
|
||||
<value>Agreement of Usage of Service</value>
|
||||
</data>
|
||||
<data name="ToSStrings_ButtonWillBeAvailableIn" xml:space="preserve">
|
||||
<value>'I agree' button will be available in</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph1" xml:space="preserve">
|
||||
<value>All of the mod files currently active on your character as well as your current character state will be uploaded to the service you registered yourself at automatically. The plugin will exclusively upload the necessary mod files and not the whole mod.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph2" xml:space="preserve">
|
||||
<value>If you are on a data capped internet connection, higher fees due to data usage depending on the amount of downloaded and uploaded mod files might occur. Mod files will be compressed on up- and download to save on bandwidth usage. Due to varying up- and download speeds, changes in characters might not be visible immediately. Files present on the service that already represent your active mod files will not be uploaded again.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph3" xml:space="preserve">
|
||||
<value>The mod files you are uploading are confidential and will not be distributed to parties other than the ones who are requesting the exact same mod files. Please think about who you are going to pair since it is unavoidable that they will receive and locally cache the necessary mod files that you have currently in use. Locally cached mod files will have arbitrary file names to discourage attempts at replicating the original mod.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph4" xml:space="preserve">
|
||||
<value>The plugin creator tried their best to keep you secure. However, there is no guarantee for 100% security. Do not blindly pair your client with everyone.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph5" xml:space="preserve">
|
||||
<value>Mod files that are saved on the service will remain on the service as long as there are requests for the files from clients. After a period of not being used, the mod files will be automatically deleted. You will also be able to wipe all the files you have personally uploaded on request. The service holds no information about which mod files belong to which mod.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_Paragraph6" xml:space="preserve">
|
||||
<value>This service is provided as-is. In case of abuse join the Lightless Sync Discord.</value>
|
||||
</data>
|
||||
<data name="ToSStrings_ReadLabel" xml:space="preserve">
|
||||
<value>READ THIS CAREFULLY</value>
|
||||
</data>
|
||||
<data name="ToSStrings_LanguageLabel" xml:space="preserve">
|
||||
<value>Language</value>
|
||||
</data>
|
||||
<data name="Users_Online" xml:space="preserve">
|
||||
<value>Users Online</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,20 +0,0 @@
|
||||
<root>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ToSStrings_LanguageLabel" xml:space="preserve">
|
||||
<value>语言</value>
|
||||
</data>
|
||||
<data name="Users_Online" xml:space="preserve">
|
||||
<value>用户在线</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -666,7 +666,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
|
||||
var location = new LocationInfo();
|
||||
location.ServerId = _playerState.CurrentWorld.RowId;
|
||||
location.InstanceId = UIState.Instance()->PublicInstance.InstanceId;
|
||||
location.InstanceId = UIState.Instance()->PublicInstance.InstanceId;
|
||||
location.TerritoryId = _clientState.TerritoryType;
|
||||
location.MapId = _clientState.MapId;
|
||||
if (houseMan != null)
|
||||
@@ -699,13 +699,13 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
}
|
||||
return location;
|
||||
}
|
||||
|
||||
|
||||
public string LocationToString(LocationInfo location)
|
||||
{
|
||||
if (location.ServerId is 0 || location.TerritoryId is 0) return String.Empty;
|
||||
var str = WorldData.Value[(ushort)location.ServerId];
|
||||
|
||||
if (ContentFinderData.Value.TryGetValue(location.TerritoryId, out var dutyName))
|
||||
if (ContentFinderData.Value.TryGetValue(location.TerritoryId , out var dutyName))
|
||||
{
|
||||
str += $" - [In Duty]{dutyName}";
|
||||
}
|
||||
@@ -856,7 +856,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
|
||||
var token = ct ?? CancellationToken.None;
|
||||
|
||||
const int tick = 250;
|
||||
const int tick = 250;
|
||||
const int initialSettle = 50;
|
||||
|
||||
var sw = Stopwatch.StartNew();
|
||||
@@ -881,7 +881,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (AccessViolationException ex)
|
||||
{
|
||||
logger.LogWarning(ex, "Error accessing {handler}, object does not exist anymore?", handler);
|
||||
}
|
||||
@@ -922,11 +922,11 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
public string? GetWorldNameFromPlayerAddress(nint address)
|
||||
{
|
||||
if (address == nint.Zero) return null;
|
||||
|
||||
|
||||
EnsureIsOnFramework();
|
||||
var playerCharacter = _objectTable.OfType<IPlayerCharacter>().FirstOrDefault(p => p.Address == address);
|
||||
if (playerCharacter == null) return null;
|
||||
|
||||
|
||||
var worldId = (ushort)playerCharacter.HomeWorld.RowId;
|
||||
return WorldData.Value.TryGetValue(worldId, out var worldName) ? worldName : null;
|
||||
}
|
||||
@@ -953,87 +953,37 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
});
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
private static extern bool IsBadReadPtr(IntPtr ptr, UIntPtr size);
|
||||
|
||||
private static bool IsValidPointer(nint ptr, int size = 8)
|
||||
{
|
||||
if (ptr == nint.Zero)
|
||||
return false;
|
||||
|
||||
try
|
||||
{
|
||||
if (!Util.IsWine())
|
||||
{
|
||||
return !IsBadReadPtr(ptr, (UIntPtr)size);
|
||||
}
|
||||
return ptr != nint.Zero && (ptr % IntPtr.Size) == 0;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private unsafe void CheckCharacterForDrawing(nint address, string characterName)
|
||||
{
|
||||
if (address == nint.Zero)
|
||||
return;
|
||||
|
||||
if (!IsValidPointer(address))
|
||||
{
|
||||
_logger.LogDebug("Invalid pointer for character {name} at {addr}", characterName, address.ToString("X"));
|
||||
return;
|
||||
}
|
||||
|
||||
var gameObj = (GameObject*)address;
|
||||
|
||||
if (gameObj == null)
|
||||
return;
|
||||
|
||||
if (!_objectTable.Any(o => o?.Address == address))
|
||||
{
|
||||
_logger.LogDebug("Character {name} at {addr} no longer in object table", characterName, address.ToString("X"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (gameObj->ObjectKind == 0)
|
||||
return;
|
||||
|
||||
var drawObj = gameObj->DrawObject;
|
||||
bool isDrawing = false;
|
||||
bool isDrawingChanged = false;
|
||||
|
||||
if ((nint)drawObj != IntPtr.Zero && IsValidPointer((nint)drawObj))
|
||||
if ((nint)drawObj != IntPtr.Zero)
|
||||
{
|
||||
isDrawing = gameObj->RenderFlags == (VisibilityFlags)0b100000000000;
|
||||
|
||||
if (!isDrawing)
|
||||
{
|
||||
var charBase = (CharacterBase*)drawObj;
|
||||
if (charBase != null && IsValidPointer((nint)charBase))
|
||||
isDrawing = ((CharacterBase*)drawObj)->HasModelInSlotLoaded != 0;
|
||||
if (!isDrawing)
|
||||
{
|
||||
isDrawing = charBase->HasModelInSlotLoaded != 0;
|
||||
if (!isDrawing)
|
||||
isDrawing = ((CharacterBase*)drawObj)->HasModelFilesInSlotLoaded != 0;
|
||||
if (isDrawing && !string.Equals(_lastGlobalBlockPlayer, characterName, StringComparison.Ordinal)
|
||||
&& !string.Equals(_lastGlobalBlockReason, "HasModelFilesInSlotLoaded", StringComparison.Ordinal))
|
||||
{
|
||||
isDrawing = charBase->HasModelFilesInSlotLoaded != 0;
|
||||
if (isDrawing && !string.Equals(_lastGlobalBlockPlayer, characterName, StringComparison.Ordinal)
|
||||
&& !string.Equals(_lastGlobalBlockReason, "HasModelFilesInSlotLoaded", StringComparison.Ordinal))
|
||||
{
|
||||
_lastGlobalBlockPlayer = characterName;
|
||||
_lastGlobalBlockReason = "HasModelFilesInSlotLoaded";
|
||||
isDrawingChanged = true;
|
||||
}
|
||||
_lastGlobalBlockPlayer = characterName;
|
||||
_lastGlobalBlockReason = "HasModelFilesInSlotLoaded";
|
||||
isDrawingChanged = true;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.Equals(_lastGlobalBlockPlayer, characterName, StringComparison.Ordinal)
|
||||
&& !string.Equals(_lastGlobalBlockReason, "HasModelInSlotLoaded", StringComparison.Ordinal))
|
||||
{
|
||||
if (!string.Equals(_lastGlobalBlockPlayer, characterName, StringComparison.Ordinal)
|
||||
&& !string.Equals(_lastGlobalBlockReason, "HasModelInSlotLoaded", StringComparison.Ordinal))
|
||||
{
|
||||
_lastGlobalBlockPlayer = characterName;
|
||||
_lastGlobalBlockReason = "HasModelInSlotLoaded";
|
||||
isDrawingChanged = true;
|
||||
}
|
||||
_lastGlobalBlockPlayer = characterName;
|
||||
_lastGlobalBlockReason = "HasModelInSlotLoaded";
|
||||
isDrawingChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1064,11 +1014,6 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
|
||||
private unsafe void FrameworkOnUpdateInternal()
|
||||
{
|
||||
if (!_clientState.IsLoggedIn || _objectTable.LocalPlayer == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((_objectTable.LocalPlayer?.IsDead ?? false) && _condition[ConditionFlag.BoundByDuty])
|
||||
{
|
||||
return;
|
||||
@@ -1088,17 +1033,12 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
}
|
||||
|
||||
var playerDescriptors = _actorObjectService.PlayerDescriptors;
|
||||
var descriptorCount = playerDescriptors.Count;
|
||||
|
||||
for (var i = 0; i < descriptorCount; i++)
|
||||
for (var i = 0; i < playerDescriptors.Count; i++)
|
||||
{
|
||||
if (i >= playerDescriptors.Count)
|
||||
break;
|
||||
|
||||
var actor = playerDescriptors[i];
|
||||
|
||||
var playerAddress = actor.Address;
|
||||
if (playerAddress == nint.Zero || !IsValidPointer(playerAddress))
|
||||
if (playerAddress == nint.Zero)
|
||||
continue;
|
||||
|
||||
if (actor.ObjectIndex >= 200)
|
||||
@@ -1112,16 +1052,17 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
|
||||
if (!IsAnythingDrawing)
|
||||
{
|
||||
if (!_objectTable.Any(o => o?.Address == playerAddress))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
CheckCharacterForDrawing(playerAddress, actor.Name);
|
||||
|
||||
var gameObj = (GameObject*)playerAddress;
|
||||
var currentName = gameObj != null ? gameObj->NameString ?? string.Empty : string.Empty;
|
||||
var charaName = string.IsNullOrEmpty(currentName) ? actor.Name : currentName;
|
||||
CheckCharacterForDrawing(playerAddress, charaName);
|
||||
if (IsAnythingDrawing)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1190,7 +1131,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
});
|
||||
|
||||
// Cutscene
|
||||
HandleStateTransition(() => IsInCutscene, v => IsInCutscene = v, shouldBeInCutscene, "Cutscene",
|
||||
HandleStateTransition(() => IsInCutscene,v => IsInCutscene = v, shouldBeInCutscene, "Cutscene",
|
||||
onEnter: () =>
|
||||
{
|
||||
Mediator.Publish(new CutsceneStartMessage());
|
||||
@@ -1233,7 +1174,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
Mediator.Publish(new ZoneSwitchEndMessage());
|
||||
Mediator.Publish(new ResumeScanMessage(nameof(ConditionFlag.BetweenAreas)));
|
||||
}
|
||||
|
||||
|
||||
//Map
|
||||
if (!_sentBetweenAreas)
|
||||
{
|
||||
@@ -1244,7 +1185,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
Mediator.Publish(new MapChangedMessage(mapid));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var localPlayer = _objectTable.LocalPlayer;
|
||||
if (localPlayer != null)
|
||||
@@ -1330,4 +1271,4 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
onExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Character;
|
||||
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
|
||||
using FFXIVClientStructs.Havok.Common.Serialize.Resource;
|
||||
using FFXIVClientStructs.Havok.Animation;
|
||||
using FFXIVClientStructs.Havok.Common.Base.Types;
|
||||
using FFXIVClientStructs.Havok.Common.Serialize.Resource;
|
||||
using FFXIVClientStructs.Havok.Common.Serialize.Util;
|
||||
using LightlessSync.FileCache;
|
||||
using LightlessSync.Interop.GameModel;
|
||||
@@ -11,7 +9,6 @@ using LightlessSync.LightlessConfiguration;
|
||||
using LightlessSync.PlayerData.Factories;
|
||||
using LightlessSync.PlayerData.Handlers;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using OtterGui.Text.EndObjects;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text.RegularExpressions;
|
||||
@@ -132,97 +129,118 @@ public sealed partial class XivDataAnalyzer
|
||||
return (output.Count != 0 && output.Values.All(v => v.Count > 0)) ? output : null;
|
||||
}
|
||||
|
||||
public static byte[]? ReadHavokBytesFromPap(string papPath)
|
||||
public unsafe Dictionary<string, List<ushort>>? GetBoneIndicesFromPap(string hash, bool persistToConfig = true)
|
||||
{
|
||||
using var fs = File.Open(papPath, FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
if (string.IsNullOrWhiteSpace(hash))
|
||||
return null;
|
||||
|
||||
if (_configService.Current.BonesDictionary.TryGetValue(hash, out var cached) && cached is not null)
|
||||
return cached;
|
||||
|
||||
var cacheEntity = _fileCacheManager.GetFileCacheByHash(hash);
|
||||
if (cacheEntity == null || string.IsNullOrEmpty(cacheEntity.ResolvedFilepath) || !File.Exists(cacheEntity.ResolvedFilepath))
|
||||
return null;
|
||||
|
||||
using var fs = File.Open(cacheEntity.ResolvedFilepath, FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
using var reader = new BinaryReader(fs);
|
||||
|
||||
_ = reader.ReadInt32();
|
||||
_ = reader.ReadInt32();
|
||||
_ = reader.ReadInt16();
|
||||
_ = reader.ReadInt16();
|
||||
// PAP header (mostly from vfxeditor)
|
||||
_ = reader.ReadInt32(); // ignore
|
||||
_ = reader.ReadInt32(); // ignore
|
||||
_ = reader.ReadInt16(); // num animations
|
||||
_ = reader.ReadInt16(); // modelid
|
||||
|
||||
var type = reader.ReadByte();
|
||||
if (type != 0) return null;
|
||||
var type = reader.ReadByte(); // type
|
||||
if (type != 0)
|
||||
return null; // not human
|
||||
|
||||
_ = reader.ReadByte();
|
||||
_ = reader.ReadInt32();
|
||||
_ = reader.ReadByte(); // variant
|
||||
_ = reader.ReadInt32(); // ignore
|
||||
|
||||
var havokPosition = reader.ReadInt32();
|
||||
var footerPosition = reader.ReadInt32();
|
||||
|
||||
// sanity checks
|
||||
if (havokPosition <= 0 || footerPosition <= havokPosition || footerPosition > fs.Length)
|
||||
return null;
|
||||
|
||||
var sizeLong = (long)footerPosition - havokPosition;
|
||||
if (sizeLong <= 8 || sizeLong > int.MaxValue)
|
||||
var havokDataSizeLong = (long)footerPosition - havokPosition;
|
||||
if (havokDataSizeLong <= 8 || havokDataSizeLong > int.MaxValue)
|
||||
return null;
|
||||
|
||||
var size = (int)sizeLong;
|
||||
var havokDataSize = (int)havokDataSizeLong;
|
||||
|
||||
fs.Position = havokPosition;
|
||||
var bytes = reader.ReadBytes(size);
|
||||
return bytes.Length > 8 ? bytes : null;
|
||||
}
|
||||
reader.BaseStream.Position = havokPosition;
|
||||
var havokData = reader.ReadBytes(havokDataSize);
|
||||
if (havokData.Length <= 8)
|
||||
return null;
|
||||
|
||||
public unsafe Dictionary<string, List<ushort>>? ParseHavokBytesOnFrameworkThread(
|
||||
byte[] havokData,
|
||||
string hash,
|
||||
bool persistToConfig)
|
||||
{
|
||||
var tempSets = new Dictionary<string, HashSet<ushort>>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
var tempHkxPath = Path.Combine(Path.GetTempPath(), $"lightless_{Guid.NewGuid():N}.hkx");
|
||||
IntPtr pathAnsi = IntPtr.Zero;
|
||||
var tempHavokDataPath = Path.Combine(Path.GetTempPath(), $"lightless_{Guid.NewGuid():N}.hkx");
|
||||
IntPtr tempHavokDataPathAnsi = IntPtr.Zero;
|
||||
|
||||
try
|
||||
{
|
||||
File.WriteAllBytes(tempHkxPath, havokData);
|
||||
File.WriteAllBytes(tempHavokDataPath, havokData);
|
||||
|
||||
pathAnsi = Marshal.StringToHGlobalAnsi(tempHkxPath);
|
||||
if (!File.Exists(tempHavokDataPath))
|
||||
{
|
||||
_logger.LogTrace("Temporary havok file did not exist when attempting to load: {path}", tempHavokDataPath);
|
||||
return null;
|
||||
}
|
||||
|
||||
hkSerializeUtil.LoadOptions loadOptions = default;
|
||||
loadOptions.TypeInfoRegistry = hkBuiltinTypeRegistry.Instance()->GetTypeInfoRegistry();
|
||||
loadOptions.ClassNameRegistry = hkBuiltinTypeRegistry.Instance()->GetClassNameRegistry();
|
||||
loadOptions.Flags = new hkFlags<hkSerializeUtil.LoadOptionBits, int>
|
||||
tempHavokDataPathAnsi = Marshal.StringToHGlobalAnsi(tempHavokDataPath);
|
||||
|
||||
var loadoptions = stackalloc hkSerializeUtil.LoadOptions[1];
|
||||
loadoptions->TypeInfoRegistry = hkBuiltinTypeRegistry.Instance()->GetTypeInfoRegistry();
|
||||
loadoptions->ClassNameRegistry = hkBuiltinTypeRegistry.Instance()->GetClassNameRegistry();
|
||||
loadoptions->Flags = new hkFlags<hkSerializeUtil.LoadOptionBits, int>
|
||||
{
|
||||
Storage = (int)hkSerializeUtil.LoadOptionBits.Default
|
||||
};
|
||||
|
||||
hkSerializeUtil.LoadOptions* pOpts = &loadOptions;
|
||||
|
||||
var resource = hkSerializeUtil.LoadFromFile((byte*)pathAnsi, errorResult: null, pOpts);
|
||||
var resource = hkSerializeUtil.LoadFromFile((byte*)tempHavokDataPathAnsi, null, loadoptions);
|
||||
if (resource == null)
|
||||
{
|
||||
_logger.LogWarning("Havok resource was null after loading from {path}", tempHavokDataPath);
|
||||
return null;
|
||||
}
|
||||
|
||||
var rootLevelName = @"hkRootLevelContainer"u8;
|
||||
fixed (byte* n1 = rootLevelName)
|
||||
{
|
||||
var container = (hkRootLevelContainer*)resource->GetContentsPointer(
|
||||
n1, hkBuiltinTypeRegistry.Instance()->GetTypeInfoRegistry());
|
||||
|
||||
if (container == null) return null;
|
||||
var container = (hkRootLevelContainer*)resource->GetContentsPointer(n1, hkBuiltinTypeRegistry.Instance()->GetTypeInfoRegistry());
|
||||
if (container == null)
|
||||
return null;
|
||||
|
||||
var animationName = @"hkaAnimationContainer"u8;
|
||||
fixed (byte* n2 = animationName)
|
||||
{
|
||||
var animContainer = (hkaAnimationContainer*)container->findObjectByName(n2, null);
|
||||
if (animContainer == null) return null;
|
||||
if (animContainer == null)
|
||||
return null;
|
||||
|
||||
for (int i = 0; i < animContainer->Bindings.Length; i++)
|
||||
{
|
||||
var binding = animContainer->Bindings[i].ptr;
|
||||
if (binding == null) continue;
|
||||
if (binding == null)
|
||||
continue;
|
||||
|
||||
var rawSkel = binding->OriginalSkeletonName.String;
|
||||
var skeletonKey = CanonicalizeSkeletonKey(rawSkel);
|
||||
if (string.IsNullOrEmpty(skeletonKey)) continue;
|
||||
if (string.IsNullOrEmpty(skeletonKey))
|
||||
continue;
|
||||
|
||||
var boneTransform = binding->TransformTrackToBoneIndices;
|
||||
if (boneTransform.Length <= 0) continue;
|
||||
if (boneTransform.Length <= 0)
|
||||
continue;
|
||||
|
||||
if (!tempSets.TryGetValue(skeletonKey, out var set))
|
||||
tempSets[skeletonKey] = set = [];
|
||||
{
|
||||
set = [];
|
||||
tempSets[skeletonKey] = set;
|
||||
}
|
||||
|
||||
for (int boneIdx = 0; boneIdx < boneTransform.Length; boneIdx++)
|
||||
{
|
||||
@@ -234,34 +252,52 @@ public sealed partial class XivDataAnalyzer
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Could not load havok file in {path}", tempHavokDataPath);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (pathAnsi != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal(pathAnsi);
|
||||
if (tempHavokDataPathAnsi != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal(tempHavokDataPathAnsi);
|
||||
|
||||
try { if (File.Exists(tempHkxPath)) File.Delete(tempHkxPath); }
|
||||
catch { /* ignore */ }
|
||||
try
|
||||
{
|
||||
if (File.Exists(tempHavokDataPath))
|
||||
File.Delete(tempHavokDataPath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogTrace(ex, "Could not delete temporary havok file: {path}", tempHavokDataPath);
|
||||
}
|
||||
}
|
||||
|
||||
if (tempSets.Count == 0) return null;
|
||||
if (tempSets.Count == 0)
|
||||
return null;
|
||||
|
||||
var output = new Dictionary<string, List<ushort>>(tempSets.Count, StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var (key, set) in tempSets)
|
||||
{
|
||||
if (set.Count == 0) continue;
|
||||
|
||||
var list = set.ToList();
|
||||
list.Sort();
|
||||
output[key] = list;
|
||||
}
|
||||
|
||||
if (output.Count == 0) return null;
|
||||
if (output.Count == 0)
|
||||
return null;
|
||||
|
||||
_configService.Current.BonesDictionary[hash] = output;
|
||||
if (persistToConfig) _configService.Save();
|
||||
|
||||
if (persistToConfig)
|
||||
_configService.Save();
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
public static string CanonicalizeSkeletonKey(string? raw)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(raw))
|
||||
@@ -339,56 +375,41 @@ public sealed partial class XivDataAnalyzer
|
||||
if (mode == AnimationValidationMode.Unsafe)
|
||||
return true;
|
||||
|
||||
var papByBucket = new Dictionary<string, List<ushort>>(StringComparer.OrdinalIgnoreCase);
|
||||
var papBuckets = papBoneIndices.Keys
|
||||
.Select(CanonicalizeSkeletonKey)
|
||||
.Where(k => !string.IsNullOrEmpty(k))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
|
||||
foreach (var (rawKey, list) in papBoneIndices)
|
||||
{
|
||||
var key = CanonicalizeSkeletonKey(rawKey);
|
||||
if (string.IsNullOrEmpty(key))
|
||||
continue;
|
||||
|
||||
if (string.Equals(key, "skeleton", StringComparison.OrdinalIgnoreCase))
|
||||
key = "__any__";
|
||||
|
||||
if (!papByBucket.TryGetValue(key, out var acc))
|
||||
papByBucket[key] = acc = [];
|
||||
|
||||
if (list is { Count: > 0 })
|
||||
acc.AddRange(list);
|
||||
}
|
||||
|
||||
foreach (var k in papByBucket.Keys.ToList())
|
||||
papByBucket[k] = papByBucket[k].Distinct().ToList();
|
||||
|
||||
if (papByBucket.Count == 0)
|
||||
if (papBuckets.Count == 0)
|
||||
{
|
||||
reason = "No skeleton bucket bindings found in the PAP";
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool AllIndicesOk(
|
||||
HashSet<ushort> available,
|
||||
List<ushort> indices,
|
||||
bool papLikelyOneBased,
|
||||
bool allowOneBasedShift,
|
||||
bool allowNeighborTolerance,
|
||||
out ushort missing)
|
||||
if (mode == AnimationValidationMode.Safe)
|
||||
{
|
||||
foreach (var idx in indices)
|
||||
{
|
||||
if (!ContainsIndexCompat(available, idx, papLikelyOneBased, allowOneBasedShift, allowNeighborTolerance))
|
||||
{
|
||||
missing = idx;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (papBuckets.Any(b => localBoneSets.ContainsKey(b)))
|
||||
return true;
|
||||
|
||||
missing = 0;
|
||||
return true;
|
||||
reason = $"No matching skeleton bucket between PAP [{string.Join(", ", papBuckets)}] and local [{string.Join(", ", localBoneSets.Keys.Order())}].";
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (var (bucket, indices) in papByBucket)
|
||||
foreach (var bucket in papBuckets)
|
||||
{
|
||||
if (!localBoneSets.TryGetValue(bucket, out var available))
|
||||
{
|
||||
reason = $"Missing skeleton bucket '{bucket}' on local actor.";
|
||||
return false;
|
||||
}
|
||||
|
||||
var indices = papBoneIndices
|
||||
.Where(kvp => string.Equals(CanonicalizeSkeletonKey(kvp.Key), bucket, StringComparison.OrdinalIgnoreCase))
|
||||
.SelectMany(kvp => kvp.Value ?? Enumerable.Empty<ushort>())
|
||||
.Distinct()
|
||||
.ToList();
|
||||
|
||||
if (indices.Count == 0)
|
||||
continue;
|
||||
|
||||
@@ -402,32 +423,14 @@ public sealed partial class XivDataAnalyzer
|
||||
}
|
||||
bool papLikelyOneBased = allowOneBasedShift && (min == 1) && has1 && !has0;
|
||||
|
||||
if (string.Equals(bucket, "__any__", StringComparison.OrdinalIgnoreCase))
|
||||
foreach (var idx in indices)
|
||||
{
|
||||
foreach (var (lk, ls) in localBoneSets)
|
||||
if (!ContainsIndexCompat(available, idx, papLikelyOneBased, allowOneBasedShift, allowNeighborTolerance))
|
||||
{
|
||||
if (AllIndicesOk(ls, indices, papLikelyOneBased, allowOneBasedShift, allowNeighborTolerance, out _))
|
||||
goto nextBucket;
|
||||
reason = $"No compatible local skeleton for PAP '{bucket}': missing bone index {idx}.";
|
||||
return false;
|
||||
}
|
||||
|
||||
reason = $"No compatible local skeleton bucket for generic PAP skeleton '{bucket}'. Local buckets: {string.Join(", ", localBoneSets.Keys)}";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!localBoneSets.TryGetValue(bucket, out var available))
|
||||
{
|
||||
reason = $"Missing skeleton bucket '{bucket}' on local actor.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!AllIndicesOk(available, indices, papLikelyOneBased, allowOneBasedShift, allowNeighborTolerance, out var missing))
|
||||
{
|
||||
reason = $"No compatible local skeleton for PAP '{bucket}': missing bone index {missing}.";
|
||||
return false;
|
||||
}
|
||||
|
||||
nextBucket:
|
||||
;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -6,12 +6,12 @@ using Dalamud.Utility;
|
||||
using LightlessSync.FileCache;
|
||||
using LightlessSync.LightlessConfiguration;
|
||||
using LightlessSync.LightlessConfiguration.Models;
|
||||
using LightlessSync.Localization;
|
||||
using LightlessSync.Services;
|
||||
using LightlessSync.Services.Mediator;
|
||||
using LightlessSync.Services.ServerConfiguration;
|
||||
using LightlessSync.Utils;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Globalization;
|
||||
using System.Numerics;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
@@ -21,7 +21,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
|
||||
{
|
||||
private readonly LightlessConfigService _configService;
|
||||
private readonly CacheMonitor _cacheMonitor;
|
||||
private readonly Dictionary<string, string> _languages = new(StringComparer.Ordinal) { { "English", "en" }, { "Deutsch", "de" }, { "Français", "fr" }, { "中文", "zh"} };
|
||||
private readonly Dictionary<string, string> _languages = new(StringComparer.Ordinal) { { "English", "en" }, { "Deutsch", "de" }, { "Français", "fr" } };
|
||||
private readonly ServerConfigurationManager _serverConfigurationManager;
|
||||
private readonly DalamudUtilService _dalamudUtilService;
|
||||
private readonly UiSharedService _uiShared;
|
||||
@@ -31,6 +31,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
|
||||
private string _secretKey = string.Empty;
|
||||
private string _timeoutLabel = string.Empty;
|
||||
private Task? _timeoutTask;
|
||||
private string[]? _tosParagraphs;
|
||||
private bool _useLegacyLogin = false;
|
||||
|
||||
public IntroUi(ILogger<IntroUi> logger, UiSharedService uiShared, LightlessConfigService configService,
|
||||
@@ -49,7 +50,8 @@ public partial class IntroUi : WindowMediatorSubscriberBase
|
||||
WindowBuilder.For(this)
|
||||
.SetSizeConstraints(new Vector2(600, 400), new Vector2(600, 2000))
|
||||
.Apply();
|
||||
|
||||
|
||||
GetToSLocalization();
|
||||
|
||||
Mediator.Subscribe<SwitchToMainUiMessage>(this, (_) => IsOpen = false);
|
||||
Mediator.Subscribe<SwitchToIntroUiMessage>(this, (_) =>
|
||||
@@ -86,7 +88,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
|
||||
{
|
||||
for (int i = 60; i > 0; i--)
|
||||
{
|
||||
_timeoutLabel = $"{Resources.Resources.ToSStrings_ButtonWillBeAvailableIn} {i}s";
|
||||
_timeoutLabel = $"{Strings.ToS.ButtonWillBeAvailableIn} {i}s";
|
||||
await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false);
|
||||
}
|
||||
});
|
||||
@@ -100,46 +102,44 @@ public partial class IntroUi : WindowMediatorSubscriberBase
|
||||
Vector2 textSize;
|
||||
using (_uiShared.UidFont.Push())
|
||||
{
|
||||
textSize = ImGui.CalcTextSize(Resources.Resources.ToSStrings_LanguageLabel);
|
||||
ImGui.TextUnformatted(Resources.Resources.ToSStrings_AgreementLabel);
|
||||
textSize = ImGui.CalcTextSize(Strings.ToS.LanguageLabel);
|
||||
ImGui.TextUnformatted(Strings.ToS.AgreementLabel);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
var languageSize = ImGui.CalcTextSize(Resources.Resources.ToSStrings_LanguageLabel);
|
||||
var languageSize = ImGui.CalcTextSize(Strings.ToS.LanguageLabel);
|
||||
ImGui.SetCursorPosX(ImGui.GetWindowContentRegionMax().X - ImGui.GetWindowContentRegionMin().X - languageSize.X - 80);
|
||||
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + textSize.Y / 2 - languageSize.Y / 2);
|
||||
|
||||
ImGui.TextUnformatted(Resources.Resources.ToSStrings_LanguageLabel);
|
||||
ImGui.TextUnformatted(Strings.ToS.LanguageLabel);
|
||||
ImGui.SameLine();
|
||||
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + textSize.Y / 2 - (languageSize.Y + ImGui.GetStyle().FramePadding.Y) / 2);
|
||||
ImGui.SetNextItemWidth(80);
|
||||
if (ImGui.Combo("", ref _currentLanguage, _languages.Keys.ToArray(), _languages.Count))
|
||||
{
|
||||
var culture = new CultureInfo(_languages.Values.ToArray()[_currentLanguage]);
|
||||
CultureInfo.DefaultThreadCurrentCulture = culture;
|
||||
CultureInfo.DefaultThreadCurrentUICulture = culture;
|
||||
GetToSLocalization(_currentLanguage);
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
ImGui.SetWindowFontScale(1.5f);
|
||||
string readThis = Resources.Resources.ToSStrings_ReadLabel;
|
||||
string readThis = Strings.ToS.ReadLabel;
|
||||
textSize = ImGui.CalcTextSize(readThis);
|
||||
ImGui.SetCursorPosX(ImGui.GetWindowSize().X / 2 - textSize.X / 2);
|
||||
UiSharedService.ColorText(readThis, ImGuiColors.DalamudRed);
|
||||
ImGui.SetWindowFontScale(1.0f);
|
||||
ImGui.Separator();
|
||||
|
||||
UiSharedService.TextWrapped(Resources.Resources.ToSStrings_Paragraph1);
|
||||
UiSharedService.TextWrapped(Resources.Resources.ToSStrings_Paragraph2);
|
||||
UiSharedService.TextWrapped(Resources.Resources.ToSStrings_Paragraph3);
|
||||
UiSharedService.TextWrapped(Resources.Resources.ToSStrings_Paragraph4);
|
||||
UiSharedService.TextWrapped(Resources.Resources.ToSStrings_Paragraph5);
|
||||
UiSharedService.TextWrapped(Resources.Resources.ToSStrings_Paragraph6);
|
||||
UiSharedService.TextWrapped(_tosParagraphs![0]);
|
||||
UiSharedService.TextWrapped(_tosParagraphs![1]);
|
||||
UiSharedService.TextWrapped(_tosParagraphs![2]);
|
||||
UiSharedService.TextWrapped(_tosParagraphs![3]);
|
||||
UiSharedService.TextWrapped(_tosParagraphs![4]);
|
||||
UiSharedService.TextWrapped(_tosParagraphs![5]);
|
||||
|
||||
ImGui.Separator();
|
||||
if (_timeoutTask?.IsCompleted ?? true)
|
||||
{
|
||||
if (ImGui.Button(Resources.Resources.ToSStrings_AgreeLabel + "##toSetup"))
|
||||
if (ImGui.Button(Strings.ToS.AgreeLabel + "##toSetup"))
|
||||
{
|
||||
_configService.Current.AcceptedAgreement = true;
|
||||
_configService.Save();
|
||||
@@ -349,6 +349,16 @@ public partial class IntroUi : WindowMediatorSubscriberBase
|
||||
}
|
||||
}
|
||||
|
||||
private void GetToSLocalization(int changeLanguageTo = -1)
|
||||
{
|
||||
if (changeLanguageTo != -1)
|
||||
{
|
||||
_uiShared.LoadLocalization(_languages.ElementAt(changeLanguageTo).Value);
|
||||
}
|
||||
|
||||
_tosParagraphs = [Strings.ToS.Paragraph1, Strings.ToS.Paragraph2, Strings.ToS.Paragraph3, Strings.ToS.Paragraph4, Strings.ToS.Paragraph5, Strings.ToS.Paragraph6];
|
||||
}
|
||||
|
||||
[GeneratedRegex("^[A-F0-9]{64}$", RegexOptions.Compiled | RegexOptions.CultureInvariant)]
|
||||
private static partial Regex SecretRegex();
|
||||
}
|
||||
@@ -4812,7 +4812,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||
ImGui.TextColored(UIColors.Get("LightlessBlue"),
|
||||
_apiController.OnlineUsers.ToString(CultureInfo.InvariantCulture));
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted(Resources.Resources.Users_Online);
|
||||
ImGui.TextUnformatted("Users Online");
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted(")");
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ using LightlessSync.Interop.Ipc;
|
||||
using LightlessSync.Interop.Ipc.Framework;
|
||||
using LightlessSync.LightlessConfiguration;
|
||||
using LightlessSync.LightlessConfiguration.Models;
|
||||
using LightlessSync.Localization;
|
||||
using LightlessSync.PlayerData.Pairs;
|
||||
using LightlessSync.Services;
|
||||
using LightlessSync.Services.Mediator;
|
||||
@@ -1467,6 +1468,12 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
return false;
|
||||
}
|
||||
|
||||
public void LoadLocalization(string languageCode)
|
||||
{
|
||||
_localization.SetupWithLangCode(languageCode);
|
||||
Strings.ToS = new Strings.ToSStrings();
|
||||
}
|
||||
|
||||
internal static void DistanceSeparator()
|
||||
{
|
||||
ImGuiHelpers.ScaledDummy(5);
|
||||
|
||||
Reference in New Issue
Block a user