2018-02-07 00:19:06 -05:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
using SharedLibrary.Database.Models;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
using SharedLibrary.Helpers;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace StatsPlugin.Models
|
|
|
|
|
{
|
2018-03-22 14:50:09 -04:00
|
|
|
|
public class EFClientKill : SharedEntity
|
2018-02-07 00:19:06 -05:00
|
|
|
|
{
|
|
|
|
|
public EFClientKill() { }
|
|
|
|
|
|
|
|
|
|
[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; }
|
|
|
|
|
public int ServerId { get; set; }
|
|
|
|
|
[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; }
|
|
|
|
|
// 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; }
|
|
|
|
|
public Vector3 ViewAngles { get; set; }
|
|
|
|
|
public DateTime When { get; set; }
|
2018-02-07 00:19:06 -05:00
|
|
|
|
}
|
|
|
|
|
}
|