correctter echelon implementation
This commit is contained in:
parent
e96ebfd33f
commit
45ece5b487
|
@ -183,6 +183,7 @@ namespace SCHALE.GameServer.Controllers.Api.ProtocolHandlers
|
|||
context.Echelons.Add(new()
|
||||
{
|
||||
AccountServerId = account.ServerId,
|
||||
EchelonNumber = 1,
|
||||
LeaderServerId = newCharacters[0].ServerId,
|
||||
MainSlotServerIds = newCharacters.Take(3).Select(x => x.ServerId).Append(0).ToList()
|
||||
});
|
||||
|
@ -286,18 +287,7 @@ namespace SCHALE.GameServer.Controllers.Api.ProtocolHandlers
|
|||
},
|
||||
EchelonListResponse = new EchelonListResponse()
|
||||
{
|
||||
EchelonDBs = [
|
||||
new EchelonDB()
|
||||
{
|
||||
AccountServerId = req.AccountId,
|
||||
EchelonType = EchelonType.Adventure,
|
||||
EchelonNumber = 1,
|
||||
LeaderServerId = 1,
|
||||
MainSlotServerIds = [1, 2, 3, 0 ],
|
||||
SupportSlotServerIds = [ 444, 0],
|
||||
SkillCardMulliganCharacterIds = []
|
||||
}
|
||||
]
|
||||
EchelonDBs = [.. account.Echelons]
|
||||
},
|
||||
EventContentPermanentListResponse = new EventContentPermanentListResponse()
|
||||
{
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
using SCHALE.Common.Database;
|
||||
using SCHALE.Common.NetworkProtocol;
|
||||
using SCHALE.GameServer.Services;
|
||||
|
||||
namespace SCHALE.GameServer.Controllers.Api.ProtocolHandlers
|
||||
{
|
||||
public class Echelon : ProtocolHandlerBase
|
||||
{
|
||||
private readonly ISessionKeyService sessionKeyService;
|
||||
private readonly SCHALEContext context;
|
||||
|
||||
public Echelon(IProtocolHandlerFactory protocolHandlerFactory, ISessionKeyService _sessionKeyService, SCHALEContext _context) : base(protocolHandlerFactory)
|
||||
{
|
||||
sessionKeyService = _sessionKeyService;
|
||||
context = _context;
|
||||
}
|
||||
|
||||
[ProtocolHandler(Protocol.Echelon_List)]
|
||||
public ResponsePacket ListHandler(EchelonListRequest req)
|
||||
{
|
||||
var account = sessionKeyService.GetAccount(req.SessionKey);
|
||||
|
||||
return new EchelonListResponse()
|
||||
{
|
||||
EchelonDBs = account.Echelons.ToList()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -19,7 +19,7 @@ namespace SCHALE.GameServer.Controllers.Api.ProtocolHandlers
|
|||
[ProtocolHandler(Protocol.Mission_List)]
|
||||
public ResponsePacket ListHandler(MissionListRequest req)
|
||||
{
|
||||
Log.Information($"MissionListRequest EventContentId: {req.EventContentId}");
|
||||
Log.Debug($"MissionListRequest EventContentId: {req.EventContentId}");
|
||||
|
||||
var missionProgresses = context.MissionProgresses.Where(x => x.AccountServerId == sessionKeyService.GetAccount(req.SessionKey).ServerId).ToList();
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ namespace SCHALE.GameServer.Controllers.Api.ProtocolHandlers
|
|||
[ProtocolHandler(Protocol.Scenario_Skip)]
|
||||
public ResponsePacket SkipHandler(ScenarioSkipRequest req)
|
||||
{
|
||||
Log.Information($"ScenarioSkipRequest ScriptGroupId:" + req.ScriptGroupId);
|
||||
Log.Information($"ScenarioSkipRequest SkipPointScriptCount: " + req.SkipPointScriptCount);
|
||||
Log.Debug($"ScenarioSkipRequest ScriptGroupId:" + req.ScriptGroupId);
|
||||
Log.Debug($"ScenarioSkipRequest SkipPointScriptCount: " + req.SkipPointScriptCount);
|
||||
|
||||
// skip story doesn't work yet, probably need to implement missiondb
|
||||
return new ScenarioSkipResponse();
|
||||
|
|
Loading…
Reference in New Issue