Core/Loot: Fixed crashes when generating loot on map that has no MapDifficulty data

Closes #29829

(cherry picked from commit 303dbd3393)
This commit is contained in:
Shauren
2024-03-24 00:26:15 +01:00
committed by funjoker
parent 7239ea65ee
commit 7a6d78c90a

View File

@@ -61,6 +61,9 @@ void Load()
ItemContext GetContextForPlayer(MapDifficultyEntry const* mapDifficulty, Player const* player)
{
if (!mapDifficulty)
return ItemContext::NONE;
auto evalContext = [](ItemContext currentContext, ItemContext newContext)
{
if (newContext == ItemContext::NONE)