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


C# Packet.ReadTime方法代碼示例

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


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

示例1: HandleGMTicketCaseStatus

        public static void HandleGMTicketCaseStatus(Packet packet)
        {
            if (ClientVersion.RemovedInVersion(ClientVersionBuild.V6_2_2_20444))
            {
                packet.ReadTime("OldestTicketTime");
                packet.ReadTime("UpdateTime");
            }

            var int24 = packet.ReadInt32("CasesCount");
            for (int i = 0; i < int24; i++)
            {
                packet.ReadInt32("CaseID", i);
                packet.ReadInt32("CaseOpened", i);
                packet.ReadInt32("CaseStatus", i);
                packet.ReadInt16("CfgRealmID", i);
                packet.ReadInt64("CharacterID", i);
                packet.ReadInt32("WaitTimeOverrideMinutes", i);

                packet.ResetBitReader();
                var bits12 = packet.ReadBits(11);
                var bits262 = packet.ReadBits(10);

                packet.ReadWoWString("Url", bits12, i);
                packet.ReadWoWString("WaitTimeOverrideMessage", bits262, i);
            }
        }
開發者ID:Gooyeth,項目名稱:WowPacketParser,代碼行數:26,代碼來源:TicketHandler.cs

示例2: HandleAccountDataTimes

        public static void HandleAccountDataTimes(Packet packet)
        {
            packet.ReadUInt32("unk24");
            packet.ReadTime("Server Time");

            for (var i = 0; i < 8; ++i)
                packet.ReadTime("[" + (AccountDataType)i + "]" + " Time");
            packet.ReadBit("Unk Bit");
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:9,代碼來源:AccountDataHandler.cs

示例3: HandleCriteriaPlayer

 public static void HandleCriteriaPlayer(Packet packet)
 {
     packet.ReadInt32("Id");
     packet.ReadInt64("Quantity");
     packet.ReadPackedGuid128("Guid");
     packet.ReadInt32("Flags");
     packet.ReadPackedTime("Date");
     packet.ReadTime("TimeFromStart");
     packet.ReadTime("TimeFromCreate");
 }
開發者ID:ChipLeo,項目名稱:WowPacketParser,代碼行數:10,代碼來源:AchievementHandler.cs

示例4: HandleAccountDataTimes

        public static void HandleAccountDataTimes(Packet packet)
        {
            packet.ReadPackedGuid128("Guid");
            packet.ReadTime("Server Time");

            for (var i = 0; i < 8; ++i)
            {
                packet.ReadTime("[" + (AccountDataType)i + "]" + " Time");
            }
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:10,代碼來源:AccountDataHandler.cs

示例5: HandleAccountDataTimes

        public static void HandleAccountDataTimes(Packet packet)
        {
            packet.ReadBit("byte20");

            for (var i = 0; i < 8; i++)
                packet.ReadTime("[" + (AccountDataType)i + "]" + " Time");

            packet.ReadUInt32("dword16");
            packet.ReadTime("Server Time"); //24*4
        }
開發者ID:ChipLeo,項目名稱:WowPacketParser,代碼行數:10,代碼來源:AccountDataHandler.cs

示例6: HandleAccountDataTimes547

        public static void HandleAccountDataTimes547(Packet packet)
        {
            packet.ReadUInt32("dword10");
            packet.ReadTime("Server Time");

            for (var i = 0; i < 8; ++i)
            {
                packet.ReadTime("[" + (AccountDataType)i + "]" + " Time");
            }

            packet.ReadBit("byte18");
        }
開發者ID:Walkum,項目名稱:WowPacketParser_Skyfire,代碼行數:12,代碼來源:AccountDataHandler.cs

示例7: ReadCriteriaProgress

        public static void ReadCriteriaProgress(Packet packet, params object[] idx)
        {
            packet.ReadInt32("Id", idx);
            packet.ReadUInt64("Quantity", idx);
            packet.ReadPackedGuid128("Player", idx);
            packet.ReadPackedTime("Date", idx);
            packet.ReadTime("TimeFromStart", idx);
            packet.ReadTime("TimeFromCreate", idx);

            packet.ResetBitReader();
            packet.ReadBits("Flags", 4, idx); // some flag... & 1 -> delete
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:12,代碼來源:AchievementHandler.cs

示例8: HandleAccountCriteriaUpdate

        public static void HandleAccountCriteriaUpdate(Packet packet)
        {
            var counter = new byte[8];
            var accountId = new byte[8];

            counter[4] = packet.ReadBit();
            accountId[2] = packet.ReadBit();
            counter[2] = packet.ReadBit();
            accountId[4] = packet.ReadBit();
            counter[0] = packet.ReadBit();
            counter[5] = packet.ReadBit();
            accountId[3] = packet.ReadBit();
            counter[3] = packet.ReadBit();
            accountId[6] = packet.ReadBit();
            counter[6] = packet.ReadBit();
            accountId[1] = packet.ReadBit();
            accountId[7] = packet.ReadBit();
            counter[1] = packet.ReadBit();

            packet.ReadBits("Flags", 4); // some flag... & 1 -> delete

            accountId[5] = packet.ReadBit();
            counter[7] = packet.ReadBit();
            accountId[0] = packet.ReadBit();

            packet.ReadXORByte(accountId, 7);
            packet.ReadTime("Timer 2"); // 80
            packet.ReadInt32("Criteria ID"); // 16
            packet.ReadXORByte(counter, 7);
            packet.ReadTime("Timer 1"); // 76
            packet.ReadXORByte(accountId, 4);
            packet.ReadXORByte(accountId, 3);
            packet.ReadPackedTime("Time");
            packet.ReadXORByte(counter, 0);
            packet.ReadXORByte(counter, 1);
            packet.ReadXORByte(counter, 2);
            packet.ReadXORByte(counter, 3);
            packet.ReadXORByte(accountId, 1);
            packet.ReadXORByte(counter, 4);
            packet.ReadXORByte(counter, 5);
            packet.ReadXORByte(accountId, 5);
            packet.ReadXORByte(accountId, 2);
            packet.ReadXORByte(counter, 6);
            packet.ReadXORByte(accountId, 0);
            packet.ReadXORByte(accountId, 6);

            packet.AddValue("Account", BitConverter.ToUInt64(accountId, 0));
            packet.AddValue("Counter", BitConverter.ToInt64(counter, 0));
        }
開發者ID:ChipLeo,項目名稱:WowPacketParser,代碼行數:49,代碼來源:AchievementHandler.cs

示例9: HandleChallengeModeRequestLeadersResult

        public static void HandleChallengeModeRequestLeadersResult(Packet packet)
        {
            packet.ReadInt32("MapID");
            packet.ReadTime("LastGuildUpdate");
            packet.ReadTime("LastRealmUpdate");

            var int4 = packet.ReadInt32("GuildLeadersCount");
            var int9 = packet.ReadInt32("RealmLeadersCount");

            for (int i = 0; i < int4; i++)
                ReadChallengeModeAttempt(packet, i, "GuildLeaders");

            for (int i = 0; i < int9; i++)
                ReadChallengeModeAttempt(packet, i, "RealmLeaders");
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:15,代碼來源:ChallengeModeHandler.cs

示例10: HandlePetNameQueryResponse

        public static void HandlePetNameQueryResponse(Packet packet)
        {
            var number = packet.ReadUInt64("Pet number");
            var hasData = packet.ReadBit();
            if (!hasData)
                return;

            const int maxDeclinedNameCases = 5;
            var declinedNameLen = new int[maxDeclinedNameCases];
            for (var i = 0; i < maxDeclinedNameCases; ++i)
                declinedNameLen[i] = (int)packet.ReadBits(7);

            packet.ReadBit("Declined");
            var len = packet.ReadBits(8);

            for (var i = 0; i < maxDeclinedNameCases; ++i)
                if (declinedNameLen[i] != 0)
                    packet.ReadWoWString("Declined name", declinedNameLen[i], i);

            packet.ReadTime("Time");
            var petName = packet.ReadWoWString("Pet name", len);

            var guidArray = (from pair in StoreGetters.NameDict where Equals(pair.Value, number) select pair.Key).ToList();
            foreach (var guid in guidArray)
                StoreGetters.NameDict[guid] = petName;
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:26,代碼來源:PetHandler.cs

示例11: HandleServerUpdateAccountData

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

            packet.ReadBitsE<AccountDataType>("Data Type", 3);

            packet.StartBitStream(guid, 5, 1, 3, 7, 0, 4, 2, 6);

            packet.ReadXORBytes(guid, 3, 1, 5);

            var decompCount = packet.ReadInt32();
            var compCount = packet.ReadInt32();

            var pkt = packet.Inflate(compCount, decompCount, false);
            var data = pkt.ReadWoWString(decompCount);
            pkt.ClosePacket(false);

            packet.AddValue("Account Data", data);

            packet.ReadXORBytes(guid, 7, 4, 0, 6, 2);

            packet.ReadTime("Login Time");

            packet.WriteGuid("GUID", guid);
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:25,代碼來源:AccountDataHandler.cs

示例12: HandleBlackMarketRequestItemsResult

        public static void HandleBlackMarketRequestItemsResult(Packet packet)
        {
            packet.ReadTime("LastUpdateID");
            var count = packet.ReadInt32("ItemsCount");

            for (int i = 0; i < count; i++)
                ReadBlackMarketItem(packet, "Items", i);
        }
開發者ID:TrinityCore,項目名稱:WowPacketParser,代碼行數:8,代碼來源:BlackMarketHandler.cs

示例13: HandleAccountDataTimes2

        public static void HandleAccountDataTimes2(Packet packet)
        {
            packet.ReadTime("Server Time");
            packet.ReadByte("Unk Byte");

            var mask = 0;
            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_2_0_10192))
                mask = packet.ReadInt32("Mask");

            for (var i = 0; i < 8; i++)
            {
                if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_2_0_10192))
                    if ((mask & (1 << i)) == 0)
                        continue;

                packet.ReadTime("[" + (AccountDataType)i + "]" + " Time");
            }
        }
開發者ID:Walkum,項目名稱:WowPacketParser_Skyfire,代碼行數:18,代碼來源:AccountDataHandler.cs

示例14: HandleClientUpdateAccountData

        public static void HandleClientUpdateAccountData(Packet packet)
        {
            packet.ReadTime("Login Time");

            var decompCount = packet.ReadInt32();
            var compCount = packet.ReadInt32();
            var data = packet.Inflate(compCount, decompCount, false).ReadWoWString(decompCount);

            packet.WriteLine("Account Data {0}", data);
            packet.ReadEnum<AccountDataType>("Data Type", 3);
        }
開發者ID:Resike,項目名稱:WowPacketParser,代碼行數:11,代碼來源:AccountDataHandler.cs

示例15: HandleHotfixInfo

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

            for (var i = 0; i < count; ++i)
            {
                packet.ReadInt32E<DB2Hash>("Hotfix DB2 File", i);
                packet.ReadTime("Hotfix date", i);
                packet.ReadInt32("Hotfixed entry", i);
            }
        }
開發者ID:Oboltys,項目名稱:WowPacketParser,代碼行數:11,代碼來源:HotfixHandler.cs


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