mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[11007] Implement use personal loot slot types that fix problems with some loot cases.
For example it fix looting 43016. Also use enum and clarify uses diff loot slot types.
This commit is contained in:
parent
5e74d1e425
commit
f7d49a4254
4 changed files with 43 additions and 8 deletions
|
|
@ -7954,6 +7954,8 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
|||
return;
|
||||
}
|
||||
|
||||
permission = OWNER_PERMISSION;
|
||||
|
||||
loot = &item->loot;
|
||||
|
||||
if (!item->HasGeneratedLoot())
|
||||
|
|
@ -8009,6 +8011,8 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
|||
|
||||
if (bones->lootRecipient != this)
|
||||
permission = NONE_PERMISSION;
|
||||
else
|
||||
permission = OWNER_PERMISSION;
|
||||
break;
|
||||
}
|
||||
case HIGHGUID_UNIT:
|
||||
|
|
@ -8044,6 +8048,7 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
|||
const uint32 a = urand(0, creature->getLevel()/2);
|
||||
const uint32 b = urand(0, getLevel()/2);
|
||||
loot->gold = uint32(10 * (a + b) * sWorld.getConfig(CONFIG_FLOAT_RATE_DROP_MONEY));
|
||||
permission = OWNER_PERMISSION;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -8106,6 +8111,8 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
|||
// let reopen skinning loot if will closed.
|
||||
if (!loot->empty())
|
||||
creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
|
||||
permission = OWNER_PERMISSION;
|
||||
}
|
||||
}
|
||||
// set group rights only for loot_type != LOOT_SKINNING
|
||||
|
|
@ -8131,7 +8138,7 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
|||
permission = NONE_PERMISSION;
|
||||
}
|
||||
else if (recipient == this)
|
||||
permission = ALL_PERMISSION;
|
||||
permission = OWNER_PERMISSION;
|
||||
else
|
||||
permission = NONE_PERMISSION;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue