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 MissionLogEventPlaneSpawn(MissionLogEventHeader header) : base(header) { GameObjectItem purpose; GameInfo.ObjectsClassification.TryGetValue(RawParameters.GetString("TYPE"), out purpose); if (purpose == null) { purpose = new GameObjectItem(GameObjectClass.Other, "Unknown"); } Player = new Player() { Id = RawParameters.GetInt("PID"), Country = new Country(RawParameters.GetInt("COUNTRY")), IsInAir = RawParameters.GetInt("INAIR") == 0 ? true : false, IsOnline = true, LoginId = RawParameters.GetGuid("LOGIN"), NickId = RawParameters.GetGuid("IDS"), NickName = RawParameters.GetString("NAME"), Plane = new Plane(RawParameters.GetInt("PLID"), RawParameters.GetString("TYPE")) { Bullets = RawParameters.GetInt("BUL"), Bombs = RawParameters.GetInt("BOMB"), Classification = GameObjectClass.Plane.ToString("g"), Fuel = RawParameters.GetDouble("FUEL"), Payload = RawParameters.GetString("PAYLOAD"), Purpose = purpose == null ? null : purpose.Purpose, Shells = RawParameters.GetInt("SH"), Skin = RawParameters.GetString("SKIN"), WeaponMods = RawParameters.GetString("WM"), }, BotPilot = new GameObject(RawParameters.GetInt("PID"), "BotPilot"), SortieId = EventID, }; Player.CoalitionIndex = Server.GetCoalitionIndex(Player.Country); Server.Players.PlayerSpawn(Player); }