本文整理汇总了C#中WowPacketParser.Misc.Packet.Inflate方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.Inflate方法的具体用法?C# Packet.Inflate怎么用?C# Packet.Inflate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WowPacketParser.Misc.Packet
的用法示例。
在下文中一共展示了Packet.Inflate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleCompressedUpdateObject
public static void HandleCompressedUpdateObject(Packet packet)
{
using (var packet2 = packet.Inflate(packet.ReadInt32()))
{
HandleUpdateObject(packet2);
}
}
示例2: HandleCompressedGuildRoster
public static void HandleCompressedGuildRoster(Packet packet)
{
using (var packet2 = packet.Inflate(packet.ReadInt32()))
{
HandleGuildRoster422(packet2);
}
}
示例3: HandleServerUpdateAccountData
public static void HandleServerUpdateAccountData(Packet packet)
{
var guid = new byte[8];
packet.ReadBitsE<AccountDataType>("Data Type", 3);
packet.StartBitStream(guid, 5, 1, 3, 7, 0, 4, 2, 6);
packet.ReadXORBytes(guid, 3, 1, 5);
var decompCount = packet.ReadInt32();
var compCount = packet.ReadInt32();
var pkt = packet.Inflate(compCount, decompCount, false);
var data = pkt.ReadWoWString(decompCount);
pkt.ClosePacket(false);
packet.AddValue("Account Data", data);
packet.ReadXORBytes(guid, 7, 4, 0, 6, 2);
packet.ReadTime("Login Time");
packet.WriteGuid("GUID", guid);
}
示例4: HandleCompressedGuildRoster
public static void HandleCompressedGuildRoster(Packet packet)
{
using (var packet2 = packet.Inflate(packet.ReadInt32()))
{
if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
HandleGuildRoster422(packet2);
else
HandleGuildRoster406(packet2);
}
}
示例5: ReadUpdateAccountDataBlock
public static void ReadUpdateAccountDataBlock(ref Packet packet)
{
packet.ReadEnum<AccountDataType>("Data Type", TypeCode.Int32);
packet.ReadTime("Login Time");
var decompCount = packet.ReadInt32();
var pkt = packet.Inflate(decompCount, false);
pkt.ReadWoWString("Account Data", decompCount);
pkt.ClosePacket(false);
}
示例6: HandleClientUpdateAccountData
public static void HandleClientUpdateAccountData(Packet packet)
{
packet.ReadTime("Login Time");
var decompCount = packet.ReadInt32();
var compCount = packet.ReadInt32();
var data = packet.Inflate(compCount, decompCount, false).ReadWoWString(decompCount);
packet.WriteLine("Account Data {0}", data);
packet.ReadEnum<AccountDataType>("Data Type", 3);
}
示例7: HandleClientUpdateAccountData
public static void HandleClientUpdateAccountData(Packet packet)
{
var decompCount = packet.ReadInt32();
packet.ReadTime("Login Time");
var compCount = packet.ReadInt32();
var pkt = packet.Inflate(compCount, decompCount, false);
var data = pkt.ReadWoWString(decompCount);
pkt.ClosePacket();
packet.ReadBitsE<AccountDataType>("Data Type", 3);
packet.AddValue("Account Data", data);
}
示例8: HandleServerUpdateAccountData
public static void HandleServerUpdateAccountData(Packet packet)
{
packet.ReadPackedGuid128("Guid");
packet.ReadTime("Time");
var decompCount = packet.ReadInt32();
packet.ResetBitReader();
packet.ReadBitsE<AccountDataType>("Data Type", 3);
var compCount = packet.ReadInt32();
var pkt = packet.Inflate(compCount, decompCount, false);
var data = pkt.ReadWoWString(decompCount);
packet.AddValue("Account Data", data);
}
示例9: ReadUpdateAccountDataBlock
public static void ReadUpdateAccountDataBlock(ref Packet packet)
{
packet.ReadEnum<AccountDataType>("Data Type", TypeCode.Int32);
packet.ReadTime("Login Time");
var decompCount = packet.ReadInt32();
packet = packet.Inflate(decompCount);
var data = packet.ReadBytes(decompCount);
packet.Writer.WriteLine("Account Data: ");
foreach (var b in data)
packet.Writer.Write((char)b);
packet.Writer.WriteLine();
}
示例10: HandleServerUpdateAccountData
public static void HandleServerUpdateAccountData(Packet packet)
{
var guid = new byte[8];
var decompCount = packet.ReadInt32();
var compCount = packet.ReadInt32();
var data = packet.Inflate(compCount, decompCount, false).ReadWoWString(decompCount);
packet.WriteLine("Account Data {0}", data);
packet.ReadTime("Login Time");
guid[7] = packet.ReadBit();
packet.ReadEnum<AccountDataType>("Data Type", 3);
packet.StartBitStream(guid, 3, 6, 1, 5, 0, 4, 2);
packet.ReadXORBytes(guid, 6, 7, 4, 1, 5, 0, 3, 2);
packet.WriteGuid("GUID", guid);
}
示例11: HandleCompressedMoves
public static void HandleCompressedMoves(Packet packet)
{
var pkt = packet.Inflate(packet.ReadInt32());
packet.Writer.WriteLine("{"); // To be able to see what is inside this packet.
packet.Writer.WriteLine();
while (pkt.CanRead())
{
var size = pkt.ReadByte();
var opc = pkt.ReadInt16();
var data = pkt.ReadBytes(size - 2);
var newPacket = new Packet(data, opc, pkt.Time, pkt.Direction, pkt.Number, packet.Writer);
Statistics.Total += 1;
Handler.Parse(newPacket);
}
packet.Writer.WriteLine("}");
packet.ReadToEnd();
}
示例12: HandleGMTicketCreate
public static void HandleGMTicketCreate(Packet packet)
{
packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
packet.ReadVector3("Position");
packet.ReadCString("Text");
packet.ReadUInt32("Need Response");
packet.ReadBoolean("Need GM interaction");
var count = packet.ReadInt32("Count");
for (int i = 0; i < count; i++)
packet.WriteLine("[" + i + "] Sent: " + (packet.Time - packet.ReadTime()).ToFormattedString());
if (count == 0)
packet.ReadInt32("Unk Int32");
else
{
var decompCount = packet.ReadInt32();
packet = packet.Inflate(decompCount);
packet.WriteLine(packet.ReadCString());
}
}
示例13: HandleCompressedMoves
public static void HandleCompressedMoves(Packet packet)
{
var pkt = packet.Inflate(packet.ReadInt32());
packet.Writer.WriteLine("{"); // To be able to see what is inside this packet.
packet.Writer.WriteLine();
while (pkt.CanRead())
{
var size = pkt.ReadByte();
pkt.GetLength();
var opc = pkt.ReadInt16();
size -= 2; // TODO: Should not be needed! Is here because size is by some reason always 2 bits too high
byte[] input = pkt.ReadBytes(size);
var newPacket = new Packet(input, opc, pkt.Time, pkt.Direction, pkt.Number, packet.Writer);
Statistics.Total += 1;
Handler.Parse(newPacket);
}
packet.Writer.WriteLine("}");
packet.ReadToEnd();
}
示例14: HandleCompressedMoves
public static void HandleCompressedMoves(Packet packet)
{
packet.WriteLine("{"); // To be able to see what is inside this packet.
packet.WriteLine();
using (var pkt = packet.Inflate(packet.ReadInt32()))
{
while (pkt.CanRead())
{
var size = pkt.ReadByte();
var opc = pkt.ReadInt16();
var data = pkt.ReadBytes(size - 2);
using (var newPacket = new Packet(data, opc, pkt.Time, pkt.Direction, pkt.Number, packet.Writer, packet.SniffFileInfo))
{
Handler.Parse(newPacket, true);
}
}
}
packet.WriteLine("}");
packet.ReadToEnd();
}
示例15: ReadClientAddonsList
public static void ReadClientAddonsList(ref Packet packet)
{
var decompCount = packet.ReadInt32();
packet = packet.Inflate(decompCount);
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_8_9464))
{
var count = packet.ReadInt32("Addons Count");
_addonCount = count;
for (var i = 0; i < count; i++)
{
packet.ReadCString("Name", i);
packet.ReadBoolean("Enabled", i);
packet.ReadInt32("CRC", i);
packet.ReadInt32("Unk Int32", i);
}
packet.ReadTime("Time");
}
else
{
int count = 0;
while (packet.GetPosition() != packet.GetLength())
{
packet.ReadCString("Name");
packet.ReadBoolean("Enabled");
packet.ReadInt32("CRC");
packet.ReadInt32("Unk Int32");
count++;
}
_addonCount = count;
}
}