Skip to content

Commit 76965ba

Browse files
committed
1.3.3³
1 parent a384f7b commit 76965ba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

LevelUP/Shared/OverrideDamageInteraction.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static void ReceiveDamageStart(Entity __instance, DamageSource damageSour
6363
if (damageSource.SourceEntity is EntityPlayer || damageSource.GetCauseEntity() is EntityPlayer && __instance.World.Side == EnumAppSide.Server && __instance.Alive)
6464
{
6565
if (Configuration.enableExtendedLog)
66-
Debug.Log($"{(damageSource.SourceEntity as EntityPlayer).Player.PlayerName} previous damage: {damage}");
66+
Debug.Log($"{(damageSource.SourceEntity as EntityPlayer)?.GetName() ?? "PlayerProjectile"} previous damage: {damage}");
6767

6868
// Melee Action
6969
if (damageSource.SourceEntity is EntityPlayer)
@@ -250,7 +250,7 @@ public static void ReceiveDamageStart(Entity __instance, DamageSource damageSour
250250
else Debug.Log($"ERROR: Invalid damage type in OverwriteDamageInteraction, cause entity is invalid: {damageSource.GetCauseEntity()} or source entity is invalid: {damageSource.SourceEntity}");
251251

252252
if (Configuration.enableExtendedLog)
253-
Debug.Log($"{(damageSource.SourceEntity as EntityPlayer).Player.PlayerName} final damage: {damage}");
253+
Debug.Log($"{(damageSource.SourceEntity as EntityPlayer)?.GetName() ?? "PlayerProjectile"} final damage: {damage}");
254254
}
255255

256256
#region compatibility
@@ -518,7 +518,7 @@ public static void ReceiveDamageStart(Entity __instance, DamageSource damageSour
518518
}
519519
#endregion
520520
}
521-
521+
522522
if (Configuration.enableExtendedLog)
523523
Debug.Log($"{(damageSource.SourceEntity as EntityPlayer).Player.PlayerName} received final damage: {damage}");
524524
};
@@ -625,7 +625,7 @@ public static void OnHeldInteractBowStop(float secondsUsed, ItemSlot slot, Entit
625625
// Setting new aim accuracy
626626
byEntity.Attributes.SetFloat("aimingAccuracy", Configuration.BowGetAimAccuracyByLevel(byEntity.WatchedAttributes.GetInt("LevelUP_Level_Bow", 0)));
627627
if (Configuration.enableExtendedLog)
628-
Debug.Log($"Bow: ${Configuration.BowGetAimAccuracyByLevel(byEntity.WatchedAttributes.GetInt("LevelUP_Level_Bow", 0))}");
628+
Debug.Log($"Bow Accuracy: {Configuration.BowGetAimAccuracyByLevel(byEntity.WatchedAttributes.GetInt("LevelUP_Level_Bow", 0))}");
629629
}
630630
}
631631
#endregion
@@ -640,7 +640,7 @@ public static void OnHeldInteractSpearStop(float secondsUsed, ItemSlot slot, Ent
640640
// Setting new aim accuracy
641641
byEntity.Attributes.SetFloat("aimingAccuracy", Configuration.SpearGetAimAccuracyByLevel(byEntity.WatchedAttributes.GetInt("LevelUP_Level_Spear", 0)));
642642
if (Configuration.enableExtendedLog)
643-
Debug.Log($"Bow: ${Configuration.SpearGetAimAccuracyByLevel(byEntity.WatchedAttributes.GetInt("LevelUP_Level_Spear", 0))}");
643+
Debug.Log($"Spear Accuracy: {Configuration.SpearGetAimAccuracyByLevel(byEntity.WatchedAttributes.GetInt("LevelUP_Level_Spear", 0))}");
644644
}
645645
}
646646
#endregion

0 commit comments

Comments
 (0)