Core/Loot: Enable setting AcquireReason, correct LootMethod definition, fix structure to match sniffs of retail and correct threashold and reason definitions.
This commit is contained in:
@@ -8744,12 +8744,26 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
||||
|
||||
if (permission != NONE_PERMISSION)
|
||||
{
|
||||
LootMethod _lootMethod = FREE_FOR_ALL;
|
||||
if (Group* group = GetGroup())
|
||||
{
|
||||
if (Creature* creature = GetMap()->GetCreature(guid))
|
||||
{
|
||||
if (Player* recipient = creature->GetLootRecipient())
|
||||
{
|
||||
if (group == recipient->GetGroup())
|
||||
_lootMethod = group->GetLootMethod();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SetLootGUID(guid);
|
||||
|
||||
WorldPackets::Loot::LootResponse packet;
|
||||
packet.LootObj = guid;
|
||||
packet.Owner = loot->GetGUID();
|
||||
packet.LootMethod = loot_type;
|
||||
packet.LootMethod = _lootMethod;
|
||||
packet.AcquireReason = loot_type;
|
||||
if (!GetGroup())
|
||||
packet.PersonalLooting = true;
|
||||
else
|
||||
|
||||
@@ -26,10 +26,10 @@ WorldPacket const* WorldPackets::Loot::LootResponse::Write()
|
||||
{
|
||||
_worldPacket << LootObj;
|
||||
_worldPacket << Owner;
|
||||
_worldPacket << Threshold;
|
||||
_worldPacket << LootMethod;
|
||||
_worldPacket << AcquireReason;
|
||||
_worldPacket << FailureReason;
|
||||
_worldPacket << AcquireReason;
|
||||
_worldPacket << LootMethod;
|
||||
_worldPacket << Threshold;
|
||||
_worldPacket << Coins;
|
||||
_worldPacket << uint32(Items.size());
|
||||
_worldPacket << uint32(Currencies.size());
|
||||
|
||||
@@ -64,10 +64,10 @@ namespace WorldPackets
|
||||
|
||||
ObjectGuid LootObj;
|
||||
ObjectGuid Owner;
|
||||
uint8 Threshold = 17; // Most common value
|
||||
uint8 LootMethod = 0;
|
||||
uint8 AcquireReason = 0;
|
||||
uint8 FailureReason = 2; // Most common value
|
||||
uint8 Threshold = 2; // Most common value
|
||||
uint8 LootMethod = 0;
|
||||
uint8 AcquireReason = 0;
|
||||
uint8 FailureReason = 17; // Most common value
|
||||
uint32 Coins = 0;
|
||||
std::vector<LootItem> Items;
|
||||
std::vector<LootCurrency> Currencies;
|
||||
|
||||
Reference in New Issue
Block a user