mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/PacketIO: Updated auction packets to newer build
This commit is contained in:
@@ -669,7 +669,7 @@ void WorldSession::HandleAuctionListItems(WorldPackets::AuctionHouse::AuctionBro
|
||||
}
|
||||
|
||||
auctionHouse->BuildListAuctionItems(result, _player, wsearchedname, browseQuery.Offset, browseQuery.MinLevel, browseQuery.MaxLevel,
|
||||
static_cast<AuctionHouseFilterMask>(browseQuery.Filters), classFilters);
|
||||
browseQuery.Filters, classFilters);
|
||||
|
||||
result.DesiredDelay = sWorld->getIntConfig(CONFIG_AUCTION_SEARCH_DELAY);
|
||||
SendPacket(result.Write());
|
||||
|
||||
@@ -255,7 +255,7 @@ void AuctionBrowseQuery::Read()
|
||||
_worldPacket >> Offset;
|
||||
_worldPacket >> MinLevel;
|
||||
_worldPacket >> MaxLevel;
|
||||
_worldPacket >> Filters;
|
||||
Filters = _worldPacket.read<AuctionHouseFilterMask, uint32>();
|
||||
KnownPets.resize(_worldPacket.read<uint32>());
|
||||
_worldPacket >> MaxPetLevel;
|
||||
for (uint8& knownPetMask : KnownPets)
|
||||
@@ -331,7 +331,7 @@ void AuctionListItemsByBucketKey::Read()
|
||||
{
|
||||
_worldPacket >> Auctioneer;
|
||||
_worldPacket >> Offset;
|
||||
_worldPacket >> Unk;
|
||||
_worldPacket >> Unknown830;
|
||||
|
||||
if (_worldPacket.ReadBit())
|
||||
TaintedBy.emplace();
|
||||
@@ -525,6 +525,7 @@ WorldPacket const* AuctionCommandResult::Write()
|
||||
_worldPacket << Guid;
|
||||
_worldPacket << uint64(MinIncrement);
|
||||
_worldPacket << uint64(Money);
|
||||
_worldPacket << uint32(DesiredDelay);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
struct AuctionEntry;
|
||||
enum class AuctionHouseSortOrder : uint8;
|
||||
enum class AuctionHouseFilterMask : uint32;
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
@@ -140,7 +141,7 @@ namespace WorldPackets
|
||||
uint32 Offset = 0;
|
||||
uint8 MinLevel = 1;
|
||||
uint8 MaxLevel = MAX_LEVEL;
|
||||
uint32 Filters = 0;
|
||||
AuctionHouseFilterMask Filters = AuctionHouseFilterMask(0);
|
||||
Array<uint8, BATTLE_PET_SPECIES_MAX_ID / 8 + 1> KnownPets;
|
||||
int8 MaxPetLevel = 0;
|
||||
Optional<Addon::AddOnInfo> TaintedBy;
|
||||
@@ -206,7 +207,7 @@ namespace WorldPackets
|
||||
|
||||
ObjectGuid Auctioneer;
|
||||
uint32 Offset = 0;
|
||||
int8 Unk = 0;
|
||||
int8 Unknown830 = 0;
|
||||
Optional<Addon::AddOnInfo> TaintedBy;
|
||||
Array<AuctionSortDef, 2> Sorts;
|
||||
AuctionBucketKey BucketKey;
|
||||
@@ -235,7 +236,6 @@ namespace WorldPackets
|
||||
void Read() override;
|
||||
|
||||
ObjectGuid Auctioneer;
|
||||
uint32 Offset = 0;
|
||||
Optional<Addon::AddOnInfo> TaintedBy;
|
||||
Array<AuctionBucketKey, 100> BucketKeys;
|
||||
Array<AuctionSortDef, 2> Sorts;
|
||||
@@ -382,6 +382,7 @@ namespace WorldPackets
|
||||
ObjectGuid Guid; ///< the GUID of the bidder for this auction.
|
||||
uint64 MinIncrement = 0; ///< the sum of outbid is (1% of current bid) * 5, if the bid is too small, then this value is 1 copper.
|
||||
uint64 Money = 0; ///< the amount of money that the player bid in copper
|
||||
uint32 DesiredDelay = 0;
|
||||
};
|
||||
|
||||
class AuctionCommodityPriceUpdate final : public ServerPacket
|
||||
|
||||
@@ -427,23 +427,24 @@ class TC_SHARED_API ByteBuffer
|
||||
_rpos += skip;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, typename Underlying = T>
|
||||
T read()
|
||||
{
|
||||
ResetBitPos();
|
||||
T r = read<T>(_rpos);
|
||||
_rpos += sizeof(T);
|
||||
T r = read<T, Underlying>(_rpos);
|
||||
_rpos += sizeof(Underlying);
|
||||
return r;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, typename Underlying = T>
|
||||
T read(size_t pos) const
|
||||
{
|
||||
if (pos + sizeof(T) > size())
|
||||
throw ByteBufferPositionException(pos, sizeof(T), size());
|
||||
T val = *((T const*)&_storage[pos]);
|
||||
if (pos + sizeof(Underlying) > size())
|
||||
throw ByteBufferPositionException(pos, sizeof(Underlying), size());
|
||||
Underlying val;
|
||||
std::memcpy(&val, &_storage[pos], sizeof(Underlying));
|
||||
EndianConvert(val);
|
||||
return val;
|
||||
return static_cast<T>(val);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
||||
Reference in New Issue
Block a user