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:
hondacrx
2021-02-15 14:14:15 -05:00
parent 67210c06fa
commit ed7eff2abe
2 changed files with 14 additions and 7 deletions
+6 -4
View File
@@ -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;