reworked corpse looting perms

This commit is contained in:
ElderShell 2026-05-02 17:44:13 -06:00
parent 9fb81f22c0
commit 0629e81436

View file

@ -4616,7 +4616,7 @@ Corpse* Player::CreateCorpse()
if (Bag* b = GetBagByPos(bag))
{
insertItem(b);
for (uint32 slot = 0; slot < b->GetBagSize(); ++slot)
{
if (Item* item = b->GetItemByPos(slot))
@ -8077,13 +8077,16 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
return;
}
permission = NONE_PERMISSION;
if (Corpse* bones = ObjectAccessor::GetCorpse(*this, guid))
{
if (bones->lootRecipient != this)
if (bones->GetOwnerGUID() != GetGUID())
{
SendLootError(guid, LOOT_ERROR_DIDNT_KILL);
return;
}
permission = OWNER_PERMISSION;
LoadLostCorpseLoot(bones->GetOwnerGUID(), bones->loot);
bones->loot.loot_type = LOOT_CORPSE;
@ -8103,10 +8106,10 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
bones->loot.gold = uint32(urand(50, 150) * 0.016f * pow(float(pLevel) / 5.76f, 2.5f) * sWorld->getRate(RATE_DROP_MONEY));
}
if (bones->lootRecipient != this)
permission = NONE_PERMISSION;
else
permission = OWNER_PERMISSION;
//if (bones->lootRecipient != this)
// permission = NONE_PERMISSION;
//else
// permission = OWNER_PERMISSION;
}
else
{