From 446d819ebaa19961273208182a4837b2dfba1a5d Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 3 Feb 2024 13:50:09 -0500 Subject: [PATCH] Scripts/Conditions: Fallback to other targets to get map if first target is invalid * fixes crash in Ulduar when reaching Assembly of Iron / Kologarn / Algalon area Port From (https://github.com/TrinityCore/TrinityCore/commit/b1c5e3809ca92ba6f172fefd9711788a7b2a8df8) --- Source/Game/Conditions/Condition.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Game/Conditions/Condition.cs b/Source/Game/Conditions/Condition.cs index 3fd6c316f..8c0506764 100644 --- a/Source/Game/Conditions/Condition.cs +++ b/Source/Game/Conditions/Condition.cs @@ -666,7 +666,14 @@ namespace Game.Conditions mConditionTargets[0] = target0; mConditionTargets[1] = target1; mConditionTargets[2] = target2; - mConditionMap = target0 != null ? target0.GetMap() : null; + if (target0 != null) + mConditionMap = target0.GetMap(); + else if (target1 != null) + mConditionMap = target1.GetMap(); + else if (target2 != null) + mConditionMap = target2.GetMap(); + else + mConditionMap = null; mLastFailedCondition = null; }