Core/ClientConfig: Fixes chat window not showing chat, also not saving any config options when you select them, like auto loot, zoom, etc.
This commit is contained in:
@@ -42,15 +42,17 @@ namespace Game
|
||||
return;
|
||||
|
||||
AccountData adata = GetAccountData(request.DataType);
|
||||
if (adata.Data == null)
|
||||
return;
|
||||
|
||||
UpdateAccountData data = new UpdateAccountData();
|
||||
data.Player = GetPlayer() ? GetPlayer().GetGUID() : ObjectGuid.Empty;
|
||||
data.Time = (uint)adata.Time;
|
||||
data.Size = (uint)adata.Data.Length;
|
||||
data.DataType = request.DataType;
|
||||
data.CompressedData = new ByteBuffer(ZLib.Compress(Encoding.UTF8.GetBytes(adata.Data)));
|
||||
|
||||
if (!adata.Data.IsEmpty())
|
||||
{
|
||||
data.Size = (uint)adata.Data.Length;
|
||||
data.CompressedData = new ByteBuffer(ZLib.Compress(Encoding.UTF8.GetBytes(adata.Data)));
|
||||
}
|
||||
|
||||
SendPacket(data);
|
||||
}
|
||||
|
||||
@@ -76,9 +76,14 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(Size);
|
||||
_worldPacket.WriteBits(DataType, 3);
|
||||
|
||||
var bytes = CompressedData.GetData();
|
||||
_worldPacket.WriteInt32(bytes.Length);
|
||||
_worldPacket.WriteBytes(bytes);
|
||||
if (CompressedData == null)
|
||||
_worldPacket.WriteUInt32(0);
|
||||
else
|
||||
{
|
||||
var bytes = CompressedData.GetData();
|
||||
_worldPacket.WriteInt32(bytes.Length);
|
||||
_worldPacket.WriteBytes(bytes);
|
||||
}
|
||||
}
|
||||
|
||||
public ObjectGuid Player;
|
||||
|
||||
Reference in New Issue
Block a user