fix gangwar server crash

(cherry picked from commit 28dfca0034)
This commit is contained in:
hydrant
2021-05-16 14:47:33 +02:00
parent 7411fa02f3
commit 613d61bf82

View File

@@ -280,7 +280,7 @@ namespace ReallifeGamemode.Server.Gangwar
a.TriggerEvent("CLIENT:loose");
}
ownerFaction.BankAccount.Balance += 15000;
logger.LogInformation("Gang {0} successfully defended the turf {1} against gang {2} and gained {3} dollars", getOwner(), getAttacker(), 15000);
logger.LogInformation("Gang {0} successfully defended the turf {1} against gang {2} and gained {3} dollars", getOwner(), getName(), getAttacker(), 15000);
}
else if (getOwner() != FactionName)
{
@@ -297,7 +297,7 @@ namespace ReallifeGamemode.Server.Gangwar
if (a != null)
a.TriggerEvent("CLIENT:win");
}
logger.LogInformation("Gang {0} successfully took over the turf {1} from gang {2} and gained {3} dollars", getAttacker(), getOwner(), 10000);
logger.LogInformation("Gang {0} successfully took over the turf {1} from gang {2} and gained {3} dollars", getAttacker(), getName(), getOwner(), 10000);
this.Owner = FactionName;
attackerFaction.BankAccount.Balance += 10000;
Turfs turf = dbContext.Turfs.Where(t => t.Id == getId()).FirstOrDefault();