mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
fix(Core/Loot): Fixed some chests inside dungeons not being bound only to participants. (#10995)
This commit is contained in:
@@ -2546,17 +2546,32 @@ void GameObject::SetLootRecipient(Map* map)
|
||||
bool GameObject::IsLootAllowedFor(Player const* player) const
|
||||
{
|
||||
if (!m_lootRecipient && !m_lootRecipientGroup)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (player->GetGUID() == m_lootRecipient)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (player->HasPendingBind())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// if we dont have a group we arent the recipient
|
||||
// if go doesnt have group bound it means it was solo killed by someone else
|
||||
Group const* playerGroup = player->GetGroup();
|
||||
if (!playerGroup || playerGroup != GetLootRecipientGroup()) // if we dont have a group we arent the recipient
|
||||
return false; // if go doesnt have group bound it means it was solo killed by someone else
|
||||
if (!playerGroup || playerGroup != GetLootRecipientGroup())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!HasAllowedLooter(player->GetGUID()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user