2018-02-07 00:19:06 -05:00
|
|
|
|
using System;
|
|
|
|
|
|
2018-04-08 17:50:58 -04:00
|
|
|
|
using SharedLibraryCore.Database.Models;
|
2018-02-07 00:19:06 -05:00
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2018-04-08 17:50:58 -04:00
|
|
|
|
using SharedLibraryCore.Helpers;
|
2018-02-07 00:19:06 -05:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2018-05-03 01:25:49 -04:00
|
|
|
|
using System.Collections.Generic;
|
2020-09-30 18:15:47 -04:00
|
|
|
|
using static SharedLibraryCore.Server;
|
2018-02-07 00:19:06 -05:00
|
|
|
|
|
2018-04-08 17:50:58 -04:00
|
|
|
|
namespace IW4MAdmin.Plugins.Stats.Models
|
2018-02-07 00:19:06 -05:00
|
|
|
|
{
|
2018-03-22 14:50:09 -04:00
|
|
|
|
public class EFClientKill : SharedEntity
|
2018-02-07 00:19:06 -05:00
|
|
|
|
{
|
|
|
|
|
[Key]
|
|
|
|
|
public long KillId { get; set; }
|
|
|
|
|
public int VictimId { get; set; }
|
|
|
|
|
[ForeignKey("VictimId")]
|
|
|
|
|
public virtual EFClient Victim { get; set; }
|
|
|
|
|
public int AttackerId { get; set; }
|
|
|
|
|
[ForeignKey("AttackerId")]
|
|
|
|
|
public virtual EFClient Attacker { get; set; }
|
2018-11-27 19:31:48 -05:00
|
|
|
|
public long ServerId { get; set; }
|
2018-02-07 00:19:06 -05:00
|
|
|
|
[ForeignKey("ServerId")]
|
|
|
|
|
public virtual EFServer Server { get; set; }
|
|
|
|
|
public IW4Info.HitLocation HitLoc { get; set; }
|
|
|
|
|
public IW4Info.MeansOfDeath DeathType { get; set; }
|
|
|
|
|
public int Damage { get; set; }
|
|
|
|
|
public IW4Info.WeaponName Weapon { get; set; }
|
|
|
|
|
public Vector3 KillOrigin { get; set; }
|
|
|
|
|
public Vector3 DeathOrigin { get; set; }
|
2018-03-26 00:51:25 -04:00
|
|
|
|
public Vector3 ViewAngles { get; set; }
|
|
|
|
|
public DateTime When { get; set; }
|
2018-09-02 17:59:27 -04:00
|
|
|
|
public double Fraction { get; set; }
|
|
|
|
|
public bool IsKill { get; set; }
|
2018-09-04 13:40:29 -04:00
|
|
|
|
public double VisibilityPercentage { get; set; }
|
2018-02-07 00:19:06 -05:00
|
|
|
|
// http://wiki.modsrepository.com/index.php?title=Call_of_Duty_5:_Gameplay_standards for conversion to meters
|
|
|
|
|
[NotMapped]
|
|
|
|
|
public double Distance => Vector3.Distance(KillOrigin, DeathOrigin) * 0.0254;
|
|
|
|
|
public IW4Info.MapName Map { get; set; }
|
2018-03-22 14:50:09 -04:00
|
|
|
|
[NotMapped]
|
|
|
|
|
public long TimeOffset { get; set; }
|
2018-03-26 00:51:25 -04:00
|
|
|
|
[NotMapped]
|
|
|
|
|
public bool IsKillstreakKill { get; set; }
|
|
|
|
|
[NotMapped]
|
|
|
|
|
public float AdsPercent { get; set; }
|
2018-05-03 01:25:49 -04:00
|
|
|
|
[NotMapped]
|
|
|
|
|
public List<Vector3> AnglesList { get; set; }
|
2020-09-30 18:15:47 -04:00
|
|
|
|
[NotMapped]
|
|
|
|
|
public Game GameName { get; set; }
|
2020-01-06 19:43:00 -05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Indicates if the attacker was alive after last captured angle
|
|
|
|
|
/// </summary>
|
|
|
|
|
[NotMapped]
|
|
|
|
|
public bool IsAlive { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Specifies the last time the attack button was detected as pressed
|
|
|
|
|
/// </summary>
|
|
|
|
|
[NotMapped]
|
|
|
|
|
public long TimeSinceLastAttack { get; set; }
|
2018-02-07 00:19:06 -05:00
|
|
|
|
}
|
|
|
|
|
}
|