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

Closes #29829
This commit is contained in:
Shauren
2024-03-24 00:26:15 +01:00
parent 6cd4607a65
commit 303dbd3393

View File

@@ -73,6 +73,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)