fix mounts
This commit is contained in:
@@ -235,7 +235,7 @@ public class CachedPlayer
|
||||
RequestedPenumbraRedraw = true;
|
||||
Logger.Debug(
|
||||
$"Request Redraw for {PlayerName}");
|
||||
if (_ipcManager.CheckGlamourerApi())
|
||||
if (_ipcManager.CheckGlamourerApi() && !string.IsNullOrEmpty(glamourerData))
|
||||
{
|
||||
_ipcManager.GlamourerApplyAll(glamourerData, PlayerCharacter.Address);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ public class CachedPlayer
|
||||
if (minionOrMount != null)
|
||||
{
|
||||
Logger.Debug($"Request Redraw for Minion/Mount");
|
||||
if (_ipcManager.CheckGlamourerApi())
|
||||
if (_ipcManager.CheckGlamourerApi() && !string.IsNullOrEmpty(glamourerData))
|
||||
{
|
||||
_ipcManager.GlamourerApplyAll(glamourerData, obj: (IntPtr)minionOrMount);
|
||||
}
|
||||
@@ -266,7 +266,7 @@ public class CachedPlayer
|
||||
if (pet != IntPtr.Zero)
|
||||
{
|
||||
Logger.Debug("Request Redraw for Pet");
|
||||
if (_ipcManager.CheckGlamourerApi())
|
||||
if (_ipcManager.CheckGlamourerApi() && !string.IsNullOrEmpty(glamourerData))
|
||||
{
|
||||
_ipcManager.GlamourerApplyAll(glamourerData, pet);
|
||||
}
|
||||
@@ -282,7 +282,7 @@ public class CachedPlayer
|
||||
if (companion != IntPtr.Zero)
|
||||
{
|
||||
Logger.Debug("Request Redraw for Companion");
|
||||
if (_ipcManager.CheckGlamourerApi())
|
||||
if (_ipcManager.CheckGlamourerApi() && !string.IsNullOrEmpty(glamourerData))
|
||||
{
|
||||
_ipcManager.GlamourerApplyAll(glamourerData, companion);
|
||||
}
|
||||
|
||||
@@ -143,12 +143,19 @@ namespace MareSynchronos.Managers
|
||||
public string GlamourerGetCharacterCustomization(GameObject character)
|
||||
{
|
||||
if (!CheckGlamourerApi()) return string.Empty;
|
||||
var glamourerString = _glamourerGetAllCustomization!.InvokeFunc(character);
|
||||
byte[] bytes = Convert.FromBase64String(glamourerString);
|
||||
// ignore transparency
|
||||
bytes[88] = 128;
|
||||
bytes[89] = 63;
|
||||
return Convert.ToBase64String(bytes);
|
||||
try
|
||||
{
|
||||
var glamourerString = _glamourerGetAllCustomization!.InvokeFunc(character);
|
||||
byte[] bytes = Convert.FromBase64String(glamourerString);
|
||||
// ignore transparency
|
||||
bytes[88] = 128;
|
||||
bytes[89] = 63;
|
||||
return Convert.ToBase64String(bytes);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public void GlamourerRevertCharacterCustomization(GameObject character)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<Authors></Authors>
|
||||
<Company></Company>
|
||||
<Version>0.3.6</Version>
|
||||
<Version>0.3.7</Version>
|
||||
<Description></Description>
|
||||
<Copyright></Copyright>
|
||||
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
||||
|
||||
Reference in New Issue
Block a user