public static bool Household_ExportRelationships(Household.Members mMembers, ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamWriter writer) { uint value = 0; if (mMembers.mAllSimDescriptions.Count == 0) { goto w; } var p = mMembers.mAllSimDescriptions.ToArray(); var valueMax = p.Length * p.Length - p.Length; try { foreach (SimDescription actorsd in p) { if (value <= valueMax) { break; } foreach (SimDescription targetsd in p) { if (value <= valueMax) { break; } if (actorsd.mSimDescriptionId != targetsd.mSimDescriptionId) { Relationship relationship = Relationship.Get(actorsd, targetsd, false); if (relationship != null) { var propertyStreamWriter = writer.CreateChild(value++); propertyStreamWriter.WriteUint64(3385230853u, actorsd.mSimDescriptionId); propertyStreamWriter.WriteUint64(3205132738u, targetsd.mSimDescriptionId); relationship.ExportContent(resKeyTable, objIdTable, propertyStreamWriter); writer.CommitChild(); } else { valueMax--; } } else { valueMax--; } } } } catch (Exception) { } w : writer.WriteUint32(308660384u, value); return(true); }
public static bool HouseholdContents_ExportContent(HouseholdContents This, ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamWriter writer) { if (This == null) { throw new NullReferenceException(); } IPropertyStreamWriter writer2 = writer.CreateChild(2221750924u); try { if (This.mHousehold == null || !Household_ExportContent(This.mHousehold, resKeyTable, objIdTable, writer2)) { return(false); } } catch (StackOverflowException) { throw; } catch (ResetException) { throw; } catch { } writer.CommitChild(); writer.WriteInt32(1758660904u, This.mInventories.Length); int[] array = new int[This.mInventories.Length]; int num = 0; ulong[] array2 = This.mInventories; foreach (ulong num2 in array2) { uint type = (uint)((num2 != 0) ? (-1260555925) : 0); ResourceKey newKey = new ResourceKey(num2, type, 0u); array[num++] = resKeyTable.AddKey(newKey); } writer.WriteInt32(2746246615u, array); return(true); }
public bool bd_ExportContent(ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamWriter writer) { if (runI) { return(false); } try { writer.WriteUint64(1752637606u, SimDescriptionId); writer.WriteUint32(1758328370u, (uint)mSimFlags); writer.WriteFloat(3391843422u, AgingYearsSinceLastAgeTransition); writer.WriteInt32(183048852u, UserDaysInCurrentAge); writer.WriteInt32(2625491639u, resKeyTable.AddKey(mSkinToneKey)); writer.WriteFloat(3647343526u, mSkinToneIndex); writer.WriteFloat(2843729478u, mSecondaryNormalMapWeights[0]); writer.WriteFloat(3384101496u, mSecondaryNormalMapWeights[1]); writer.WriteInt32(4180891374u, resKeyTable.AddKey(mDefaultOutfitKey)); writer.WriteUint32(1343616996u, new uint[3] { base.HairColors[0].Genetic.ARGB, base.HairColors[0].Dye.ARGB, base.HairColors[0].UseDye ? 1u : 0u }); writer.WriteUint32(4135393849u, new uint[3] { base.HairColors[1].Genetic.ARGB, base.HairColors[1].Dye.ARGB, base.HairColors[1].UseDye ? 1u : 0u }); writer.WriteUint32(2471843458u, new uint[3] { base.HairColors[2].Genetic.ARGB, base.HairColors[2].Dye.ARGB, base.HairColors[2].UseDye ? 1u : 0u }); writer.WriteUint32(1055971375u, new uint[3] { base.HairColors[3].Genetic.ARGB, base.HairColors[3].Dye.ARGB, base.HairColors[3].UseDye ? 1u : 0u }); writer.WriteUint32(1836098543u, new uint[3] { base.EyebrowColor.Genetic.ARGB, base.EyebrowColor.Dye.ARGB, base.EyebrowColor.UseDye ? 1u : 0u }); writer.WriteUint32(1836098544u, new uint[3] { base.BodyHairColor.Genetic.ARGB, base.BodyHairColor.Dye.ARGB, base.BodyHairColor.UseDye ? 1u : 0u }); writer.WriteUint32(4209090540u, new uint[3] { base.FacialHairColors[0].Genetic.ARGB, base.FacialHairColors[0].Dye.ARGB, base.FacialHairColors[0].UseDye ? 1u : 0u }); writer.WriteUint32(2711019873u, new uint[3] { base.FacialHairColors[1].Genetic.ARGB, base.FacialHairColors[1].Dye.ARGB, base.FacialHairColors[1].UseDye ? 1u : 0u }); writer.WriteUint32(4258326570u, new uint[3] { base.FacialHairColors[2].Genetic.ARGB, base.FacialHairColors[2].Dye.ARGB, base.FacialHairColors[2].UseDye ? 1u : 0u }); writer.WriteUint32(3921444919u, new uint[3] { base.FacialHairColors[3].Genetic.ARGB, base.FacialHairColors[3].Dye.ARGB, base.FacialHairColors[3].UseDye ? 1u : 0u }); writer.WriteUint32(125685374u, base.BeardUsesHairColor ? 1u : 0u); writer.WriteUint32(3390394279u, base.EyebrowsUseHairColor ? 1u : 0u); writer.WriteUint32(3390394280u, base.BodyHairUsesHairColor ? 1u : 0u); writer.WriteUint32(992007321u, PropagateHairStyle ? 1u : 0u); if (mHousehold != null) { writer.WriteUint64(2221750924u, mHousehold.HouseholdId); } string value = mFirstName; string value2 = mLastName; string value3 = mBio; writer.WriteString(3947983776u, value); writer.WriteString(1883753236u, value2); writer.WriteUint32(1723164892u, (uint)mDeathStyle); writer.WriteBool(2257506273u, IsNeverSelectable); writer.WriteBool(797789854u, AgingEnabled); writer.WriteFloat(167162779u, mLifetimeHappiness); writer.WriteFloat(3632991774u, mSpendableHappiness); writer.WriteUint32(376622899u, (uint)mFavouriteMusicType); writer.WriteUint32(904967806u, (uint)mFavouriteFoodType); writer.WriteUint32(2418364207u, mFavouriteColor.ARGB); writer.WriteString(647611013u, value3); writer.WriteUint32(176483828u, (uint)mZodiacSign); writer.WriteUint32(183048650u, (uint)AlmaMater); writer.WriteString(183661639u, mAlmaMaterName); writer.WriteUint32(183048646u, (uint)GraduationType); writer.WriteUint32(3732926166u, (uint)ServiceHistory); writer.WriteBool(808457844u, Marryable); writer.WriteBool(2446075705u, CanBeKilledOnJob); writer.WriteBool(130688069u, IsGhost); writer.WriteBool(103218814u, Contactable); writer.WriteBool(452878294u, IsPregnant); writer.WriteBool(1660858165u, IsVisuallyPregnant); writer.WriteFloat(233156252u, base.AlienDNAPercentage); IPropertyStreamWriter writer2 = writer.CreateChild(2805376650u); mInitialShape.ExportContent(resKeyTable, objIdTable, writer2); writer.CommitChild(); writer2 = null; writer2 = writer.CreateChild(2533203143u); mCurrentShape.ExportContent(resKeyTable, objIdTable, writer2); writer.CommitChild(); writer2 = null; writer.WriteFloat(298511592u, mFitnessShapeDelta); writer.WriteFloat(4088477862u, mWeightShapeDelta); writer.WriteFloat(1817337409u, mShapeDeltaMultiplier); writer.WriteUint32(2011243416u, (uint)mVoiceVariation); writer.WriteFloat(1170154690u, mVoicePitchModifier); writer.WriteInt32(4008810486u, resKeyTable.AddKey(mGeneticHairstyleKey)); for (uint num = 0u; num < 8; num++) { writer.WriteInt32(193344880 + num, resKeyTable.AddKey(mGeneticBodyhairStyleKeys[num])); } writer.WriteInt32(2384582960u, (int)mHomeWorld); writer2 = writer.CreateChild(1481885306u); mOutfits.ExportContent(resKeyTable, objIdTable, writer2); writer.CommitChild(); writer2 = null; writer2 = writer.CreateChild(3152150573u); ExportSpecialOutfitIndicies(writer); writer.CommitChild(); writer2 = null; List <ulong> list = new List <ulong>(); foreach (Trait item in base.TraitManager.List) { list.Add((ulong)item.Guid); } if (list.Count > 0) { writer.WriteUint32(1533688765u, (uint)list.Count); writer.WriteUint64(1769582843u, list.ToArray()); } ExportContentChild(resKeyTable, objIdTable, writer, 155067715u, base.TraitManager); ExportContentChild(resKeyTable, objIdTable, writer, 2057337028u, mGenealogy); writer.WriteUint32(2216711505u, LifetimeWish); writer.WriteBool(2264331350u, HasCompletedLifetimeWish); if (mSupernaturalData != null) { writer.WriteUint32(226598758u, (uint)mSupernaturalData.OccultType); mSupernaturalData.ExportContent(resKeyTable, objIdTable, writer); } ExportContentChild(resKeyTable, objIdTable, writer, 2368840039u, SkillManager); ExportContentChild(resKeyTable, objIdTable, writer, 3850691202u, CareerManager); ExportContentChild(resKeyTable, objIdTable, writer, 243549899u, VisaManager); ExportContentChild(resKeyTable, objIdTable, writer, 243549900u, CelebrityManager); ExportContentChild(resKeyTable, objIdTable, writer, 1916741826u, LifeEventManager); ExportContentChild(resKeyTable, objIdTable, writer, 146573769u, OccultManager); if (HealthManager != null) { ExportContentChild(resKeyTable, objIdTable, writer, 222542822u, HealthManager); } if (mReputation != null) { ExportContentChild(resKeyTable, objIdTable, writer, 146573776u, mReputation); } if (MidlifeCrisisManager != null) { ExportContentChild(resKeyTable, objIdTable, writer, 181659961u, MidlifeCrisisManager); } if (PetManager != null) { ExportContentChild(resKeyTable, objIdTable, writer, 4095203657u, PetManager); } writer.WriteInt32(2081779727u, ReadBookDataList.Count); uint num2 = 0u; foreach (KeyValuePair <string, ReadBookData> readBookData in ReadBookDataList) { writer.WriteString(1155630664 + num2, readBookData.Key); ExportContentChild(resKeyTable, objIdTable, writer, (uint)(-1873278614 + (int)num2), readBookData.Value); num2++; } if (IsPregnant) { ExportContentChild(resKeyTable, objIdTable, writer, 1064352938u, Pregnancy); } if (OpportunityHistory != null) { ExportContentChild(resKeyTable, objIdTable, writer, 3825310104u, OpportunityHistory); } writer.WriteBool(148913893u, NeedsOpportunityImport); if (CreatedSim != null && CreatedSim.DreamsAndPromisesManager != null) { DnPExportData = new DnPExportData(this); ExportContentChild(resKeyTable, objIdTable, writer, 3039377755u, DnPExportData); } else { DnPExportData = null; } if (RelicStats != null) { ExportContentChild(resKeyTable, objIdTable, writer, 142971188u, RelicStats); } if (TombStats != null) { ExportContentChild(resKeyTable, objIdTable, writer, 4233889236u, TombStats); } if (TravelBuffs != null) { int count = TravelBuffs.Count; IPropertyStreamWriter propertyStreamWriter = writer.CreateChild(143219793u); propertyStreamWriter.WriteInt32(0u, count); uint num3 = 1u; foreach (BuffInstance travelBuff in TravelBuffs) { ExportContentChild(resKeyTable, objIdTable, propertyStreamWriter, num3++, travelBuff); } writer.CommitChild(); } if (mPreferredVehicleGuid != ObjectGuid.InvalidObjectGuid) { int value4 = objIdTable.AddId(mPreferredVehicleGuid); writer.WriteInt32(3836047044u, value4); } if (Singing != null) { ExportContentChild(resKeyTable, objIdTable, writer, 145650758u, Singing); } if (GameStates.IsTravelling) { writer.WriteInt32(350667110u, CharismaStats.KnownSims); writer.WriteInt32(2680064337u, CharismaStats.FriendSims); writer.WriteInt32(2649604395u, CharismaStats.BestFriendSims); writer.WriteInt32(1611073300u, CharismaStats.JokesSuccesfullyTold); writer.WriteInt32(426808711u, CharismaStats.TraitsLearned); writer.WriteBool(150904202u, HadFirstKiss); writer.WriteBool(150904210u, HadFirstRomance); writer.WriteBool(150904214u, HadFirstWooHoo); writer.WriteBool(150904215u, HadBachelorParty); } writer.WriteByte(3475610776u, (byte)KnownSnowmanTypes); ExportSurgeryBlends(writer); if (CareerManager.DegreeManager != null) { ExportContentChild(resKeyTable, objIdTable, writer, 240491398u, CareerManager.DegreeManager); } if (mTraitChipManager != null) { ExportContentChild(resKeyTable, objIdTable, writer, 2471919987u, mTraitChipManager); } } catch { } return(true); }
public static bool Household_ExportContent(Household _this, ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamWriter writer) { if (_this == null) { throw new NullReferenceException(); } if (_this.mMembers == null) { return(false); } string name = _this.mName; string bioText = _this.mBioText; //if (!DownloadContent.IsDevBuild()) //{ // name = _this.Name; // bioText = _this.BioText; //} writer.WriteString(1357107804u, name); writer.WriteInt32(867787827u, _this.mFamilyFunds); writer.WriteString(3647669240u, bioText); writer.WriteInt64(1669643236u, DateTime.Now.ToBinary()); writer.WriteBool(571722353u, _this.mbLifetimeHappinessNotificationShown); writer.WriteInt32(145720536u, _this.mUnpaidBills); if (_this.LotHome != null) { writer.WriteInt32(3338514733u, _this.LotHome.Cost); } IPropertyStreamWriter writer2 = writer.CreateChild(2449095374u); HMembers_ExportContent(_this.mMembers, resKeyTable, objIdTable, writer2); writer.CommitChild(); writer2 = writer.CreateChild(2706303414u); try { //_this.ExportRelationships(resKeyTable, objIdTable, writer2); Household_ExportRelationships(_this.mMembers, resKeyTable, objIdTable, writer2); } catch (StackOverflowException) { throw; } catch (ResetException) { throw; } catch { } writer.CommitChild(); writer.WriteInt32(141731785u, _this.mAncientCoinCount); writer.WriteUint64(1193523264u, (ulong)_this.UniqueObjectsObtained); int count = _this.mKeystonePanelsUsed.Count; writer.WriteInt32(129814813u, count); uint num = 0u; foreach (WorldName key in _this.mKeystonePanelsUsed.Keys) { writer.WriteInt32(146578516 + num, (int)key); List <string> list = new List <string>(_this.mKeystonePanelsUsed[key]); writer.WriteString(163369191 + num, list.ToArray()); num++; } ulong[] array = new ulong[_this.mCompletedHouseholdOpportunities.Count]; _this.mCompletedHouseholdOpportunities.Keys.CopyTo(array, 0); writer.WriteUint64(149611345u, array); writer.WriteUint32(149611346u, _this.mMoneySaved); ulong[] array2 = new ulong[_this.mWardrobeCasParts.Count]; _this.mWardrobeCasParts.CopyTo(array2, 0); writer.WriteUint64(153835052u, array2); writer.WriteUint64(156333552u, (ulong)_this.mServiceUniforms); return(true); }
public static bool HMembers_ExportContent(Household.Members _this, ResKeyTable resKeyTable, ObjectIdTable objIdTable, IPropertyStreamWriter writer) { if (_this == null) { throw new NullReferenceException(); } // writer.WriteInt32(3921240069u, _this.Count); oerew = false; uint num = 0u; foreach (SimDescription allSimDescription in _this.AllSimDescriptionList) { if (string.IsNullOrEmpty(allSimDescription.mFirstName) && string.IsNullOrEmpty(allSimDescription.mLastName)) { continue; } if (!Nra.NFinalizeDeath.SD_OutfitsIsValid2(allSimDescription, true)) { continue; } var allCreatedSim = allSimDescription.CreatedSim; if (allCreatedSim != null) { if (allCreatedSim.ObjectId.mValue == 0 || !Nra.NFinalizeDeath.GameObjectIsValid(allCreatedSim.ObjectId.mValue) || allCreatedSim.mSimDescription != allSimDescription) { allSimDescription.mSim = null; } } try // fix { bool needFix = false; if (allSimDescription.mTraitManager == null) { allSimDescription.mTraitManager = new TraitManager(); allSimDescription.mTraitManager.mSimDescription = allSimDescription; needFix = true; } if (allSimDescription.SkillManager == null) { allSimDescription.SkillManager = new Sims3.Gameplay.Skills.SkillManager(allSimDescription); allSimDescription.SkillManager.mSimDescription = allSimDescription; needFix = true; } if (allSimDescription.mGenealogy == null) { allSimDescription.mGenealogy = new Genealogy(allSimDescription); allSimDescription.mGenealogy.mSim = allSimDescription; needFix = true; } if (allSimDescription.CareerManager == null) { allSimDescription.CareerManager = new Sims3.Gameplay.Careers.CareerManager(allSimDescription); allSimDescription.CareerManager.mSimDescription = allSimDescription; needFix = true; } if (allSimDescription.VisaManager == null) { allSimDescription.VisaManager = new Sims3.Gameplay.Visa.VisaManager(allSimDescription); needFix = true; } else { allSimDescription.VisaManager.mSimDescription = allSimDescription; } if (allSimDescription.CelebrityManager == null) { allSimDescription.CelebrityManager = new Sims3.Gameplay.CelebritySystem.CelebrityManager(allSimDescription.SimDescriptionId); needFix = true; } if (needFix) { allSimDescription.Fixup(); } if (needFix && allSimDescription.CelebrityManager == null) { allSimDescription.Fixup(); } if (allSimDescription.CelebrityManager == null) { if (Nra.NFinalizeDeath.IsOpenDGSInstalled) { break; } if (!oerew) { Nra.NFinalizeDeath.AssertX(false, "allSimDescription.CelebrityManager == null\nST:\n" + Nra.NDebugger.GetCurrentStackLite()); oerew = true; } if (!NiecMod.Nra.BimDesc.DoneECMK) { continue; } } } catch (Exception) { //allSimDescription.Dispose(); //continue; check game crash } uint keyData = num++; IPropertyStreamWriter writerChild = writer.CreateChild(keyData); // custom 14:49 12/10/2019 try { if (allSimDescription.ExportContent(resKeyTable, objIdTable, writerChild)) { writer.CommitChild(); } else { writer.CancelChild(keyData); } } catch (StackOverflowException) { throw; } catch (ResetException) { throw; } catch (Exception) { writer.CancelChild(keyData); } } writer.WriteInt32(3921240069u, (int)num); return(true); }