Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
76 changes: 76 additions & 0 deletions Game.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.1.11312.151
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pangya_GameServer", "GameServer\Pangya_GameServer.csproj", "{9CD7A0B3-C309-4568-B28D-153FE91FA17C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PangyaAPI.Utilities", "PangyaAPI\PangyaAPI.Utilities\PangyaAPI.Utilities.csproj", "{1E2BE994-1794-47CE-B66B-65F02D42570C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PangyaAPI.SQL", "PangyaAPI\PangyaAPI.SQL\PangyaAPI.SQL.csproj", "{A3FE3DA6-5099-4A65-8734-D43513E23FFB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PangyaAPI.Network", "PangyaAPI\PangyaAPI.Network\PangyaAPI.Network.csproj", "{FE218D80-0679-47E0-BED2-284BBA6FE8AA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FA4CDE6E-195F-47F5-A5AE-460360D41B5C}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PangyaAPI.IFF.GB", "PangyaAPI\PangyaAPI.IFF.GB\PangyaAPI.IFF.GB.csproj", "{03210C5A-2661-4BB2-B3B5-C49603E422F3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9CD7A0B3-C309-4568-B28D-153FE91FA17C}.Debug|x64.ActiveCfg = Debug|x64
{9CD7A0B3-C309-4568-B28D-153FE91FA17C}.Debug|x64.Build.0 = Debug|x64
{9CD7A0B3-C309-4568-B28D-153FE91FA17C}.Debug|x86.ActiveCfg = Debug|x86
{9CD7A0B3-C309-4568-B28D-153FE91FA17C}.Debug|x86.Build.0 = Debug|x86
{9CD7A0B3-C309-4568-B28D-153FE91FA17C}.Release|x64.ActiveCfg = Release|x64
{9CD7A0B3-C309-4568-B28D-153FE91FA17C}.Release|x64.Build.0 = Release|x64
{9CD7A0B3-C309-4568-B28D-153FE91FA17C}.Release|x86.ActiveCfg = Release|x86
{9CD7A0B3-C309-4568-B28D-153FE91FA17C}.Release|x86.Build.0 = Release|x86
{1E2BE994-1794-47CE-B66B-65F02D42570C}.Debug|x64.ActiveCfg = Debug|x64
{1E2BE994-1794-47CE-B66B-65F02D42570C}.Debug|x64.Build.0 = Debug|x64
{1E2BE994-1794-47CE-B66B-65F02D42570C}.Debug|x86.ActiveCfg = Debug|x86
{1E2BE994-1794-47CE-B66B-65F02D42570C}.Debug|x86.Build.0 = Debug|x86
{1E2BE994-1794-47CE-B66B-65F02D42570C}.Release|x64.ActiveCfg = Release|x64
{1E2BE994-1794-47CE-B66B-65F02D42570C}.Release|x64.Build.0 = Release|x64
{1E2BE994-1794-47CE-B66B-65F02D42570C}.Release|x86.ActiveCfg = Release|x86
{1E2BE994-1794-47CE-B66B-65F02D42570C}.Release|x86.Build.0 = Release|x86
{A3FE3DA6-5099-4A65-8734-D43513E23FFB}.Debug|x64.ActiveCfg = Debug|x64
{A3FE3DA6-5099-4A65-8734-D43513E23FFB}.Debug|x64.Build.0 = Debug|x64
{A3FE3DA6-5099-4A65-8734-D43513E23FFB}.Debug|x86.ActiveCfg = Debug|x86
{A3FE3DA6-5099-4A65-8734-D43513E23FFB}.Debug|x86.Build.0 = Debug|x86
{A3FE3DA6-5099-4A65-8734-D43513E23FFB}.Release|x64.ActiveCfg = Release|x64
{A3FE3DA6-5099-4A65-8734-D43513E23FFB}.Release|x64.Build.0 = Release|x64
{A3FE3DA6-5099-4A65-8734-D43513E23FFB}.Release|x86.ActiveCfg = Release|x86
{A3FE3DA6-5099-4A65-8734-D43513E23FFB}.Release|x86.Build.0 = Release|x86
{FE218D80-0679-47E0-BED2-284BBA6FE8AA}.Debug|x64.ActiveCfg = Debug|x64
{FE218D80-0679-47E0-BED2-284BBA6FE8AA}.Debug|x64.Build.0 = Debug|x64
{FE218D80-0679-47E0-BED2-284BBA6FE8AA}.Debug|x86.ActiveCfg = Debug|x86
{FE218D80-0679-47E0-BED2-284BBA6FE8AA}.Debug|x86.Build.0 = Debug|x86
{FE218D80-0679-47E0-BED2-284BBA6FE8AA}.Release|x64.ActiveCfg = Release|x64
{FE218D80-0679-47E0-BED2-284BBA6FE8AA}.Release|x64.Build.0 = Release|x64
{FE218D80-0679-47E0-BED2-284BBA6FE8AA}.Release|x86.ActiveCfg = Release|x86
{FE218D80-0679-47E0-BED2-284BBA6FE8AA}.Release|x86.Build.0 = Release|x86
{03210C5A-2661-4BB2-B3B5-C49603E422F3}.Debug|x64.ActiveCfg = Debug|x64
{03210C5A-2661-4BB2-B3B5-C49603E422F3}.Debug|x64.Build.0 = Debug|x64
{03210C5A-2661-4BB2-B3B5-C49603E422F3}.Debug|x86.ActiveCfg = Debug|x86
{03210C5A-2661-4BB2-B3B5-C49603E422F3}.Debug|x86.Build.0 = Debug|x86
{03210C5A-2661-4BB2-B3B5-C49603E422F3}.Release|x64.ActiveCfg = Release|x64
{03210C5A-2661-4BB2-B3B5-C49603E422F3}.Release|x64.Build.0 = Release|x64
{03210C5A-2661-4BB2-B3B5-C49603E422F3}.Release|x86.ActiveCfg = Release|x86
{03210C5A-2661-4BB2-B3B5-C49603E422F3}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D89632E2-B0EE-4E60-B535-A38BCFE10AB1}
EndGlobalSection
EndGlobal
46 changes: 46 additions & 0 deletions GameServer/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.2" newVersion="8.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.2" newVersion="7.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
10 changes: 10 additions & 0 deletions GameServer/Config/personal_config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[CONFIG]
#defina os valores de cada card por tipo
CARD_NORMAL_LIMIT_PRICE = 20000000
CARD_RARE_LIMIT_PRICE = 20000000
CARD_SUPER_RARE_LIMIT_PRICE = 20000000
CARD_SECRET_LIMIT_PRICE = 20000000
ITEM_MIN_PRICE = 1
ITEM_MAX_PRICE = 20000000
#para redefinir este valor, precisa reiniciar o servidor inteiro(desligar e ligar novamente), maximo é 70.
LIMIT_LEVEL_PERSONAL = 1
12 changes: 12 additions & 0 deletions GameServer/Config/socket_config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[IPRULES]
enable_ip_rules = 1
limit_connection_per_ip = 2
order = deny,allow
allow = 127.0.0.1
allow = all
deny = 192.168.0.1/24

[DDOS]
ddos_interval = 3000
ddos_count = 5
ddos_autoreset = 3000
41 changes: 41 additions & 0 deletions GameServer/Game Server.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using Pangya_GameServer.Models;
using PangyaAPI.Utilities;
using PangyaAPI.Utilities.Log;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace Pangya_GameServer
{
public class GameServer
{
static void Main()
{

var sjis = Encoding.GetEncoding(874);
Console.InputEncoding = sjis;
Console.OutputEncoding = sjis;
Console.WriteLine("Teste Tailandês: สวัสดี"); // "Olá" em tailandês
try
{
sgs.gs.getInstance().Start();

for (; ; )
{
var input = Console.ReadLine();
var comando = new Queue<string>(input.Split(' '));
if (sgs.gs.getInstance().CheckCommand(comando))
{
_smp.message_pool.getInstance().push(new message($"[GameServer::CheckCommand][Log] Command Executed-> {input}", type_msg.CL_ONLY_CONSOLE));
}
}
}
catch (exception e)
{
_smp.message_pool.getInstance().push(new message("[GameServer::Main][Error] " + e.getFullMessageError() + "]", type_msg.CL_FILE_LOG_AND_CONSOLE));

throw e;
}
}
}
}
Loading