本文整理汇总了C#中WowPacketParser.Misc.Packet.ParseBitStream方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ParseBitStream方法的具体用法?C# Packet.ParseBitStream怎么用?C# Packet.ParseBitStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WowPacketParser.Misc.Packet
的用法示例。
在下文中一共展示了Packet.ParseBitStream方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleDestroyObject
public static void HandleDestroyObject(Packet packet)
{
if (packet.Direction == Direction.ServerToClient)
{
var guid = new byte[8];
guid[3] = packet.ReadBit();
guid[2] = packet.ReadBit();
guid[4] = packet.ReadBit();
guid[1] = packet.ReadBit();
packet.ReadBit("Despawn Animation");
guid[7] = packet.ReadBit();
guid[0] = packet.ReadBit();
guid[6] = packet.ReadBit();
guid[5] = packet.ReadBit();
packet.ParseBitStream(guid, 0, 4, 7, 2, 6, 3, 1, 5);
packet.WriteGuid("Object Guid", guid);
}
else
{
packet.WriteLine(" : CMSG_PVP_LOG_DATA");
}
}
示例2: HandleVoidItemSwapResponse
public static void HandleVoidItemSwapResponse(Packet packet)
{
packet.ReadBit("Has Src Item id (Inv)");
byte[] itemId2 = packet.StartBitStream(4, 1, 6, 0, 3, 7, 2, 5);
packet.ReadBit("Has Dest Item id (Inv)");
byte[] itemId1 = itemId1 = packet.StartBitStream(6, 0, 3, 2, 1, 5, 7, 4);
var usedSrcSlot = !packet.ReadBit("Used Src Slot (Inv)"); // always set?
var usedDestSlot = !packet.ReadBit("Used Dest Slot (Inv)");
packet.ParseBitStream(itemId1, 3, 7, 2, 5, 0, 1, 4, 6);
packet.WriteGuid("Dest Item Id", itemId1);
packet.ParseBitStream(itemId2, 0, 2, 7, 5, 6, 4, 3, 1);
packet.WriteGuid("Src Item Id", itemId2);
if (usedSrcSlot)
packet.ReadInt32("New Slot for Src Item");
if (usedDestSlot)
packet.ReadInt32("New Slot for Dest Item");
}
示例3: HandleLootList
public static void HandleLootList(Packet packet)
{
var guid48 = new byte[8];
guid48[5] = packet.ReadBit();
var unk24 = packet.ReadBit("unk24"); // 24
var guid16 = new byte[8];
if (unk24)
guid16 = packet.StartBitStream(4, 6, 0, 7, 5, 2, 3, 1);
guid48[1] = packet.ReadBit();
var unk40 = packet.ReadBit("unk40"); // 40
guid48[4] = packet.ReadBit();
guid48[3] = packet.ReadBit();
guid48[2] = packet.ReadBit();
var guid32 = new byte[8];
if (unk40)
guid32 = packet.StartBitStream(2, 3, 4, 5, 6, 0, 1, 7);
guid48[7] = packet.ReadBit();
guid48[0] = packet.ReadBit();
guid48[6] = packet.ReadBit();
if (unk40)
{
packet.ParseBitStream(guid32, 7, 1, 0, 6, 5, 3, 4, 2);
packet.WriteGuid("guid32", guid32);
}
if (unk24)
{
packet.ParseBitStream(guid16, 4, 5, 6, 3, 2, 7, 0, 1);
packet.WriteGuid("guid16", guid16);
}
packet.ParseBitStream(guid48, 5, 1, 6, 2, 3, 0, 7, 4);
packet.WriteGuid("guid48", guid48);
}
示例4: HandleAIReaction
public static void HandleAIReaction(Packet packet)
{
var guid = packet.StartBitStream(5, 7, 0, 4, 6, 2, 3, 1);
packet.ParseBitStream(guid, 4, 6, 5);
packet.ReadInt32E<AIReaction>("Reaction");
packet.ParseBitStream(guid, 7, 1, 2, 0, 3);
packet.WriteGuid("Guid", guid);
}
示例5: HandleHealthUpdate
public static void HandleHealthUpdate(Packet packet)
{
var guid = packet.StartBitStream(4, 3, 0, 2, 7, 5, 1, 6);
packet.ParseBitStream(guid, 3, 1, 2, 4, 6);
packet.ReadInt32("Health"); // 96
packet.ParseBitStream(guid, 7, 5, 0);
packet.WriteGuid("Guid", guid);
}
示例6: HandleAreaSpiritHealerTime
public static void HandleAreaSpiritHealerTime(Packet packet)
{
var guid = packet.StartBitStream(5, 2, 7, 6, 1, 0, 3, 4);
packet.ParseBitStream(guid, 2, 3, 5, 4, 6);
packet.ReadInt32("Time");
packet.ParseBitStream(guid, 7, 0, 1);
packet.WriteGuid("Guid", guid);
}
示例7: HandleAuraPointsDepleted
public static void HandleAuraPointsDepleted(Packet packet)
{
var guid = packet.StartBitStream(2, 4, 0, 3, 6, 7, 5, 1);
packet.ParseBitStream(guid, 1, 3, 5);
packet.ReadByte("unk24"); // 24
packet.ParseBitStream(guid, 0, 2, 7, 6, 4);
packet.ReadByte("unk25"); // 25
packet.WriteGuid("Guid", guid);
}
示例8: HandleMovementSetWalkSpeed
public static void HandleMovementSetWalkSpeed(Packet packet)
{
var guid = packet.StartBitStream(1, 0, 6, 3, 5, 4, 7, 2);
packet.ReadSingle("Speed");
packet.ParseBitStream(guid, 6, 1, 5);
packet.ReadInt32("Counter");
packet.ParseBitStream(guid, 2, 4, 3, 0, 7);
packet.WriteGuid("Guid", guid);
}
示例9: HandleLfgJoinResult
public static void HandleLfgJoinResult(Packet packet)
{
var guid = new byte[8];
guid[7] = packet.ReadBit();
guid[6] = packet.ReadBit();
guid[3] = packet.ReadBit();
guid[0] = packet.ReadBit();
var count40 = packet.ReadBits("count40", 22);
var guids = new byte[count40][];
var unk52 = new uint[count40];
for (var i = 0; i < count40; i++)
{
guids[i] = new byte[8];
guids[i][3] = packet.ReadBit();
unk52[i] = packet.ReadBits("unk52", 20, i);
guids[i][6] = packet.ReadBit();
guids[i][1] = packet.ReadBit();
guids[i][4] = packet.ReadBit();
guids[i][7] = packet.ReadBit();
guids[i][2] = packet.ReadBit();
guids[i][0] = packet.ReadBit();
guids[i][5] = packet.ReadBit();
}
guid[5] = packet.ReadBit();
guid[1] = packet.ReadBit();
guid[4] = packet.ReadBit();
guid[2] = packet.ReadBit();
packet.ReadByte("unk56"); // 56
for (var i = 0; i < count40; i++)
{
packet.ParseBitStream(guids[i], 4);
for (var j = 0; j < unk52[i]; j++)
{
packet.ReadInt32("unk68", i); // 68
packet.ReadInt32("unk64", i); // 64
packet.ReadInt32("unk60", i); // 60
packet.ReadInt32("unk56", i); // 56
}
packet.ParseBitStream(guids[i], 1, 0, 5, 7, 3, 6, 2);
packet.WriteGuid("Guids", guids[i], i);
}
packet.ReadByte("unk57"); // 57
packet.ParseBitStream(guid, 2);
packet.ReadInt32("unk32"); // 32
packet.ReadInt32("unk24"); // 24
packet.ReadInt32("unk28"); // 28
packet.ParseBitStream(guid, 6, 4, 1, 0, 5, 7, 3);
packet.WriteGuid("Guid", guid);
}
示例10: HandleMoveSetRunSpeed
public static void HandleMoveSetRunSpeed(Packet packet)
{
var guid = packet.StartBitStream(1, 5, 2, 0, 4, 3, 7, 6);
packet.ParseBitStream(guid, 3, 2, 6, 0);
packet.ReadInt32("Counter");
packet.ReadXORByte(guid, 5);
packet.ReadSingle("Speed");
packet.ParseBitStream(guid, 7, 4, 1);
packet.WriteGuid("Guid", guid);
}
示例11: HandleMoveSetFlightSpeed
public static void HandleMoveSetFlightSpeed(Packet packet)
{
var guid = packet.StartBitStream(2, 1, 6, 5, 7, 3, 0, 4);
packet.ParseBitStream(guid, 7, 4, 3);
packet.ReadInt32("Counter");
packet.ReadXORByte(guid, 5);
packet.ReadSingle("Speed");
packet.ParseBitStream(guid, 6, 2, 0, 1);
packet.WriteGuid("Guid", guid);
}
示例12: Handle13022
public static void Handle13022(Packet packet)
{
var guid = packet.StartBitStream(3, 7, 6, 2, 5, 4, 0, 1);
packet.ParseBitStream(guid, 4, 1, 5, 2);
packet.ReadInt32("Unk Int32");
packet.ParseBitStream(guid, 0, 3, 7, 6);
packet.ToGuid("Unk Guid?", guid);
}
示例13: HandleActivateTaxiExpress
public static void HandleActivateTaxiExpress(Packet packet)
{
var guid = new byte[8];
packet.StartBitStream(guid, 6, 7);
var count = packet.ReadBits("Count", 22);
packet.StartBitStream(guid, 2, 0, 4, 3, 1, 5);
packet.ParseBitStream(guid, 2, 7, 1);
for (var i = 0; i < count; i++)
packet.ReadUInt32("Node", i);
packet.ParseBitStream(guid, 0, 5, 3, 6, 4);
packet.WriteGuid("Guid", guid);
}
示例14: HandleDestroyArenaUnit
public static void HandleDestroyArenaUnit(Packet packet)
{
var count = packet.ReadBits("count", 21);
var guid = new byte[count][];
for (var i = 0; i < count; i++)
guid[i] = packet.StartBitStream(7, 1, 2, 0, 6, 5, 4, 3);
for (var i = 0; i < count; i++)
{
packet.ParseBitStream(guid[i], 0, 7);
packet.ReadInt32("Level", i);
packet.ParseBitStream(guid[i], 2, 5, 3, 6, 1, 4);
packet.WriteGuid("Guid", guid[i], i);
}
}
示例15: HandleAuctionBidderNotification
public static void HandleAuctionBidderNotification(Packet packet)
{
var guid = packet.StartBitStream(5, 4, 7, 6, 0, 1, 2, 3);
packet.ParseBitStream(guid, 7, 3);
packet.ReadUInt32<ItemId>("Item Entry"); // 32
packet.ParseBitStream(guid, 1, 2);
packet.ReadInt32("Location"); // 24
packet.ParseBitStream(guid, 0);
packet.ReadInt32("unk36"); // 36
packet.ParseBitStream(guid, 5, 4, 6);
packet.ReadInt32("unk40"); // 40
packet.ReadInt32("Auction ID"); // 28
packet.WriteGuid("Guid", guid);
}