Exemplo n.º 1
0
        public static ParameterInfo From(SaintCoinach.Xiv.ParameterValue value)
        {
            var info = new ParameterInfo();

            info.Type  = value.Type;
            info.Index = value.Index;

            if (value is ParameterValueRelativeLimited)
            {
                info.Maximum = ((ParameterValueRelativeLimited)value).Maximum;
            }

            if (value is ParameterValueRelative)
            {
                info.Amount = ((ParameterValueRelative)value).Amount;
            }
            else if (value is ParameterValueFixed)
            {
                info.Amount = ((ParameterValueFixed)value).Amount;
            }
            else
            {
                throw new NotImplementedException();
            }

            return(info);
        }