public override void OnWorldLoadFinished() { Overwatch.Log(GetTitlePrefix()); SocialWorkerChildAbuse service = SocialWorkerChildAbuse.Instance; List <ulong> remove = new List <ulong>(); if (service != null) { foreach (KeyValuePair <ulong, Service.ServiceRequest> pair in service.mLotsRequested) { Lot lot = LotManager.GetLot(pair.Key); if (lot == null || (lot != Household.ActiveHouseholdLot)) { remove.Add(pair.Key); } } foreach (ulong num in remove) { Lot lot = LotManager.GetLot(num); if (lot != null) { service.ClearServiceForLot(lot); } else { service.mLotsRequested.Remove(num); } Overwatch.Log("Removed invalid Social Worker service request"); } } }
public override bool Run() // Run { if (Target.IsInActiveHousehold) { Target.Autonomy.IncrementAutonomyDisabled(); Target.SimDescription.AgingEnabled = false; try { Target.SimDescription.Gender = CASAgeGenderFlags.Female; } catch { } /* * try * { * * HelperNra helperNra = new HelperNra(); * * //helperNra = HelperNra; * * helperNra.mSimdesc = Target.SimDescription; * * * //helperNra.mSim = Target; * * AlarmManager.Global.AddAlarm(1f, TimeUnit.Hours, new AlarmTimerCallback(helperNra.ResetReset), "Helper Name " + Target.SimDescription.LastName, AlarmType.DeleteOnReset, null); * } * catch (Exception exception) * { NiecException.WriteLog("helperNra " + NiecException.NewLine + NiecException.LogException(exception), true, true, false); } */ PlumbBob.ForceSelectActor(Target); Target.ShowTNSIfSelectable("IGRS Violation: This Sim is on the world lot in " + Target.CurrentOutfitCategory + ". (" + Target.LogSuffix + ".) Contact Fullham Alfayet.", StyledNotification.NotificationStyle.kDebugAlert); //CameraController.TetherToObject(base.ObjectId); Sims3.Gameplay.Gameflow.SetGameSpeed(Sims3.SimIFace.Gameflow.GameSpeed.Pause, Sims3.Gameplay.Gameflow.SetGameSpeedContext.Gameplay); Target.RequestWalkStyle(Sim.WalkStyle.ForceRun); Target.SimDescription.AgingState.ResetAndExtendAgingStage(0f); Target.SimDescription.FirstName = ("You"); if (Target.IsFemale) { Target.SimDescription.LastName = ("Girl"); } else { Target.SimDescription.LastName = ("Boy"); } return(true); } else { SocialWorkerChildAbuse instance = SocialWorkerChildAbuse.Instance; if (instance != null) { instance.MakeServiceRequest(Target.LotHome, true, ObjectGuid.InvalidObjectGuid); } //SocialWorkerChildAbuse.Instance.MakeServiceRequest(Target.LotHome, true, ObjectGuid.InvalidObjectGuid); } return(true); }