[HOTFIX] Mehr Logs beim Tod, DeathLogs korrekt füllen
This commit is contained in:
@@ -203,11 +203,16 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
public void enter(Player client)
|
||||
{
|
||||
User user = client.GetUser();
|
||||
if(user == null || user.FactionId == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.status == "attack")
|
||||
{
|
||||
if (user.Faction.Name != getOwner() && user.Faction.Name != getAttacker())
|
||||
return;
|
||||
Player gPlayer = playerInGangwar.Where(c => c != null && !c.Handle.IsNull && c.IsLoggedIn() && c.GetUser()?.Id == user.Id).FirstOrDefault();
|
||||
Player gPlayer = playerInGangwar.Where(c => c != null && !c.Handle.IsNull && c.IsLoggedIn() && c.Handle.Value == client.Handle.Value).FirstOrDefault();
|
||||
if (gPlayer == null)
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
@@ -366,10 +371,12 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
{
|
||||
if (getOwner() == FactionName)
|
||||
{
|
||||
NAPI.Util.ConsoleOutput($"GangwarKill - Adding Point for Faction {getAttacker()}");
|
||||
Att_Score += 1;
|
||||
}
|
||||
else if (getAttacker() == FactionName)
|
||||
{
|
||||
NAPI.Util.ConsoleOutput($"GangwarKill - Adding Point for Faction {getOwner()}");
|
||||
Def_Score += 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user