Exemplo n.º 1
0
        public override CVariable SetValue(object val)
        {
            this.IsSerialized = true;
            switch (val)
            {
            case string s:
                this.DepotPath = s;
                break;

            case ushort o:
                this.SetValueInternal(o);
                break;

            case IREDRef soft:
                this.DepotPath = soft.DepotPath;
                //this.ClassName = cvar.ClassName;
                this.Flags = soft.Flags;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            return(this);
        }
Exemplo n.º 2
0
        private void SetValueInternal(ushort value)
        {
            if (value > 0)
            {
                DepotPath = cr2w.Imports[value - 1].DepotPathStr;
                Flags     = (EImportFlags)cr2w.Imports[value - 1].Flags;
            }
            else
            {
                DepotPath = "";
                Flags     = EImportFlags.Default;

                //throw new InvalidParsingException("rRef");
            }
        }
Exemplo n.º 3
0
        public override CVariable SetValue(object val)
        {
            switch (val)
            {
            case ushort o:
                this.SetValueInternal(o);
                break;

            case ISoftAccessor soft:
                this.DepotPath = soft.DepotPath;
                //this.ClassName = cvar.ClassName;
                this.Flags = soft.Flags;
                break;
            }

            return(this);
        }
Exemplo n.º 4
0
        private void SetValueInternal(ushort value)
        {
            if (value > 0)
            {
                DepotPath = cr2w.Imports[value - 1].DepotPathStr;

                //var filetype = cr2w.Imports[value - 1].Import.className;
                //ClassName = cr2w.Names[filetype].Str;

                Flags = (EImportFlags)cr2w.Imports[value - 1].Import.flags;
            }
            else
            {
                DepotPath = "";
                //ClassName = "";
                Flags = EImportFlags.Default;
            }
        }
Exemplo n.º 5
0
        private void SetValueInternal(ushort value)
        {
            if (value > 0)
            {
                DepotPath = cr2w.Imports[value - 1].DepotPathStr;

                //var filetype = cr2w.Imports[value - 1].Import.className;
                //ClassName = cr2w.Names[filetype].Str;

                Flags = (EImportFlags)cr2w.Imports[value - 1].Flags;
            }
            else
            {
                DepotPath = "";
                //ClassName = "";
                Flags = EImportFlags.Default;

                throw new InvalidParsingException("rRef");
            }
        }
Exemplo n.º 6
0
 public SImportEntry(string classname, string path, EImportFlags flags)
 {
     ClassName = classname;
     Path      = path;
     Flags     = flags;
 }