-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hank Li
committed
Dec 19, 2019
0 parents
commit 8dc596f
Showing
1,552 changed files
with
302,986 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
*.sln merge=union | ||
*.csproj merge=union | ||
*.vbproj merge=union | ||
*.fsproj merge=union | ||
*.dbproj merge=union | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/Source/Framework/ZyGames.Framework/obj | ||
/Source/Framework/ZyGames.Framework/bin | ||
/Source/Framework/ZyGames.Framework.Common/obj | ||
/Source/Framework/ZyGames.Framework.Common/bin | ||
/Source/Middleware/AccountServer/bin | ||
/Source/Middleware/AccountServer/obj | ||
/Source/Middleware/GameServer/bin | ||
/Source/Middleware/GameServer/obj | ||
/Source/Middleware/ScutSecurity/bin | ||
/Source/Middleware/ScutSecurity/obj | ||
/Source/Middleware/ZyGames.Framework.Game/bin | ||
/Source/Middleware/ZyGames.Framework.Game/obj | ||
/Source/Tools/ContractTools/src/ContractTools.WebApp/bin | ||
/Source/Tools/ContractTools/src/ContractTools.WebApp/obj | ||
/Source/Framework/*.suo | ||
/Source/Middleware/*.suo | ||
/SDK/Unity3d/obj | ||
/SDK/Unity3d/Library/metadata | ||
/Source/Framework/packages | ||
obj | ||
bin | ||
testresults | ||
*.suo |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2013-2015 scutgame.com | ||
|
||
http://www.scutgame.com | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# README | ||
|
||
[](http://scutgame.com/download/) | ||
|
||
|
||
## Scut是什么? | ||
|
||
欢迎使用 Scut | ||
,这是一款免费开源的游戏服务器引擎,适用于开发AVG、SLGRPG、MMOG等类型的网络游戏,同时支持Http、WebSocket和Socket协议通讯,支持Window、Mac和Linux多种平台部署,支持Redis内存数据库和Microsoft | ||
SQL、MySql数据库;服务器引擎框架基于C#编写,游戏逻辑层可以选择使用C#、Python和Lua多种脚本进行开发,支持热更新的方式部署;客户端可以使用Coscos2d、Unity3d、FlashAir与服务器引擎对接;提供了丰富的中间件,可以简单快捷的搭建您的游戏。 | ||
|
||
|
||
## 帮助文档 | ||
|
||
* [Wiki](http://git.oschina.net/scutgame/Scut/wikis/home) | ||
|
||
|
||
## 贡献者 | ||
|
||
* 开源作者(微博): [伍张发](http://weibo.com/plgavin) | ||
|
||
* [typ77](http://git.oschina.net/typ77) | ||
|
||
|
||
## 如何贡献代码 | ||
|
||
- 首先在[git.oschina.net](http://git.oschina.net)注册一个账号(已有账号可跳过); | ||
- 在`Scut`的右上角点击`Fork`,将代码添加自己的项目中; | ||
- 下载Git客户端`TortoiseGit`工具,安装工具之前要安装`Git`程序; | ||
- 克隆`Scut`源码地址 | ||
|
||
``` | ||
https://git.oschina.net/scutgame/Scut.git | ||
``` | ||
- 在`Scut`代码目录下右击使用`TortoiseGit`提交需要贡献的代码,此时提交的代码还在本机Git仓库; | ||
- 接着操作`Create Pull Request`推送命令,将代码推送到远程`Scut` 代码仓库中; | ||
- 推送成功后,需要等待作者审核代码并合并Push请求成功后才可以完成代码贡献。 | ||
## 开源协议 | ||
参见根目录`LICENSE`文件。 |
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
Release/6.7.9.11/AccountServer/Console/AccountServerConsole.exe.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<appSettings> | ||
<add key="Product.SignKey" value=""/> | ||
<add key="Product.ClientDesDeKey" value="j6=9=1ac"/> | ||
<add key="Game.Http.Host" value="pass.scutgame.com,127.0.0.1:8801" /> | ||
<add key="Game.Http.Port" value="80" /> | ||
<add key="Game.Http.Name" value ="default.ashx"/> | ||
<add key="Redis.Host" value="127.0.0.1:6379"/> | ||
<add key="Redis.Db" value="0"/> | ||
</appSettings> | ||
<connectionStrings> | ||
<add name="SnsCenter" providerName="SqlDataProvider" connectionString="Data Source=localhost;Database=SnsCenter;Uid=sa;Pwd=123" /> | ||
</connectionStrings> | ||
</configuration> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
This file needs to be put in the application directory. Make sure to set | ||
'Copy to Output Directory' option in Visual Studio. | ||
--> | ||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<variable name="logDirectory" value="D:/NLog/AccountLog"/> | ||
<targets> | ||
<target name="Info" xsi:type="File" fileName="${logDirectory}/Info/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Debug" xsi:type="File" fileName="${logDirectory}/Debug/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Exception" xsi:type="File" fileName="${logDirectory}/Exception/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Fatal" xsi:type="File" fileName="${logDirectory}/Fatal/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Warn" xsi:type="File" fileName="${logDirectory}/Warn/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Client" xsi:type="File" fileName="${logDirectory}/Client/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="SqlError" xsi:type="File" fileName="${logDirectory}/Sql/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Complement" xsi:type="File" fileName="${logDirectory}/Complement/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Console" xsi:type="Console" layout="${message}"/> | ||
</targets> | ||
<rules> | ||
<logger name="*" level="Info" writeTo="Info,Console"/> | ||
<logger name="*" level="Debug" writeTo="Debug"/> | ||
<logger name="*" level="Error" writeTo="Exception"/> | ||
<logger name="*" level="Fatal" writeTo="Fatal"/> | ||
<logger name="*" level="Warn" writeTo="Warn"/> | ||
<logger name="Client" level="Trace" writeTo="Client"/> | ||
<logger name="Sql" level="Trace" writeTo="SqlError"/> | ||
<logger name="Complement" level="Trace" writeTo="Complement"/> | ||
</rules> | ||
</nlog> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<%@ WebHandler Language="C#" CodeBehind="Default.ashx.cs" Class="AccountServer.Default" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<%@ Application Codebehind="Global.asax.cs" Inherits="AccountServer.Global" Language="C#" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
This file needs to be put in the application directory. Make sure to set | ||
'Copy to Output Directory' option in Visual Studio. | ||
--> | ||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<variable name="logDirectory" value="D:/NLog/AccountLog"/> | ||
<targets> | ||
<target name="Info" xsi:type="File" fileName="${logDirectory}/Info/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Debug" xsi:type="File" fileName="${logDirectory}/Debug/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Exception" xsi:type="File" fileName="${logDirectory}/Exception/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Fatal" xsi:type="File" fileName="${logDirectory}/Fatal/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Warn" xsi:type="File" fileName="${logDirectory}/Warn/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Client" xsi:type="File" fileName="${logDirectory}/Client/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="SqlError" xsi:type="File" fileName="${logDirectory}/Sql/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Complement" xsi:type="File" fileName="${logDirectory}/Complement/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Console" xsi:type="Console" layout="${message}"/> | ||
</targets> | ||
<rules> | ||
<logger name="*" level="Info" writeTo="Info,Console"/> | ||
<logger name="*" level="Debug" writeTo="Debug"/> | ||
<logger name="*" level="Error" writeTo="Exception"/> | ||
<logger name="*" level="Fatal" writeTo="Fatal"/> | ||
<logger name="*" level="Warn" writeTo="Warn"/> | ||
<logger name="Client" level="Trace" writeTo="Client"/> | ||
<logger name="Sql" level="Trace" writeTo="SqlError"/> | ||
<logger name="Complement" level="Trace" writeTo="Complement"/> | ||
</rules> | ||
</nlog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
有关如何配置 ASP.NET 应用程序的详细信息,请访问 | ||
http://go.microsoft.com/fwlink/?LinkId=169433 | ||
--> | ||
<configuration> | ||
<appSettings> | ||
<add key="Product.SignKey" value=""/> | ||
<add key="Product.ClientDesDeKey" value="j6=9=1ac"/> | ||
<add key="Redis.Host" value="127.0.0.1:6379" /> | ||
<add key="Redis.Db" value="0" /> | ||
</appSettings> | ||
<connectionStrings> | ||
<add name="SnsCenter" providerName="SqlDataProvider" connectionString="Data Source=localhost;Database=SnsCenter;Uid=sa;Pwd=123" /> | ||
</connectionStrings> | ||
|
||
<system.web> | ||
<compilation targetFramework="4.5.1" /> | ||
<httpRuntime targetFramework="4.5.1" /> | ||
</system.web> | ||
<system.webServer> | ||
<defaultDocument> | ||
<files> | ||
<add value="Default.ashx"/> | ||
</files> | ||
</defaultDocument> | ||
</system.webServer> | ||
</configuration> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0"?> | ||
<configuration> | ||
<appSettings> | ||
<!--基本配置 | ||
Port:监听端口 | ||
Code:产品代码 | ||
ServerId:产品游服代码 | ||
Redis.Host:Redis主机地址 | ||
Redis.Port:Redis主机端口 | ||
Redis.Password:密码 | ||
Redis.Db:数据库位置 | ||
--> | ||
<add key="Product.Code" value="0"/> | ||
<add key="Product.ServerId" value="0"/> | ||
<add key="Game.Port" value="9001"/> | ||
<add key="Redis.Host" value="127.0.0.1:6379"/> | ||
<add key="ScriptRelativePath" value="Script"/> | ||
<add key="CSharpRootPath" value="CsScript"/> | ||
<add key="LuaRootPath" value="LuaScript"/> | ||
<add key="Game.Language.TypeName" value="GameServer.CsScript.Locale.SimplifiedLanguage"/> | ||
<add key="Game.Action.Script.TypeName" value="GameServer.CsScript.Action.Action{0}"/> | ||
<add key="Script_IsDebug" value="True"/> | ||
<add key="PublishType" value="Debug" /> | ||
<add key="Lua_Disable" value="True"/> | ||
|
||
<!--脚本解密回调配置--> | ||
<!--<add key="Game.Script.DecodeFunc.TypeName" value="ScutSecurity.ScriptDes,ScutSecurity"/>--> | ||
</appSettings> | ||
<connectionStrings> | ||
<!--<add name="SnsCenter" providerName="SqlDataProvider" connectionString="Data Source=localhost;Database=snscenter;Uid=sa;Pwd=123;Pooling=true;"/> | ||
<add name="PayCenter" providerName="SqlDataProvider" connectionString="Data Source=localhost;Database=PayDB;Uid=sa;Pwd=123;Pooling=true;"/> | ||
<add name="ConnData" providerName="SqlDataProvider" connectionString="Data Source=localhost;Database=PHData;Uid=game_user;Pwd=123;"/>--> | ||
</connectionStrings> | ||
</configuration> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
|
||
xcopy /y ..\Lib\*.dll .\ | ||
|
||
ECHO Install Ok & PAUSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
This file needs to be put in the application directory. Make sure to set | ||
'Copy to Output Directory' option in Visual Studio. | ||
--> | ||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true"> | ||
<variable name="logDirectory" value="Log"/> | ||
<targets> | ||
<target name="Info" xsi:type="File" fileName="${logDirectory}/Info/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Debug" xsi:type="File" fileName="${logDirectory}/Debug/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Exception" xsi:type="File" fileName="${logDirectory}/Exception/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Fatal" xsi:type="File" fileName="${logDirectory}/Fatal/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Warn" xsi:type="File" fileName="${logDirectory}/Warn/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Client" xsi:type="File" fileName="${logDirectory}/Client/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="SqlError" xsi:type="File" fileName="${logDirectory}/Sql/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Complement" xsi:type="File" fileName="${logDirectory}/Complement/${date:format=yyyyMMddHH}.txt" layout="${message}"/> | ||
<target name="Console" xsi:type="Console" layout="${message}"/> | ||
</targets> | ||
<rules> | ||
<logger name="*" level="Info" writeTo="Info,Console"/> | ||
<logger name="*" level="Debug" writeTo="Debug"/> | ||
<logger name="*" level="Error" writeTo="Exception,Console"/> | ||
<logger name="*" level="Fatal" writeTo="Fatal"/> | ||
<logger name="*" level="Warn" writeTo="Warn"/> | ||
<logger name="Client" level="Trace" writeTo="Client"/> | ||
<logger name="Sql" level="Trace" writeTo="SqlError"/> | ||
<logger name="Complement" level="Trace" writeTo="Complement"/> | ||
</rules> | ||
</nlog> |
81 changes: 81 additions & 0 deletions
81
Release/6.7.9.11/Console/Script/CsScript/Action/Action1000.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/**************************************************************************** | ||
Copyright (c) 2013-2015 scutgame.com | ||
http://www.scutgame.com | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
****************************************************************************/ | ||
|
||
using GameServer.Model; | ||
using ZyGames.Framework.Cache.Generic; | ||
using ZyGames.Framework.Game.Contract; | ||
using ZyGames.Framework.Game.Service; | ||
|
||
namespace GameServer.CsScript.Action | ||
{ | ||
public class Action1000 : BaseStruct | ||
{ | ||
private string UserName; | ||
private int Score; | ||
|
||
|
||
public Action1000(HttpGet httpGet) | ||
: base(1000, httpGet) | ||
{ | ||
} | ||
|
||
public override void BuildPacket() | ||
{ | ||
|
||
} | ||
|
||
public override bool GetUrlElement() | ||
{ | ||
if (httpGet.GetString("UserName", ref UserName) | ||
&& httpGet.GetInt("Score", ref Score)) | ||
{ | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
public override bool TakeAction() | ||
{ | ||
var cache = new ShareCacheStruct<UserRanking>(); | ||
var ranking = cache.Find(m => m.UserName == UserName); | ||
if (ranking == null) | ||
{ | ||
var user = new GameUser() { UserId = (int)cache.GetNextNo(), NickName = UserName}; | ||
new PersonalCacheStruct<GameUser>().Add(user); | ||
ranking = new UserRanking(); | ||
ranking.UserID = user.UserId; | ||
ranking.UserName = UserName; | ||
ranking.Score = Score; | ||
cache.Add(ranking); | ||
} | ||
else | ||
{ | ||
ranking.UserName = UserName; | ||
ranking.Score = Score; | ||
} | ||
return true; | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.