Skip to content

Commit

Permalink
world qualified logging
Browse files Browse the repository at this point in the history
  • Loading branch information
andylippitt committed Mar 3, 2019
1 parent be48634 commit 1f86ef9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Game.Engine/Auditing/AuditEventBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
public class AuditEventBase
{
public string Type { get => this.GetType().Name; }
public string PublicURL { get; set; }
public string WorldKey { get; set; }
}
}
3 changes: 3 additions & 0 deletions Game.Engine/Auditing/AuditEventDeath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ public class AuditEventDeath : AuditEventBase
public AuditEventDeath(Player killer, Player victim, Fleet fleet)
{
GameTime = fleet?.World.Time ?? 0;
PublicURL = fleet?.World?.GameConfiguration?.PublicURL;
WorldKey = fleet?.World?.WorldKey;

Killer = new AuditModelPlayer(killer);
Victim = new AuditModelPlayer(victim);
}
Expand Down
2 changes: 2 additions & 0 deletions Game.Engine/Auditing/AuditEventSpawn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public class AuditEventSpawn : AuditEventBase
public AuditEventSpawn(Player player)
{
GameTime = player?.World?.Time ?? 0;
PublicURL = player?.World?.GameConfiguration?.PublicURL;
WorldKey = player?.World?.WorldKey;
Player = new AuditModelPlayer(player);
}
}
Expand Down

0 comments on commit 1f86ef9

Please sign in to comment.