reworked corpse looting perms

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

View file

@ -8077,13 +8077,16 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
return; return;
} }
permission = NONE_PERMISSION;
if (Corpse* bones = ObjectAccessor::GetCorpse(*this, guid)) if (Corpse* bones = ObjectAccessor::GetCorpse(*this, guid))
{ {
if (bones->lootRecipient != this) if (bones->GetOwnerGUID() != GetGUID())
{ {
SendLootError(guid, LOOT_ERROR_DIDNT_KILL); SendLootError(guid, LOOT_ERROR_DIDNT_KILL);
return; return;
} }
permission = OWNER_PERMISSION;
LoadLostCorpseLoot(bones->GetOwnerGUID(), bones->loot); LoadLostCorpseLoot(bones->GetOwnerGUID(), bones->loot);
bones->loot.loot_type = LOOT_CORPSE; 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)); 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) //if (bones->lootRecipient != this)
permission = NONE_PERMISSION; // permission = NONE_PERMISSION;
else //else
permission = OWNER_PERMISSION; // permission = OWNER_PERMISSION;
} }
else else
{ {