示例#1
0
        public bool ImportContent(ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            try
            {
                int num;
                IPropertyStreamReader child = reader.GetChild(0x846d3a8c);
                if (child != null)
                {
                    mContents.mHousehold = Household.Create();

                    // Custom Function
                    if (!HouseholdEx.ImportContent(mContents.Household, resKeyTable, objIdTable, child))
                    {
                        return(false);
                    }
                }

                reader.ReadInt32(0x68d30928, out num, 0x2);
                mContents.mInventories = new ulong[num];
                int[] values = new int[num];
                reader.ReadInt32(0xa3b065d7, out values);
                for (int i = 0x0; i < values.Length; i++)
                {
                    ResourceKey key = resKeyTable[values[i]];
                    mContents.mInventories[i] = key.InstanceId;
                }
                return(true);
            }
            catch (Exception e)
            {
                Common.Exception("ImportContent", e);
                return(false);
            }
        }
        public override bool ImportContent(ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            bool result = base.ImportContent(resKeyTable, objIdTable, reader);

            reader.ReadInt32(0x0243DF80, out mNumScraps, 1);
            return(result);
        }
示例#3
0
        public bool ImportContent(ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            try
            {
                int num;
                IPropertyStreamReader child = reader.GetChild(0x846d3a8c);
                if (child != null)
                {
                    mContents.mHousehold = Household.Create();

                    // Custom Function
                    //if (!Household.ImportContent(resKeyTable, objIdTable, child))
                    if (Sims3.NiecModList.Persistable.ListCollon.AllowNiecDisposedSimDescriptions)
                    {
                        if (!Household_ImportContent(Household, resKeyTable, objIdTable, child))
                        {
                            return(false);
                        }
                    }
                    else
                    {
                        if (!Household.ImportContent(resKeyTable, objIdTable, child))
                        {
                            return(false);
                        }
                    }
                }

                reader.ReadInt32(0x68d30928, out num, 0x2);
                mContents.mInventories = new ulong[num];
                int[] values = new int[num];
                reader.ReadInt32(0xa3b065d7, out values);
                for (int i = 0x0; i < values.Length; i++)
                {
                    ResourceKey key = resKeyTable[values[i]];
                    mContents.mInventories[i] = key.InstanceId;
                }
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
示例#4
0
        // Cutdown version of function
        public static bool ImportContent(Household.Members ths, ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            try
            {
                Household.sRemapSimDescriptionIdsOnImport = !Household.IsTravelImport;

                int memberCount;
                reader.ReadInt32(0xe9b96005, out memberCount, 0);
                for (uint i = 0; i < memberCount; i++)
                {
                    IPropertyStreamReader child = reader.GetChild(i);
                    if (child != null)
                    {
                        ulong simDescriptionId;
                        child.ReadUint64(0x687720a6, out simDescriptionId, 0L);

                        SimDescription simDescription = null;
                        ulong newId = simDescriptionId;
                        if ((Household.sRemapSimDescriptionIdsOnImport) && (Household.sOldIdToNewSimDescriptionMap != null))
                        {
                            if (!Household.sOldIdToNewSimDescriptionMap.TryGetValue(simDescriptionId, out simDescription))
                            {
                                simDescription = null;
                            }
                        }
                        else
                        {
                            foreach (SimDescription sim in ths.AllSimDescriptionList)
                            {
                                if (sim.SimDescriptionId == newId)
                                {
                                    simDescription = sim;
                                    break;
                                }
                            }
                        }

                        if (simDescription != null)
                        {
                            SimDescriptionEx.ImportContent(simDescription, resKeyTable, objIdTable, child);
                        }
                    }
                }
            }
            finally
            {
                Household.sRemapSimDescriptionIdsOnImport = false;
            }

            return true;
        }
示例#5
0
        // Cutdown version of function
        public static bool ImportContent(Household.Members ths, ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            try
            {
                Household.sRemapSimDescriptionIdsOnImport = !Household.IsTravelImport;

                int memberCount;
                reader.ReadInt32(0xe9b96005, out memberCount, 0);
                for (uint i = 0; i < memberCount; i++)
                {
                    IPropertyStreamReader child = reader.GetChild(i);
                    if (child != null)
                    {
                        ulong simDescriptionId;
                        child.ReadUint64(0x687720a6, out simDescriptionId, 0L);

                        SimDescription simDescription = null;
                        ulong          newId          = simDescriptionId;
                        if ((Household.sRemapSimDescriptionIdsOnImport) && (Household.sOldIdToNewSimDescriptionMap != null))
                        {
                            if (!Household.sOldIdToNewSimDescriptionMap.TryGetValue(simDescriptionId, out simDescription))
                            {
                                simDescription = null;
                            }
                        }
                        else
                        {
                            foreach (SimDescription sim in ths.AllSimDescriptionList)
                            {
                                if (sim.SimDescriptionId == newId)
                                {
                                    simDescription = sim;
                                    break;
                                }
                            }
                        }

                        if (simDescription != null)
                        {
                            SimDescriptionEx.ImportContent(simDescription, resKeyTable, objIdTable, child);
                        }
                    }
                }
            }
            finally
            {
                Household.sRemapSimDescriptionIdsOnImport = false;
            }

            return(true);
        }
示例#6
0
        public override bool ImportContent(IPropertyStreamReader reader)
        {
            try
            {
                uint skillHash = GetSkillHash() - 1;

                reader.ReadInt32(skillHash, out mCashMade, 0);
                skillHash--;

                string[] newKeys;
                bool[]   newValues;

                bool found = reader.ReadString(skillHash, out newKeys);
                skillHash--;

                found = found & reader.ReadBool(skillHash, out newValues);
                skillHash--;

                mIsNew.Clear();

                if (found)
                {
                    for (int i = 0; i < newKeys.Length; i++)
                    {
                        mIsNew.Add(newKeys[i], newValues[i]);
                    }
                }

                return(base.ImportContent(reader));
            }
            catch (Exception e)
            {
                Common.Exception("ImportContent", e);
                return(false);
            }
        }
示例#7
0
        public static bool ImportContent(Household me, ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            ulong num2;
            int   num3;

            ulong[] numArray;
            ulong[] numArray2;
            ulong   num8;

            reader.ReadString(0x50e3d25c, out me.mName, "");
            reader.ReadInt32(0x33b96433, out me.mFamilyFunds, 0x0);
            reader.ReadString(0xd96b03f8, out me.mBioText, "");
            reader.ReadInt32(0x8af84d8, out me.mUnpaidBills, 0x0);
            reader.ReadInt32(0xc6fdb12d, out me.mLotHomeWorth, 0x0);
            long num = DateTime.Now.ToBinary();

            reader.ReadInt64(0x6384bbe4, out num, DateTime.Now.ToBinary());
            me.mExportTime = DateTime.FromBinary(num);
            reader.ReadBool(0x2213ca71, out me.mbLifetimeHappinessNotificationShown, false);
            IPropertyStreamReader child = reader.GetChild(0x91fa3ace);

            if (child != null)
            {
                me.mMembers.ImportContent(resKeyTable, objIdTable, child);

                // Custom to handle import of custom careers
                HouseholdMemberEx.ImportContent(me.mMembers, resKeyTable, objIdTable, child);
            }

            foreach (SimDescription description in Households.All(me))
            {
                try
                {
                    // Custom
                    if (Household.sOldIdToNewSimDescriptionMap != null)
                    {
                        if ((description.mOldSimDescriptionId != 0) &&
                            (!Household.sOldIdToNewSimDescriptionMap.ContainsKey(description.mOldSimDescriptionId)))
                        {
                            Household.sOldIdToNewSimDescriptionMap.Add(description.mOldSimDescriptionId, description);
                        }
                        if (!Household.sOldIdToNewSimDescriptionMap.ContainsKey(description.mSimDescriptionId))
                        {
                            Household.sOldIdToNewSimDescriptionMap.Add(description.mSimDescriptionId, description);
                        }
                    }

                    description.OnHouseholdChanged(me, true);
                    description.CareerManager.OnLoadFixup();

                    Occupation occupation = description.CareerManager.Occupation;
                    if (occupation != null)
                    {
                        occupation.RepairLocation();
                    }
                }
                catch (Exception e)
                {
                    Common.Exception(description, e);
                }
            }

            foreach (SimDescription description2 in Households.All(me))
            {
                try
                {
                    if (description2.Pregnancy != null)
                    {
                        SimDescription description3;
                        if ((Household.sOldIdToNewSimDescriptionMap != null) && Household.sOldIdToNewSimDescriptionMap.TryGetValue(description2.Pregnancy.DadDescriptionId, out description3))
                        {
                            description2.Pregnancy.DadDescriptionId = description3.SimDescriptionId;
                        }
                        else if (!Household.IsTravelImport && (me.mMembers.GetSimDescriptionFromId(description2.Pregnancy.DadDescriptionId) == null))
                        {
                            description2.Pregnancy.DadDescriptionId = 0x0L;
                        }
                    }
                }
                catch (Exception e)
                {
                    Common.Exception(description2, e);
                }
            }

            child = reader.GetChild(0xa14ee9b6);
            if (child != null)
            {
                // Custom Function
                ImportRelationships(me, resKeyTable, objIdTable, child);
            }

            reader.ReadInt32(0x872a7c9, out me.mAncientCoinCount, 0x0);
            reader.ReadUint64(0x4723b840, out num2, 0x0L);
            me.UniqueObjectsObtained = (UniqueObjectKey)num2;
            me.mKeystonePanelsUsed   = new PairedListDictionary <WorldName, List <string> >();
            reader.ReadInt32(0x7bcd11d, out num3, 0x0);
            for (uint i = 0x0; i < num3; i++)
            {
                int      num5;
                string[] strArray;
                reader.ReadInt32(0x8bc9c54 + i, out num5, -1);
                WorldName name = (WorldName)num5;
                reader.ReadString(0x9bcd0e7 + i, out strArray);
                me.mKeystonePanelsUsed[name] = new List <string>(strArray);
            }
            me.mCompletedHouseholdOpportunities.Clear();
            reader.ReadUint64(0x8eae351, out numArray);
            foreach (ulong num6 in numArray)
            {
                me.mCompletedHouseholdOpportunities.Add(num6, true);
            }
            reader.ReadUint32(0x8eae352, out me.mMoneySaved);
            reader.ReadUint64(0x92b562c, out numArray2);
            foreach (ulong num7 in numArray2)
            {
                me.mWardrobeCasParts.Add(num7);
            }
            reader.ReadUint64(0x95175f0, out num8, 0x0L);
            me.AddServiceUniforms((ServiceType)((int)num8));
            return(true);
        }
示例#8
0
        public bool ImportContent(ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            Inventory ths = mInventory;

            uint[] numArray;
            ths.DestroyItems();
            ths.Owner.InventoryComp.InventoryUIModel.ClearInvalidItemStacks();
            if (!reader.ReadUint32(0x804459ab, out numArray))
            {
                return false;
            }

            foreach (uint num in numArray)
            {
                IGameObject obj2 = GameObject.GetObject<IGameObject>(objIdTable[(int)num]);
                if (obj2 != null)
                {
                    IPropertyStreamReader child = reader.GetChild(num);
                    if (child != null)
                    {
                        bool flag = true;
                        try
                        {
                            Urnstone urnstone = obj2 as Urnstone;
                            if (urnstone != null)
                            {
                                flag = urnstone.ImportContent(resKeyTable, objIdTable, child, ths.Owner);
                            }
                            else if (obj2 is IPhoneCell)
                            {
                                if (ths.AmountIn<IPhoneCell>() == 0x1)
                                {
                                    flag = false;
                                }
                            }
                            else
                            {
                                flag = obj2.ImportContent(resKeyTable, objIdTable, child);
                            }
                        }
                        catch (Exception)
                        {
                            flag = false;
                        }
                        if (!flag)
                        {
                            obj2.Destroy();
                            continue;
                        }
                    }

                    // Custom
                    if (!Inventories.TryToMove(obj2, ths, false))
                    {
                        obj2.Destroy();
                    }
                }
            }
            reader.ReadInt32(0x86c4285, out ths.mMaxInventoryCapacity, 0x0);
            return true;
        }
示例#9
0
        public bool ImportContent(ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            Inventory ths = mInventory;

            uint[] numArray;
            ths.DestroyItems();
            ths.Owner.InventoryComp.InventoryUIModel.ClearInvalidItemStacks();
            if (!reader.ReadUint32(0x804459ab, out numArray))
            {
                return(false);
            }

            foreach (uint num in numArray)
            {
                IGameObject obj2 = GameObject.GetObject <IGameObject>(objIdTable[(int)num]);
                if (obj2 != null)
                {
                    IPropertyStreamReader child = reader.GetChild(num);
                    if (child != null)
                    {
                        bool flag = true;
                        try
                        {
                            Urnstone urnstone = obj2 as Urnstone;
                            if (urnstone != null)
                            {
                                flag = urnstone.ImportContent(resKeyTable, objIdTable, child, ths.Owner);
                            }
                            else if (obj2 is IPhoneCell)
                            {
                                if (ths.AmountIn <IPhoneCell>() == 0x1)
                                {
                                    flag = false;
                                }
                            }
                            else
                            {
                                flag = obj2.ImportContent(resKeyTable, objIdTable, child);
                            }
                        }
                        catch (Exception)
                        {
                            flag = false;
                        }
                        if (!flag)
                        {
                            obj2.Destroy();
                            continue;
                        }
                    }

                    // Custom
                    if (!Inventories.TryToMove(obj2, ths, false))
                    {
                        obj2.Destroy();
                    }
                }
            }
            reader.ReadInt32(0x86c4285, out ths.mMaxInventoryCapacity, 0x0);
            return(true);
        }
示例#10
0
        public static bool Household_ImportContent(Household _this, ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            if (_this == null)
            {
                throw new NullReferenceException("if (this == null)");
            }

            reader.ReadString(1357107804u, out _this.mName, "");
            reader.ReadInt32(867787827u, out _this.mFamilyFunds, 0);
            reader.ReadString(3647669240u, out _this.mBioText, "");
            reader.ReadInt32(145720536u, out _this.mUnpaidBills, 0);
            reader.ReadInt32(3338514733u, out _this.mLotHomeWorth, 0);

            long exportTime = DateTime.Now.ToBinary();

            reader.ReadInt64(1669643236u, out exportTime, DateTime.Now.ToBinary());
            _this.mExportTime = DateTime.FromBinary(exportTime);

            reader.ReadBool(571722353u, out _this.mbLifetimeHappinessNotificationShown, false);
            IPropertyStreamReader child = reader.GetChild(2449095374u);

            if (child != null)
            {
                HMembers_ImportContent(_this.mMembers, resKeyTable, objIdTable, child);
            }

            try
            {
                foreach (SimDescription allSimDescription in _this.mMembers.AllSimDescriptionList)
                {
                    allSimDescription.OnHouseholdChanged(_this, true);
                    allSimDescription.CareerManager.OnLoadFixup();
                    Sims3.Gameplay.Careers.Occupation occupation = allSimDescription.CareerManager.Occupation;
                    if (occupation != null)
                    {
                        occupation.RepairLocation();
                    }
                }

                foreach (SimDescription allSimDescription2 in _this.mMembers.AllSimDescriptionList)
                {
                    if (allSimDescription2.Pregnancy != null)
                    {
                        SimDescription value2;
                        if (Household.sOldIdToNewSimDescriptionMap != null && Household.sOldIdToNewSimDescriptionMap.TryGetValue(allSimDescription2.Pregnancy.DadDescriptionId, out value2))
                        {
                            allSimDescription2.Pregnancy.DadDescriptionId = value2.SimDescriptionId;
                        }
                        else if (!Household.IsTravelImport && _this.mMembers.GetSimDescriptionFromId(allSimDescription2.Pregnancy.DadDescriptionId) == null)
                        {
                            allSimDescription2.Pregnancy.DadDescriptionId = 0uL;
                        }
                    }
                }

                child = reader.GetChild(2706303414u);
                if (child != null)
                {
                    //_this.ImportRelationships(resKeyTable, objIdTable, child);
                    //_this.ImportRelationships(resKeyTable, objIdTable, child);
                    Household_ImportRelationships(_this, resKeyTable, objIdTable, child);
                }
            }
            catch (StackOverflowException) { throw; }
            catch (ResetException) { throw; }
            catch (Exception)
            { }


            reader.ReadInt32(141731785u, out _this.mAncientCoinCount, 0);

            ulong uniqueObjectsObtained;

            reader.ReadUint64(1193523264u, out uniqueObjectsObtained, 0uL);
            _this.UniqueObjectsObtained = (UniqueObjectKey)uniqueObjectsObtained;

            _this.mKeystonePanelsUsed = new PairedListDictionary <WorldName, List <string> >();

            int KeystonePanelsUsedCount;

            reader.ReadInt32(129814813u, out KeystonePanelsUsedCount, 0);
            int checkloop = 0; // Fix Loop 12:48 20/05/2019

            for (uint num = 0u; num < KeystonePanelsUsedCount; num++)
            {
                int keystonePanelsUsed;
                reader.ReadInt32(146578516 + num, out keystonePanelsUsed, -1);
                WorldName key = (WorldName)keystonePanelsUsed;

                string[] keystonePanelsList;
                reader.ReadString(163369191 + num, out keystonePanelsList);
                _this.mKeystonePanelsUsed[key] = new List <string>(keystonePanelsList ?? new string[0]);

                if (checkloop++ > 500)
                {
                    break;
                }
            }

            _this.mCompletedHouseholdOpportunities.Clear();

            ulong[] completedHouseholdOpportunities;
            reader.ReadUint64(149611345u, out completedHouseholdOpportunities);

            foreach (ulong key in completedHouseholdOpportunities)
            {
                _this.mCompletedHouseholdOpportunities.Add(key, true);
            }

            reader.ReadUint32(149611346u, out _this.mMoneySaved);
            if (_this.mMoneySaved == null || _this.mMoneySaved.Length != 3)
            {
                _this.mMoneySaved = new uint[3];
            }

            ulong[] wardrobeCasParts;
            reader.ReadUint64(153835052u, out wardrobeCasParts);
            foreach (ulong item in wardrobeCasParts)
            {
                _this.mWardrobeCasParts.Add(item);
            }

            ulong serviceUniform;

            reader.ReadUint64(156333552u, out serviceUniform, 0uL);
            _this.AddServiceUniforms((ServiceType)serviceUniform);

            return(true);
        }
示例#11
0
        public static bool HMembers_ImportContent(Household.Members _this, ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            if (_this == null)
            {
                throw new NullReferenceException();
            }

            _this.mAllSimDescriptions.Clear();
            _this.mPetSimDescriptions.Clear();
            _this.mSimDescriptions.Clear();

            try
            {
                Household.sRemapSimDescriptionIdsOnImport = !Household.IsTravelImport;

                int memberCount;

                if (!reader.ReadInt32(3921240069u, out memberCount, int.MaxValue) || memberCount == 0 || memberCount < 0 || memberCount == int.MaxValue) // loop
                {
                    return(false);
                }

                int checkloop = 0; // Fix Loop 12:48 20/05/2019

                for (uint i = 0; i < memberCount; i++)
                {
                    IPropertyStreamReader child = reader.GetChild(i);
                    if (child == null)
                    {
                        continue;
                    }
                    SimDescription simDescription = Nra.NFinalizeDeath.SimDesc_Empty(null); //new SimDescription();

                    try
                    {
                        if (simDescription.ImportContent(resKeyTable, objIdTable, child))
                        {
                            _this.Add(simDescription, simDescription.CreatedSim);
                        }
                        else
                        {
                            Nra.NFinalizeDeath.SimDescCleanse(simDescription, true, false);
                        }
                    }
                    catch (StackOverflowException) { throw; }
                    catch (ResetException) { throw; }
                    catch (Exception)
                    {
                        Nra.NFinalizeDeath.Household_Remove(simDescription, true);
                        Nra.NFinalizeDeath.SimDescCleanse(simDescription, true, false);
                        continue;
                    }

                    if (checkloop++ > 500)
                    {
                        break;
                    }
                }
            }
            finally
            {
                Household.sRemapSimDescriptionIdsOnImport = false;
            }
            return(true);
        }
示例#12
0
        public static bool ImportContent(Household me, ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            ulong num2;
            int num3;
            ulong[] numArray;
            ulong[] numArray2;
            ulong num8;

            reader.ReadString(0x50e3d25c, out me.mName, "");
            reader.ReadInt32(0x33b96433, out me.mFamilyFunds, 0x0);
            reader.ReadString(0xd96b03f8, out me.mBioText, "");
            reader.ReadInt32(0x8af84d8, out me.mUnpaidBills, 0x0);
            reader.ReadInt32(0xc6fdb12d, out me.mLotHomeWorth, 0x0);
            long num = DateTime.Now.ToBinary();
            reader.ReadInt64(0x6384bbe4, out num, DateTime.Now.ToBinary());
            me.mExportTime = DateTime.FromBinary(num);
            reader.ReadBool(0x2213ca71, out me.mbLifetimeHappinessNotificationShown, false);
            IPropertyStreamReader child = reader.GetChild(0x91fa3ace);
            if (child != null)
            {
                me.mMembers.ImportContent(resKeyTable, objIdTable, child);

                // Custom to handle import of custom careers
                HouseholdMemberEx.ImportContent(me.mMembers, resKeyTable, objIdTable, child);
            }

            foreach (SimDescription description in Households.All(me))
            {
                try
                {
                    // Custom
                    if (Household.sOldIdToNewSimDescriptionMap != null)
                    {
                        if ((description.mOldSimDescriptionId != 0) &&
                            (!Household.sOldIdToNewSimDescriptionMap.ContainsKey(description.mOldSimDescriptionId)))
                        {
                            Household.sOldIdToNewSimDescriptionMap.Add(description.mOldSimDescriptionId, description);
                        }
                        if (!Household.sOldIdToNewSimDescriptionMap.ContainsKey(description.mSimDescriptionId))
                        {
                            Household.sOldIdToNewSimDescriptionMap.Add(description.mSimDescriptionId, description);
                        }
                    }

                    description.OnHouseholdChanged(me, true);
                    description.CareerManager.OnLoadFixup();

                    Occupation occupation = description.CareerManager.Occupation;
                    if (occupation != null)
                    {
                        occupation.RepairLocation();
                    }
                }
                catch (Exception e)
                {
                    Common.Exception(description, e);
                }
            }

            foreach (SimDescription description2 in Households.All(me))
            {
                try
                {
                    if (description2.Pregnancy != null)
                    {
                        SimDescription description3;
                        if ((Household.sOldIdToNewSimDescriptionMap != null) && Household.sOldIdToNewSimDescriptionMap.TryGetValue(description2.Pregnancy.DadDescriptionId, out description3))
                        {
                            description2.Pregnancy.DadDescriptionId = description3.SimDescriptionId;
                        }
                        else if (!Household.IsTravelImport && (me.mMembers.GetSimDescriptionFromId(description2.Pregnancy.DadDescriptionId) == null))
                        {
                            description2.Pregnancy.DadDescriptionId = 0x0L;
                        }
                    }
                }
                catch (Exception e)
                {
                    Common.Exception(description2, e);
                }
            }

            child = reader.GetChild(0xa14ee9b6);
            if (child != null)
            {
                // Custom Function
                ImportRelationships(me, resKeyTable, objIdTable, child);
            }

            reader.ReadInt32(0x872a7c9, out me.mAncientCoinCount, 0x0);
            reader.ReadUint64(0x4723b840, out num2, 0x0L);
            me.UniqueObjectsObtained = (UniqueObjectKey)num2;
            me.mKeystonePanelsUsed = new PairedListDictionary<WorldName, List<string>>();
            reader.ReadInt32(0x7bcd11d, out num3, 0x0);
            for (uint i = 0x0; i < num3; i++)
            {
                int num5;
                string[] strArray;
                reader.ReadInt32(0x8bc9c54 + i, out num5, -1);
                WorldName name = (WorldName)num5;
                reader.ReadString(0x9bcd0e7 + i, out strArray);
                me.mKeystonePanelsUsed[name] = new List<string>(strArray);
            }
            me.mCompletedHouseholdOpportunities.Clear();
            reader.ReadUint64(0x8eae351, out numArray);
            foreach (ulong num6 in numArray)
            {
                me.mCompletedHouseholdOpportunities.Add(num6, true);
            }
            reader.ReadUint32(0x8eae352, out me.mMoneySaved);
            reader.ReadUint64(0x92b562c, out numArray2);
            foreach (ulong num7 in numArray2)
            {
                me.mWardrobeCasParts.Add(num7);
            }
            reader.ReadUint64(0x95175f0, out num8, 0x0L);
            me.AddServiceUniforms((ServiceType)((int)num8));
            return true;
        }
示例#13
0
        public bool ImportContent(ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamReader reader)
        {
            try
            {
                int num;
                IPropertyStreamReader child = reader.GetChild(0x846d3a8c);
                if (child != null)
                {
                    mContents.mHousehold = Household.Create();

                    // Custom Function
                    if (!HouseholdEx.ImportContent(mContents.Household, resKeyTable, objIdTable, child))
                    {
                        return false;
                    }
                }

                reader.ReadInt32(0x68d30928, out num, 0x2);
                mContents.mInventories = new ulong[num];
                int[] values = new int[num];
                reader.ReadInt32(0xa3b065d7, out values);
                for (int i = 0x0; i < values.Length; i++)
                {
                    ResourceKey key = resKeyTable[values[i]];
                    mContents.mInventories[i] = key.InstanceId;
                }
                return true;
            }
            catch (Exception e)
            {
                Common.Exception("ImportContent", e);
                return false;
            }
        }