Skip to content

Commit

Permalink
fix(Core/Player): Prevent exploit to loot items that are already looted
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitzunu and Jildor committed Feb 2, 2021
1 parent 0d52b4c commit 8376bba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25362,16 +25362,16 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot)

LootItem* item = loot->LootItemInSlot(lootSlot, this, &qitem, &ffaitem, &conditem);

if (!item)
if (!item || item->is_looted)
{
SendEquipError(EQUIP_ERR_ALREADY_LOOTED, NULL, nullptr);
SendEquipError(EQUIP_ERR_ALREADY_LOOTED, nullptr, nullptr);
return;
}

// Xinef: exploit protection, dont allow to loot normal items if player is not master loot
// Xinef: only quest, ffa and conditioned items
if (!IS_ITEM_GUID(GetLootGUID()) && GetGroup() && GetGroup()->GetLootMethod() == MASTER_LOOT && GetGUID() != GetGroup()->GetMasterLooterGuid())
if (qitem == NULL && ffaitem == NULL && conditem == nullptr)
if (qitem == nullptr && ffaitem == nullptr && conditem == nullptr)
{
SendLootRelease(GetLootGUID());
return;
Expand Down

0 comments on commit 8376bba

Please sign in to comment.