From 62119923f26852c8a6e2e8c3450273acf19dd5ae Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 23 Jun 2021 12:15:38 -0400 Subject: [PATCH] Core/Scripts: added null checks to DamageTaken hooks Port From (https://github.com/TrinityCore/TrinityCore/commit/62c571076e5319c07c7222e139dbfc7c8bb4543f) --- Source/Scripts/World/NpcSpecial.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Scripts/World/NpcSpecial.cs b/Source/Scripts/World/NpcSpecial.cs index 8c591a659..da74a8051 100644 --- a/Source/Scripts/World/NpcSpecial.cs +++ b/Source/Scripts/World/NpcSpecial.cs @@ -1559,7 +1559,8 @@ namespace Scripts.World.NpcSpecial public override void DamageTaken(Unit doneBy, ref uint damage) { - _damageTimes[doneBy.GetGUID()] = GameTime.GetGameTime(); + if (doneBy != null) + _damageTimes[doneBy.GetGUID()] = GameTime.GetGameTime(); damage = 0; }