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


C# Packet.ReadUInt32方法代码示例

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


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

示例1: HandleActivateTaxiExpress

 public static void HandleActivateTaxiExpress(Packet packet)
 {
     packet.ReadGuid("GUID");
     var count = packet.ReadUInt32("Node Count");
     for (var i = 0; i < count; ++i)
         packet.ReadUInt32("Node ID", i);
 }
开发者ID:Supabad,项目名称:WowPacketParser,代码行数:7,代码来源:TaxiHandler.cs

示例2: HandleArenaTeamCommandResult

 public static void HandleArenaTeamCommandResult(Packet packet)
 {
     packet.ReadUInt32("Action"); // FIXME: Use enum
     packet.ReadCString("Team Name");
     packet.ReadCString("Player Name");
     packet.ReadUInt32("ErrorId"); // FIXME: Use enum
 }
开发者ID:skypeak,项目名称:WowPacketParser_SkyFire,代码行数:7,代码来源:BattlegroundHandler.cs

示例3: HandleArchaelogySurveryCast

 public static void HandleArchaelogySurveryCast(Packet packet)
 {
     packet.ReadUInt32("TotalFinds");
     packet.ReadUInt32("NumFindsCompleted");
     packet.ReadInt32("ResearchBranchID");
     packet.ReadBit("SuccessfulFind");
 }
开发者ID:cyberbrest,项目名称:WowPacketParser,代码行数:7,代码来源:ArchaelogyHandler.cs

示例4: HandleInitCurrency

        public static void HandleInitCurrency(Packet packet)
        {
            var count = packet.ReadInt32("SetupCurrencyRecord");

            // ClientSetupCurrencyRecord
            for (var i = 0; i < count; ++i)
            {
                packet.ReadUInt32("Type", i);
                packet.ReadUInt32("Quantity", i);

                var hasWeeklyQuantity = packet.ReadBit();
                var hasMaxWeeklyQuantity = packet.ReadBit();
                var hasTrackedQuantity = packet.ReadBit();
                packet.ReadBits("Flags", 5, i);

                if (hasWeeklyQuantity)
                    packet.ReadUInt32("WeeklyQuantity", i);

                if (hasMaxWeeklyQuantity)
                    packet.ReadUInt32("MaxWeeklyQuantity", i);

                if (hasTrackedQuantity)
                    packet.ReadUInt32("TrackedQuantity", i);
            }
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:25,代码来源:CurrencyHandler.cs

示例5: HandleVendorInventory

        public static void HandleVendorInventory(Packet packet)
        {
            uint entry = packet.ReadPackedGuid128("VendorGUID").GetEntry();
            packet.ReadByte("Reason");
            int count = packet.ReadInt32("VendorItems");

            for (int i = 0; i < count; ++i)
            {
                NpcVendor vendor = new NpcVendor
                {
                    Entry = entry,
                    Slot = packet.ReadInt32("Muid", i),
                    Type = (uint)packet.ReadInt32("Type", i)
                };

                int maxCount = packet.ReadInt32("Quantity", i);
                packet.ReadInt64("Price", i);
                packet.ReadInt32("Durability", i);
                int buyCount = packet.ReadInt32("StackCount", i);
                vendor.ExtendedCost = packet.ReadUInt32("ExtendedCostID", i);
                vendor.PlayerConditionID = packet.ReadUInt32("PlayerConditionFailed", i);

                vendor.Item = V6_0_2_19033.Parsers.ItemHandler.ReadItemInstance(packet, i);
                vendor.IgnoreFiltering = packet.ReadBit("DoNotFilterOnVendor", i);

                vendor.MaxCount = maxCount == -1 ? 0 : (uint)maxCount; // TDB
                if (vendor.Type == 2)
                    vendor.MaxCount = (uint)buyCount;

                Storage.NpcVendors.Add(vendor, packet.TimeSpan);
            }
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:32,代码来源:NpcHandler.cs

示例6: HandleTokenConfirmBuyToken

 public static void HandleTokenConfirmBuyToken(Packet packet)
 {
     packet.ReadUInt32("UnkInt32");
     packet.ReadUInt32("PendingBuyConfirmations");
     packet.ReadUInt64("GuaranteedPrice");
     packet.ReadBit("Confirmed");
 }
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:7,代码来源:TokenHandler.cs

示例7: HandleLootResponse

        public static void HandleLootResponse(Packet packet)
        {
            packet.ReadPackedGuid128("Owner");
            packet.ReadPackedGuid128("LootObj");
            packet.ReadByteE<LootError>("FailureReason");
            packet.ReadByteE<LootType>("AcquireReason");
            packet.ReadByteE<LootMethod>("LootMethod");
            packet.ReadByteE<ItemQuality>("Threshold");

            packet.ReadUInt32("Coins");

            var itemCount = packet.ReadUInt32("ItemCount");
            var currencyCount = packet.ReadUInt32("CurrencyCount");

            packet.ResetBitReader();

            packet.ReadBit("Acquired");
            packet.ReadBit("AELooting");
            packet.ReadBit("PersonalLooting");

            for (var i = 0; i < itemCount; ++i)
                ReadLootItem(packet, i, "LootItem");

            for (var i = 0; i < currencyCount; ++i)
                V6_0_2_19033.Parsers.LootHandler.ReadCurrenciesData(packet, i, "Currencies");
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:26,代码来源:LootHandler.cs

示例8: HandleAreaTriggerReShape

        public static void HandleAreaTriggerReShape(Packet packet)
        {
            packet.ReadPackedGuid128("TriggerGUID");

            packet.ResetBitReader();
            var hasAreaTriggerSpline = packet.ReadBit("HasAreaTriggerSpline");
            var hasAreaTriggerUnkType = packet.ReadBit("HasAreaTriggerUnkType");

            if (hasAreaTriggerSpline)
                ReadAreaTriggerSpline(packet);

            if (hasAreaTriggerUnkType)
            {
                packet.ResetBitReader();
                var unk1 = packet.ReadBit("AreaTriggerUnk1");
                var hasCenter = packet.ReadBit("HasCenter");
                packet.ReadBit("Unk bit 703 1");
                packet.ReadBit("Unk bit 703 2");

                packet.ReadUInt32("Unk UInt 1");
                packet.ReadInt32("Unk Int 1");
                packet.ReadUInt32("Unk UInt 2");
                packet.ReadSingle("Radius");
                packet.ReadSingle("BlendFromRadius");
                packet.ReadSingle("InitialAngel");
                packet.ReadSingle("ZOffset");

                if (unk1)
                    packet.ReadPackedGuid128("AreaTriggerUnkGUID");

                if (hasCenter)
                    packet.ReadVector3("Center");
            }
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:34,代码来源:AreaTriggerHandler.cs

示例9: HandleCalendarSendEvent

        public static void HandleCalendarSendEvent(Packet packet)
        {
            packet.ReadByte("EventType");
            packet.ReadPackedGuid128("OwnerGUID");
            packet.ReadInt64("EventID");
            packet.ReadByte("GetEventType");
            packet.ReadInt32("TextureID");
            packet.ReadUInt32("Flags");
            packet.ReadUInt32("Date");
            packet.ReadUInt32("LockDate");
            packet.ReadPackedGuid128("EventGuildID");

            var inviteCount = packet.ReadInt32("InviteCount");

            packet.ResetBitReader();

            var lenEventName = packet.ReadBits(8);
            var lenDescription = packet.ReadBits(11);

            packet.ResetBitReader();

            for (int i = 0; i < inviteCount; i++)
                V6_0_2_19033.Parsers.CalendarHandler.ReadCalendarEventInviteInfo(packet, "Invites", i);

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

示例10: 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(ClientVersionBuild.V4_3_0_15005) ? 10 : ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545) ? 9 : 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.ReadValue("Start Bid", _auctionSize, i);
                packet.ReadValue("Out Bid", _auctionSize, i);
                packet.ReadValue("Buyout ", _auctionSize, i);
                packet.ReadUInt32("Time Left", i);
                packet.ReadGuid("Bidder", i);
                packet.ReadValue("Bid", _auctionSize, i);
            }

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

示例11: HandleTradeStatusExtended

        public static void HandleTradeStatusExtended(Packet packet)
        {
            packet.ReadByte("Trader");
            packet.ReadUInt32("Trade Id");
            packet.ReadUInt32("Unk Slot 1");
            packet.ReadUInt32("Unk Slot 2");
            packet.ReadUInt32("Gold");
            packet.ReadEntryWithName<Int32>(StoreNameType.Spell, "Spell ID");

            while (packet.CanRead())
            {
                var slot = packet.ReadByte("Slot Index");
                packet.ReadEntryWithName<UInt32>(StoreNameType.Item, "Item Entry", slot);
                packet.ReadUInt32("Item Display ID", slot);
                packet.ReadUInt32("Item Count", slot);
                packet.ReadUInt32("Item Wrapped", slot);
                packet.ReadUInt64("Item Gift Creator GUID", slot);
                packet.ReadUInt32("Item Perm Enchantment Id", slot);
                for (var i = 0; i < 3; ++i)
                    packet.ReadUInt32("Item Enchantment Id", slot, i);
                packet.ReadGuid("Item Creator GUID", slot);
                packet.ReadInt32("Item Spell Charges", slot);
                packet.ReadInt32("Item Suffix Factor", slot);
                packet.ReadInt32("Item Random Property ID", slot);
                packet.ReadUInt32("Item Lock ID", slot);
                packet.ReadUInt32("Item Max Durability", slot);
                packet.ReadUInt32("Item Durability", slot);
            }
        }
开发者ID:CarlosX,项目名称:WowPacketParser,代码行数:29,代码来源:TradeHandler.cs

示例12: HandleEquipmentSetList

        public static void HandleEquipmentSetList(Packet packet)
        {
            var count = packet.ReadInt32("Count");

            for (var i = 0; i < count; i++)
            {
                packet.ReadInt32("Type", i);
                packet.ReadUInt64("Guid", i);
                packet.ReadUInt32("SetID", i);
                uint ignoreMask = packet.ReadUInt32("IgnoreMask");

                for (var j = 0; j < NumSlots; j++)
                {
                    bool ignore = (ignoreMask & (1 << j)) != 0;
                    packet.ReadPackedGuid128("Pieces" + (ignore ? " (Ignored)" : ""), i, j);
                    packet.ReadInt32("Appearances", i);
                }

                for (var j = 0; j < 2; j++)
                    packet.ReadInt32("Enchants", i);

                packet.ResetBitReader();
                var setNameLen = packet.ReadBits(8);
                var setIconLen = packet.ReadBits(9);

                packet.ReadWoWString("SetName", setNameLen, i);
                packet.ReadWoWString("SetIcon", setIconLen, i);
            }
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:29,代码来源:EquipmentSetHandler.cs

示例13: HandleAllAchievementData422

        public static void HandleAllAchievementData422(Packet packet)
        {
            var criterias = packet.ReadUInt32("Criterias Count");
            for (var i = 0; i < criterias; ++i)
                packet.ReadBits("Flag", 2, 0, i);

            for (var i = 0; i < criterias; ++i)
                packet.ReadUInt64("Counter", 0, i);

            var achievements = packet.ReadUInt32("Achievement Count");
            for (var i = 0; i < achievements; ++i)
                packet.ReadPackedTime("Achievement Time", 1, i);

            for (var i = 0; i < criterias; ++i)
                packet.ReadGuid("Player GUID", 0, i);

            for (var i = 0; i < criterias; ++i)
                packet.ReadPackedTime("Criteria Time", 0, i);

            for (var i = 0; i < criterias; ++i)
                packet.ReadUInt32("Timer 1", 0, i);

            for (var i = 0; i < achievements; ++i)
                packet.ReadUInt32("Achievement Id", 1, i);

            for (var i = 0; i < criterias; ++i)
                packet.ReadUInt32("Criteria Id", 0, i);

            for (var i = 0; i < criterias; ++i)
                packet.ReadUInt32("Timer 2", 0, i);
        }
开发者ID:samaelsacred,项目名称:WowPacketParser,代码行数:31,代码来源:AchievementHandler.cs

示例14: HandlePetSpells

        public static void HandlePetSpells(Packet packet)
        {
            packet.ReadPackedGuid128("PetGUID");
            packet.ReadInt16("CreatureFamily");
            packet.ReadInt16("Specialization");
            packet.ReadInt32("TimeLimit");

            ReadPetFlags(packet, "PetModeAndOrders");

            const int maxCreatureSpells = 10;
            for (var i = 0; i < maxCreatureSpells; i++) // Read pet / vehicle spell ids
                V6_0_2_19033.Parsers.PetHandler.ReadPetAction(packet, "ActionButtons", i);

            var actionsCount = packet.ReadInt32("ActionsCount");
            var cooldownsCount = packet.ReadUInt32("CooldownsCount");
            var spellHistoryCount = packet.ReadUInt32("SpellHistoryCount");

            for (int i = 0; i < actionsCount; i++)
                V6_0_2_19033.Parsers.PetHandler.ReadPetAction(packet, i, "Actions");

            for (int i = 0; i < cooldownsCount; i++)
                V6_0_2_19033.Parsers.PetHandler.ReadPetSpellCooldownData(packet, i, "PetSpellCooldown");

            for (int i = 0; i < spellHistoryCount; i++)
                V6_0_2_19033.Parsers.PetHandler.ReadPetSpellHistoryData(packet, i, "PetSpellHistory");
        }
开发者ID:jackpoz,项目名称:WowPacketParser,代码行数:26,代码来源:PetHandler.cs

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


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