fix
This commit is contained in:
@@ -59,7 +59,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
|||||||
|
|
||||||
public string getOwner()
|
public string getOwner()
|
||||||
{
|
{
|
||||||
return this.TurfName;
|
return this.Owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string getAttacker()
|
public string getAttacker()
|
||||||
@@ -168,7 +168,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
|||||||
}
|
}
|
||||||
else if (getOwner() != FactionName)
|
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 == getAttacker()).FirstOrDefault());
|
ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte das Gebiet ~r~" + getName() + "~w~ nicht erobern.", dbContext.Factions.Where(f => f.Name == getAttacker()).FirstOrDefault());
|
||||||
this.Owner = FactionName;
|
this.Owner = FactionName;
|
||||||
Turfs turf = dbContext.Turfs.Where(t => t.Id == getId()).FirstOrDefault();
|
Turfs turf = dbContext.Turfs.Where(t => t.Id == getId()).FirstOrDefault();
|
||||||
turf.Owner = this.Owner;
|
turf.Owner = this.Owner;
|
||||||
@@ -206,9 +206,6 @@ namespace ReallifeGamemode.Server.Gangwar
|
|||||||
Client[] usersInGangwar = NAPI.Pools.GetAllPlayers().Where(c => c.GetUser().Faction.Name == getOwner() || c.GetUser().Faction.Name == getAttacker()).ToArray();
|
Client[] usersInGangwar = NAPI.Pools.GetAllPlayers().Where(c => c.GetUser().Faction.Name == getOwner() || c.GetUser().Faction.Name == getAttacker()).ToArray();
|
||||||
foreach (var u in usersInGangwar)
|
foreach (var u in usersInGangwar)
|
||||||
{
|
{
|
||||||
u.SendChatMessage(JsonConvert.SerializeObject(usersInGangwar));
|
|
||||||
u.SendChatMessage(JsonConvert.SerializeObject(usersInGangwar.Length));
|
|
||||||
u.SendChatMessage(JsonConvert.SerializeObject(u.Name));
|
|
||||||
u.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score);
|
u.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score);
|
||||||
u.SetData("inGangWar", getId());
|
u.SetData("inGangWar", getId());
|
||||||
clientsInGangwar.Add(u);
|
clientsInGangwar.Add(u);
|
||||||
|
|||||||
Reference in New Issue
Block a user