Core/Loot: Fix Master Loot exploit

Fix Master Loot exploit allowing any online Player to receive loot.
This commit is contained in:
jackpoz
2014-01-01 21:42:15 +01:00
parent e773c9a693
commit 82181a8622

View File

@@ -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()))