mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
fix(Core/Loot): (#7452)
- Players that did not participate in killing dungeon boss are not eligible to get loot. - Players that are too far away from the looted object are not eligible to get loot. - Players that released spirit and were outside the dungeon when the loot has been released are eligible to get loot. - Players that have pending bind are not eligible to get loot. - Properly get loot recipient for some chests in dungeons. - All above fixes should work in any loot mode (group loot, master loot, etc.) - Closes #2104.
This commit is contained in:
@@ -3036,3 +3036,33 @@ float WorldObject::GetFloorZ() const
|
||||
|
||||
return std::max<float>(m_staticFloorZ, GetMap()->GetGameObjectFloor(GetPhaseMask(), GetPositionX(), GetPositionY(), GetPositionZ() + std::max(GetCollisionHeight(), Z_OFFSET_FIND_HEIGHT)));
|
||||
}
|
||||
|
||||
void WorldObject::AddAllowedLooter(ObjectGuid guid)
|
||||
{
|
||||
_allowedLooters.insert(guid);
|
||||
}
|
||||
|
||||
void WorldObject::SetAllowedLooters(GuidUnorderedSet const looters)
|
||||
{
|
||||
_allowedLooters = looters;
|
||||
}
|
||||
|
||||
void WorldObject::ResetAllowedLooters()
|
||||
{
|
||||
_allowedLooters.clear();
|
||||
}
|
||||
|
||||
bool WorldObject::HasAllowedLooter(ObjectGuid guid) const
|
||||
{
|
||||
if (_allowedLooters.empty())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return _allowedLooters.find(guid) != _allowedLooters.end();
|
||||
}
|
||||
|
||||
GuidUnorderedSet const& WorldObject::GetAllowedLooters() const
|
||||
{
|
||||
return _allowedLooters;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user