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.
141 lines
3.7 KiB
141 lines
3.7 KiB
1 month ago
|
/*
|
||
|
Sog 游戏基础库
|
||
|
2016 by zouwei
|
||
|
*/
|
||
|
|
||
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Threading.Tasks;
|
||
|
using System.Runtime.Serialization;
|
||
|
|
||
|
using Sog.Log;
|
||
|
|
||
|
namespace Game
|
||
|
{
|
||
|
//AB测试开启配置,对哪些服务器,哪些uid开启哪些规则,本质上是个规则的白名单列表
|
||
|
public class ABTestConfig
|
||
|
{
|
||
|
//规则id集合,按位,为0表示无效规则
|
||
|
public int abTestFlag;
|
||
|
|
||
|
//ip白名单有效
|
||
|
public int enableWhiteIPList;
|
||
|
|
||
|
//ios或android,不配置表示所有
|
||
|
public string os;
|
||
|
|
||
|
//开启的realms,不填表示全部realms有效
|
||
|
public int[] openOnRealmIds;
|
||
|
|
||
|
//开启的uid余数范围, 0 ~ 9,为了数数统计方便,只取一位尾部数字
|
||
|
public int uidRemainderStart;
|
||
|
|
||
|
public int uidRemainderEnd;
|
||
|
|
||
|
}
|
||
|
public class GameServerConfig
|
||
|
{
|
||
|
//断线后在内存里保留时间,秒
|
||
|
public int keepTimeOffline;
|
||
|
|
||
|
//下线后在内存里保留时间,秒
|
||
|
public int keepTimeData;
|
||
|
|
||
|
//检查客户端ping消息超时(秒),0表示不检查
|
||
|
public int checkCliPingTimeout;
|
||
|
|
||
|
//脏数据存盘每秒最多几个,停服的时候不是这个限制,这个是服务器正常运行时候的频率
|
||
|
public int SavePlayerMaxCountPerSecond;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 玩家日志配置
|
||
|
/// </summary>
|
||
|
public UserLogConfig userLog;
|
||
|
|
||
|
//1.2.6.48|1.2.6.51
|
||
|
//android ios
|
||
|
public string curVersion;
|
||
|
|
||
|
public int grantChip;
|
||
|
|
||
|
public int grantDiamond;
|
||
|
|
||
|
|
||
|
// 是否允许执行AddServerTime
|
||
|
public int permitAddServerTime;
|
||
|
|
||
|
// 是否允许客户端执行AddServerTime
|
||
|
public int permitCliAddServerTime;
|
||
|
|
||
|
// 是否所有人都有gm权限
|
||
|
public int isAllGM;
|
||
|
|
||
|
// 有权限的gm uid
|
||
|
public long[] gmUid;
|
||
|
|
||
|
// 校验所有战斗
|
||
|
public int checkAllBattle;
|
||
|
|
||
|
// 校验指定Uid的战斗
|
||
|
public long[] checkUidBattle;
|
||
|
|
||
|
// 校验指定副本id的战斗
|
||
|
public int[] checkMainlandBattle;
|
||
|
|
||
|
//玩家信息版本号,用来做版本升级后数据修复使用
|
||
|
public int dataVersion;
|
||
|
|
||
|
public bool bDebugHotOpen; //是否开启内测热更版本配置
|
||
|
|
||
|
//关闭客户端的充值功能
|
||
|
public int closePayChanel;
|
||
|
|
||
|
public bool bCloseCheckSysUnlock; //是否关闭系统解锁校验
|
||
|
|
||
|
public int MaxExchangeCodeCount;
|
||
|
|
||
|
//前端选择使用战斗解释模式
|
||
|
public int useInterpT; //0 ILRuntime(默认) 1:mono执行
|
||
|
public int[] useInterpTRealmIDs; //指定具体的realmid
|
||
|
public int[] useInterpTUIDs; //指定具体的uid
|
||
|
|
||
|
public int checkRealmVisible;
|
||
|
|
||
|
public int PreRegistrationActivity;
|
||
|
|
||
|
public ABTestConfig[] abTestConfigs;
|
||
|
|
||
|
public int WritePlayerInfo;
|
||
|
|
||
|
public int isAudit; //是否在审核中,审核中为1,默认为0
|
||
|
|
||
|
public bool isOpenKolGM;
|
||
|
|
||
|
public int GMKolMainlandId; //KOL测试账户创建时直达主线
|
||
|
|
||
|
public int GMKolDropId; //KOL测试账户创建时资源掉落
|
||
|
|
||
|
public int notCheckFinishBattleInfoAll; // 副本finish时不校验battleInfoAll
|
||
|
|
||
|
public int currency;
|
||
|
}
|
||
|
|
||
|
public class GameConfigDef
|
||
|
{
|
||
|
private const int DefaultMaxExchangeCodeCount = 200;
|
||
|
public static int MaxExchangeCodeCount
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
var cfg = GameServerUtils.GetServerConfig();
|
||
|
if(cfg != null && cfg.MaxExchangeCodeCount > 0)
|
||
|
{
|
||
|
return cfg.MaxExchangeCodeCount;
|
||
|
}
|
||
|
return DefaultMaxExchangeCodeCount;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|