當前位置: 首頁>>代碼示例>>C#>>正文


C# Packet.StartBitStream方法代碼示例

本文整理匯總了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);
            }
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:29,代碼來源:GuildHandler.cs

示例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);
        }
開發者ID:ChipLeo,項目名稱:WowPacketParser,代碼行數:33,代碼來源:LootHandler.cs

示例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");
        }
開發者ID:cyberbrest,項目名稱:WowPacketParser,代碼行數:25,代碼來源:VoidStorageHandler.cs

示例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);
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:30,代碼來源:ItemHandler.cs

示例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);
            }
        }
開發者ID:samaelsacred,項目名稱:WowPacketParser,代碼行數:54,代碼來源:EquipmentSetHandler.cs

示例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);
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:11,代碼來源:MovementHandler.cs

示例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);
        }
開發者ID:ChipLeo,項目名稱:WowPacketParser,代碼行數:14,代碼來源:TaxiHandler.cs

示例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);
        }
開發者ID:ChipLeo,項目名稱:WowPacketParser,代碼行數:7,代碼來源:TradeHandler.cs

示例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");
 }
開發者ID:TrinityCore,項目名稱:WowPacketParser,代碼行數:7,代碼來源:GameObjectHandler.cs

示例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);
        }
開發者ID:Nihilianth,項目名稱:WowPacketParser,代碼行數:7,代碼來源:UpdateHandler.cs

示例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);
        }
開發者ID:Nihilianth,項目名稱:WowPacketParser,代碼行數:7,代碼來源:CharacterHandler.cs

示例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);
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:7,代碼來源:UpdateHandler.cs

示例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);
        }
開發者ID:samaelsacred,項目名稱:WowPacketParser,代碼行數:7,代碼來源:GameObjectHandler.cs

示例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]);
            }
        }
開發者ID:samaelsacred,項目名稱:WowPacketParser,代碼行數:33,代碼來源:LootHandler.cs

示例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);
            }
        }
開發者ID:usernel,項目名稱:WowPacketParser,代碼行數:29,代碼來源:ItemHandler.cs


注:本文中的WowPacketParser.Misc.Packet.StartBitStream方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。