示例#1
0
        public static int GetUpdateField(CorpseField corpseField)
        {
            var typeString = string.Format("WowPacketParser.Enums.Version.{0}.CorpseField", ClientVersion.GetVersionString());

            var newEnumType = _assembly.GetType(typeString);

            foreach (int val in Enum.GetValues(newEnumType))
            {
                if (Enum.GetName(newEnumType, val) == corpseField.ToString())
                {
                    return(val);
                }
            }

            return((int)corpseField);
        }
示例#2
0
        public static int GetUpdateField(CorpseField corpseField)
        {
            var typeString = string.Format("WowPacketParser.Enums.Version.{0}.CorpseField", ClientVersion.GetVersionString());

            var newEnumType = _assembly.GetType(typeString);

            foreach (int val in Enum.GetValues(newEnumType))
                if (Enum.GetName(newEnumType, val) == corpseField.ToString())
                    return val;

            return (int)corpseField;
        }