Compare commits
5 Commits
merge-abel
...
2.0.2.71-D
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcd3bd5ca2 | ||
|
|
c1829a9837 | ||
|
|
a2ed9f8d2b | ||
| 8e08da7471 | |||
|
|
cca23f6e05 |
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<Authors></Authors>
|
||||
<Company></Company>
|
||||
<Version>2.0.3</Version>
|
||||
<Version>2.0.2.71</Version>
|
||||
<Description></Description>
|
||||
<Copyright></Copyright>
|
||||
<PackageProjectUrl>https://github.com/Light-Public-Syncshells/LightlessClient</PackageProjectUrl>
|
||||
|
||||
@@ -955,7 +955,13 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
|
||||
private unsafe void CheckCharacterForDrawing(nint address, string characterName)
|
||||
{
|
||||
if (address == nint.Zero)
|
||||
return;
|
||||
|
||||
var gameObj = (GameObject*)address;
|
||||
|
||||
if (gameObj == null || gameObj->ObjectKind == 0)
|
||||
return;
|
||||
var drawObj = gameObj->DrawObject;
|
||||
bool isDrawing = false;
|
||||
bool isDrawingChanged = false;
|
||||
@@ -1052,16 +1058,28 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
|
||||
if (!IsAnythingDrawing)
|
||||
{
|
||||
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;
|
||||
try
|
||||
{
|
||||
var gameObj = (GameObject*)playerAddress;
|
||||
|
||||
if (gameObj == null || gameObj->ObjectKind == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var currentName = gameObj->NameString ?? string.Empty;
|
||||
var charaName = string.IsNullOrEmpty(currentName) ? actor.Name : currentName;
|
||||
|
||||
CheckCharacterForDrawing(playerAddress, charaName);
|
||||
|
||||
if (IsAnythingDrawing)
|
||||
break;
|
||||
}
|
||||
catch (AccessViolationException ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Memory access violation reading character at {addr}", playerAddress.ToString("X"));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user