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


C# ClientVersionBuild类代码示例

本文整理汇总了C#中ClientVersionBuild的典型用法代码示例。如果您正苦于以下问题:C# ClientVersionBuild类的具体用法?C# ClientVersionBuild怎么用?C# ClientVersionBuild使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: ParserAttribute

 // [addedInVersion, removedInVersion[
 public ParserAttribute(int opcode, ClientVersionBuild addedInVersion, ClientVersionBuild removedInVersion)
 {
     if (ClientVersion.AddedInVersion(addedInVersion) && ClientVersion.RemovedInVersion(removedInVersion))
         Opcode = opcode;
     else
         Opcode = 0;
 }
开发者ID:RazorCore,项目名称:WowPacketParser,代码行数:8,代码来源:ParserAttribute.cs

示例2: ParserAttribute

 // [addedInVersion, removedInVersion[
 public ParserAttribute(Opcode opcode, ClientVersionBuild addedInVersion, ClientVersionBuild removedInVersion)
 {
     if (ClientVersion.AddedInVersion(addedInVersion) && ClientVersion.RemovedInVersion(removedInVersion))
         Opcode = Opcodes.GetOpcode(opcode);
     else
         Opcode = 0;
 }
开发者ID:kandera,项目名称:WowPacketParser,代码行数:8,代码来源:ParserAttribute.cs

示例3: GetOpcodeName

        public static string GetOpcodeName(int opcodeId, ClientVersionBuild versionBuild)
        {
            foreach (var pair in GetOpcodeDictionary(versionBuild))
                if (pair.Value == opcodeId)
                    return pair.Key.ToString();

            return opcodeId.ToString();
        }
开发者ID:Supabad,项目名称:WowPacketParser,代码行数:8,代码来源:Opcodes.cs

示例4: GetOpcodeDictionary

 private static Dictionary<Opcode, int> GetOpcodeDictionary(ClientVersionBuild versionBuild)
 {
     switch (versionBuild)
     {
         case ClientVersionBuild.V2_4_3_8606:
         case ClientVersionBuild.V3_0_2_9056:
         case ClientVersionBuild.V3_0_3_9183:
         case ClientVersionBuild.V3_0_8_9464:
         case ClientVersionBuild.V3_0_8a_9506:
         case ClientVersionBuild.V3_0_9_9551:
         case ClientVersionBuild.V3_1_0_9767:
         case ClientVersionBuild.V3_1_1_9806:
         case ClientVersionBuild.V3_1_1a_9835:
         case ClientVersionBuild.V3_1_2_9901:
         case ClientVersionBuild.V3_1_3_9947:
         case ClientVersionBuild.V3_2_0_10192:
         case ClientVersionBuild.V3_2_0a_10314:
         case ClientVersionBuild.V3_2_2_10482:
         case ClientVersionBuild.V3_2_2a_10505:
         case ClientVersionBuild.V3_3_0_10958:
         case ClientVersionBuild.V3_3_0a_11159:
         case ClientVersionBuild.V3_3_3_11685:
         case ClientVersionBuild.V3_3_5a_12340:
         {
             return _V3_3_5_opcodes;
         }
         case ClientVersionBuild.V4_0_3_13329:
         {
             return _V4_0_3_opcodes;
         }
         case ClientVersionBuild.V4_0_6_13596:
         case ClientVersionBuild.V4_0_6a_13623:
         {
             return _V4_0_6_opcodes;
         }
         case ClientVersionBuild.V4_1_0_13914:
         case ClientVersionBuild.V4_1_0a_14007:
         {
             return _V4_1_0_opcodes;
         }
         case ClientVersionBuild.V4_2_0_14333:
         case ClientVersionBuild.V4_2_0a_14480:
         {
             return _V4_2_0_opcodes;
         }
         case ClientVersionBuild.V4_2_2_14545:
         {
             return _V4_2_2_opcodes;
         }
     }
     return _V3_3_5_opcodes; // Default case, should pick a better one
 }
开发者ID:Supabad,项目名称:WowPacketParser,代码行数:52,代码来源:Opcodes.cs

示例5: DBFieldNameAttribute

 /// <summary>
 /// [addedInVersion, removedInVersion[
 /// </summary>
 /// <param name="name">database field name</param>
 /// <param name="addedInVersion">initial version</param>
 /// <param name="removedInVersion">final version</param>
 public DBFieldNameAttribute(string name, ClientVersionBuild addedInVersion, ClientVersionBuild removedInVersion)
 {
     if (ClientVersion.AddedInVersion(addedInVersion) && ClientVersion.RemovedInVersion(removedInVersion))
     {
         Name = name;
         Count = 1;
     }
     else
     {
         Name = null;
         Count = 0;
     }
 }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:19,代码来源:DBFieldNameAttribute.cs

示例6: GetOpcode

        private static Opcode GetOpcode(int opcodeId, ClientVersionBuild build)
        {
            /* Remove this comment block if you need to find duplicated opcode
             * values in the opcode dictionaries.
             * This is not enabled by default because it is slow as sh*t.
             *
            var dict = GetOpcodeDictionary(build);
            var newDict = new Dictionary<Opcode, int>();
            foreach (var pair in dict)
            {
                if (newDict.ContainsKey(pair.Key) || newDict.ContainsValue(pair.Value))
                    throw new Exception(string.Format("Opcode dictionary got duplicated key ({0}) or value ({1}).",
                                                      pair.Key, pair.Value));
                newDict.Add(pair.Key, pair.Value);
            }*/

            foreach (var pair in GetOpcodeDictionary(build).Where(pair => pair.Value == opcodeId))
                return pair.Key;

            return (Opcode)opcodeId;
        }
开发者ID:hodobaj,项目名称:StrawberryTools,代码行数:21,代码来源:Opcodes.cs

示例7: HotfixVersionAttribute

 public HotfixVersionAttribute(ClientVersionBuild build, bool removedInVersion)
 {
     Build = build;
     RemovedInVersion = removedInVersion;
 }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:5,代码来源:HotfixStructureAttribute.cs

示例8: GetOpcodeDictionary

 public static BiDictionary<Opcode, int> GetOpcodeDictionary(ClientVersionBuild build, Direction direction)
 {
     switch (build)
     {
         case ClientVersionBuild.V1_12_1_5875:
         case ClientVersionBuild.V2_0_1_6180:
         case ClientVersionBuild.V2_0_3_6299:
         case ClientVersionBuild.V2_0_6_6337:
         case ClientVersionBuild.V2_1_0_6692:
         case ClientVersionBuild.V2_1_1_6739:
         case ClientVersionBuild.V2_1_2_6803:
         case ClientVersionBuild.V2_1_3_6898:
         case ClientVersionBuild.V2_2_0_7272:
         case ClientVersionBuild.V2_2_2_7318:
         case ClientVersionBuild.V2_2_3_7359:
         case ClientVersionBuild.V2_3_0_7561:
         case ClientVersionBuild.V2_3_2_7741:
         case ClientVersionBuild.V2_3_3_7799:
         case ClientVersionBuild.V2_4_0_8089:
         case ClientVersionBuild.V2_4_1_8125:
         case ClientVersionBuild.V2_4_2_8209:
         case ClientVersionBuild.V2_4_3_8606:
         case ClientVersionBuild.V3_0_2_9056:
         case ClientVersionBuild.V3_0_3_9183:
         case ClientVersionBuild.V3_0_8_9464:
         case ClientVersionBuild.V3_0_8a_9506:
         case ClientVersionBuild.V3_0_9_9551:
         case ClientVersionBuild.V3_1_0_9767:
         case ClientVersionBuild.V3_1_1_9806:
         case ClientVersionBuild.V3_1_1a_9835:
         case ClientVersionBuild.V3_1_2_9901:
         case ClientVersionBuild.V3_1_3_9947:
         case ClientVersionBuild.V3_2_0_10192:
         case ClientVersionBuild.V3_2_0a_10314:
         case ClientVersionBuild.V3_2_2_10482:
         case ClientVersionBuild.V3_2_2a_10505:
         case ClientVersionBuild.V3_3_0_10958:
         case ClientVersionBuild.V3_3_0a_11159:
         case ClientVersionBuild.V3_3_3_11685:
         case ClientVersionBuild.V3_3_3a_11723:
         case ClientVersionBuild.V3_3_5_12213:
         case ClientVersionBuild.V3_3_5a_12340:
         {
             return Opcodes_3_3_5.Opcodes(direction);
         }
         case ClientVersionBuild.V4_0_1_13164:
         case ClientVersionBuild.V4_0_1a_13205:
         case ClientVersionBuild.V4_0_3_13329:
         {
             return Opcodes_4_0_3.Opcodes(direction);
         }
         case ClientVersionBuild.V4_0_6_13596:
         case ClientVersionBuild.V4_0_6a_13623:
         {
             return Opcodes_4_0_6.Opcodes(direction);
         }
         case ClientVersionBuild.V4_1_0_13914:
         case ClientVersionBuild.V4_1_0a_14007:
         {
             return Opcodes_4_1_0.Opcodes(direction);
         }
         case ClientVersionBuild.V4_2_0_14333:
         case ClientVersionBuild.V4_2_0a_14480:
         {
             return Opcodes_4_2_0.Opcodes(direction);
         }
         case ClientVersionBuild.V4_2_2_14545:
         {
             return Opcodes_4_2_2.Opcodes(direction);
         }
         case ClientVersionBuild.V4_3_0_15005:
         case ClientVersionBuild.V4_3_0a_15050:
         {
             return Opcodes_4_3_0.Opcodes(direction);
         }
         case ClientVersionBuild.V4_3_2_15211:
         {
             return Opcodes_4_3_2.Opcodes(direction);
         }
         case ClientVersionBuild.V4_3_3_15354:
         {
             return Opcodes_4_3_3.Opcodes(direction);
         }
         case ClientVersionBuild.V4_3_4_15595:
         {
             return Opcodes_4_3_4.Opcodes(direction);
         }
         case ClientVersionBuild.V5_0_4_16016:
         {
             return Opcodes_5_0_4.Opcodes(direction);
         }
         case ClientVersionBuild.V5_0_5_16048:
         case ClientVersionBuild.V5_0_5a_16057:
         case ClientVersionBuild.V5_0_5b_16135:
         {
             return Opcodes_5_0_5.Opcodes(direction);
         }
         case ClientVersionBuild.V5_1_0_16309:
         case ClientVersionBuild.V5_1_0a_16357:
         {
//.........这里部分代码省略.........
开发者ID:ChipLeo,项目名称:WowPacketParser,代码行数:101,代码来源:Opcodes.cs

示例9: GetExpansion

 private static ClientType GetExpansion(ClientVersionBuild build)
 {
     if (build >= ClientVersionBuild.V4_0_3_13329)
         return ClientType.Cataclysm;
     else if (build >= ClientVersionBuild.V3_0_3_9183)
         return ClientType.WrathOfTheLichKing;
     else if (build >= ClientVersionBuild.V2_0_3_6299)
         return ClientType.TheBurningCrusade;
     else
         return ClientType.WorldOfWarcraft;
 }
开发者ID:CarlosX,项目名称:WowPacketParser,代码行数:11,代码来源:ClientVersion.cs

示例10: GetOpcodeDictionary

 private static BiDictionary<Opcode, int> GetOpcodeDictionary(ClientVersionBuild build)
 {
     switch (build)
     {
         case ClientVersionBuild.V2_4_3_8606:
         case ClientVersionBuild.V3_0_2_9056:
         case ClientVersionBuild.V3_0_3_9183:
         case ClientVersionBuild.V3_0_8_9464:
         case ClientVersionBuild.V3_0_8a_9506:
         case ClientVersionBuild.V3_0_9_9551:
         case ClientVersionBuild.V3_1_0_9767:
         case ClientVersionBuild.V3_1_1_9806:
         case ClientVersionBuild.V3_1_1a_9835:
         case ClientVersionBuild.V3_1_2_9901:
         case ClientVersionBuild.V3_1_3_9947:
         case ClientVersionBuild.V3_2_0_10192:
         case ClientVersionBuild.V3_2_0a_10314:
         case ClientVersionBuild.V3_2_2_10482:
         case ClientVersionBuild.V3_2_2a_10505:
         case ClientVersionBuild.V3_3_0_10958:
         case ClientVersionBuild.V3_3_0a_11159:
         case ClientVersionBuild.V3_3_3_11685:
         case ClientVersionBuild.V3_3_3a_11723:
         case ClientVersionBuild.V3_3_5a_12340:
         {
             return Opcodes_3_3_5.Opcodes();
         }
         case ClientVersionBuild.V4_0_3_13329:
         {
             return Opcodes_4_0_3.Opcodes();
         }
         case ClientVersionBuild.V4_0_6_13596:
         case ClientVersionBuild.V4_0_6a_13623:
         {
             return Opcodes_4_0_6.Opcodes();
         }
         case ClientVersionBuild.V4_1_0_13914:
         case ClientVersionBuild.V4_1_0a_14007:
         {
             return Opcodes_4_1_0.Opcodes();
         }
         case ClientVersionBuild.V4_2_0_14333:
         case ClientVersionBuild.V4_2_0a_14480:
         {
             return Opcodes_4_2_0.Opcodes();
         }
         case ClientVersionBuild.V4_2_2_14545:
         {
             return Opcodes_4_2_2.Opcodes();
         }
         case ClientVersionBuild.V4_3_0_15005:
         case ClientVersionBuild.V4_3_0_15050:
         {
             return Opcodes_4_3_0.Opcodes();
         }
         case ClientVersionBuild.V4_3_2_15211:
         {
             return Opcodes_4_3_2.Opcodes();
         }
         case ClientVersionBuild.V4_3_3_15354:
         {
             return Opcodes_4_3_3.Opcodes();
         }
         case ClientVersionBuild.V4_3_4_15595:
         {
             return Opcodes_4_3_4.Opcodes();
         }
         default:
         {
             return Opcodes_3_3_5.Opcodes();
         }
     }
 }
开发者ID:kandera,项目名称:WowPacketParser,代码行数:73,代码来源:Opcodes.cs

示例11: GetExpansion

        private static ClientType GetExpansion(ClientVersionBuild build)
        {
            if (build >= ClientVersionBuild.V5_0_4_16016)
                return ClientType.MistsOfPandaria;
            if (build >= ClientVersionBuild.V4_0_3_13329)
                return ClientType.Cataclysm;
            if (build >= ClientVersionBuild.V3_0_3_9183)
                return ClientType.WrathOfTheLichKing;
            if (build >= ClientVersionBuild.V2_0_3_6299)
                return ClientType.TheBurningCrusade;

            return ClientType.WorldOfWarcraft;
        }
开发者ID:Walkum,项目名称:WowPacketParser_Skyfire,代码行数:13,代码来源:ClientVersion.cs

示例12: GetOpcode

 public static int GetOpcode(Opcode opcode, ClientVersionBuild versionBuild)
 {
     int opcodeId;
     GetOpcodeDictionary(versionBuild).TryGetValue(opcode, out opcodeId);
     return opcodeId;
 }
开发者ID:Supabad,项目名称:WowPacketParser,代码行数:6,代码来源:Opcodes.cs

示例13: SetVersion

        public static void SetVersion(ClientVersionBuild version)
        {
            if (Build == version)
                return;

            Build = version;
            _expansion = GetExpansion(version);

            Opcodes.InitializeOpcodeDictionary();
            Handler.ResetHandlers();
            UpdateFields.ResetUFDictionaries();
            try
            {
                var asm = Assembly.Load($"WowPacketParserModule.{VersionDefiningBuild}");
                Trace.WriteLine($"Loading module WowPacketParserModule.{VersionDefiningBuild}.dll");

                Handler.LoadHandlers(asm, VersionDefiningBuild);

                // This is a huge hack to handle the abnormal situation that appeared with builds 6.0 and 6.1 having mostly the same packet structures
                if (!UpdateFields.LoadUFDictionaries(asm, version))
                    UpdateFields.LoadUFDictionaries(asm, VersionDefiningBuild);
            }
            catch (FileNotFoundException)
            {
                // No dll found, try to load the data in the executable itself
                UpdateFields.LoadUFDictionaries(Assembly.GetExecutingAssembly(), Build);
            }
        }
开发者ID:cmsimike,项目名称:WowPacketParser,代码行数:28,代码来源:ClientVersion.cs

示例14: GetOpcodeDictionary

 public static BiDictionary<Opcode, int> GetOpcodeDictionary(ClientVersionBuild build, Direction direction)
 {
     switch (build)
     {
         case ClientVersionBuild.V2_4_3_8606:
         case ClientVersionBuild.V3_0_2_9056:
         case ClientVersionBuild.V3_0_3_9183:
         case ClientVersionBuild.V3_0_8_9464:
         case ClientVersionBuild.V3_0_8a_9506:
         case ClientVersionBuild.V3_0_9_9551:
         case ClientVersionBuild.V3_1_0_9767:
         case ClientVersionBuild.V3_1_1_9806:
         case ClientVersionBuild.V3_1_1a_9835:
         case ClientVersionBuild.V3_1_2_9901:
         case ClientVersionBuild.V3_1_3_9947:
         case ClientVersionBuild.V3_2_0_10192:
         case ClientVersionBuild.V3_2_0a_10314:
         case ClientVersionBuild.V3_2_2_10482:
         case ClientVersionBuild.V3_2_2a_10505:
         case ClientVersionBuild.V3_3_0_10958:
         case ClientVersionBuild.V3_3_0a_11159:
         case ClientVersionBuild.V3_3_3_11685:
         case ClientVersionBuild.V3_3_3a_11723:
         case ClientVersionBuild.V3_3_5a_12340:
         {
             return Opcodes_3_3_5.Opcodes(direction);
         }
         case ClientVersionBuild.V4_0_3_13329:
         {
             return Opcodes_4_0_3.Opcodes(direction);
         }
         case ClientVersionBuild.V4_0_6_13596:
         case ClientVersionBuild.V4_0_6a_13623:
         {
             return Opcodes_4_0_6.Opcodes(direction);
         }
         case ClientVersionBuild.V4_1_0_13914:
         case ClientVersionBuild.V4_1_0a_14007:
         {
             return Opcodes_4_1_0.Opcodes(direction);
         }
         case ClientVersionBuild.V4_2_0_14333:
         case ClientVersionBuild.V4_2_0a_14480:
         {
             return Opcodes_4_2_0.Opcodes(direction);
         }
         case ClientVersionBuild.V4_2_2_14545:
         {
             return Opcodes_4_2_2.Opcodes(direction);
         }
         case ClientVersionBuild.V4_3_0_15005:
         case ClientVersionBuild.V4_3_0a_15050:
         {
             return Opcodes_4_3_0.Opcodes(direction);
         }
         case ClientVersionBuild.V4_3_2_15211:
         {
             return Opcodes_4_3_2.Opcodes(direction);
         }
         case ClientVersionBuild.V4_3_3_15354:
         {
             return Opcodes_4_3_3.Opcodes(direction);
         }
         case ClientVersionBuild.V4_3_4_15595:
         {
             return Opcodes_4_3_4.Opcodes(direction);
         }
         case ClientVersionBuild.V5_0_4_16016:
         {
             return Opcodes_5_0_4.Opcodes(direction);
         }
         case ClientVersionBuild.V5_0_5_16048:
         case ClientVersionBuild.V5_0_5a_16057:
         case ClientVersionBuild.V5_0_5b_16135:
         {
             return Opcodes_5_0_5.Opcodes(direction);
         }
         case ClientVersionBuild.V5_1_0_16309:
         case ClientVersionBuild.V5_1_0a_16357:
         {
             return Opcodes_5_1_0.Opcodes(direction);
         }
         case ClientVersionBuild.V5_2_0_16650:
         case ClientVersionBuild.V5_2_0_16669:
         case ClientVersionBuild.V5_2_0_16683:
         case ClientVersionBuild.V5_2_0_16685:
         case ClientVersionBuild.V5_2_0_16701:
         case ClientVersionBuild.V5_2_0_16709:
         case ClientVersionBuild.V5_2_0_16716:
         case ClientVersionBuild.V5_2_0_16733:
         case ClientVersionBuild.V5_2_0_16769:
         case ClientVersionBuild.V5_2_0_16826:
         {
             return Opcodes_5_2_0.Opcodes(direction);
         }
         case ClientVersionBuild.V5_3_0_16981:
         case ClientVersionBuild.V5_3_0_16983:
         case ClientVersionBuild.V5_3_0_16992:
         case ClientVersionBuild.V5_3_0_17055:
         case ClientVersionBuild.V5_3_0_17116:
//.........这里部分代码省略.........
开发者ID:Gooyeth,项目名称:WowPacketParser,代码行数:101,代码来源:Opcodes.cs

示例15: InVersion

 public static bool InVersion(ClientVersionBuild build1, ClientVersionBuild build2)
 {
     return AddedInVersion(build1) && RemovedInVersion(build2);
 }
开发者ID:DrEhsan,项目名称:WowPacketParser,代码行数:4,代码来源:ClientVersion.cs


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