Test
This commit is contained in:
@@ -173,7 +173,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
this.takeOver(this.Owner);
|
||||
}*/
|
||||
timerCount += 1;
|
||||
if (timerCount >= 900) //change to 900 (seconds) before release for testing reasons change to whatever you like
|
||||
if (timerCount >= 10) //change to 900 (seconds) before release for testing reasons change to whatever you like
|
||||
{
|
||||
if (this.Att_Score > this.Def_Score)
|
||||
{
|
||||
@@ -255,11 +255,14 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
Player[] attackers = NAPI.Pools.GetAllPlayers().Where(c => c.IsLoggedIn() && c.GetUser().Faction.Name == this.Attacker).ToArray();
|
||||
foreach (var o in owners)
|
||||
{
|
||||
o.TriggerEvent("CLIENT:win");
|
||||
if (o != null)
|
||||
o.TriggerEvent("CLIENT:win");
|
||||
}
|
||||
foreach (var a in attackers)
|
||||
{
|
||||
a.TriggerEvent("CLIENT:loose");
|
||||
if (o != null)
|
||||
|
||||
a.TriggerEvent("CLIENT:loose");
|
||||
}
|
||||
ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion hat erfolgreich das Gebiet ~g~" + getName() + "~w~ verteidigt.", dbContext.Factions.Where(f => f.Name == getOwner()).FirstOrDefault());
|
||||
ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion hat den Angrif auf das Gebiet ~r~" + getName() + "~w~ verloren.", dbContext.Factions.Where(f => f.Name == getAttacker()).FirstOrDefault());
|
||||
@@ -268,8 +271,15 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
else if (getOwner() != FactionName)
|
||||
{
|
||||
ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte das Gebiet ~r~" + getName() + "~w~ nicht verteidigen.", dbContext.Factions.Where(f => f.Name == getOwner()).FirstOrDefault());
|
||||
Console.WriteLine("[DEBUG:GANGWAR] getting owners...");
|
||||
Player[] owners = NAPI.Pools.GetAllPlayers().Where(c => c.IsLoggedIn() && c.GetUser().Faction.Name == this.Owner).ToArray();
|
||||
Console.WriteLine($"[DEBUG:GANGWAR] got owners {owners}.");
|
||||
Console.WriteLine($"[DEBUG:GANGWAR] got owners {owners.ToString()}.");
|
||||
|
||||
Console.WriteLine("[DEBUG:GANGWAR] getting attackers...");
|
||||
Player[] attackers = NAPI.Pools.GetAllPlayers().Where(c => c.IsLoggedIn() && c.GetUser().Faction.Name == this.Attacker).ToArray();
|
||||
Console.WriteLine($"[DEBUG:GANGWAR] got attackers {attackers}.");
|
||||
Console.WriteLine($"[DEBUG:GANGWAR] got attackers {attackers.ToString()}.");
|
||||
foreach (var o in owners)
|
||||
{
|
||||
if (o != null)
|
||||
|
||||
Reference in New Issue
Block a user