Merge branch 'hotfix/gangwar-crash' into develop
This commit is contained in:
@@ -210,11 +210,12 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
|
||||
public void enter(Player client)
|
||||
{
|
||||
User user = client.GetUser();
|
||||
if (this.status == "attack")
|
||||
{
|
||||
if (client.GetUser().Faction.Name != getOwner() && client.GetUser().Faction.Name != getAttacker())
|
||||
if (user.Faction.Name != getOwner() && user.Faction.Name != getAttacker())
|
||||
return;
|
||||
Player gPlayer = playerInGangwar.Where(c => c.GetUser().Id == client.GetUser().Id).FirstOrDefault();
|
||||
Player gPlayer = playerInGangwar.Where(c => c != null && !c.Handle.IsNull && c.IsLoggedIn() && c.GetUser().Id == user.Id).FirstOrDefault();
|
||||
if (gPlayer == null)
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
@@ -226,6 +227,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (playerInside.Find(c => c == client) == null)
|
||||
{
|
||||
playerInside.Add(client);
|
||||
|
||||
Reference in New Issue
Block a user