真封神无敌1.3.6人數修改方法
private void FreeMaxOnlineTimer(int times, long elapsed, long TimerID, object param)
{
if (ConfigInfo.Instance.MaxOnlineCount >= 30)
{
try
{
ConfigInfo.Instance.MaxOnlineCount = XmlConfigure.Instance.GetAppConfigInt("MaxOnlineCount");
}
catch
{
}
if (ConfigInfo.Instance.MaxOnlineCount <= 0)
{
ConfigInfo.Instance.MaxOnlineCount = 1;
}
}
}
private void IpBindResTimer(int times, long elapsed, long TimerID, object param)
{
ConfigInfo.Instance.IpBindRestrictNum = 30;
}
上面兩個地方,修要就可以
用ildasm反編譯Gameserver.exe 後打開生成的IL文件 搜索FreeMaxOnlineTimer
.method private hidebysig instance void FreeMaxOnlineTimer(int32 times, int64 elapsed, int64 TimerID, object param) cil managed
{
.maxstack 4
.locals init (
bool flag1)
L_0000: nop
L_0001: call FengShenServer.ConfigInfo FengShenServer.ConfigInfo::get_Instance()
L_0006: ldfld int32 FengShenServer.ConfigInfo::MaxOnlineCount
L_000b: ldc.i4.s 30 修改這裏的30
L_000d: clt
L_000f: stloc.0
L_0010: ldloc.0
L_0011: brtrue.s L_0054
L_0013: nop
L_0014: nop
L_0015: call FengShenServer.ConfigInfo FengShenServer.ConfigInfo::get_Instance()
L_001a: call [ServerUtility]ServerUtility.XmlConfigure [ServerUtility]ServerUtility.XmlConfigure::get_Instance()
L_001f: ldstr "MaxOnlineCount"
搜索IpBindResTimer
.method private hidebysig instance void IpBindResTimer(int32 times, int64 elapsed, int64 TimerID, object param) cil managed
{
.maxstack 8
L_0000: nop
L_0001: call FengShenServer.ConfigInfo FengShenServer.ConfigInfo::get_Instance()
L_0006: ldc.i4.s 30 修改這裏的30
L_0008: stfld int32 FengShenServer.ConfigInfo::IpBindRestrictNum
L_000d: ret
}
最後用ilasm編譯回去即可
不會用的,可以BAIDU搜索DotNetHelper這個工具
(责任编辑:admin) |