reworked corpse looting perms
This commit is contained in:
parent
9fb81f22c0
commit
0629e81436
1 changed files with 9 additions and 6 deletions
|
|
@ -4616,7 +4616,7 @@ Corpse* Player::CreateCorpse()
|
||||||
if (Bag* b = GetBagByPos(bag))
|
if (Bag* b = GetBagByPos(bag))
|
||||||
{
|
{
|
||||||
insertItem(b);
|
insertItem(b);
|
||||||
|
|
||||||
for (uint32 slot = 0; slot < b->GetBagSize(); ++slot)
|
for (uint32 slot = 0; slot < b->GetBagSize(); ++slot)
|
||||||
{
|
{
|
||||||
if (Item* item = b->GetItemByPos(slot))
|
if (Item* item = b->GetItemByPos(slot))
|
||||||
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue