protected virtual void OnDeath(string token) { Score /= 2; if (!string.IsNullOrEmpty(this.Token) && !string.IsNullOrEmpty(token)) { RemoteEventLog.SendEvent(new { token = this.Token, name = this.Name, killedBy = token }); } }
protected virtual void OnDeath(string token) { Score = (int)Math.Max(Score * World.Hook.PointsMultiplierDeath, 0); if (!string.IsNullOrEmpty(this.Token) && !string.IsNullOrEmpty(token)) { RemoteEventLog.SendEvent(new { token = this.Token, name = this.Name, killedBy = token }); } }
public virtual void CreateDestroy() { if (IsSpawning && !IsAlive && Fleet == null) { IsSpawning = false; IsAlive = true; Fleet = CreateFleet(Color); Fleet.SpawnLocation = SpawnLocation; Fleet.Init(World); RemoteEventLog.SendEvent(new AuditEventSpawn { Player = this.ToAuditModelPlayer() }, World); if (World.Hook.GearheadName != null && this.Name == World.Hook.GearheadName) { Fleet.BaseWeapon = new FleetWeaponRobot(); IsGearhead = true; } if (SpawnMomentum != null) { foreach (var ship in Fleet.NewShips) { ship.Momentum = SpawnMomentum.Value; } } if (!DisableSpawnInvulnerability) { SetInvulnerability(SpawnInvulnerableTime, true); } SpawnTime = World.Time; } if (PendingDestruction) { Destroy(); PendingDestruction = false; } IsStillPlaying = !PendingDestruction && DeadSince > World.Time - World.Hook.PlayerCountGracePeriodMS; }
protected virtual void OnDeath(Player player = null) { if (Connection != null && player?.Fleet != null) { Connection.SpectatingFleet = player.Fleet; } if (!string.IsNullOrEmpty(player?.Token)) { RemoteEventLog.SendEvent(new OnDeath { token = this.Token, name = this.Name, killedBy = player?.Token }); } }