mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 08:59:11 +01:00
Core/Loot: Fix Master Loot exploit
Fix Master Loot exploit allowing any online Player to receive loot.
This commit is contained in:
@@ -419,6 +419,13 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData)
|
||||
if (_player->GetLootGUID() != lootguid)
|
||||
return;
|
||||
|
||||
if (!_player->IsInRaidWith(target) || !_player->IsInMap(target))
|
||||
{
|
||||
TC_LOG_INFO("loot", "MasterLootItem: Player %s tried to give an item to ineligible player %s !", GetPlayer()->GetName().c_str(), target->GetName().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loot* loot = NULL;
|
||||
|
||||
if (IS_CRE_OR_VEH_GUID(GetPlayer()->GetLootGUID()))
|
||||
|
||||
Reference in New Issue
Block a user