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


C# Packet.ReadInt32E方法代码示例

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


在下文中一共展示了Packet.ReadInt32E方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandleContactList

        public static void HandleContactList(Packet packet)
        {
            packet.ReadInt32E<ContactListFlag>("List Flags");
            var count = packet.ReadInt32("Count");

            for (var i = 0; i < count; i++)
            {
                packet.ReadGuid("GUID");
                packet.ReadInt32("Realm Id");
                packet.ReadInt32("Realm Id");
                var flag = packet.ReadInt32E<ContactEntryFlag>("Flags");
                packet.ReadCString("Note");

                if (!flag.HasAnyFlag(ContactEntryFlag.Friend))
                    continue;

                var status = packet.ReadByteE<ContactStatus>("Status");
                if (status == 0) // required any flag
                    continue;

                packet.ReadInt32<AreaId>("Area");
                packet.ReadInt32("Level");
                packet.ReadInt32E<Class>("Class");
            }

            // still needed?
            if (packet.CanRead())
                CoreParsers.WardenHandler.ReadCheatCheckDecryptionBlock(packet);
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:29,代码来源:ContactHandler.cs

示例2: HandleAttackerStateUpdate

        public static void HandleAttackerStateUpdate(Packet packet)
        {
            var hitInfo = packet.ReadInt32E<SpellHitInfo>("HitInfo");
            packet.ReadPackedGuid("AttackerGUID");
            packet.ReadPackedGuid("TargetGUID");
            packet.ReadInt32("Damage");

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_3_9183))
                packet.ReadInt32("OverDamage");

            var subDmgCount = packet.ReadByte();
            for (var i = 0; i < subDmgCount; ++i)
            {
                packet.ReadInt32("SchoolMask", i);
                packet.ReadSingle("Float Damage", i);
                packet.ReadInt32("Int Damage", i);

                if (ClientVersion.RemovedInVersion(ClientVersionBuild.V3_0_3_9183) ||
                    hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_ABSORB | SpellHitInfo.HITINFO_FULL_ABSORB))
                    packet.ReadInt32("Damage Absorbed", i);

                if (ClientVersion.RemovedInVersion(ClientVersionBuild.V3_0_3_9183) ||
                    hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_RESIST | SpellHitInfo.HITINFO_FULL_RESIST))
                    packet.ReadInt32("Damage Resisted", i);
            }

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_3_9183))
                packet.ReadByteE<VictimStates>("VictimState");
            else
                packet.ReadInt32E<VictimStates>("VictimState");

            packet.ReadInt32("Unk Attacker State 0");

            packet.ReadInt32<SpellId>("Melee Spell ID ");

            if (ClientVersion.RemovedInVersion(ClientVersionBuild.V3_0_3_9183) ||
                hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_BLOCK))
                packet.ReadInt32("Block Amount");

            if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_RAGE_GAIN))
                packet.ReadInt32("Rage Gained");

            if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_UNK0))
            {
                packet.ReadInt32("Unk Attacker State 3 1");
                packet.ReadSingle("Unk Attacker State 3 2");
                packet.ReadSingle("Unk Attacker State 3 3");
                packet.ReadSingle("Unk Attacker State 3 4");
                packet.ReadSingle("Unk Attacker State 3 5");
                packet.ReadSingle("Unk Attacker State 3 6");
                packet.ReadSingle("Unk Attacker State 3 7");
                packet.ReadSingle("Unk Attacker State 3 8");
                packet.ReadSingle("Unk Attacker State 3 9");
                packet.ReadSingle("Unk Attacker State 3 10");
                packet.ReadSingle("Unk Attacker State 3 11");
                packet.ReadInt32("Unk Attacker State 3 12");
                packet.ReadInt32("Unk Attacker State 3 13");
                packet.ReadInt32("Unk Attacker State 3 14");
            }
        }
开发者ID:cyberbrest,项目名称:WowPacketParser,代码行数:60,代码来源:CombatHandler.cs

示例3: HandleContactList

        public static void HandleContactList(Packet packet)
        {
            packet.ReadInt32E<ContactListFlag>("List Flags");
            var count = packet.ReadInt32("Count");

            for (var i = 0; i < count; i++)
            {
                packet.ReadGuid("GUID");
                packet.ReadInt32("Realm Id");
                packet.ReadInt32("Realm Id");
                var flag = packet.ReadInt32E<ContactEntryFlag>("Flags");
                packet.ReadCString("Note");

                if (!flag.HasAnyFlag(ContactEntryFlag.Friend))
                    continue;

                var status = packet.ReadByteE<ContactStatus>("Status");
                if (status == 0) // required any flag
                    continue;

                packet.ReadInt32<AreaId>("Area");
                packet.ReadInt32("Level");
                packet.ReadInt32E<Class>("Class");
            }
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:25,代码来源:ContactHandler.cs

示例4: HandleComplain

        public static void HandleComplain(Packet packet)
        {
            bool fromChat = packet.ReadBool("From Chat"); // false = from mail
            packet.ReadGuid("Guid");
            packet.ReadInt32E<Language>("Language");
            packet.ReadInt32E<ChatMessageType>("Type");
            packet.ReadInt32("Channel ID");

            if (fromChat)
            {
                packet.ReadTime("Time ago");
                packet.ReadCString("Complain");
            }
        }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:14,代码来源:TicketHandler.cs

示例5: HandleInstanceDifficulty

 public static void HandleInstanceDifficulty(Packet packet)
 {
     packet.ReadInt32E<MapDifficulty>("Difficulty");
     if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)
         && ClientVersion.RemovedInVersion(ClientType.Cataclysm))
         packet.ReadInt32("Player Difficulty");
 }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:7,代码来源:InstanceHandler.cs

示例6: HandleLootMethod

 public static void HandleLootMethod(Packet packet)
 {
     packet.ReadByte("PartyIndex");
     packet.ReadByteE<LootMethod>("Method");
     packet.ReadPackedGuid128("Master");
     packet.ReadInt32E<ItemQuality>("Threshold");
 }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:7,代码来源:LootHandler.cs

示例7: HandleAddCalendarEvent

        public static void HandleAddCalendarEvent(Packet packet)
        {
            packet.ReadCString("Title");
            packet.ReadCString("Description");
            packet.ReadByteE<CalendarEventType>("Event Type");
            packet.ReadByteE<CalendarRepeatType>("Repeat Type");
            packet.ReadInt32("Max Invites");
            packet.ReadInt32<LFGDungeonId>("Dungeon ID");
            packet.ReadPackedTime("Event Time");
            packet.ReadPackedTime("Unk PackedTime");

            var flags = packet.ReadInt32E<CalendarFlag>("Event Flags");

            if ((flags & CalendarFlag.GuildAnnouncement) != 0)
                return;

            var count = packet.ReadInt32("Invite Count");

            for (var i = 0; i < count; i++)
            {
                packet.ReadPackedGuid("Creator GUID");
                packet.ReadByteE<CalendarEventStatus>("Status");
                packet.ReadByteE<CalendarModerationRank>("Moderation Rank");
            }
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:25,代码来源:CalendarHandler.cs

示例8: HandleCalendarEventInviteAlert

        public static void HandleCalendarEventInviteAlert(Packet packet)
        {
            // TODO: find unks

            packet.ReadUInt64("EventID");
            packet.ReadPackedTime("Date");
            packet.ReadInt32E<CalendarFlag>("Flags");

            packet.ReadByteE<CalendarEventType>("EventType");

            packet.ReadInt32("TextureID");

            packet.ReadPackedGuid128("EventGuildID");

            packet.ReadUInt64("InviteID");

            packet.ReadByteE<CalendarEventStatus>("Status");
            packet.ReadByteE<CalendarModerationRank>("ModeratorStatus");

            packet.ReadPackedGuid128("OwnerGUID | InvitedByGUID");
            packet.ReadPackedGuid128("OwnerGUID | InvitedByGUID");

            var eventNameLength = packet.ReadBits("EventNameLength", 8);
            packet.ResetBitReader();

            packet.ReadWoWString("EventName", eventNameLength);
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:27,代码来源:CalendarHandler.cs

示例9: HandleCalendarCommandResult

 public static void HandleCalendarCommandResult(Packet packet)
 {
     packet.ReadInt32("UnkInt1");
     packet.ReadCString("UnkString1");
     packet.ReadCString("Param 1"); // if %s is used in the error message
     packet.ReadInt32E<CalendarError>("Error");
 }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:7,代码来源:CalendarHandler.cs

示例10: HandleContactList

        public static void HandleContactList(Packet packet)
        {
            packet.ReadInt32E<ContactListFlag>("List Flags");
            var bits6 = packet.ReadBits("ContactInfoCount", 8);

            for (var i = 0; i < bits6; i++)
            {
                packet.ReadPackedGuid128("Guid", i);
                packet.ReadPackedGuid128("WowAccount", i);

                packet.ReadInt32("VirtualRealmAddr", i);
                packet.ReadInt32("NativeRealmAddr", i);
                packet.ReadInt32("TypeFlags", i);

                packet.ReadByte("Status", i);

                packet.ReadInt32("AreaID", i);
                packet.ReadInt32("Level", i);
                packet.ReadInt32("ClassID", i);

                packet.ResetBitReader();

                var bits44 = packet.ReadBits(10);
                packet.ReadWoWString("Notes", bits44, i);
            }
        }
开发者ID:rob3ns,项目名称:PacketSniffer,代码行数:26,代码来源:ContactHandler.cs

示例11: HandleClientChatMessageChannel434

 public static void HandleClientChatMessageChannel434(Packet packet)
 {
     packet.ReadInt32E<Language>("Language");
     var channelNameLen = packet.ReadBits(9);
     var msgLen = packet.ReadBits(8);
     packet.ReadWoWString("Message", msgLen);
     packet.ReadWoWString("Channel Name", channelNameLen);
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:8,代码来源:ChatHandler.cs

示例12: HandleAuctionListItems

        public static void HandleAuctionListItems(Packet packet)
        {
            packet.ReadInt32("Offset");
            packet.ReadPackedGuid128("Auctioneer");

            packet.ReadByte("MinLevel");
            packet.ReadByte("MaxLevel");
            packet.ReadInt32E<ItemQuality>("Quality");
            var sort = packet.ReadByte("SortCount");
            var knownPetsCount = packet.ReadUInt32("KnownPetsCount");
            packet.ReadByte("MaxPetLevel");

            for (int i = 0; i < knownPetsCount; ++i)
                packet.ReadByte("KnownPets", i);

            var nameLength = packet.ReadBits(8);
            packet.ReadWoWString("Name", nameLength);

            var classFiltersCount = packet.ReadBits("ClassFiltersCount", 3);

            packet.ReadBit("OnlyUsable");
            packet.ReadBit("ExactMatch");

            packet.ResetBitReader();

            for (int i = 0; i < classFiltersCount; ++i)
            {
                packet.ReadInt32E<ItemClass>("ItemClass", "ClassFilters", i);

                var subClassFiltersCount = packet.ReadBits("SubClassFiltersCount", 5, "ClassFilters", i);
                for (int j = 0; j < subClassFiltersCount; ++j)
                {
                    packet.ReadInt32("ItemSubclass", "ClassFilters", i, "SubClassFilters", j);
                    packet.ReadUInt32("InvTypeMask", "ClassFilters", i, "SubClassFilters", j);
                }
            }

            var size = packet.ReadInt32("DataSize");
            var data = packet.ReadBytes(size);
            var sorts = new Packet(data, packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName);
            for (var i = 0; i < sort; ++i)
            {
                sorts.ReadByte("Type", i);
                sorts.ReadByte("Direction", i);
            }
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:46,代码来源:AuctionHouseHandler.cs

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

示例14: HandleHotfixNotify

        public static void HandleHotfixNotify(Packet packet)
        {
            var tableHash = packet.ReadInt32E<DB2Hash>("TableHash");
            var recordID = packet.ReadInt32("RecordID");
            var timestamp = packet.ReadUInt32("Timestamp");

            Storage.AddHotfixData(recordID, tableHash, false, timestamp);
        }
开发者ID:jackpoz,项目名称:WowPacketParser,代码行数:8,代码来源:HotfixHandler.cs

示例15: HandleClientChatMessageWhisper

 public static void HandleClientChatMessageWhisper(Packet packet)
 {
     packet.ReadInt32E<Language>("Language");
     var msgLen = packet.ReadBits(8);
     var recvName = packet.ReadBits(9);
     packet.ReadWoWString("Message", msgLen);
     packet.ReadWoWString("Receivers Name", recvName);
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:8,代码来源:ChatHandler.cs


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