Skip to content

Commit

Permalink
修改一个tlv0017
Browse files Browse the repository at this point in the history
  • Loading branch information
luojinfang committed Oct 12, 2018
1 parent 894d179 commit 658486c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions QQ.Framework/Packets/PCTLV/TLV_0017.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ public void Parser_Tlv(QQUser user, BinaryReader buf)
{
var type = buf.BeReadUInt16(); //type
var length = buf.BeReadUInt16(); //length
WSubVer = buf.BeReadUInt16(); //wSubVer
var Reader = new BinaryReader(new MemoryStream(buf.ReadBytes(length)));
WSubVer = Reader.BeReadUInt16(); //wSubVer
if (WSubVer == 0x0001)
{
long timeMillis = buf.BeReadUInt32();
long timeMillis = Reader.BeReadUInt32();
user.TXProtocol.DwServerTime = Util.GetDateTimeFromMillis(timeMillis);
user.TXProtocol.TimeDifference = (uint.MaxValue & timeMillis) - Util.CurrentTimeMillis() / 1000;
user.TXProtocol.DwClientIP = Util.GetIpStringFromBytes(buf.ReadBytes(4));
user.TXProtocol.WClientPort = buf.BeReadUInt16();
buf.BeReadUInt16(); //UNKNOW
user.TXProtocol.DwClientIP = Util.GetIpStringFromBytes(Reader.ReadBytes(4));
user.TXProtocol.WClientPort = Reader.BeReadUInt16();
//buf.BeReadUInt16(); //UNKNOW
}
else
{
Expand Down

0 comments on commit 658486c

Please sign in to comment.