public MissionLogEventObjectiveCompleted(MissionLogEventHeader header) : base(header) { ObjectiveId = RawParameters.GetInt("OBJID"); Position = RawParameters.GetVector3D("POS"); IsPrimary = RawParameters.GetInt("TYPE") == 1 ? true : false; CoalitionIndex = RawParameters.GetInt("COAL"); IsCompleted = RawParameters.GetInt("RES") == 1 ? true : false; }
public MissionLogEventAirfieldInfo(MissionLogEventHeader header) : base(header) { AirField = new AirField() { Country = new Country(RawParameters.GetInt("COUNTRY")), Id = RawParameters.GetInt("AID"), Position = RawParameters.GetVector3D("POS"), }; }
public MissionLogEject(MissionLogEventHeader header) : base(header) { Position = RawParameters.GetVector3D("POS"); var area = Server.Areas.FindAreaByPos(RawParameters.GetVector3D("POS")); Player = Server.Players[RawParameters.GetInt("PARENTID")] ?? Server.Players[RawParameters.GetInt("BOTID")]; if (Player != null && area != null) { IsFriendlyArea = area.Coalition == Player.CoalitionIndex; } }
public MissionLogEventLanding(MissionLogEventHeader header) : base(header) { PlayerId = RawParameters.GetInt("PID"); Position = RawParameters.GetVector3D("POS"); Player = Server.Players[PlayerId]; if (Player == null) { Bot = Server.GameObjects[PlayerId]; } else { Player.IsInAir = false; } }
public MissionLogEventDamage(MissionLogEventHeader header) : base(header) { AttackerId = RawParameters.GetInt("AID"); TargetId = RawParameters.GetInt("TID"); Damage = RawParameters.GetDouble("DMG"); Position = RawParameters.GetVector3D("POS"); AttackerPlayer = Server.Players[AttackerId]; if (AttackerPlayer == null) { AttackerObject = Server.GameObjects[AttackerId]; } TargetPlayer = Server.Players[TargetId]; if (TargetPlayer == null) { TargetObject = Server.GameObjects[TargetId]; } }
public MissionLogRemoveBot(MissionLogEventHeader header) : base(header) { Position = RawParameters.GetVector3D("POS"); var area = Server.Areas.FindAreaByPos(RawParameters.GetVector3D("POS")); Player = Server.Players[RawParameters.GetInt("BOTID")]; if (area != null) { if (Player == null) { Bot = Server.GameObjects[RawParameters.GetInt("BOTID")]; IsFriendlyArea = area.Coalition == Bot.CoalitionIndex; } else { IsFriendlyArea = area.Coalition == Player.CoalitionIndex; } } }
public MissionLogEventKill(MissionLogEventHeader header) : base(header) { AttackerId = RawParameters.GetInt("AID"); TargetId = RawParameters.GetInt("TID"); Position = RawParameters.GetVector3D("POS"); AttackerPlayer = Server.Players[AttackerId]; AttackerObject = Server.GameObjects[AttackerId]; TargetPlayer = Server.Players[TargetId]; TargetObject = Server.GameObjects[TargetId]; if (AttackerPlayer == null && AttackerObject == null && TargetPlayer != null && TargetPlayer.HitsSources.Count > 0) { AttackerPlayer = TargetPlayer.MostDamageByPlayer(); if (AttackerPlayer == null) { AttackerObject = TargetPlayer.MostDamageByObject(); } } }