public static void DelInteraction(List <InteractionInstance> mInteractionList, Sims3.Gameplay.ActorSystems.InteractionQueue simIQ, Sim sim, int index, bool stopImmediately, bool succeeded) { if (index >= 0 && index < mInteractionList.Count) { InteractionInstance interactionInstance = mInteractionList._items[index]; if (interactionInstance == null) { niec_std.list_remove(mInteractionList, interactionInstance); goto r; } if (simIQ.mIsHeadInteractionLocked && index == 0) { throw new ArgumentException("Sim: " + interactionInstance.InstanceActor.SimDescription.FullName + " is removing head interaction: " + interactionInstance.GetInteractionName() + " while it is locked."); } interactionInstance.OnRemovedFromQueue(index == 0); niec_std.list_remove(mInteractionList, interactionInstance); if (!sim.HasExitReason(ExitReason.SuspensionRequested)) { CleanUpOrOnFailureInteraction(sim, interactionInstance, stopImmediately, succeeded); } if (succeeded || simIQ.mBabyOrToddlerTransitionTargetInteraction == interactionInstance || mInteractionList.Count == 0) { simIQ.mBabyOrToddlerTransitionTargetInteraction = null; } r : if (sim.IsSelectable) { simIQ.FireQueueChanged(); } } }