mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-12 20:54:34 +01:00
remove static serving & ely realm prep
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Common.Utils;
|
||||
using System.Reflection;
|
||||
using Common.Utils;
|
||||
using Config.Net;
|
||||
using MongoDB.Driver;
|
||||
|
||||
@@ -23,16 +24,16 @@ namespace Common
|
||||
bool UseLocalCache { get; set; }
|
||||
|
||||
[Option(DefaultValue = true)]
|
||||
bool CreateAccountOnLoginAttempt { get; }
|
||||
bool CreateAccountOnLoginAttempt { get; set; }
|
||||
|
||||
[Option(DefaultValue = "mongodb://127.0.0.1:27017/PemukulPaku")]
|
||||
string DatabaseUri { get; set; }
|
||||
|
||||
[Option]
|
||||
IGameserver Gameserver { get; }
|
||||
IGameserver Gameserver { get; set; }
|
||||
|
||||
[Option]
|
||||
IHttp Http { get; }
|
||||
IHttp Http { get; set; }
|
||||
|
||||
public interface IGameserver
|
||||
{
|
||||
@@ -40,20 +41,20 @@ namespace Common
|
||||
public string Host { get; set; }
|
||||
|
||||
[Option(DefaultValue = (uint)(16100))]
|
||||
public uint Port { get; }
|
||||
public uint Port { get; set; }
|
||||
|
||||
[Option(DefaultValue = "overseas01")]
|
||||
public string RegionName { get; }
|
||||
public string RegionName { get; set; }
|
||||
}
|
||||
|
||||
public interface IHttp
|
||||
{
|
||||
|
||||
[Option(DefaultValue = (uint)(80))]
|
||||
public uint HttpPort { get; }
|
||||
public uint HttpPort { get; set; }
|
||||
|
||||
[Option(DefaultValue = (uint)(443))]
|
||||
public uint HttpsPort { get; }
|
||||
public uint HttpsPort { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
15
GameServer/Handlers/GetClientDataReqHandler.cs
Normal file
15
GameServer/Handlers/GetClientDataReqHandler.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.GetClientDataReq)]
|
||||
internal class GetClientDataReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GetClientDataReq Data = packet.GetDecodedBody<GetClientDataReq>();
|
||||
|
||||
session.Send(Packet.FromProto(new GetClientDataRsp() { retcode = GetClientDataRsp.Retcode.NotFound, Type = Data.Type, Id = Data.Id }, CmdId.GetClientDataRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
session.Send(Packet.FromProto(new GetGodWarRsp() { retcode = GetGodWarRsp.Retcode.NotOpen }, CmdId.GetGodWarRsp));
|
||||
session.Send(Packet.FromProto(new GetGodWarRsp() { retcode = GetGodWarRsp.Retcode.Succ }, CmdId.GetGodWarRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
GameServer/Handlers/RefreshGodWarTicketReqHandler.cs
Normal file
15
GameServer/Handlers/RefreshGodWarTicketReqHandler.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.RefreshGodWarTicketReq)]
|
||||
internal class RefreshGodWarTicketReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
RefreshGodWarTicketReq Data = packet.GetDecodedBody<RefreshGodWarTicketReq>();
|
||||
|
||||
session.Send(Packet.FromProto(new RefreshGodWarTicketRsp() { retcode = RefreshGodWarTicketRsp.Retcode.Succ, GodWarId = Data.GodWarId }, CmdId.RefreshGodWarTicketRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
13
GameServer/Handlers/StageInnerDataReportReqHandler.cs
Normal file
13
GameServer/Handlers/StageInnerDataReportReqHandler.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
[PacketCmdId(CmdId.StageInnerDataReportReq)]
|
||||
internal class StageInnerDataReportReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
session.Send(Packet.FromProto(new StageInnerDataReportRsp() { retcode = StageInnerDataReportRsp.Retcode.Succ }, CmdId.StageInnerDataReportRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,6 @@ namespace HttpServer
|
||||
AccountController.AddHandlers(app);
|
||||
ConfigController.AddHandlers(app);
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions() { FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")) });
|
||||
app.UseMiddleware<RequestLoggingMiddleware>();
|
||||
c.Log($"HTTP server started on port 80 & 443"); // A lie
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user