From 496ebc2d4fde927ef2ea458376717b30bab9246b Mon Sep 17 00:00:00 2001 From: Xian55 <367101+Xian55@users.noreply.github.com> Date: Sat, 25 Jan 2025 16:08:06 +0100 Subject: [PATCH] Core: Blacklist added logging for PetTarget case. --- Core/GoalsComponent/Blacklist/Blacklist.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Core/GoalsComponent/Blacklist/Blacklist.cs b/Core/GoalsComponent/Blacklist/Blacklist.cs index 4d176abf..c0b044b7 100644 --- a/Core/GoalsComponent/Blacklist/Blacklist.cs +++ b/Core/GoalsComponent/Blacklist/Blacklist.cs @@ -70,6 +70,14 @@ public bool Is() if (playerReader.PetTarget() && source.UnitGuid == playerReader.PetGuid) { + if (lastGuid != source.UnitGuid) + { + LogPetTarget(logger, typeof(T), + source.UnitId, source.UnitGuid, source.UnitName); + + lastGuid = source.UnitGuid; + } + return true; } @@ -240,5 +248,11 @@ public bool Is() Message = "{type} ({id},{guid},{name},{classification}) evade on attack!")] static partial void LogEvade(ILogger logger, Type type, int id, int guid, string name, string classification); + [LoggerMessage( + EventId = 0068, + Level = LogLevel.Warning, + Message = "{type} ({id},{guid},{name}) Pet Target!")] + static partial void LogPetTarget(ILogger logger, Type type, int id, int guid, string name); + #endregion } \ No newline at end of file