//TODO: Check and possibly move logic public void AddOwnedSite(OwnerPeriod newSite) { if (newSite.StartCause == "UNKNOWN" && SiteHistory.Where(s => s.Site == newSite.Site).Count() == 0) { SiteHistory.Insert(0, newSite); } else { this.SiteHistory.Add(newSite); } if (newSite.Owner != this) { this.Groups.Add((Entity)newSite.Owner); } if (this.Parent != null && this.Parent != null) { Parent.AddOwnedSite(newSite); this.Race = Parent.Race; } }
//TODO: Check and possibly move logic public void AddOwnedSite(OwnerPeriod newSite) { if (newSite.StartCause == "UNKNOWN" && SiteHistory.All(s => s.Site != newSite.Site)) { SiteHistory.Insert(0, newSite); } else { SiteHistory.Add(newSite); } if (newSite.Owner != this) { Groups.Add((Entity)newSite.Owner); } if (!IsCiv && Parent != null) { Parent.AddOwnedSite(newSite); Race = Parent.Race; } }
//TODO: Check and possibly move logic public void AddOwnedSite(OwnerPeriod newSite) { if (newSite.StartCause == "UNKNOWN" && SiteHistory.Where(s => s.Site == newSite.Site).Count() == 0) SiteHistory.Insert(0, newSite); else this.SiteHistory.Add(newSite); if (newSite.Owner != this) this.Groups.Add((Entity)newSite.Owner); if (this.Parent != null && this.Parent != null) { Parent.AddOwnedSite(newSite); this.Race = Parent.Race; } }