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


C# Packet.ReadXORByte方法代码示例

本文整理汇总了C#中WowPacketParser.Misc.Packet.ReadXORByte方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadXORByte方法的具体用法?C# Packet.ReadXORByte怎么用?C# Packet.ReadXORByte使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WowPacketParser.Misc.Packet的用法示例。


在下文中一共展示了Packet.ReadXORByte方法的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: 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

示例3: HandleVoidStorageContents

        public static void HandleVoidStorageContents(Packet packet)
        {
            var count = packet.ReadBits("Count", 7);

            var id = new byte[count][];
            var guid = new byte[count][];

            for (int i = 0; i < count; ++i)
            {
                id[i] = new byte[8];
                guid[i] = new byte[8];

                guid[i][2] = packet.ReadBit();
                id[i][2] = packet.ReadBit();
                id[i][5] = packet.ReadBit();
                id[i][7] = packet.ReadBit();
                guid[i][0] = packet.ReadBit();
                id[i][3] = packet.ReadBit();
                id[i][1] = packet.ReadBit();
                guid[i][5] = packet.ReadBit();
                id[i][0] = packet.ReadBit();
                guid[i][7] = packet.ReadBit();
                id[i][6] = packet.ReadBit();
                id[i][4] = packet.ReadBit();
                guid[i][4] = packet.ReadBit();
                guid[i][3] = packet.ReadBit();
                guid[i][1] = packet.ReadBit();
                guid[i][6] = packet.ReadBit();
            }

            for (int i = 0; i < count; ++i)
            {
                packet.ReadXORByte(id[i], 4);
                packet.ReadXORByte(guid[i], 2);
                packet.ReadXORByte(guid[i], 3);
                packet.ReadXORByte(guid[i], 1);
                packet.ReadXORByte(guid[i], 4);
                packet.ReadXORByte(guid[i], 0);
                packet.ReadXORByte(id[i], 3);
                packet.ReadXORByte(id[i], 1);
                packet.ReadXORByte(id[i], 6);
                packet.ReadInt32("Item Slot", i);
                packet.ReadInt32("Item Suffix Factor", i);
                packet.ReadXORByte(guid[i], 5);
                packet.ReadXORByte(id[i], 5);
                packet.ReadXORByte(id[i], 2);
                packet.ReadInt32("Item Random Property ID", i);
                packet.ReadXORByte(id[i], 7);
                packet.ReadXORByte(guid[i], 7);
                packet.ReadXORByte(guid[i], 6);
                packet.ReadXORByte(id[i], 0);
                packet.ReadUInt32<ItemId>("Item Entry", i);
                packet.ReadInt32("New Unk", i);
                packet.WriteGuid("Item Id", id[i], i);
                packet.WriteGuid("Item Player Creator Guid", guid[i], i);
            }
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:57,代码来源:VoidStorageHandler.cs

示例4: HandleGuildPlayerSetNote

        public static void HandleGuildPlayerSetNote(Packet packet)
        {
            var playerGUID = new byte[8];

            playerGUID[1]  = packet.ReadBit();
            var noteLength = packet.ReadBits("note length", 8);
            playerGUID[4]  = packet.ReadBit();
            playerGUID[2]  = packet.ReadBit();
            var ispublic   = packet.ReadBit("IsPublic");
            playerGUID[3]  = packet.ReadBit();
            playerGUID[5]  = packet.ReadBit();
            playerGUID[0]  = packet.ReadBit();
            playerGUID[6]  = packet.ReadBit();
            playerGUID[7]  = packet.ReadBit();

            packet.ReadXORByte(playerGUID, 5);
            packet.ReadXORByte(playerGUID, 1);
            packet.ReadXORByte(playerGUID, 6);
            packet.ReadWoWString("note", noteLength);
            packet.ReadXORByte(playerGUID, 0);
            packet.ReadXORByte(playerGUID, 7);
            packet.ReadXORByte(playerGUID, 4);
            packet.ReadXORByte(playerGUID, 3);
            packet.ReadXORByte(playerGUID, 2);

            packet.WriteGuid("Player GUID", playerGUID);
        }
开发者ID:cyberbrest,项目名称:WowPacketParser,代码行数:27,代码来源:GuildHandler.cs

示例5: HandleServerAuctionHello

        public static void HandleServerAuctionHello(Packet packet)
        {
            var guid = new byte[8];

            guid[2] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            packet.ReadBit("Enabled");
            guid[3] = packet.ReadBit();
            guid[5] = packet.ReadBit();

            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 4);
            packet.ReadInt32("AuctionHouse ID");
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 0);

            packet.WriteGuid("Guid", guid);
        }
开发者ID:samaelsacred,项目名称:WowPacketParser,代码行数:26,代码来源:AuctionHouseHandler.cs

示例6: HandlePlaySound

        public static void HandlePlaySound(Packet packet)
        {
            var guid = new byte[8];

            guid[5] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 1);
            var sound = packet.ReadUInt32("Sound Id");
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 0);

            packet.WriteGuid("Guid", guid);

            Storage.Sounds.Add(sound, packet.TimeSpan);
        }
开发者ID:horn,项目名称:WowPacketParser,代码行数:26,代码来源:MiscellaneousHandler.cs

示例7: HandleCorpseQueryResponse

        public static void HandleCorpseQueryResponse(Packet packet)
        {
            var pos = new Vector3();
            var guid = new byte[8];

            guid[4] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            packet.ReadBit("Corpse Found");
            guid[7] = packet.ReadBit();

            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadInt32<MapId>("Map ID");
            pos.X = packet.ReadSingle();
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 5);
            packet.ReadInt32<MapId>("Corpse Map ID");
            packet.ReadXORByte(guid, 7);
            pos.Z = packet.ReadSingle();
            packet.ReadXORByte(guid, 0);
            pos.Y = packet.ReadSingle();

            packet.AddValue("Position", pos);
            packet.WriteGuid("Corpse Low GUID", guid);
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:32,代码来源:CorpseHandler.cs

示例8: HandleGroupAssignment

        public static void HandleGroupAssignment(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadByte("Byte12");
            packet.ReadByte("Byte10");
            guid[0] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            var bit11 = packet.ReadBit();
            guid[4] = packet.ReadBit();
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 0);

            packet.WriteGuid("Guid", guid);
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:26,代码来源:GroupHandler.cs

示例9: HandleGroupAssistantLeader

        public static void HandleGroupAssistantLeader(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadBool("Promote");
            guid[1] = packet.ReadBit();
            var bit11 = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[6] = packet.ReadBit();

            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 0);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 5);

            packet.WriteGuid("Guid", guid);
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:26,代码来源:GroupHandler.cs

示例10: HandleGroupInvite

        public static void HandleGroupInvite(Packet packet)
        {
            var crossRealmGuid = new byte[8];

            packet.ReadInt32("Int114");
            packet.ReadByte("Byte118");
            packet.ReadInt32("Int128");
            crossRealmGuid[7] = packet.ReadBit();
            var realmNameLen = packet.ReadBits(9);
            crossRealmGuid[3] = packet.ReadBit();
            var nameLen = packet.ReadBits(9);
            crossRealmGuid[2] = packet.ReadBit();
            crossRealmGuid[5] = packet.ReadBit();
            crossRealmGuid[4] = packet.ReadBit();
            crossRealmGuid[0] = packet.ReadBit();
            crossRealmGuid[1] = packet.ReadBit();
            crossRealmGuid[6] = packet.ReadBit();

            packet.ReadXORByte(crossRealmGuid, 7);
            packet.ReadXORByte(crossRealmGuid, 6);
            packet.ReadXORByte(crossRealmGuid, 0);
            packet.ReadXORByte(crossRealmGuid, 4);
            packet.ReadWoWString("Name", nameLen);
            packet.ReadXORByte(crossRealmGuid, 1);
            packet.ReadXORByte(crossRealmGuid, 2);
            packet.ReadXORByte(crossRealmGuid, 3);
            packet.ReadWoWString("Realm Name", realmNameLen);
            packet.ReadXORByte(crossRealmGuid, 5);

            packet.WriteGuid("crossRealmGuid", crossRealmGuid);
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:31,代码来源:GroupHandler.cs

示例11: HandleGroupInvite

        public static void HandleGroupInvite(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadInt32("Unk Int32"); // Non-zero in cross realm parties (1383)
            packet.ReadInt32("Unk Int32"); // Always 0
            packet.ReadByte("unk");

            guid[2] = packet.ReadBit();
            var strLen = packet.ReadBits(9);
            guid[0] = packet.ReadBit();

            guid[3] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[1] = packet.ReadBit();

            var nameLen = packet.ReadBits(9);

            packet.ResetBitReader();

            packet.ReadXORByte(guid, 5);
            packet.ReadWoWString("Realm Name", strLen); // Non-empty in cross realm parties
            packet.ReadWoWString("Name", nameLen);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 0);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 7);
            packet.WriteGuid("Guid", guid); // Non-zero in cross realm parties
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:35,代码来源:GroupHandler.cs

示例12: HandleCorpseQueryResponse

        public static void HandleCorpseQueryResponse(Packet packet)
        {
            var pos = new Vector3();
            var guid = new byte[8];

            guid[4] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            packet.ReadBit("Corpse Found");
            guid[7] = packet.ReadBit();

            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
            pos.X = packet.ReadSingle();
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 5);
            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Corpse Map ID");
            packet.ReadXORByte(guid, 7);
            pos.Z = packet.ReadSingle();
            packet.ReadXORByte(guid, 0);
            pos.Y = packet.ReadSingle();

            packet.WriteLine("Position: {0}", pos);
            packet.WriteGuid("Corpse Low GUID", guid);
        }
开发者ID:usernel,项目名称:WowPacketParser,代码行数:32,代码来源:CorpseHandler.cs

示例13: 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

示例14: HandleScenarioProgressUpdate

        public static void HandleScenarioProgressUpdate(Packet packet)
        {
            var guid3 = new byte[8];
            var guid4 = new byte[8];

            var bits28 = 0;

            guid4[7] = packet.ReadBit();
            guid4[0] = packet.ReadBit();
            guid4[4] = packet.ReadBit();
            bits28 = (int)packet.ReadBits(4);
            guid3[3] = packet.ReadBit();
            guid3[4] = packet.ReadBit();
            guid3[0] = packet.ReadBit();
            guid4[6] = packet.ReadBit();
            guid3[2] = packet.ReadBit();
            guid4[3] = packet.ReadBit();
            guid3[7] = packet.ReadBit();
            guid4[5] = packet.ReadBit();
            guid3[6] = packet.ReadBit();
            guid3[5] = packet.ReadBit();
            guid3[1] = packet.ReadBit();
            guid4[2] = packet.ReadBit();
            guid4[1] = packet.ReadBit();
            packet.ReadXORByte(guid4, 5);
            packet.ReadXORByte(guid3, 2);
            packet.ReadXORByte(guid3, 6);
            packet.ReadXORByte(guid4, 4);
            packet.ReadXORByte(guid3, 4);
            packet.ReadXORByte(guid4, 6);
            packet.ReadXORByte(guid3, 3);
            packet.ReadPackedTime("Time");
            packet.ReadXORByte(guid4, 7);
            packet.ReadXORByte(guid3, 5);
            packet.ReadXORByte(guid3, 7);
            packet.ReadXORByte(guid3, 0);
            packet.ReadXORByte(guid4, 1);
            packet.ReadXORByte(guid3, 1);
            packet.ReadXORByte(guid4, 2);
            packet.ReadXORByte(guid4, 3);
            packet.ReadInt32("Int50");
            packet.ReadInt32("Int4C");
            packet.ReadInt32("Criteria ID");
            packet.ReadXORByte(guid4, 0);

            packet.WriteGuid("Guid3", guid3);
            packet.WriteGuid("Guid4", guid4);
        }
开发者ID:usernel,项目名称:WowPacketParser,代码行数:48,代码来源:ScenarioHandler.cs

示例15: HandleQuestgiverAcceptQuest

        public static void HandleQuestgiverAcceptQuest(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadUInt32<QuestId>("Quest ID");
            guid[3] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            packet.ReadBit("bit18");
            guid[5] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[4] = packet.ReadBit();

            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 0);

            packet.WriteGuid("Guid", guid);
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:26,代码来源:QuestHandler.cs


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