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)
This commit is contained in:
@@ -666,7 +666,14 @@ namespace Game.Conditions
|
|||||||
mConditionTargets[0] = target0;
|
mConditionTargets[0] = target0;
|
||||||
mConditionTargets[1] = target1;
|
mConditionTargets[1] = target1;
|
||||||
mConditionTargets[2] = target2;
|
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;
|
mLastFailedCondition = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user