public bool SplitFromSourceGroup() { if (SourceGroup == null) { return(false); } if (!SourceGroup.StillPresent) { return(false); } //Profiler.BeginSample("SourceGroup.SplitGroup"); Population = SourceGroup.SplitGroup(this); //Profiler.EndSample(); if (Population <= 0) { return(false); } //Profiler.BeginSample("Culture = new BufferCulture"); Culture = new BufferCulture(SourceGroup.Culture); //Profiler.EndSample(); PolityProminencesCount = SourceGroup.GetPolityProminences().Count; int currentPPCount = PolityProminences.Count; int i = 0; foreach (PolityProminence pp in SourceGroup.GetPolityProminences()) { if (i < currentPPCount) { PolityProminences[i].Set(pp); } else { PolityProminences.Add(new PolityProminence(pp)); } i++; } //Profiler.BeginSample("TryMigrateFactionCores"); TryMigrateFactionCores(); //Profiler.EndSample(); return(true); }