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


C# Packet.ReadEntryWithName方法代码示例

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


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

示例1: HandleAddCalendarEvent

        public static void HandleAddCalendarEvent(Packet packet)
        {
            packet.ReadCString("Title");
            packet.ReadCString("Description");
            packet.ReadEnum<CalendarEventType>("Event Type", TypeCode.Byte);
            packet.ReadEnum<CalendarRepeatType>("Repeat Type", TypeCode.Byte);
            packet.ReadInt32("Max Invites");
            packet.ReadEntryWithName<Int32>(StoreNameType.LFGDungeon, "Dungeon ID");
            packet.ReadPackedTime("Event Time");
            packet.ReadPackedTime("Unk PackedTime");

            var flags = packet.ReadEnum<CalendarFlag>("Event Flags", TypeCode.Int32);

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

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

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

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

示例3: HandleCharEnum

        public static void HandleCharEnum(Packet packet)
        {
            var count = packet.ReadByte("Count");

            for (var i = 0; i < count; i++)
            {
                var guid = packet.ReadGuid("GUID");
                var name = packet.ReadCString("Name");
                var race = packet.ReadEnum<Race>("Race", TypeCode.Byte);
                var clss = packet.ReadEnum<Class>("Class", TypeCode.Byte);
                packet.ReadEnum<Gender>("Gender", TypeCode.Byte);

                packet.ReadByte("Skin");
                packet.ReadByte("Face");
                packet.ReadByte("Hair Style");
                packet.ReadByte("Hair Color");
                packet.ReadByte("Facial Hair");

                var level = packet.ReadByte("Level");
                var zone = packet.ReadEntryWithName<UInt32>(StoreNameType.Zone, "Zone Id");
                var mapId = packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map Id");

                var pos = packet.ReadVector3("Position");
                packet.ReadInt32("Guild Id");
                packet.ReadEnum<CharacterFlag>("Character Flags", TypeCode.Int32);

                if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_2_9056))
                    packet.ReadEnum<CustomizationFlag>("Customization Flags", TypeCode.Int32);

                var firstLogin = packet.ReadBoolean("First Login");
                packet.ReadInt32("Pet Display Id");
                packet.ReadInt32("Pet Level");
                packet.ReadEnum<CreatureFamily>("Pet Family", TypeCode.Int32);

                for (var j = 0; j < 19; j++)
                {
                    packet.ReadInt32("Equip Display Id");
                    packet.ReadEnum<InventoryType>("Equip Inventory Type", TypeCode.Byte);
                    packet.ReadInt32("Equip Aura Id");
                }

                int bagCount = ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3_11685) ? 4 : 1;
                for (var j = 0; j < bagCount; j++)
                {
                    packet.ReadInt32("Bag Display Id");
                    packet.ReadEnum<InventoryType>("Bag Inventory Type", TypeCode.Byte);
                    packet.ReadInt32("Bag Aura Id");
                }

                if (firstLogin)
                {
                    var startPos = new StartPosition {Map = mapId, Position = pos, Zone = zone};
                    packet.SniffFileInfo.Storage.StartPositions.TryAdd(new Tuple<Race, Class>(race, clss), startPos);
                }

                var playerInfo = new Player {Race = race, Class = clss, Name = name, FirstLogin = firstLogin, Level = level};
                packet.SniffFileInfo.Storage.Objects.AddOrUpdate(guid, playerInfo);
            }
        }
开发者ID:Chaplain,项目名称:WowPacketParser,代码行数:59,代码来源:CharacterHandler.cs

示例4: HandleBindPointUpdate

 public static void HandleBindPointUpdate(Packet packet)
 {
     packet.ReadSingle("Position Z");
     packet.ReadSingle("Position Y");
     packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map Id");
     packet.ReadEntryWithName<Int32>(StoreNameType.Zone, "Zone Id");
     packet.ReadSingle("Position X");
 }
开发者ID:Resike,项目名称:WowPacketParser,代码行数:8,代码来源:MovementHandler.cs

示例5: HandleInitWorldStates

        public static void HandleInitWorldStates(Packet packet)
        {
            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
            packet.ReadEntryWithName<Int32>(StoreNameType.Zone, "Zone Id");
            CurrentAreaId = packet.ReadEntryWithName<Int32>(StoreNameType.Area, "Area Id");

            var numFields = packet.ReadInt16("Field Count");
            for (var i = 0; i < numFields; i++)
                ReadWorldStateBlock(ref packet);
        }
开发者ID:Nihilianth,项目名称:WowPacketParser,代码行数:10,代码来源:WorldStateHandler.cs

示例6: HandleBindPointUpdate

        public static void HandleBindPointUpdate(Packet packet)
        {
            var pos = new Vector3();

            CoreParsers.MovementHandler.CurrentMapId = (uint)packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map");

            pos.X = packet.ReadSingle();
            pos.Z = packet.ReadSingle();
            pos.Y = packet.ReadSingle();

            packet.ReadEntryWithName<Int32>(StoreNameType.Area, "Area Id");

            packet.WriteLine("Position: {0}", pos);
        }
开发者ID:usernel,项目名称:WowPacketParser,代码行数:14,代码来源:MovementHandler.cs

示例7: HandleInitWorldStates

        public static void HandleInitWorldStates(Packet packet)
        {
            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
            packet.ReadEntryWithName<Int32>(StoreNameType.Zone, "Zone Id");
            CurrentAreaId = packet.ReadEntryWithName<Int32>(StoreNameType.Area, "Area Id");

            var numFields = packet.ReadBits("Field Count", 21);
            //packet.ReadByte("UnkB");
            /*for (var i = 0; i < numFields; i++)
            {
                var val = packet.ReadByte();
                packet.WriteLine("Field: {0} - Value: {1}", i, val);
            }*/
            packet.ReadToEnd();
        }
开发者ID:nelegalno,项目名称:WowPacketParser,代码行数:15,代码来源:WorldStateHandler.cs

示例8: HandleInitWorldStates

        public static void HandleInitWorldStates(Packet packet)
        {
            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
            packet.ReadEntryWithName<Int32>(StoreNameType.Zone, "Zone Id");
            CoreParsers.WorldStateHandler.CurrentAreaId = packet.ReadEntryWithName<Int32>(StoreNameType.Area, "Area Id");

            var numFields = packet.ReadBits("Field Count", 21);

            for (var i = 0; i < numFields; i++)
            {
                var val = packet.ReadInt32();
                var field = packet.ReadInt32();
                packet.WriteLine("[{0}] - Field: {1} - Value: {2}", i, field, val);
            }
        }
开发者ID:usernel,项目名称:WowPacketParser,代码行数:15,代码来源:WorldStateHandler.cs

示例9: HandleCompletionNPCResponse

        public static void HandleCompletionNPCResponse(Packet packet)
        {
            var count = packet.ReadBits("Count", 23);
            var counts = new uint[count];

            for (int i = 0; i < count; ++i)
                counts[i] = packet.ReadBits("Count", 24, i);

            for (int i = 0; i < count; ++i)
            {
                packet.ReadEntryWithName<UInt32>(StoreNameType.Quest, "Quest", i);
                for (int j = 0; j < counts[i]; ++j)
                    packet.ReadEntryWithName<UInt32>(StoreNameType.Unit, "Unit", i, j);
            }
        }
开发者ID:Zakamurite,项目名称:WowPacketParser,代码行数:15,代码来源:NpcHandler.cs

示例10: HandleCorpseQuery

        public static void HandleCorpseQuery(Packet packet)
        {
            if (packet.Direction == Direction.ClientToServer)
                return;

            if (!packet.ReadBoolean("Corpse Found"))
                return;

            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
            packet.ReadVector3("Corpse Position");
            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Corpse Map ID");

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_2_2_10482))
                packet.ReadInt32("Corpse Low GUID");
        }
开发者ID:Nihilianth,项目名称:WowPacketParser,代码行数:15,代码来源:CorpseHandler.cs

示例11: HandlePetActionFeedback

        public static void HandlePetActionFeedback(Packet packet)
        {
            var state = packet.ReadEnum<PetFeedback>("Pet state", TypeCode.Byte);

            switch (state)
            {
                case PetFeedback.NothingToAttack:
                    if (ClientVersion.AddedInVersion(ClientType.Cataclysm) || packet.CanRead())
                        packet.ReadEntryWithName<Int32>(StoreNameType.Spell, "Spell ID");
                    break;
                case PetFeedback.CantAttackTarget:
                    if (ClientVersion.AddedInVersion(ClientType.Cataclysm))
                        packet.ReadEntryWithName<Int32>(StoreNameType.Spell, "Spell ID");    // sub_8ADA60 2nd parameter is SpellID, check sub_8B22C0
                    break;
            }
        }
开发者ID:Huri,项目名称:WowPacketParser,代码行数:16,代码来源:PetHandler.cs

示例12: HandleEnchantmentLog

 public static void HandleEnchantmentLog(Packet packet)
 {
     packet.ReadPackedGuid("Target");
     packet.ReadPackedGuid("Caster");
     packet.ReadEntryWithName<Int32>(StoreNameType.Item, "Item Entry");
     packet.ReadUInt32("Enchantment ID?");
 }
开发者ID:Supabad,项目名称:WowPacketParser,代码行数:7,代码来源:ItemHandler.cs

示例13: HandleAuctionListBidderResult

        public static void HandleAuctionListBidderResult(Packet packet)
        {
            var count = packet.ReadUInt32("Count");
            for (var i = 0; i < count; ++i)
            {
                packet.ReadUInt32("Auction Id", i);
                packet.ReadEntryWithName<UInt32>(StoreNameType.Item, "Item Entry", i);

                int enchantmentCount = ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing) ? 7 : 6;
                for (var j = 0; j < enchantmentCount; ++j)
                {
                    packet.ReadUInt32("Item Enchantment ID", i, j);
                    packet.ReadUInt32("Item Enchantment Duration", i, j);
                    packet.ReadUInt32("Item Enchantment Charges", i, j);
                }

                packet.ReadInt32("Item Random Property ID", i);
                packet.ReadUInt32("Item Suffix", i);
                packet.ReadUInt32("Item Count", i);
                packet.ReadInt32("Item Spell Charges", i);
                //packet.ReadEnum<ItemFlag>("Item Flags", TypeCode.UInt32, i);
                packet.ReadUInt32("Unk UInt32 1", i);
                packet.ReadGuid("Owner", i);
                packet.ReadUInt32("Start Bid", i);
                packet.ReadUInt32("Out Bid", i);
                packet.ReadUInt32("Buyout ", i);
                packet.ReadUInt32("Time Left", i);
                packet.ReadGuid("Bidder", i);
                packet.ReadUInt32("Bid", i);
            }

            packet.ReadUInt32("Own Count");
            packet.ReadUInt32("Unk UInt32 1");
        }
开发者ID:CarlosX,项目名称:WowPacketParser,代码行数:34,代码来源:AuctionHouseHandler.cs

示例14: HandleQuestNpcQuery

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

            for (var i = 0; i < count; i++)
                packet.ReadEntryWithName<Int32>(StoreNameType.Quest, "Quest ID", i);
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:7,代码来源:QuestHandler.cs

示例15: HandleQuestgiverAcceptQuest

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

            packet.ReadEntryWithName<UInt32>(StoreNameType.Quest, "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:usernel,项目名称:WowPacketParser,代码行数:26,代码来源:QuestHandler.cs


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