當前位置: 首頁>>代碼示例>>C#>>正文


C# BinaryReader.ReadUInt32WithEndian方法代碼示例

本文整理匯總了C#中System.IO.BinaryReader.ReadUInt32WithEndian方法的典型用法代碼示例。如果您正苦於以下問題:C# BinaryReader.ReadUInt32WithEndian方法的具體用法?C# BinaryReader.ReadUInt32WithEndian怎麽用?C# BinaryReader.ReadUInt32WithEndian使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.IO.BinaryReader的用法示例。


在下文中一共展示了BinaryReader.ReadUInt32WithEndian方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Decode

 public override void Decode()
 {
     using (var br = new BinaryReader(new MemoryStream(GetData())))
     {
         m_vAccountId = br.ReadInt64WithEndian();
         m_vPassToken = br.ReadScString();
         m_vClientMajorVersion = br.ReadInt32WithEndian();
         m_vClientContentVersion = br.ReadInt32WithEndian();
         m_vClientBuild = br.ReadInt32WithEndian();
         m_vResourceSha = br.ReadScString();
         m_vUDID = br.ReadScString();
         m_vOpenUDID = br.ReadScString();
         m_vMacAddress = br.ReadScString();
         m_vDevice = br.ReadScString();
         br.ReadInt32WithEndian();//00 1E 84 81, readDataReference for m_vPreferredLanguage
         m_vPreferredDeviceLanguage = br.ReadScString();
         //unchecked
         m_vPhoneId = br.ReadScString();
         m_vGameVersion = br.ReadScString();
         br.ReadByte();//01
         br.ReadInt32WithEndian();//00 00 00 00
         m_vSignature2 = br.ReadScString();
         m_vSignature3 = br.ReadScString();
         br.ReadByte();//01
         m_vSignature4 = br.ReadScString();
         m_vClientSeed = br.ReadUInt32WithEndian();
         Debugger.WriteLine("[M] Client with user id " + m_vAccountId + " accessing with " + m_vDevice);
         if(GetMessageVersion() >=7 )//7.200
         {
             br.ReadByte();
             br.ReadUInt32WithEndian();
             br.ReadUInt32WithEndian();
         }
     }
 }
開發者ID:KaskidFoundations,項目名稱:ucs,代碼行數:35,代碼來源:LoginMessage.cs

示例2: NewShopItemsSeenCommand

 public NewShopItemsSeenCommand(BinaryReader br)
 {
     uint NewShopItemNumber = br.ReadUInt32WithEndian();
     uint Unknown1 = br.ReadUInt32WithEndian();
     uint Unknown2 = br.ReadUInt32WithEndian();
     uint Unknown3 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:7,代碼來源:NewShopItemsSeenCommand.cs

示例3: ToggleAttackModeCommand

 public ToggleAttackModeCommand(BinaryReader br)
 {
     BuildingId = br.ReadUInt32WithEndian(); //buildingId - 0x1DCD6500;
     Unknown1 = br.ReadByte();
     Unknown2 = br.ReadUInt32WithEndian();
     Unknown3 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:7,代碼來源:ToggleAttackModeCommand.cs

示例4: UpgradeUnitCommand

 public UpgradeUnitCommand(BinaryReader br)
 {
     BuildingId = br.ReadInt32WithEndian(); //buildingId - 0x1DCD6500;
     Unknown1 = br.ReadUInt32WithEndian();
     UnitData = (CombatItemData)br.ReadDataReference();//.ReadInt32WithEndian();
     Unknown2 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:7,代碼來源:UpgradeUnitCommand.cs

示例5: DonateAllianceUnitCommand

 public DonateAllianceUnitCommand(BinaryReader br)
 {
     Unknown1 = br.ReadUInt32WithEndian();
     PlayerId = br.ReadUInt32WithEndian();
     UnitType = br.ReadUInt32WithEndian();
     Unknown2 = br.ReadUInt32WithEndian();
     Unknown3 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:8,代碼來源:DonateAllianceUnitCommand.cs

示例6: TrainUnitCommand

 public TrainUnitCommand(BinaryReader br)
 {
     BuildingId = br.ReadInt32WithEndian(); //buildingId - 0x1DCD6500;
     Unknown1 = br.ReadUInt32WithEndian();
     UnitType = br.ReadInt32WithEndian();
     Count = br.ReadInt32WithEndian();
     Unknown3 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:8,代碼來源:TrainUnitCommand.cs

示例7: CancelUnitProductionCommand

 public CancelUnitProductionCommand(BinaryReader br)
 {
     BuildingId = br.ReadInt32WithEndian(); //buildingId - 0x1DCD6500;
     Unknown1 = br.ReadUInt32WithEndian();
     UnitType = br.ReadInt32WithEndian();
     Count = br.ReadInt32WithEndian();
     Unknown3 = br.ReadUInt32WithEndian();
     Unknown4 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:9,代碼來源:CancelUnitProductionCommand.cs

示例8: Decode

        public override void Decode()
        {
            using (var br = new BinaryReader(new MemoryStream(GetData())))
            {
                Subtick = br.ReadUInt32WithEndian();
                Checksum = br.ReadUInt32WithEndian();
                NumberOfCommands = br.ReadUInt32WithEndian();

                if (NumberOfCommands > 0)
                {
                    NestedCommands = br.ReadBytes(GetLength());
                }
            }
        }
開發者ID:tempdban,項目名稱:UCR-1,代碼行數:14,代碼來源:ExecuteCommandsMessage.cs

示例9: Decode

        public override void Decode()
        {
            using (var br = new BinaryReader(new MemoryStream(GetData())))
            {
                //Console.WriteLine(base.ToHexString());
                Unknown1 = br.ReadUInt32WithEndian();
                Unknown2 = br.ReadUInt32WithEndian();
                NumberOfCommands = br.ReadUInt32WithEndian();

                if (NumberOfCommands > 0)
                {
                    m_vCommands = br.ReadBytes(GetLength() - 12);
                }
            }
        }
開發者ID:KaskidFoundations,項目名稱:ucs,代碼行數:15,代碼來源:ExecuteCommandsMessage.cs

示例10: RemoveUnitsCommand

        public RemoveUnitsCommand(BinaryReader br)
        {
            Unknown1 = br.ReadUInt32WithEndian();
            UnitTypesCount = br.ReadInt32WithEndian();

            UnitsToRemove = new List<UnitToRemove>();
            for (int i = 0; i < UnitTypesCount; i++)
            {
                CharacterData unit = (CharacterData)br.ReadDataReference();
                int count = br.ReadInt32WithEndian();
                int level = br.ReadInt32WithEndian();
                UnitsToRemove.Add(new UnitToRemove() { Data = unit, Count = count, Level = level });
            }

            Unknown2 = br.ReadUInt32WithEndian();
        }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:16,代碼來源:RemoveUnitsCommand.cs

示例11: BuyBuildingCommand

 public BuyBuildingCommand(BinaryReader br)
 {
     X = br.ReadInt32WithEndian();
     Y = br.ReadInt32WithEndian();
     BuildingId = br.ReadInt32WithEndian();
     Unknown1 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:7,代碼來源:BuyBuildingCommand.cs

示例12: CastSpellCommand

 public CastSpellCommand(BinaryReader br)
 {
     X = br.ReadInt32WithEndian();
     Y = br.ReadInt32WithEndian();
     Spell = (SpellData)br.ReadDataReference();
     Unknown1 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:7,代碼來源:CastSpellCommand.cs

示例13: BuyDecoCommand

 public BuyDecoCommand(BinaryReader br)
 {
     X = br.ReadInt32WithEndian();
     Y = br.ReadInt32WithEndian();
     DecoId = br.ReadInt32WithEndian();
     Unknown1 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:7,代碼來源:BuyDecoCommand.cs

示例14: MoveBuildingCommand

 public MoveBuildingCommand(BinaryReader br)
 {
     X = br.ReadInt32WithEndian();
     Y = br.ReadInt32WithEndian();
     BuildingId = br.ReadInt32WithEndian(); //buildingId - 0x1DCD6500;
     Unknown1 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:7,代碼來源:MoveBuildingCommand.cs

示例15: PlaceAttackerCommand

 public PlaceAttackerCommand(BinaryReader br)
 {
     X = br.ReadInt32WithEndian();
     Y = br.ReadInt32WithEndian();
     Unit = (CharacterData)br.ReadDataReference();
     Unknown1 = br.ReadUInt32WithEndian();
 }
開發者ID:0trebor0,項目名稱:clash-of-warriors-server,代碼行數:7,代碼來源:PlaceAttackerCommand.cs


注:本文中的System.IO.BinaryReader.ReadUInt32WithEndian方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。