Moving World.SaveOption to StandardSaveStrategy.SaveOption, as it's only used and applicable there. Setting Dynamic Save Strategy to run whenever there are more than two cores.

This commit is contained in:
asayre 2012-02-11 04:36:54 +00:00
parent ae54ac290d
commit 68922c1eeb
3 changed files with 16 additions and 11 deletions

View file

@ -30,6 +30,14 @@ using Server.Guilds;
namespace Server {
public class StandardSaveStrategy : SaveStrategy {
public enum SaveOption
{
Normal,
Threaded
}
public static SaveOption SaveType = SaveOption.Normal;
public override string Name {
get { return "Standard"; }
}
@ -43,7 +51,7 @@ namespace Server {
protected bool PermitBackgroundWrite { get { return _permitBackgroundWrite; } set { _permitBackgroundWrite = value; } }
protected bool UseSequentialWriters { get { return (World.SaveType == World.SaveOption.Normal || !_permitBackgroundWrite); } }
protected bool UseSequentialWriters { get { return (StandardSaveStrategy.SaveType == SaveOption.Normal || !_permitBackgroundWrite); } }
public override void Save(SaveMetrics metrics, bool permitBackgroundWrite)
{