fix(Core/Player): Prevent exploit to loot items that are already looted
* 586c00fe2e
Co-Authored-By: Gildor <521036+Jildor@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user