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


C# StreamHandler.ReadUInt32方法代码示例

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


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

示例1: Read

        public override void Read(StreamHandler reader)
        {
            uint DisplayedItemCount = reader.ReadUInt32();

            Items = new AuctionListItem[DisplayedItemCount];
            for (uint i = 0; i < DisplayedItemCount; ++i)
                Items[i] = reader.ReadStruct<AuctionListItem>();

            TotalItemCount = reader.ReadUInt32();
            NextSearchDelayMs = reader.ReadUInt32();
        }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:11,代码来源:AuctionListResult.cs

示例2: Read

        public override void Read(StreamHandler reader)
        {
            ContainerSlot = (InventorySlot)reader.ReadByte();
            Slot = (InventorySlot)reader.ReadByte();
            CastId = reader.ReadByte();
            SpellId = reader.ReadUInt32();
            ItemGuid = reader.ReadGuid();
            GlyphSlot = reader.ReadUInt32();
            UnkFlags = reader.ReadByte();

            TargetData.Read(reader);
        }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:12,代码来源:UseItem.cs

示例3: Read

        public override void Read(StreamHandler reader)
        {
            this.Roles = (GroupRoles)reader.ReadUInt32();

            reader.Skip(2); // 2 bools

            uint count = reader.ReadByte();
            Dungeons = new DungeonEntry[count];
            for (uint i = 0; i < count; ++i)
                Dungeons[i] = new DungeonEntry(reader.ReadUInt32());

            reader.Skip(4);

            this.Comment = reader.ReadCString();
        }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:15,代码来源:LFG.cs

示例4: Read

 public override void Read(StreamHandler Reader)
 {
     this.Count = Reader.ReadByte();
     this.Seed = Reader.ReadUInt32();
     this.ClientSeed = Reader.ReadBytes(16);
     this.ServerSeed = Reader.ReadBytes(16);
 }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:7,代码来源:Authentication.cs

示例5: ElementRead

 protected override void ElementRead(StreamHandler reader, int index)
 {
     if (index == -2)
         this.NewValue = reader.ReadUInt32();
     else
         base.ElementRead(reader, index);
 }
开发者ID:SkyFire,项目名称:Kamilla.Wow,代码行数:7,代码来源:ForceSetVehicleId.cs

示例6: ReadElement

 protected override void ReadElement(StreamHandler reader, MovementStatusElements element, MovementStatus status, byte[] guid, byte[] tguid)
 {
     if (element == MovementStatusElements.GenericDword0)
         this.ChangeCounter = reader.ReadUInt32();
     else
         base.ReadElement(reader, element, status, guid, tguid);
 }
开发者ID:SkyFire,项目名称:Kamilla.Wow,代码行数:7,代码来源:ForceAckPacket.cs

示例7: Read

        public void Read(StreamHandler Reader)
        {
            Flags = (SpellCastTargetFlags)Reader.ReadUInt32();

            if ((Flags & (
                SpellCastTargetFlags.Unit   | SpellCastTargetFlags.Unk2 |
                SpellCastTargetFlags.Object |
                SpellCastTargetFlags.Corpse | SpellCastTargetFlags.PvPCorpse
                )) != 0)
                TargetUnit = Reader.ReadPackedGuid();

            if ((Flags & (SpellCastTargetFlags.Item | SpellCastTargetFlags.TradeItem)) != 0)
                TargetItem = Reader.ReadPackedGuid();

            if ((Flags & SpellCastTargetFlags.SourceLocation) != 0)
            {
                SourceTransportGuid = Reader.ReadPackedGuid();
                SourceLocation = Reader.ReadVector3();
            }

            if ((Flags & SpellCastTargetFlags.DestLocation) != 0)
            {
                DestTransportGuid = Reader.ReadPackedGuid();
                DestLocation = Reader.ReadVector3();
            }

            if ((Flags & SpellCastTargetFlags.String) != 0)
                StringTarget = Reader.ReadCString();
        }
开发者ID:SkyFire,项目名称:Kamilla.Wow,代码行数:29,代码来源:SpellCasting.cs

示例8: ElementRead

 protected override void ElementRead(StreamHandler reader, int index)
 {
     if (index == -5)
         this.Unk = reader.ReadUInt32();
     else
         this.Data[-index - 1] = reader.ReadBytes(reader.ReadInt32());
 }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:7,代码来源:SetPhaseShift.cs

示例9: ElementRead

 protected override void ElementRead(StreamHandler reader, int index)
 {
     if (index == -1)
         this.ChangeCounter = reader.ReadUInt32();
     else
         throw new InvalidOperationException("Unknown read element: " + index);
 }
开发者ID:SkyFire,项目名称:Kamilla.Wow,代码行数:7,代码来源:ForcePacket.cs

示例10: Read

        public override void Read(StreamHandler reader)
        {
            this.Unit = reader.ReadPackedGuid();

            var count = reader.ReadInt32();
            this.ThreatList = new ThreatUpdatePair[count];
            for (int i = 0; i < count; ++i)
                this.ThreatList[i] = new ThreatUpdatePair { Unit = reader.ReadPackedGuid(), Threat = reader.ReadUInt32() };
        }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:9,代码来源:ThreatUpdate.cs

示例11: Read

        public override void Read(StreamHandler reader)
        {
            Caster = reader.ReadPackedGuid();
            SpellId = reader.ReadUInt32();
            Duration = reader.ReadInt32();

            HaveFlags = reader.ReadBoolean();
            if (HaveFlags)
            {
                TargetFlags1 = reader.ReadUInt32();
                TargetFlags2 = reader.ReadUInt32();
            }

            Unk_HaveData2 = reader.ReadBoolean();
            if (Unk_HaveData2)
            {
                Unk_Guid1 = reader.ReadPackedGuid();
                Unk_UInt3 = reader.ReadUInt32();
                Unk_Byte = reader.ReadByte();
                if (Unk_Byte == 2)
                    Unk_Guid2 = reader.ReadPackedGuid();
            }
        }
开发者ID:SkyFire,项目名称:Kamilla.Wow,代码行数:23,代码来源:ChannelStart.cs

示例12: Read

        public override void Read(StreamHandler Reader)
        {
            byte[] blob = Reader.ReadBytes(256);
            Token = Reader.ReadUInt32();
            UnknownULong = Reader.ReadUInt64();
            ConnectionIndex = Reader.ReadByte();

            // hardcoded in client
            byte[] modulus1 = {
                    0x91, 0xD5, 0x9B, 0xB7, 0xD4, 0xE1, 0x83, 0xA5, 0x22, 0x2B, 0x5F, 0x38, 0xF4, 0xB8, 0x86, 0xFF, 
                    0x32, 0x84, 0x38, 0x2D, 0x99, 0x38, 0x8F, 0xBA, 0xF3, 0xC9, 0x22, 0x5D, 0x51, 0x73, 0x1E, 0x28, 
                    0x87, 0x24, 0x8F, 0xB5, 0xC9, 0xB0, 0x7C, 0x95, 0xD0, 0x6B, 0x5B, 0xF4, 0x94, 0xC5, 0x94, 0x9D, 
                    0xFA, 0x6F, 0x47, 0x3A, 0xA3, 0x86, 0xC0, 0xA8, 0x37, 0xF3, 0x9B, 0xEF, 0x2F, 0xC1, 0xFB, 0xB3, 
                    0xF4, 0x1C, 0x2B, 0x0E, 0xD3, 0x6D, 0x88, 0xBB, 0x02, 0xE0, 0x4E, 0x63, 0xFA, 0x76, 0xE3, 0x43, 
                    0xF9, 0x01, 0xFD, 0x23, 0x5E, 0x6A, 0x0B, 0x14, 0xEC, 0x5E, 0x91, 0x34, 0x0D, 0x0B, 0x4F, 0xA3, 
                    0x5A, 0x46, 0xC5, 0x5E, 0xDC, 0xB5, 0xCD, 0xC1, 0x47, 0x6B, 0x59, 0xCA, 0xFA, 0xA9, 0xBE, 0x24, 
                    0x9F, 0xF5, 0x05, 0x6B, 0xBB, 0x67, 0x8B, 0xB7, 0xE4, 0x3A, 0x43, 0x00, 0x5C, 0x1C, 0xB7, 0xCA, 
                    0x98, 0x90, 0x79, 0x77, 0x6D, 0x05, 0x4F, 0x83, 0xCC, 0xAC, 0x06, 0x2E, 0x50, 0x11, 0x87, 0x23, 
                    0xD8, 0xA6, 0xF7, 0x6F, 0x7A, 0x59, 0x87, 0xA6, 0xDE, 0x5D, 0xD8, 0xEC, 0x44, 0xBE, 0x45, 0x31, 
                    0x7F, 0x8A, 0xF0, 0x58, 0x89, 0x53, 0x74, 0xDF, 0xCC, 0xAD, 0x01, 0x24, 0xD8, 0x19, 0x65, 0x1C, 
                    0x25, 0xD3, 0xE1, 0x6B, 0x8B, 0xDA, 0xFE, 0x1D, 0xA4, 0x2C, 0x8B, 0x25, 0xED, 0x7C, 0xFF, 0x6A, 
                    0xE0, 0x63, 0xD0, 0x52, 0x20, 0x7E, 0x62, 0x49, 0xD2, 0xB3, 0x6B, 0xCC, 0x91, 0x69, 0xA5, 0x08, 
                    0x8B, 0x69, 0x65, 0xFF, 0xB9, 0xC9, 0x17, 0x02, 0x5D, 0xD8, 0x8E, 0x1A, 0x63, 0xD9, 0x2A, 0x7F, 
                    0xDB, 0xE3, 0xF8, 0x76, 0x6D, 0xEA, 0x0E, 0x36, 0x98, 0x78, 0x19, 0xC5, 0x87, 0xBA, 0x6C, 0x20, 
                    0xB6, 0x08, 0x44, 0x04, 0x4C, 0xA8, 0xD5, 0xB6, 0x9D, 0x4D, 0x00, 0x20, 0x40, 0x00, 0x90, 0x04
                };

            // hardcoded in client
            byte[] exp = { 0x01, 0x00, 0x01, 0x00 };

            BigInteger res_bn = BigInteger.ModPow(new BigInteger(blob), new BigInteger(exp), new BigInteger(modulus1));

            FixedBlob = FixBlob(res_bn.ToByteArray());

            ServerHash = new byte[0];
            Port = BitConverter.ToUInt16(FixedBlob, 21);
            IP = new IPAddress(FixedBlob.Take(4).ToArray());

            //byte[] bytes = new byte[0]
            //    .Concat(BitConverter.GetBytes(Port))
            //    .Concat(BitConverter.GetBytes(ip))
            //    .ToArray();

            //SHA1Managed sha1 = new SHA1Managed();
            ComputedHash = new byte[0]; //sha1.ComputeHash(bytes);
        }
开发者ID:SkyFire,项目名称:Kamilla.Wow,代码行数:46,代码来源:ConnectToPacket.cs

示例13: Read

        public override void Read(StreamHandler reader)
        {
            this.Guid = reader.ReadGuid();
            this.Type = (LootType)reader.ReadByte();
            this.Gold = new Money(reader.ReadUInt32());
            byte itemCount = reader.ReadByte();
            byte currencyCount = reader.ReadByte();

            for (int i = 0; i < itemCount; ++i)
            {
                Item item = reader.ReadStruct<Item>();
                Items.Add(item);
            }

            for (int i = 0; i < currencyCount; ++i)
            {
                Currency currency = reader.ReadStruct<Currency>();
                Currencies.Add(currency);
            }
        }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:20,代码来源:Loot.cs

示例14: Read

 public override void Read(StreamHandler reader)
 {
     Entity = reader.ReadGuid();
     Model = reader.ReadUInt32();
     Race = (Races)reader.ReadByte();
     Gender = (Genders)reader.ReadByte();
     Class = (Classes)reader.ReadByte();
     Skin = reader.ReadByte();
     Face = reader.ReadByte();
     Hair = reader.ReadByte();
     HairColor = reader.ReadByte();
     FaceFeatures = reader.ReadByte();
     Guild = reader.ReadGuid();
     Head = reader.ReadUInt32();
     Shoulders = reader.ReadUInt32();
     Body = reader.ReadUInt32();
     Chest = reader.ReadUInt32();
     Waist = reader.ReadUInt32();
     Legs = reader.ReadUInt32();
     Feet = reader.ReadUInt32();
     Wrists = reader.ReadUInt32();
     Hands = reader.ReadUInt32();
     Back = reader.ReadUInt32();
     Tabard = reader.ReadUInt32();
 }
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:25,代码来源:MirrorImageData.cs

示例15: MovementInfo


//.........这里部分代码省略.........
                    this.HaveTransportTime2 = Reader.UnalignedReadBit();
                    bytes[7] = Reader.UnalignedReadTinyInt(1);
                }
            }

            ushort field_1B2 = 0;
            ushort field_1AE = 0;
            ushort field_1B0 = 0;
            if (field_1AC)
            {
                field_1B2 = (ushort)(!Reader.UnalignedReadBit() ? 1 : 0);
                field_1AE = (ushort)(!Reader.UnalignedReadBit() ? 1 : 0);
                field_1B0 = (ushort)(!Reader.UnalignedReadBit() ? 1 : 0);
            }

            if (this.HaveAttackingTarget)
            {
                fixed (byte* bytes = this.AttackingTarget.Bytes)
                {
                    bytes[3] = Reader.UnalignedReadTinyInt(1);
                    bytes[4] = Reader.UnalignedReadTinyInt(1);
                    bytes[6] = Reader.UnalignedReadTinyInt(1);
                    bytes[0] = Reader.UnalignedReadTinyInt(1);
                    bytes[1] = Reader.UnalignedReadTinyInt(1);
                    bytes[7] = Reader.UnalignedReadTinyInt(1);
                    bytes[5] = Reader.UnalignedReadTinyInt(1);
                    bytes[2] = Reader.UnalignedReadTinyInt(1);
                }
            }

            this.UnkUInt32 = new uint[arrCounter];
            for (uint i = 0; i < arrCounter; ++i)
            {
                this.UnkUInt32[i] = Reader.ReadUInt32();
            }

            if (this.HavePosition)
            {
                Reader
                    .ReadSingle(out this.Position.Z)
                    .ReadSingle(out this.Orientation)
                    .ReadSingle(out this.Position.X)
                    .ReadSingle(out this.Position.Y);
            }

            if (this.HaveVehicleData)
            {
                Reader
                    .ReadUInt32(out this.VehicleId)
                    .ReadSingle(out this.VehicleAimAdjustement);
            }

            if (this.HaveGameObjectPosition)
            {
                fixed (byte* bytes = this.TransportGuid.Bytes)
                {
                    Reader
                        .ReadXorByte(ref bytes[1])
                        .ReadXorByte(ref bytes[4])
                        .ReadSingle(out this.TransportPosition.Z);

                    if (this.HaveTransportTime3)
                        this.TransportTime3 = Reader.ReadUInt32();

                    this.TransportTime = Reader.ReadUInt32();
开发者ID:CarlosX,项目名称:Kamilla.Wow,代码行数:66,代码来源:MovementInfo.cs


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