当前位置: 首页>>代码示例>>C#>>正文


C# Packet.ParseBitStream方法代码示例

本文整理汇总了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");
            }
        }
开发者ID:nelegalno,项目名称:WowPacketParser,代码行数:27,代码来源:UpdateHandler.cs

示例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");
        }
开发者ID:cyberbrest,项目名称:WowPacketParser,代码行数:25,代码来源:VoidStorageHandler.cs

示例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);
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:33,代码来源:LootHandler.cs

示例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);
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:8,代码来源:CombatHandler.cs

示例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);
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:8,代码来源:UpdateHandler.cs

示例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);
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:8,代码来源:BattlegroundHandler.cs

示例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);
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:9,代码来源:SpellHandler.cs

示例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);
 }
开发者ID:samaelsacred,项目名称:WowPacketParser,代码行数:9,代码来源:MovementHandler.cs

示例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);
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:56,代码来源:LfgHandler.cs

示例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);
 }
开发者ID:samaelsacred,项目名称:WowPacketParser,代码行数:10,代码来源:MovementHandler.cs

示例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);
 }
开发者ID:samaelsacred,项目名称:WowPacketParser,代码行数:10,代码来源:MovementHandler.cs

示例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);
        }
开发者ID:hodobaj,项目名称:StrawberryTools,代码行数:12,代码来源:TestHandler.cs

示例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);
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:14,代码来源:TaxiHandler.cs

示例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);
     }
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:14,代码来源:ArenaHandler.cs

示例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);
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:15,代码来源:AuctionHouseHandler.cs


注:本文中的WowPacketParser.Misc.Packet.ParseBitStream方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。