diff --git a/ReallifeGamemode.Database/Entities/Faction.cs b/ReallifeGamemode.Database/Entities/Faction.cs index a0291a0f..5e600b89 100644 --- a/ReallifeGamemode.Database/Entities/Faction.cs +++ b/ReallifeGamemode.Database/Entities/Faction.cs @@ -19,6 +19,8 @@ namespace ReallifeGamemode.Database.Entities [StringLength(32)] public string Name { get; set; } public bool StateOwned { get; set; } + + public bool GangOwned { get; set; } public int WeaponDealTime { get; set; } = 60; public override string BankAccountName => Name; diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index c05429b8..18e4a5d8 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -53,7 +53,10 @@ namespace ReallifeGamemode.Server.Commands message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); string broadcastMessage = "!{FF0000}** " + player.GetUser().GetFactionRank().RankName + " " + player.Name + ": " + message + " )) **"; - ChatService.BroadcastFaction(broadcastMessage, f); + using (var context = new DatabaseContext()) + { + ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.GangOwned)); + } } else {