diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index f448a9e6d..8ddb5926c 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -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 {