/// <inheritdoc /> public void Load() { if (!File.Exists(GameResources.DeathPenalityPath)) { this._logger.LogWarning("Unable to load death penality. Reason: cannot find '{0}' file.", GameResources.DeathPenalityPath); return; } this.DeathPenality = ConfigurationHelper.Load <DeathPenalityData>(GameResources.DeathPenalityPath); if (this.DeathPenality == null) { this._logger.LogError(GameResources.UnableLoadMessage, "death penality", "Json loading error."); return; } this.DeathPenality.RevivalPenality = this.DeathPenality.RevivalPenality.OrderBy(x => x.Level); this.DeathPenality.DecExpPenality = this.DeathPenality.DecExpPenality.OrderBy(x => x.Level); this.DeathPenality.LevelDownPenality = this.DeathPenality.LevelDownPenality.OrderBy(x => x.Level); this._logger.LogInformation("-> Penalities loaded."); }
/// <inheritdoc /> public void Dispose() { this.DeathPenality = null; }