Skip to content

Commit dbc2f0f

Browse files
fix-2698 (#2728)
1 parent 4d5d34d commit dbc2f0f

File tree

1 file changed

+3
-1
lines changed
  • Intersect.Server.Core/Entities

1 file changed

+3
-1
lines changed

Intersect.Server.Core/Entities/Npc.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,9 @@ public override void Update(long timeMs)
10111011
{
10121012
if (CanAttack(blockingEntity, default))
10131013
{
1014-
ApplicationContext.Context.Value?.Logger.LogDebug($"Trying to attack {blockingEntity.Name} because they're blocking the path to {Target.Name}");
1014+
var blockingEntityName = blockingEntity?.Name ?? "Unknown Blocking Entity";
1015+
var targetName = Target?.Name ?? "Unknown Target";
1016+
ApplicationContext.Context.Value?.Logger.LogDebug($"Trying to attack {blockingEntityName} because they're blocking the path to {targetName}");
10151017
ChangeDir(nextPathDirection);
10161018
TryAttack(blockingEntity);
10171019
blockerAttacked = true;

0 commit comments

Comments
 (0)