add initial public zombie stats models, migrations, and events

This commit is contained in:
RaidMax 2023-05-01 22:33:47 -05:00
parent 5ffe293455
commit 0d6aaa1d9d
20 changed files with 2616 additions and 4 deletions

View File

@ -9,6 +9,7 @@ using Data.Models.Client.Stats;
using Data.Models.Client.Stats.Reference;
using Data.Models.Misc;
using Data.Models.Server;
using Data.Models.Zombie;
namespace Data.Context
{
@ -47,6 +48,15 @@ namespace Data.Context
public DbSet<EFServerSnapshot> ServerSnapshots { get;set; }
public DbSet<EFClientConnectionHistory> ConnectionHistory { get; set; }
#endregion
#region Zombie
public DbSet<ZombieMatch> ZombieMatches { get; set; }
public DbSet<ZombieMatchClientStat> ZombieMatchClientStats { get; set; }
public DbSet<ZombieRoundClientStat> ZombieRoundClientStats { get; set; }
public DbSet<ZombieAggregateClientStat> ZombieClientStatAggregates { get; set; }
#endregion
private void SetAuditColumns()
@ -62,10 +72,6 @@ namespace Data.Context
}
}
public DatabaseContext(DbContextOptions<DatabaseContext> options) : base(options)
{
}
protected DatabaseContext(DbContextOptions options) : base(options)
{
}
@ -161,6 +167,12 @@ namespace Data.Context
modelBuilder.Entity<EFPenaltyIdentifier>().ToTable("EFPenaltyIdentifiers");
modelBuilder.Entity<EFServerSnapshot>().ToTable(nameof(EFServerSnapshot));
modelBuilder.Entity<EFClientConnectionHistory>().ToTable(nameof(EFClientConnectionHistory));
modelBuilder.Entity(typeof(ZombieMatch)).ToTable($"EF{nameof(ZombieMatch)}");
modelBuilder.Entity(typeof(ZombieMatchClientStat)).ToTable($"EF{nameof(ZombieMatchClientStat)}");
modelBuilder.Entity(typeof(ZombieRoundClientStat)).ToTable($"EF{nameof(ZombieRoundClientStat)}");
modelBuilder.Entity(typeof(ZombieAggregateClientStat)).ToTable($"EF{nameof(ZombieAggregateClientStat)}");
modelBuilder.Entity(typeof(ZombieClientStat)).ToTable($"EF{nameof(ZombieClientStat)}");
Models.Configuration.StatsModelConfiguration.Configure(modelBuilder);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,230 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Data.Migrations.Sqlite
{
public partial class AddZombieStatsInitial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "EFZombieMatch",
columns: table => new
{
ZombieMatchId = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
MapId = table.Column<int>(type: "INTEGER", nullable: true),
ServerId = table.Column<long>(type: "INTEGER", nullable: true),
MatchStartDate = table.Column<DateTimeOffset>(type: "TEXT", nullable: false),
MatchEndDate = table.Column<DateTimeOffset>(type: "TEXT", nullable: true),
EFClientClientId = table.Column<int>(type: "INTEGER", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EFZombieMatch", x => x.ZombieMatchId);
table.ForeignKey(
name: "FK_EFZombieMatch_EFClients_EFClientClientId",
column: x => x.EFClientClientId,
principalTable: "EFClients",
principalColumn: "ClientId");
table.ForeignKey(
name: "FK_EFZombieMatch_EFMaps_MapId",
column: x => x.MapId,
principalTable: "EFMaps",
principalColumn: "MapId");
table.ForeignKey(
name: "FK_EFZombieMatch_EFServers_ServerId",
column: x => x.ServerId,
principalTable: "EFServers",
principalColumn: "ServerId");
});
migrationBuilder.CreateTable(
name: "EFZombieClientStat",
columns: table => new
{
ZombieClientStatId = table.Column<long>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
MatchId = table.Column<int>(type: "INTEGER", nullable: true),
ClientId = table.Column<int>(type: "INTEGER", nullable: false),
Kills = table.Column<int>(type: "INTEGER", nullable: false),
Deaths = table.Column<int>(type: "INTEGER", nullable: false),
DamageDealt = table.Column<int>(type: "INTEGER", nullable: false),
DamageReceived = table.Column<int>(type: "INTEGER", nullable: false),
Headshots = table.Column<int>(type: "INTEGER", nullable: false),
Melees = table.Column<int>(type: "INTEGER", nullable: false),
Downs = table.Column<int>(type: "INTEGER", nullable: false),
Revives = table.Column<int>(type: "INTEGER", nullable: false),
PointsEarned = table.Column<int>(type: "INTEGER", nullable: false),
PointsSpent = table.Column<int>(type: "INTEGER", nullable: false),
PerksConsumed = table.Column<int>(type: "INTEGER", nullable: false),
PowerupsGrabbed = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EFZombieClientStat", x => x.ZombieClientStatId);
table.ForeignKey(
name: "FK_EFZombieClientStat_EFClients_ClientId",
column: x => x.ClientId,
principalTable: "EFClients",
principalColumn: "ClientId",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_EFZombieClientStat_EFZombieMatch_MatchId",
column: x => x.MatchId,
principalTable: "EFZombieMatch",
principalColumn: "ZombieMatchId");
});
migrationBuilder.CreateTable(
name: "EFZombieAggregateClientStat",
columns: table => new
{
ZombieClientStatId = table.Column<long>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
AverageKillsPerDown = table.Column<double>(type: "REAL", nullable: false),
AverageDowns = table.Column<double>(type: "REAL", nullable: false),
AverageRevives = table.Column<double>(type: "REAL", nullable: false),
HeadshotPercentage = table.Column<double>(type: "REAL", nullable: false),
AlivePercentage = table.Column<double>(type: "REAL", nullable: false),
AverageMelees = table.Column<double>(type: "REAL", nullable: false),
AverageRoundReached = table.Column<double>(type: "REAL", nullable: false),
AveragePoints = table.Column<double>(type: "REAL", nullable: false),
HighestRound = table.Column<int>(type: "INTEGER", nullable: false),
TotalRoundsPlayed = table.Column<int>(type: "INTEGER", nullable: false),
TotalMatchesPlayed = table.Column<int>(type: "INTEGER", nullable: false),
RankingMetric = table.Column<double>(type: "REAL", nullable: false),
EFClientClientId = table.Column<int>(type: "INTEGER", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EFZombieAggregateClientStat", x => x.ZombieClientStatId);
table.ForeignKey(
name: "FK_EFZombieAggregateClientStat_EFClients_EFClientClientId",
column: x => x.EFClientClientId,
principalTable: "EFClients",
principalColumn: "ClientId");
table.ForeignKey(
name: "FK_EFZombieAggregateClientStat_EFZombieClientStat_ZombieClientStatId",
column: x => x.ZombieClientStatId,
principalTable: "EFZombieClientStat",
principalColumn: "ZombieClientStatId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "EFZombieMatchClientStat",
columns: table => new
{
ZombieClientStatId = table.Column<long>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
EFClientClientId = table.Column<int>(type: "INTEGER", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EFZombieMatchClientStat", x => x.ZombieClientStatId);
table.ForeignKey(
name: "FK_EFZombieMatchClientStat_EFClients_EFClientClientId",
column: x => x.EFClientClientId,
principalTable: "EFClients",
principalColumn: "ClientId");
table.ForeignKey(
name: "FK_EFZombieMatchClientStat_EFZombieClientStat_ZombieClientStatId",
column: x => x.ZombieClientStatId,
principalTable: "EFZombieClientStat",
principalColumn: "ZombieClientStatId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "EFZombieRoundClientStat",
columns: table => new
{
ZombieClientStatId = table.Column<long>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
StartTime = table.Column<DateTimeOffset>(type: "TEXT", nullable: false),
EndTime = table.Column<DateTimeOffset>(type: "TEXT", nullable: true),
Duration = table.Column<TimeSpan>(type: "TEXT", nullable: true),
TimeAlive = table.Column<TimeSpan>(type: "TEXT", nullable: true),
RoundNumber = table.Column<int>(type: "INTEGER", nullable: false),
Points = table.Column<int>(type: "INTEGER", nullable: false),
EFClientClientId = table.Column<int>(type: "INTEGER", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EFZombieRoundClientStat", x => x.ZombieClientStatId);
table.ForeignKey(
name: "FK_EFZombieRoundClientStat_EFClients_EFClientClientId",
column: x => x.EFClientClientId,
principalTable: "EFClients",
principalColumn: "ClientId");
table.ForeignKey(
name: "FK_EFZombieRoundClientStat_EFZombieClientStat_ZombieClientStatId",
column: x => x.ZombieClientStatId,
principalTable: "EFZombieClientStat",
principalColumn: "ZombieClientStatId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_EFZombieAggregateClientStat_EFClientClientId",
table: "EFZombieAggregateClientStat",
column: "EFClientClientId");
migrationBuilder.CreateIndex(
name: "IX_EFZombieClientStat_ClientId",
table: "EFZombieClientStat",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_EFZombieClientStat_MatchId",
table: "EFZombieClientStat",
column: "MatchId");
migrationBuilder.CreateIndex(
name: "IX_EFZombieMatch_EFClientClientId",
table: "EFZombieMatch",
column: "EFClientClientId");
migrationBuilder.CreateIndex(
name: "IX_EFZombieMatch_MapId",
table: "EFZombieMatch",
column: "MapId");
migrationBuilder.CreateIndex(
name: "IX_EFZombieMatch_ServerId",
table: "EFZombieMatch",
column: "ServerId");
migrationBuilder.CreateIndex(
name: "IX_EFZombieMatchClientStat_EFClientClientId",
table: "EFZombieMatchClientStat",
column: "EFClientClientId");
migrationBuilder.CreateIndex(
name: "IX_EFZombieRoundClientStat_EFClientClientId",
table: "EFZombieRoundClientStat",
column: "EFClientClientId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "EFZombieAggregateClientStat");
migrationBuilder.DropTable(
name: "EFZombieMatchClientStat");
migrationBuilder.DropTable(
name: "EFZombieRoundClientStat");
migrationBuilder.DropTable(
name: "EFZombieClientStat");
migrationBuilder.DropTable(
name: "EFZombieMatch");
}
}
}

View File

@ -812,6 +812,7 @@ namespace Data.Migrations.Sqlite
b.Property<string>("SearchableIPAddress")
.ValueGeneratedOnAddOrUpdate()
.HasMaxLength(255)
.HasColumnType("TEXT")
.HasComputedColumnSql("((IPAddress & 255) || '.' || ((IPAddress >> 8) & 255)) || '.' || ((IPAddress >> 16) & 255) || '.' || ((IPAddress >> 24) & 255)", true);
@ -1160,6 +1161,185 @@ namespace Data.Migrations.Sqlite
b.ToTable("Vector3", (string)null);
});
modelBuilder.Entity("Data.Models.Zombie.ZombieClientStat", b =>
{
b.Property<long>("ZombieClientStatId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("ClientId")
.HasColumnType("INTEGER");
b.Property<int>("DamageDealt")
.HasColumnType("INTEGER");
b.Property<int>("DamageReceived")
.HasColumnType("INTEGER");
b.Property<int>("Deaths")
.HasColumnType("INTEGER");
b.Property<int>("Downs")
.HasColumnType("INTEGER");
b.Property<int>("Headshots")
.HasColumnType("INTEGER");
b.Property<int>("Kills")
.HasColumnType("INTEGER");
b.Property<int?>("MatchId")
.HasColumnType("INTEGER");
b.Property<int>("Melees")
.HasColumnType("INTEGER");
b.Property<int>("PerksConsumed")
.HasColumnType("INTEGER");
b.Property<int>("PointsEarned")
.HasColumnType("INTEGER");
b.Property<int>("PointsSpent")
.HasColumnType("INTEGER");
b.Property<int>("PowerupsGrabbed")
.HasColumnType("INTEGER");
b.Property<int>("Revives")
.HasColumnType("INTEGER");
b.HasKey("ZombieClientStatId");
b.HasIndex("ClientId");
b.HasIndex("MatchId");
b.ToTable("EFZombieClientStat", (string)null);
});
modelBuilder.Entity("Data.Models.Zombie.ZombieMatch", b =>
{
b.Property<int>("ZombieMatchId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int?>("EFClientClientId")
.HasColumnType("INTEGER");
b.Property<int?>("MapId")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset?>("MatchEndDate")
.HasColumnType("TEXT");
b.Property<DateTimeOffset>("MatchStartDate")
.HasColumnType("TEXT");
b.Property<long?>("ServerId")
.HasColumnType("INTEGER");
b.HasKey("ZombieMatchId");
b.HasIndex("EFClientClientId");
b.HasIndex("MapId");
b.HasIndex("ServerId");
b.ToTable("EFZombieMatch", (string)null);
});
modelBuilder.Entity("Data.Models.Zombie.ZombieAggregateClientStat", b =>
{
b.HasBaseType("Data.Models.Zombie.ZombieClientStat");
b.Property<double>("AlivePercentage")
.HasColumnType("REAL");
b.Property<double>("AverageDowns")
.HasColumnType("REAL");
b.Property<double>("AverageKillsPerDown")
.HasColumnType("REAL");
b.Property<double>("AverageMelees")
.HasColumnType("REAL");
b.Property<double>("AveragePoints")
.HasColumnType("REAL");
b.Property<double>("AverageRevives")
.HasColumnType("REAL");
b.Property<double>("AverageRoundReached")
.HasColumnType("REAL");
b.Property<int?>("EFClientClientId")
.HasColumnType("INTEGER");
b.Property<double>("HeadshotPercentage")
.HasColumnType("REAL");
b.Property<int>("HighestRound")
.HasColumnType("INTEGER");
b.Property<double>("RankingMetric")
.HasColumnType("REAL");
b.Property<int>("TotalMatchesPlayed")
.HasColumnType("INTEGER");
b.Property<int>("TotalRoundsPlayed")
.HasColumnType("INTEGER");
b.HasIndex("EFClientClientId");
b.ToTable("EFZombieAggregateClientStat", (string)null);
});
modelBuilder.Entity("Data.Models.Zombie.ZombieMatchClientStat", b =>
{
b.HasBaseType("Data.Models.Zombie.ZombieClientStat");
b.Property<int?>("EFClientClientId")
.HasColumnType("INTEGER");
b.HasIndex("EFClientClientId");
b.ToTable("EFZombieMatchClientStat", (string)null);
});
modelBuilder.Entity("Data.Models.Zombie.ZombieRoundClientStat", b =>
{
b.HasBaseType("Data.Models.Zombie.ZombieClientStat");
b.Property<TimeSpan?>("Duration")
.HasColumnType("TEXT");
b.Property<int?>("EFClientClientId")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset?>("EndTime")
.HasColumnType("TEXT");
b.Property<int>("Points")
.HasColumnType("INTEGER");
b.Property<int>("RoundNumber")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset>("StartTime")
.HasColumnType("TEXT");
b.Property<TimeSpan?>("TimeAlive")
.HasColumnType("TEXT");
b.HasIndex("EFClientClientId");
b.ToTable("EFZombieRoundClientStat", (string)null);
});
modelBuilder.Entity("Data.Models.Client.EFACSnapshotVector3", b =>
{
b.HasOne("Data.Models.Client.Stats.EFACSnapshot", "Snapshot")
@ -1601,6 +1781,81 @@ namespace Data.Migrations.Sqlite
b.Navigation("Server");
});
modelBuilder.Entity("Data.Models.Zombie.ZombieClientStat", b =>
{
b.HasOne("Data.Models.Client.EFClient", "Client")
.WithMany("ZombieClientStats")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Data.Models.Zombie.ZombieMatch", "Match")
.WithMany("ClientStats")
.HasForeignKey("MatchId");
b.Navigation("Client");
b.Navigation("Match");
});
modelBuilder.Entity("Data.Models.Zombie.ZombieMatch", b =>
{
b.HasOne("Data.Models.Client.EFClient", null)
.WithMany("ZombieMatches")
.HasForeignKey("EFClientClientId");
b.HasOne("Data.Models.Client.Stats.Reference.EFMap", "Map")
.WithMany()
.HasForeignKey("MapId");
b.HasOne("Data.Models.Server.EFServer", "Server")
.WithMany()
.HasForeignKey("ServerId");
b.Navigation("Map");
b.Navigation("Server");
});
modelBuilder.Entity("Data.Models.Zombie.ZombieAggregateClientStat", b =>
{
b.HasOne("Data.Models.Client.EFClient", null)
.WithMany("ZombieAggregateClientStats")
.HasForeignKey("EFClientClientId");
b.HasOne("Data.Models.Zombie.ZombieClientStat", null)
.WithOne()
.HasForeignKey("Data.Models.Zombie.ZombieAggregateClientStat", "ZombieClientStatId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Data.Models.Zombie.ZombieMatchClientStat", b =>
{
b.HasOne("Data.Models.Client.EFClient", null)
.WithMany("ZombieMatchClientStats")
.HasForeignKey("EFClientClientId");
b.HasOne("Data.Models.Zombie.ZombieClientStat", null)
.WithOne()
.HasForeignKey("Data.Models.Zombie.ZombieMatchClientStat", "ZombieClientStatId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Data.Models.Zombie.ZombieRoundClientStat", b =>
{
b.HasOne("Data.Models.Client.EFClient", null)
.WithMany("ZombieRoundClientStats")
.HasForeignKey("EFClientClientId");
b.HasOne("Data.Models.Zombie.ZombieClientStat", null)
.WithOne()
.HasForeignKey("Data.Models.Zombie.ZombieRoundClientStat", "ZombieClientStatId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Data.Models.Client.EFClient", b =>
{
b.Navigation("AdministeredPenalties");
@ -1608,6 +1863,16 @@ namespace Data.Migrations.Sqlite
b.Navigation("Meta");
b.Navigation("ReceivedPenalties");
b.Navigation("ZombieAggregateClientStats");
b.Navigation("ZombieClientStats");
b.Navigation("ZombieMatchClientStats");
b.Navigation("ZombieMatches");
b.Navigation("ZombieRoundClientStats");
});
modelBuilder.Entity("Data.Models.Client.Stats.EFACSnapshot", b =>
@ -1631,6 +1896,11 @@ namespace Data.Migrations.Sqlite
b.Navigation("ReceivedPenalties");
});
modelBuilder.Entity("Data.Models.Zombie.ZombieMatch", b =>
{
b.Navigation("ClientStats");
});
#pragma warning restore 612, 618
}
}

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Data.Models.Zombie;
namespace Data.Models.Client
{
@ -83,5 +84,10 @@ namespace Data.Models.Client
public virtual ICollection<EFMeta> Meta { get; set; }
public virtual ICollection<EFPenalty> ReceivedPenalties { get; set; }
public virtual ICollection<EFPenalty> AdministeredPenalties { get; set; }
public virtual ICollection<ZombieAggregateClientStat> ZombieAggregateClientStats { get; set; }
public virtual ICollection<ZombieClientStat> ZombieClientStats { get; set; }
public virtual ICollection<ZombieMatch> ZombieMatches { get; set; }
public virtual ICollection<ZombieMatchClientStat> ZombieMatchClientStats { get; set; }
public virtual ICollection<ZombieRoundClientStat> ZombieRoundClientStats { get; set; }
}
}

View File

@ -0,0 +1,27 @@
namespace Data.Models.Zombie;
public class ZombieAggregateClientStat : ZombieClientStat
{
#region Average
public double AverageKillsPerDown { get; set; }
public double AverageDowns { get; set; }
public double AverageRevives { get; set; }
public double HeadshotPercentage { get; set; }
public double AlivePercentage { get; set; }
public double AverageMelees { get; set; }
public double AverageRoundReached { get; set; }
public double AveragePoints { get; set; }
#endregion
#region Totals
public int HighestRound { get; set; }
public int TotalRoundsPlayed { get; set; }
public int TotalMatchesPlayed { get; set; }
#endregion
public double RankingMetric { get; set; }
}

View File

@ -0,0 +1,34 @@
#nullable enable
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Data.Models.Client;
namespace Data.Models.Zombie;
public abstract class ZombieClientStat
{
[Key]
public long ZombieClientStatId { get; set; }
public int? MatchId { get; set; }
[ForeignKey(nameof(MatchId))]
public virtual ZombieMatch? Match { get; set; }
public int ClientId { get; set; }
[ForeignKey(nameof(ClientId))]
public virtual EFClient? Client { get; set; }
public int Kills { get; set; }
public int Deaths { get; set; }
public int DamageDealt { get; set; }
public int DamageReceived { get; set; }
public int Headshots { get; set; }
public int Melees { get; set; }
public int Downs { get; set; }
public int Revives { get; set; }
public int PointsEarned { get; set; }
public int PointsSpent { get; set; }
public int PerksConsumed { get; set; }
public int PowerupsGrabbed { get; set; }
}

View File

@ -0,0 +1,28 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Data.Models.Client.Stats.Reference;
using Data.Models.Server;
namespace Data.Models.Zombie;
public class ZombieMatch
{
[Key]
public int ZombieMatchId { get; set; }
public int? MapId { get; set; }
[ForeignKey(nameof(MapId))]
public virtual EFMap? Map { get; set; }
public long? ServerId { get; set; }
[ForeignKey(nameof(ServerId))]
public virtual EFServer? Server { get; set; }
public virtual ICollection<ZombieClientStat>? ClientStats { get; set; }
public DateTimeOffset MatchStartDate { get; set; } = DateTimeOffset.UtcNow;
public DateTimeOffset? MatchEndDate { get; set; }
}

View File

@ -0,0 +1,6 @@
namespace Data.Models.Zombie;
public class ZombieMatchClientStat : ZombieClientStat
{
}

View File

@ -0,0 +1,13 @@
using System;
namespace Data.Models.Zombie;
public class ZombieRoundClientStat : ZombieClientStat
{
public DateTimeOffset StartTime { get; set; } = DateTimeOffset.UtcNow;
public DateTimeOffset? EndTime { get; set; }
public TimeSpan? Duration { get; set; }
public TimeSpan? TimeAlive { get; set; }
public int RoundNumber { get; set; }
public int Points { get; set; }
}

View File

@ -0,0 +1,9 @@
using Data.Models.Client;
namespace SharedLibraryCore.Events.Game.GameScript.Zombie;
public class PlayerConsumedPerkGameEvent : ClientGameEvent
{
public EFClient Consumer => Origin;
public string PerkName { get; init; }
}

View File

@ -0,0 +1,6 @@
namespace SharedLibraryCore.Events.Game.GameScript.Zombie;
public class PlayerDamageGameEvent : ClientDamageEvent
{
}

View File

@ -0,0 +1,6 @@
namespace SharedLibraryCore.Events.Game.GameScript.Zombie;
public class PlayerDownedGameEvent : ClientGameEvent
{
}

View File

@ -0,0 +1,9 @@
using Data.Models.Client;
namespace SharedLibraryCore.Events.Game.GameScript.Zombie;
public class PlayerGrabbedPowerupGameEvent : ClientGameEvent
{
public EFClient Grabber => Origin;
public string PowerupName { get; init; }
}

View File

@ -0,0 +1,9 @@
namespace SharedLibraryCore.Events.Game.GameScript.Zombie;
public class PlayerKilledGameEvent : PlayerDamageGameEvent
{
public PlayerKilledGameEvent()
{
RequiredEntity = EventRequiredEntity.Target;
}
}

View File

@ -0,0 +1,9 @@
using Data.Models.Client;
namespace SharedLibraryCore.Events.Game.GameScript.Zombie;
public class PlayerRevivedGameEvent : ClientGameEvent
{
public EFClient Reviver => Origin;
public EFClient Revived => Target;
}

View File

@ -0,0 +1,8 @@
namespace SharedLibraryCore.Events.Game.GameScript.Zombie;
public class PlayerRoundDataGameEvent : ClientGameEvent
{
public int TotalScore { get; init; }
public int CurrentScore { get; init; }
public bool IsGameOver { get; init; }
}

View File

@ -0,0 +1,6 @@
namespace SharedLibraryCore.Events.Game.GameScript.Zombie;
public class RoundCompleteGameEvent : GameEventV2
{
public int RoundNumber { get; init; }
}

View File

@ -0,0 +1,6 @@
namespace SharedLibraryCore.Events.Game.GameScript.Zombie;
public class ZombieDamageGameEvent : ClientDamageEvent
{
}

View File

@ -0,0 +1,9 @@
namespace SharedLibraryCore.Events.Game.GameScript.Zombie;
public class ZombieKilledGameEvent : ZombieDamageGameEvent
{
public ZombieKilledGameEvent()
{
RequiredEntity = EventRequiredEntity.Origin;
}
}