Core/PacketIO: Update opcodes for 11.0.5

Port From (https://github.com/TrinityCore/TrinityCore/commit/ac7a95b45ca239d91b3daa8e2f77376382b092d2)
This commit is contained in:
Hondacrx
2024-11-11 11:27:06 -05:00
parent 25a716db9e
commit 9ccc3f7e05
7 changed files with 2093 additions and 2100 deletions
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -528,8 +528,7 @@ namespace Game
SendPacket(response);
}
[WorldPacketHandler(ClientOpcodes.AuctionRequestFavoriteList)]
void HandleAuctionRequestFavoriteList(AuctionRequestFavoriteList requestFavoriteList)
void SendAuctionFavoriteList()
{
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.SEL_CHARACTER_FAVORITE_AUCTIONS);
stmt.AddValue(0, _player.GetGUID().GetCounter());
+2
View File
@@ -847,6 +847,8 @@ namespace Game
pCurrChar.SetGuildLevel(0);
}
SendAuctionFavoriteList();
pCurrChar.GetSession().GetBattlePetMgr().SendJournalLockStatus();
pCurrChar.SendInitialPacketsBeforeAddToMap();
+1 -1
View File
@@ -358,7 +358,7 @@ namespace Game
// TODO: Missing treasure picker implementation
_player.SendPacket(treasurePickerResponse);
SendPacket(treasurePickerResponse);
}
}
}
+1 -1
View File
@@ -96,7 +96,7 @@ namespace Game.Networking
public WorldPacket(byte[] data) : base(data)
{
opcode = ReadUInt16();
opcode = ReadUInt32();
}
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
{
public ObjectGuid Auctioneer;
+4 -4
View File
@@ -362,7 +362,7 @@ namespace Game.Networking
if (packetSize > 0x400 && _worldCrypt.IsInitialized)
{
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;
uint compressedSize = CompressPacket(data, opcode, out compressedData);
@@ -376,9 +376,9 @@ namespace Game.Networking
}
buffer = new ByteBuffer();
buffer.WriteUInt16((ushort)opcode);
buffer.WriteUInt32((uint)opcode);
buffer.WriteBytes(data);
packetSize += 2 /*opcode*/;
packetSize += 4 /*opcode*/;
data = buffer.GetData();
@@ -401,7 +401,7 @@ namespace Game.Networking
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);
outData = new byte[bufferSize];