fix(Core/Packets): sending item's random property in a few packets (#6193)

- Closes #4843
This commit is contained in:
UltraNix
2021-06-15 12:37:58 +02:00
committed by GitHub
parent 34da0cda51
commit 0d96866cea
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -26832,7 +26832,7 @@ void Player::BuildEnchantmentsInfoData(WorldPacket* data)
data->put<uint16>(enchantmentMaskPos, enchantmentMask); data->put<uint16>(enchantmentMaskPos, enchantmentMask);
*data << uint16(item->GetItemRandomPropertyId()); // item random property id *data << int16(item->GetItemRandomPropertyId()); // item random property id
*data << item->GetGuidValue(ITEM_FIELD_CREATOR).WriteAsPacked(); // item creator *data << item->GetGuidValue(ITEM_FIELD_CREATOR).WriteAsPacked(); // item creator
*data << uint32(item->GetItemSuffixFactor()); // item suffix factor *data << uint32(item->GetItemSuffixFactor()); // item suffix factor
} }
+3 -3
View File
@@ -472,13 +472,13 @@ bool Guild::BankTab::WriteSlotPacket(WorldPacket& data, uint8 slotId, bool ignor
{ {
data << uint32(0); // 3.3.0 (0x00018020, 0x00018000) data << uint32(0); // 3.3.0 (0x00018020, 0x00018000)
if (uint32 random = pItem->GetItemRandomPropertyId()) if (int32 random = pItem->GetItemRandomPropertyId())
{ {
data << uint32(random); // Random item property id data << int32(random); // Random item property id
data << uint32(pItem->GetItemSuffixFactor()); // SuffixFactor data << uint32(pItem->GetItemSuffixFactor()); // SuffixFactor
} }
else else
data << uint32(0); data << int32(0);
data << uint32(pItem->GetCount()); // ITEM_FIELD_STACK_COUNT data << uint32(pItem->GetCount()); // ITEM_FIELD_STACK_COUNT
data << uint32(0); data << uint32(0);
+1 -1
View File
@@ -105,7 +105,7 @@ void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
data << item->GetGuidValue(ITEM_FIELD_CREATOR); data << item->GetGuidValue(ITEM_FIELD_CREATOR);
data << uint32(item->GetSpellCharges()); // charges data << uint32(item->GetSpellCharges()); // charges
data << uint32(item->GetItemSuffixFactor()); // SuffixFactor data << uint32(item->GetItemSuffixFactor()); // SuffixFactor
data << uint32(item->GetItemRandomPropertyId());// random properties id data << int32(item->GetItemRandomPropertyId()); // random properties id
data << uint32(item->GetTemplate()->LockID); // lock id data << uint32(item->GetTemplate()->LockID); // lock id
// max durability // max durability
data << uint32(item->GetUInt32Value(ITEM_FIELD_MAXDURABILITY)); data << uint32(item->GetUInt32Value(ITEM_FIELD_MAXDURABILITY));