mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +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:
@@ -1047,6 +1047,12 @@ public:
|
||||
[[nodiscard]] virtual float GetCollisionWidth() const { return GetObjectSize(); }
|
||||
[[nodiscard]] virtual float GetCollisionRadius() const { return GetObjectSize() / 2; }
|
||||
|
||||
void AddAllowedLooter(ObjectGuid guid);
|
||||
void ResetAllowedLooters();
|
||||
void SetAllowedLooters(GuidUnorderedSet const looters);
|
||||
[[nodiscard]] bool HasAllowedLooter(ObjectGuid guid) const;
|
||||
[[nodiscard]] GuidUnorderedSet const& GetAllowedLooters() const;
|
||||
|
||||
protected:
|
||||
std::string m_name;
|
||||
bool m_isActive;
|
||||
@@ -1091,6 +1097,8 @@ private:
|
||||
bool CanDetectInvisibilityOf(WorldObject const* obj) const;
|
||||
//bool CanDetectStealthOf(WorldObject const* obj) const;
|
||||
bool CanDetectStealthOf(WorldObject const* obj, bool checkAlert = false) const;
|
||||
|
||||
GuidUnorderedSet _allowedLooters;
|
||||
};
|
||||
|
||||
namespace Acore
|
||||
|
||||
Reference in New Issue
Block a user