本文整理汇总了C#中WowPacketParser.Misc.Packet.StartBitStream方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.StartBitStream方法的具体用法?C# Packet.StartBitStream怎么用?C# Packet.StartBitStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WowPacketParser.Misc.Packet
的用法示例。
在下文中一共展示了Packet.StartBitStream方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleGuildAchievementData
public static void HandleGuildAchievementData(Packet packet)
{
var count = packet.ReadBits("Criteria count", 20);
var guid = new byte[count][];
for (var i = 0; i < count; ++i)
{
guid[i] = new byte[8];
packet.StartBitStream(guid[i], 3, 5, 4, 7, 2, 1, 0, 6);
}
for (var i = 0; i < count; ++i)
{
packet.ReadXORByte(guid[i], 2);
packet.ReadXORByte(guid[i], 7);
packet.ReadInt32("Unk 1", i);
packet.ReadXORByte(guid[i], 5);
packet.ReadXORByte(guid[i], 3);
packet.ReadXORByte(guid[i], 1);
packet.ReadInt32<AchievementId>("Achievement Id", i);
packet.ReadXORByte(guid[i], 6);
packet.ReadInt32("Unk 2", i);
packet.ReadXORByte(guid[i], 4);
packet.ReadXORByte(guid[i], 0);
packet.ReadPackedTime("Time", i);
packet.WriteGuid("Guid", guid[i], i);
}
}
示例2: 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);
}
示例3: 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");
}
示例4: HandleItemEnchantTimeUpdate
public static void HandleItemEnchantTimeUpdate(Packet packet)
{
var itemGuid = new byte[8];
var playerGuid = new byte[8];
packet.StartBitStream(itemGuid, 2, 4);
playerGuid[4] = packet.ReadBit();
itemGuid[5] = packet.ReadBit();
packet.StartBitStream(playerGuid, 3, 5);
packet.StartBitStream(itemGuid, 7, 0, 6);
packet.StartBitStream(playerGuid, 6, 2, 0, 1);
itemGuid[1] = packet.ReadBit();
playerGuid[7] = packet.ReadBit();
itemGuid[3] = packet.ReadBit();
packet.ResetBitReader();
packet.ReadXORBytes(playerGuid, 1, 7);
packet.ReadXORBytes(itemGuid, 4, 7);
packet.ReadXORByte(playerGuid, 5);
packet.ReadXORBytes(itemGuid, 1, 2);
packet.ReadXORBytes(playerGuid, 4, 2, 0);
packet.ReadXORBytes(itemGuid, 0, 5);
packet.ReadUInt32("Duration");
packet.ReadUInt32("Slot");
packet.ReadXORByte(playerGuid, 3);
packet.ReadXORBytes(itemGuid, 3, 6);
packet.ReadXORByte(playerGuid, 6);
packet.WriteGuid("Player GUID", playerGuid);
packet.WriteGuid("Item GUID", itemGuid);
}
示例5: HandleEquipmentSetList
public static void HandleEquipmentSetList(Packet packet)
{
var count = packet.ReadBits("Count", 19);
var guid1 = new byte[count][][];
var guid2 = new byte[count][];
var bits0 = new uint[count];
var bits4 = new uint[count];
for (var i = 0; i < count; i++)
{
guid1[i] = new byte[NumSlots][];
for (var j = 0; j < NumSlots; j++)
{
guid1[i][j] = new byte[8];
packet.StartBitStream(guid1[i][j], 0, 6, 5, 4, 2, 7, 1, 3);
}
guid2[i] = new byte[8];
packet.StartBitStream(guid2[i], 6, 0, 2, 5);
bits0[i] = packet.ReadBits(8);
guid2[i][3] = packet.ReadBit();
bits4[i] = packet.ReadBits(9);
packet.StartBitStream(guid2[i], 4, 7, 1);
}
for (var i = 0; i < count; i++)
{
for (var j = 0; j < NumSlots; j++)
{
packet.ParseBitStream(guid1[i][j], 4, 6, 3, 5, 0, 2, 1, 7);
packet.WriteGuid("Item GUID", guid1[i][j], i, j);
}
packet.ReadWoWString("Set Name", bits0[i], i);
packet.ReadXORByte(guid2[i], 5);
packet.ReadXORByte(guid2[i], 0);
packet.ReadXORByte(guid2[i], 3);
packet.ReadXORByte(guid2[i], 6);
packet.ReadXORByte(guid2[i], 1);
packet.ReadWoWString("Set Icon", bits4[i], i);
packet.ReadXORByte(guid2[i], 7);
packet.ReadXORByte(guid2[i], 4);
packet.ReadXORByte(guid2[i], 2);
packet.ReadInt32("Index", i);
packet.WriteGuid("GUID", guid2[i], i);
}
}
示例6: HandleClientControlUpdate
public static void HandleClientControlUpdate(Packet packet)
{
var guid = new byte[8];
packet.StartBitStream(guid, 2, 7);
packet.ReadBit("AllowMove");
packet.StartBitStream(guid, 0, 3, 6, 5, 1, 4);
packet.ParseBitStream(guid, 1, 5, 7, 4, 2, 6, 3, 0);
packet.WriteGuid("Guid", guid);
}
示例7: 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);
}
示例8: HandleInitiateTrade
public static void HandleInitiateTrade(Packet packet)
{
var guid = packet.StartBitStream(5, 1, 4, 2, 3, 7, 0, 6);
packet.ParseBitStream(guid, 4, 6, 2, 0, 3, 7, 5, 1);
packet.WriteGuid("Guid", guid);
}
示例9: HandleGameObjectActivateAnimKit
public static void HandleGameObjectActivateAnimKit(Packet packet)
{
var guid = packet.StartBitStream(5, 1, 0, 4, 7, 2, 3, 6);
packet.ParseBitStream(guid, 5, 1, 0, 3, 4, 6, 2, 7);
packet.WriteGuid("Guid", guid);
packet.ReadInt32("Anim");
}
示例10: HandleObjectUpdateFailed510
public static void HandleObjectUpdateFailed510(Packet packet)
{
var guid = packet.StartBitStream(5, 3, 0, 6, 1, 4, 2, 7);
packet.ParseBitStream(guid, 2, 3, 7, 4, 5, 1, 0, 6);
packet.WriteGuid("Guid", guid);
}
示例11: DuelProposed
public static void DuelProposed(Packet packet)
{
var guid = packet.StartBitStream(2, 0, 4, 3, 7, 1, 5, 6);
packet.ParseBitStream(guid, 0, 3, 2, 6, 5, 4, 1, 7);
packet.WriteGuid("Guid", guid);
}
示例12: HandleObjectUpdateFailed
public static void HandleObjectUpdateFailed(Packet packet)
{
var guid = packet.StartBitStream(4, 6, 3, 0, 7, 5, 1, 2);
packet.ParseBitStream(guid, 4, 7, 0, 6, 5, 2, 1, 3);
packet.WriteGuid("Guid", guid);
}
示例13: HandleGOReportUse
public static void HandleGOReportUse(Packet packet)
{
var guid = packet.StartBitStream(7, 0, 3, 2, 1, 6, 5, 4);
packet.ParseBitStream(guid, 1, 3, 5, 4, 6, 7, 2, 0);
packet.WriteGuid("GameObject Guid", guid);
}
示例14: HandleLootMasterList
public static void HandleLootMasterList(Packet packet)
{
var guid = new byte[8];
guid[1] = packet.ReadBit();
var count1 = packet.ReadBits("count1", 24);
guid[5] = packet.ReadBit();
var guid32 = new byte[count1][];
for (var i = 0; i < count1; i++)
guid32[i] = packet.StartBitStream(4, 1, 2, 5, 3, 7, 0, 6);
guid[2] = packet.ReadBit();
guid[0] = packet.ReadBit();
guid[6] = packet.ReadBit();
guid[7] = packet.ReadBit();
guid[3] = packet.ReadBit();
guid[4] = packet.ReadBit();
packet.ParseBitStream(guid, 3, 0, 2);
for (var i = 0; i < count1; i++)
packet.ParseBitStream(guid32[i], 1, 3, 7, 2, 0, 6, 4, 5);
packet.ParseBitStream(guid, 7, 1, 6, 4, 5);
packet.WriteGuid("Guid", guid);
for (var i = 0; i < count1; i++)
{
packet.WriteGuid("Guid32", guid32[i]);
}
}
示例15: HandleAutoStoreLootItem510
public static void HandleAutoStoreLootItem510(Packet packet)
{
var counter = packet.ReadBits("Count", 23);
var guid = new byte[counter][];
for (var i = 0; i < counter; ++i)
{
guid[i] = new byte[8];
packet.StartBitStream(guid[i], 2, 1, 5, 7, 4, 3, 0, 6);
}
packet.ResetBitReader();
for (var i = 0; i < counter; ++i)
{
packet.ReadXORByte(guid[i], 0);
packet.ReadXORByte(guid[i], 3);
packet.ReadByte("Slot", i);
packet.ReadXORByte(guid[i], 7);
packet.ReadXORByte(guid[i], 2);
packet.ReadXORByte(guid[i], 4);
packet.ReadXORByte(guid[i], 1);
packet.ReadXORByte(guid[i], 6);
packet.ReadXORByte(guid[i], 5);
packet.WriteGuid("Looter GUID", guid[i], i);
}
}