mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-12 14:24:34 +01:00
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using Common;
|
|
using System.Net.NetworkInformation;
|
|
using PemukulPaku.GameServer;
|
|
using Common.Database;
|
|
using PemukulPaku.GameServer.Game;
|
|
using PemukulPaku.GameServer.Commands;
|
|
using MongoDB.Bson;
|
|
using Common.Resources.Proto;
|
|
using Common.Utils.ExcelReader;
|
|
|
|
namespace PemukulPaku
|
|
{
|
|
class Program
|
|
{
|
|
public static void Main()
|
|
{
|
|
#if DEBUG
|
|
Global.config.VerboseLevel = VerboseLevel.Debug;
|
|
#endif
|
|
Global.c.Log("Starting...");
|
|
|
|
if (Global.config.Gameserver.Host == "127.0.0.1")
|
|
Global.config.Gameserver.Host = NetworkInterface.GetAllNetworkInterfaces().Where(i => i.NetworkInterfaceType != NetworkInterfaceType.Loopback && i.OperationalStatus == OperationalStatus.Up).First().GetIPProperties().UnicastAddresses.Where(a => a.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).First().Address.ToString();
|
|
|
|
CommandFactory.LoadCommandHandlers();
|
|
PacketFactory.LoadPacketHandlers();
|
|
new Thread(HttpServer.Program.Main).Start();
|
|
_ = Server.GetInstance();
|
|
|
|
ReadLine.GetInstance().Start();
|
|
}
|
|
}
|
|
} |