You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
848 B
33 lines
848 B
using System.Runtime.Serialization;
|
|
|
|
|
|
namespace PlayerOp
|
|
{
|
|
public class PlayerOpServerConfig
|
|
{
|
|
public string dbname;
|
|
public string dbip;
|
|
public string dbuser;
|
|
public string dbpassword;
|
|
public int maxExchangeCodeCount;
|
|
public int dbtype;
|
|
public string codefliepath;
|
|
}
|
|
|
|
public class PlayerOpConfigDef
|
|
{
|
|
private const int DefaultMaxExchangeCodeCount = 200;
|
|
public static int MaxExchangeCodeCount
|
|
{
|
|
get
|
|
{
|
|
var cfg = PlayerOpServerUtils.GetServerConfig();
|
|
if(cfg != null && cfg.maxExchangeCodeCount > 0)
|
|
{
|
|
return cfg.maxExchangeCodeCount;
|
|
}
|
|
return PlayerOpConfigDef.DefaultMaxExchangeCodeCount;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|