Skip to content

Commit

Permalink
Pass map to condition check from loot manager.
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkosrb committed Dec 2, 2023
1 parent 9d7cf55 commit 5d22524
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/game/LootMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,12 @@ bool LootStoreItem::AllowedForTeam(Loot const& loot) const

// Check non-player dependant conditions
if (ConditionEntry::CanBeUsedWithoutPlayer(conditionId))
if (!condition->Meets(nullptr, nullptr, loot.GetLootTarget(), CONDITION_FROM_LOOT))
{
WorldObject const* source = loot.GetLootTarget();
Map const* map = source ? source->FindMap() : nullptr;
if (!condition->Meets(nullptr, map, source, CONDITION_FROM_LOOT))
return false;
}
}

return true;
Expand Down

0 comments on commit 5d22524

Please sign in to comment.