Skip to content

Commit b92485e

Browse files
committed
Release 6.7.9.7RC
1 parent 8418926 commit b92485e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+32921
-2
lines changed
174 KB
Binary file not shown.
339 KB
Binary file not shown.

Release/6.7.9.6/Console/NLog.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8" ?>
22
<!--
33
This file needs to be put in the application directory. Make sure to set
44
'Copy to Output Directory' option in Visual Studio.
55
-->
66
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
7-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
7+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true">
88
<variable name="logDirectory" value="Log"/>
99
<targets>
1010
<target name="Info" xsi:type="File" fileName="${logDirectory}/Info/${date:format=yyyyMMddHH}.txt" layout="${message}"/>
5 KB
Binary file not shown.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0"?>
2+
<configuration>
3+
<appSettings>
4+
<!--基本配置
5+
Port:监听端口
6+
Code:产品代码
7+
ServerId:产品游服代码
8+
Redis.Host:Redis主机地址
9+
Redis.Port:Redis主机端口
10+
Redis.Password:密码
11+
Redis.Db:数据库位置
12+
-->
13+
<add key="Product.Code" value="0"/>
14+
<add key="Product.ServerId" value="0"/>
15+
<add key="Game.Port" value="9001"/>
16+
<add key="Redis.Host" value="127.0.0.1:6379"/>
17+
<add key="ScriptRelativePath" value="Script"/>
18+
<add key="CSharpRootPath" value="CsScript"/>
19+
<add key="LuaRootPath" value="LuaScript"/>
20+
<add key="Game.Language.TypeName" value="GameServer.CsScript.Locale.SimplifiedLanguage"/>
21+
<add key="Game.Action.Script.TypeName" value="GameServer.CsScript.Action.Action{0}"/>
22+
<add key="Script_IsDebug" value="True"/>
23+
<add key="Lua_Disable" value="True"/>
24+
25+
<!--脚本解密回调配置-->
26+
<!--<add key="Game.Script.DecodeFunc.TypeName" value="ScutSecurity.ScriptDes,ScutSecurity"/>-->
27+
</appSettings>
28+
<connectionStrings>
29+
<!--<add name="SnsCenter" providerName="SqlDataProvider" connectionString="Data Source=localhost;Database=snscenter;Uid=sa;Pwd=123;Pooling=true;"/>
30+
<add name="PayCenter" providerName="SqlDataProvider" connectionString="Data Source=localhost;Database=PayDB;Uid=sa;Pwd=123;Pooling=true;"/>
31+
<add name="ConnData" providerName="SqlDataProvider" connectionString="Data Source=localhost;Database=PHData;Uid=game_user;Pwd=123;"/>-->
32+
</connectionStrings>
33+
</configuration>

Release/6.7.9.7/Console/Install.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@echo off
2+
3+
xcopy /y ..\Lib\*.dll .\
4+
5+
ECHO Install Ok & PAUSE

Release/6.7.9.7/Console/NLog.config

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!--
3+
This file needs to be put in the application directory. Make sure to set
4+
'Copy to Output Directory' option in Visual Studio.
5+
-->
6+
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
7+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true">
8+
<variable name="logDirectory" value="Log"/>
9+
<targets>
10+
<target name="Info" xsi:type="File" fileName="${logDirectory}/Info/${date:format=yyyyMMddHH}.txt" layout="${message}"/>
11+
<target name="Debug" xsi:type="File" fileName="${logDirectory}/Debug/${date:format=yyyyMMddHH}.txt" layout="${message}"/>
12+
<target name="Exception" xsi:type="File" fileName="${logDirectory}/Exception/${date:format=yyyyMMddHH}.txt" layout="${message}"/>
13+
<target name="Fatal" xsi:type="File" fileName="${logDirectory}/Fatal/${date:format=yyyyMMddHH}.txt" layout="${message}"/>
14+
<target name="Warn" xsi:type="File" fileName="${logDirectory}/Warn/${date:format=yyyyMMddHH}.txt" layout="${message}"/>
15+
<target name="Client" xsi:type="File" fileName="${logDirectory}/Client/${date:format=yyyyMMddHH}.txt" layout="${message}"/>
16+
<target name="SqlError" xsi:type="File" fileName="${logDirectory}/Sql/${date:format=yyyyMMddHH}.txt" layout="${message}"/>
17+
<target name="Complement" xsi:type="File" fileName="${logDirectory}/Complement/${date:format=yyyyMMddHH}.txt" layout="${message}"/>
18+
<target name="Console" xsi:type="Console" layout="${message}"/>
19+
</targets>
20+
<rules>
21+
<logger name="*" level="Info" writeTo="Info,Console"/>
22+
<logger name="*" level="Debug" writeTo="Debug"/>
23+
<logger name="*" level="Error" writeTo="Exception,Console"/>
24+
<logger name="*" level="Fatal" writeTo="Fatal"/>
25+
<logger name="*" level="Warn" writeTo="Warn"/>
26+
<logger name="Client" level="Trace" writeTo="Client"/>
27+
<logger name="Sql" level="Trace" writeTo="SqlError"/>
28+
<logger name="Complement" level="Trace" writeTo="Complement"/>
29+
</rules>
30+
</nlog>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/****************************************************************************
2+
Copyright (c) 2013-2015 scutgame.com
3+
4+
http://www.scutgame.com
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.
23+
****************************************************************************/
24+
25+
using GameServer.Model;
26+
using ZyGames.Framework.Cache.Generic;
27+
using ZyGames.Framework.Game.Contract;
28+
using ZyGames.Framework.Game.Service;
29+
30+
namespace GameServer.CsScript.Action
31+
{
32+
public class Action1000 : BaseStruct
33+
{
34+
private string UserName;
35+
private int Score;
36+
37+
38+
public Action1000(HttpGet httpGet)
39+
: base(1000, httpGet)
40+
{
41+
}
42+
43+
public override void BuildPacket()
44+
{
45+
46+
}
47+
48+
public override bool GetUrlElement()
49+
{
50+
if (httpGet.GetString("UserName", ref UserName)
51+
&& httpGet.GetInt("Score", ref Score))
52+
{
53+
return true;
54+
}
55+
return false;
56+
}
57+
58+
public override bool TakeAction()
59+
{
60+
var cache = new ShareCacheStruct<UserRanking>();
61+
var ranking = cache.Find(m => m.UserName == UserName);
62+
if (ranking == null)
63+
{
64+
var user = new GameUser() { UserId = (int)cache.GetNextNo(), NickName = UserName};
65+
new PersonalCacheStruct<GameUser>().Add(user);
66+
ranking = new UserRanking();
67+
ranking.UserID = user.UserId;
68+
ranking.UserName = UserName;
69+
ranking.Score = Score;
70+
cache.Add(ranking);
71+
}
72+
else
73+
{
74+
ranking.UserName = UserName;
75+
ranking.Score = Score;
76+
}
77+
return true;
78+
}
79+
80+
}
81+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/****************************************************************************
2+
Copyright (c) 2013-2015 scutgame.com
3+
4+
http://www.scutgame.com
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.
23+
****************************************************************************/
24+
using System;
25+
using System.Collections.Generic;
26+
using GameServer.Model;
27+
using ZyGames.Framework.Cache.Generic;
28+
using ZyGames.Framework.Common;
29+
using ZyGames.Framework.Game.Contract;
30+
using ZyGames.Framework.Game.Service;
31+
32+
namespace GameServer.CsScript.Action
33+
{
34+
public class Action1001 : BaseStruct
35+
{
36+
private int PageIndex;
37+
private int PageSize;
38+
private int PageCount;
39+
private List<UserRanking> rankingList;
40+
41+
42+
public Action1001(HttpGet httpGet)
43+
: base(1001, httpGet)
44+
{
45+
46+
}
47+
48+
public override void BuildPacket()
49+
{
50+
this.PushIntoStack(PageCount);
51+
this.PushIntoStack(rankingList.Count);
52+
foreach (var item in rankingList)
53+
{
54+
DataStruct dsItem = new DataStruct();
55+
dsItem.PushIntoStack(item.UserName);
56+
dsItem.PushIntoStack(item.Score);
57+
//Console.WriteLine("Num count:{0}", item.Items.Count);
58+
this.PushIntoStack(dsItem);
59+
}
60+
61+
}
62+
63+
public override bool GetUrlElement()
64+
{
65+
if (httpGet.GetInt("PageIndex", ref PageIndex)
66+
&& httpGet.GetInt("PageSize", ref PageSize))
67+
{
68+
return true;
69+
}
70+
return false;
71+
}
72+
73+
public override bool TakeAction()
74+
{
75+
var cache = new ShareCacheStruct<UserRanking>();
76+
rankingList = cache.FindAll(false);
77+
rankingList = MathUtils.QuickSort<UserRanking>(rankingList, compareTo);
78+
rankingList = rankingList.GetPaging(PageIndex, PageSize, out PageCount);
79+
return true;
80+
}
81+
82+
private int compareTo(UserRanking x, UserRanking y)
83+
{
84+
int result = y.Score - x.Score;
85+
if (result == 0)
86+
{
87+
result = y.UserID - x.UserID;
88+
}
89+
return result;
90+
}
91+
}
92+
}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/****************************************************************************
2+
Copyright (c) 2013-2015 scutgame.com
3+
4+
http://www.scutgame.com
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.
23+
****************************************************************************/
24+
using ZyGames.Framework.Game.Lang;
25+
26+
namespace GameServer.CsScript.Locale
27+
{
28+
public class SimplifiedLanguage : Language
29+
{
30+
/// <summary>
31+
/// Sign error
32+
/// </summary>
33+
public new string SignError = "验证签名出错";
34+
35+
/// <summary>
36+
/// validate error
37+
/// </summary>
38+
public new string ValidateError = "请求的参数无效";
39+
/// <summary>
40+
/// The system is busy
41+
/// </summary>
42+
public new string ServerBusy = "服务器繁忙";
43+
44+
/// <summary>
45+
/// param error
46+
/// </summary>
47+
public new string UrlElement = "缺少请求参数-";
48+
49+
/// <summary>
50+
/// 参数名:{0}不存在
51+
/// </summary>
52+
public new string UrlNoParam = "参数名:{0}是必须的";
53+
/// <summary>
54+
/// 参数名:{0}超出范围[{1}-{2}]
55+
/// </summary>
56+
public new string UrlParamOutRange = "参数:{0}超出范围[{1} - {2}]";
57+
58+
/// <summary>
59+
/// 服务器正在维护
60+
/// </summary>
61+
public new string ServerMaintain = "服务器正在维护";
62+
63+
/// <summary>
64+
/// 服务器正在重启中,请稍候...
65+
/// </summary>
66+
public new string ServerLoading = "服务器正在重启中,请稍候...";
67+
68+
/// <summary>
69+
/// 请求超时
70+
/// </summary>
71+
public new string RequestTimeout = "请求超时";
72+
/// <summary>
73+
/// 您输入的账号或密码不正确
74+
/// </summary>
75+
public new string PasswordError = "您输入的账号或密码不正确";
76+
77+
/// <summary>
78+
/// 加载数据失败
79+
/// </summary>
80+
public new string LoadDataError = "加载数据失败";
81+
82+
/// <summary>
83+
/// 该账号已被封禁
84+
/// </summary>
85+
public new string AcountIsLocked = "该账号已被封禁";
86+
87+
/// <summary>
88+
/// 您的账号未登录或已过期
89+
/// </summary>
90+
public new string AcountNoLogin = "您的账号未登录或已过期";
91+
92+
/// <summary>
93+
/// 您的账号已在其它地方登录
94+
/// </summary>
95+
public new string AcountLogined = "您的账号已在其它地方登录";
96+
97+
/// <summary>
98+
/// 充值失败
99+
/// </summary>
100+
public new string AppStorePayError = "充值失败";
101+
/// <summary>
102+
/// 获取受权失败
103+
/// </summary>
104+
public new string GetAccessFailure = "获取受权失败";
105+
}
106+
}

0 commit comments

Comments
 (0)