public void PacifyVillage(Village village, IEnumerable <global::Empire> empiresWhichHelpedPacification = null) { SimulationDescriptor value = this.SimulationDescriptorDatabase.GetValue(BarbarianCouncil.VillageStatusPacified); village.SwapDescriptor(value); if (!village.HasBeenPacified) { village.HasBeenPacified = true; SimulationDescriptor value2 = this.SimulationDescriptorDatabase.GetValue(Village.PacifiedVillage); if (value2 != null) { Diagnostics.Assert(village.PointOfInterest != null); village.PointOfInterest.SwapDescriptor(value2); village.SwapDescriptor(value2); } for (int i = village.StandardUnits.Count - 1; i >= 0; i--) { Unit unit = village.StandardUnits[i]; this.GameEntityRepositoryService.Unregister(unit); village.RemoveUnit(unit); unit.Dispose(); } if (empiresWhichHelpedPacification != null) { foreach (global::Empire empire in empiresWhichHelpedPacification) { this.EventService.Notify(new EventVillagePacified(empire, village)); } } if (village.Converter != null && village.Converter.ConvertedVillages != null) { DepartmentOfTheInterior.ClearFIMSEOnConvertedVillage(village.Converter, village.PointOfInterest); village.Converter.RemoveConvertedVillage(village); village.Converter = null; } } }