Exemple #1
0
        public bool SetCommonProperty(uint crc, BluaReader blua)
        {
            bool v4 = false;

            var v5 = GetDamagableBlueprint();

            if (v5 != null && false) // TODO: struct is returned in the above call
            {
                v4 = true;
            }

            var v7 = GetAudibleBlueprint();

            if (v7 != null && false) // TODO: struct is returned in the above call
            {
                v4 = true;
            }

            var v8 = GetModelRenderableBlueprint();

            if (v8 != null && false) // TODO: struct is returned in the above call
            {
                v4 = true;
            }

            var v9 = GetTargetableBlueprint();

            if (v9 != null && false) // TODO: struct is returned in the above call
            {
                v4 = true;
            }

            var v10 = GetAIAttractionPtBlueprint();

            if (v10 != null && false) // TODO: struct is returned in the above call
            {
                v4 = true;
            }

            var v11 = GetControllableBlueprint();

            if (v11 != null && v11.SetControllableProperty(crc, blua))
            {
                v4 = true;
            }

            if (Hash.StringToHash("dynamic") == crc)
            {
                Flags ^= (byte)((blua.ReadByte() ^ Flags) & 1);

                return(true);
            }

            if (Hash.StringToHash("UseDynamicPool") == crc)
            {
                Flags ^= (byte)(((2 * blua.ReadByte()) ^ Flags) & 2);

                return(true);
            }

            if (Hash.StringToHash("priority") == crc)
            {
                var prio = blua.ReadInt();
                if (prio >= 0)
                {
                    if (prio > 255)
                    {
                        prio = 255;
                    }

                    Priority = (byte)prio;
                }
                else
                {
                    Priority = 0;
                }

                return(true);
            }

            if (Hash.StringToHash("backup") == crc)
            {
                var crc2 = blua.ReadInt();
                if (crc2 != Hash.StringToHash("NONE") && crc2 != 0)
                {
                    Backup = null; // TODO
                }
                else
                {
                    Backup = null;
                }

                return(true);
            }

            if (Hash.StringToHash("managed") == crc)
            {
                Flags ^= (byte)(((4 * blua.ReadByte()) ^ Flags) & 4);

                return(true);
            }

            return(v4);
        }
        // TODO: read done, data storage isn't
        public bool Sub1634800(uint crc, BluaReader blua)
        {
            uint field;

            if (crc == 0x404D1343U)
            {
                blua.ReadInt(); // Not using the value

                return(true);
            }

            if (crc != 0xDB0F705CU)
            {
                if (crc != 0xFB31F1EFU)
                {
                    return(false);
                }

                field = blua.ReadUInt();

                if (field != 0x4FF9F863U)
                {
                    Unk8 = field;
                }

                return(true);
            }

            var str2 = blua.ReadString(128);

            field = blua.ReadUInt();

            if (field <= 0x3290BA65U)
            {
                if (field == 0x3290BA65U)
                {
                    field = blua.ReadUInt();

                    if (field != 0x4FF9F863U)
                    {
                        // TODO Sub656A10
                    }

                    return(true);
                }

                if (field == 0x1B444F31)
                {
                    var b = blua.ReadByte();
                    if (b != 0)
                    {
                        // TODO: Sub656870
                    }

                    return(true);
                }

                if (field == 0x2B93BDA9)
                {
                    field = blua.ReadUInt();
                    // TODO: Sub656940

                    return(true);
                }
            }

            if (field != 0xB9059DF9)
            {
                if (field != 0xF0676C78)
                {
                    if (field == 0xF5B799C2)
                    {
                        var str1 = blua.ReadString(128);
                        if (str1 != "none" && !string.IsNullOrEmpty(str1))
                        {
                            // TODO: Sub690650
                        }
                    }

                    return(true);
                }

                field = blua.ReadUInt();
                // TODO: Sub656940

                return(true);
            }

            var cnt = blua.ReadUInt();
            var i   = 0;

            while (i < cnt)
            {
                var str1 = blua.ReadString(128);

                ++i;

                // TODO: Sub656D20
            }

            return(true);
        }
        public override bool SetProperty(uint crc, BluaReader blua)
        {
            // In sub function: Sub4A26D0
            switch (crc)
            {
            case 0x0424DD32:
                _ = blua.ReadByte();
                return(true);

            case 0x07B13063:
                _ = blua.ReadInt();
                return(true);

            case 0x165C1FD7:
                _ = blua.ReadInt();
                return(true);

            case 0x19BAB4C9:
                _ = blua.ReadFloat();
                return(true);

            case 0x2F1820CC:
                _ = blua.ReadFloat();
                return(true);

            case 0x3570F09D:
                _ = blua.ReadInt();
                return(true);

            case 0x37FC008D:
                _ = blua.ReadFloat();
                return(true);

            case 0x4177A478:
                _ = blua.ReadInt();
                return(true);

            case 0x44885A78:
                _ = blua.ReadBool();
                return(true);

            case 0x6A9AB174:
                _ = blua.ReadFloat();
                return(true);

            case 0x7154DC63:
                _ = blua.ReadFloat();
                return(true);

            case 0x722C0953:
                _ = blua.ReadInt();
                return(true);

            case 0x77776D5A:
                _ = blua.ReadInt();
                return(true);

            case 0x7A2AA5EF:
                _ = blua.ReadFloat();
                return(true);

            case 0x85B5E29F:
                _ = blua.ReadString(32);
                return(true);

            case 0x89A84EF5:     // 4 bytes
                _ = blua.ReadInt();
                return(true);

            case 0x97EE12C6:     // 1 byte
                _ = blua.ReadByte();
                return(true);

            case 0xA3DBF09D:     // 1 byte
                _ = blua.ReadByte();
                return(true);

            case 0xA77EDAAA:     // 1 byte
                _ = blua.ReadByte();
                return(true);

            case 0xAE350719:
                _ = blua.ReadFloat();
                return(true);

            case 0xBCFE6314:
                _ = blua.ReadString(128);
                return(true);

            case 0xBE5952B1:
                _ = blua.ReadFloat();
                return(true);

            case 0xBF930289:     // 4 bytes
                _ = blua.ReadInt();
                return(true);

            case 0xC072E94A:
                _ = blua.ReadFloat();
                return(true);

            case 0xC4C412CD:
                _ = blua.ReadFloat();
                return(true);

            case 0xCA6B9057:     // 4 bytes
                _ = blua.ReadInt();
                return(true);

            case 0xCACFD6AA:
                _ = blua.ReadInt();
                return(true);

            case 0xCE629E7E:
                _ = blua.ReadInt();
                return(true);

            case 0xD6F4D903:
                _ = blua.ReadFloat();
                return(true);

            case 0xD72AA401:
                _ = blua.ReadInt();
                return(true);

            case 0xD730D0E1:
                _ = blua.ReadFloat();
                return(true);

            case 0xD79C2BE9:     // PblCRC
                _ = blua.ReadInt();
                return(true);

            case 0xDDF1EE0F:
                _ = blua.ReadFloat();
                return(true);

            case 0xE0B01D9F:
                Unkstr40 = blua.ReadString(128);
                return(true);

            case 0xE4E34549:     // 4 bytes
                _ = blua.ReadInt();
                return(true);

            case 0xF4BADFDB:
                _ = blua.ReadFloat();
                return(true);

            case 0xF6B4FF0E:
                _ = blua.ReadInt();
                return(true);

            case 0xFE8BAE82:     // 4 bytes
                _ = blua.ReadInt();
                return(true);

            default:
                return(false);
            }
        }