Core/PacketIO: Update opcodes for 11.0.5
Port From (https://github.com/TrinityCore/TrinityCore/commit/ac7a95b45ca239d91b3daa8e2f77376382b092d2)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -528,8 +528,7 @@ namespace Game
|
|||||||
SendPacket(response);
|
SendPacket(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
[WorldPacketHandler(ClientOpcodes.AuctionRequestFavoriteList)]
|
void SendAuctionFavoriteList()
|
||||||
void HandleAuctionRequestFavoriteList(AuctionRequestFavoriteList requestFavoriteList)
|
|
||||||
{
|
{
|
||||||
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.SEL_CHARACTER_FAVORITE_AUCTIONS);
|
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.SEL_CHARACTER_FAVORITE_AUCTIONS);
|
||||||
stmt.AddValue(0, _player.GetGUID().GetCounter());
|
stmt.AddValue(0, _player.GetGUID().GetCounter());
|
||||||
|
|||||||
@@ -847,6 +847,8 @@ namespace Game
|
|||||||
pCurrChar.SetGuildLevel(0);
|
pCurrChar.SetGuildLevel(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SendAuctionFavoriteList();
|
||||||
|
|
||||||
pCurrChar.GetSession().GetBattlePetMgr().SendJournalLockStatus();
|
pCurrChar.GetSession().GetBattlePetMgr().SendJournalLockStatus();
|
||||||
|
|
||||||
pCurrChar.SendInitialPacketsBeforeAddToMap();
|
pCurrChar.SendInitialPacketsBeforeAddToMap();
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ namespace Game
|
|||||||
|
|
||||||
// TODO: Missing treasure picker implementation
|
// TODO: Missing treasure picker implementation
|
||||||
|
|
||||||
_player.SendPacket(treasurePickerResponse);
|
SendPacket(treasurePickerResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ namespace Game.Networking
|
|||||||
|
|
||||||
public WorldPacket(byte[] data) : base(data)
|
public WorldPacket(byte[] data) : base(data)
|
||||||
{
|
{
|
||||||
opcode = ReadUInt16();
|
opcode = ReadUInt32();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObjectGuid ReadPackedGuid()
|
public ObjectGuid ReadPackedGuid()
|
||||||
|
|||||||
@@ -342,13 +342,6 @@ namespace Game.Networking.Packets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AuctionRequestFavoriteList : ClientPacket
|
|
||||||
{
|
|
||||||
public AuctionRequestFavoriteList(WorldPacket packet) : base(packet) { }
|
|
||||||
|
|
||||||
public override void Read() { }
|
|
||||||
}
|
|
||||||
|
|
||||||
class AuctionSellCommodity : ClientPacket
|
class AuctionSellCommodity : ClientPacket
|
||||||
{
|
{
|
||||||
public ObjectGuid Auctioneer;
|
public ObjectGuid Auctioneer;
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ namespace Game.Networking
|
|||||||
if (packetSize > 0x400 && _worldCrypt.IsInitialized)
|
if (packetSize > 0x400 && _worldCrypt.IsInitialized)
|
||||||
{
|
{
|
||||||
buffer.WriteInt32(packetSize + 2);
|
buffer.WriteInt32(packetSize + 2);
|
||||||
buffer.WriteUInt32(ZLib.adler32(ZLib.adler32(0x9827D8F1, BitConverter.GetBytes((ushort)opcode), 2), data, (uint)packetSize));
|
buffer.WriteUInt32(ZLib.adler32(ZLib.adler32(0x9827D8F1, BitConverter.GetBytes((uint)opcode), 4), data, (uint)packetSize));
|
||||||
|
|
||||||
byte[] compressedData;
|
byte[] compressedData;
|
||||||
uint compressedSize = CompressPacket(data, opcode, out compressedData);
|
uint compressedSize = CompressPacket(data, opcode, out compressedData);
|
||||||
@@ -376,9 +376,9 @@ namespace Game.Networking
|
|||||||
}
|
}
|
||||||
|
|
||||||
buffer = new ByteBuffer();
|
buffer = new ByteBuffer();
|
||||||
buffer.WriteUInt16((ushort)opcode);
|
buffer.WriteUInt32((uint)opcode);
|
||||||
buffer.WriteBytes(data);
|
buffer.WriteBytes(data);
|
||||||
packetSize += 2 /*opcode*/;
|
packetSize += 4 /*opcode*/;
|
||||||
|
|
||||||
data = buffer.GetData();
|
data = buffer.GetData();
|
||||||
|
|
||||||
@@ -401,7 +401,7 @@ namespace Game.Networking
|
|||||||
|
|
||||||
public uint CompressPacket(byte[] data, ServerOpcodes opcode, out byte[] outData)
|
public uint CompressPacket(byte[] data, ServerOpcodes opcode, out byte[] outData)
|
||||||
{
|
{
|
||||||
byte[] uncompressedData = BitConverter.GetBytes((ushort)opcode).Combine(data);
|
byte[] uncompressedData = BitConverter.GetBytes((uint)opcode).Combine(data);
|
||||||
|
|
||||||
uint bufferSize = ZLib.deflateBound(_compressionStream, (uint)data.Length);
|
uint bufferSize = ZLib.deflateBound(_compressionStream, (uint)data.Length);
|
||||||
outData = new byte[bufferSize];
|
outData = new byte[bufferSize];
|
||||||
|
|||||||
Reference in New Issue
Block a user