mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-12 15:04:36 +01:00
misc fixes
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
using nksrv.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace nksrv.LobbyServer.Msgs.Character
|
||||
{
|
||||
@@ -12,11 +7,14 @@ namespace nksrv.LobbyServer.Msgs.Character
|
||||
{
|
||||
protected override async Task HandleAsync()
|
||||
{
|
||||
var req = ReadData<ReqGetCharacterData>();
|
||||
var req = await ReadData<ReqGetCharacterData>();
|
||||
var user = GetUser();
|
||||
|
||||
var response = new ResGetCharacterData();
|
||||
|
||||
// TODO implement
|
||||
foreach (var item in user.Characters)
|
||||
{
|
||||
response.Character.Add(new NetUserCharacterData() { Default = new() { Csn = item.Csn, Skill1Lv = item.Skill1Lvl, Skill2Lv = item.Skill2Lvl, CostumeId = item.CostumeId, Lv = item.Level, Grade = item.Grade, Tid = item.Tid } });
|
||||
}
|
||||
|
||||
WriteData(response);
|
||||
}
|
||||
|
||||
18
nksrv/LobbyServer/Msgs/Messenger/ProceedMsg.cs
Normal file
18
nksrv/LobbyServer/Msgs/Messenger/ProceedMsg.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using nksrv.Utils;
|
||||
|
||||
namespace nksrv.LobbyServer.Msgs.Messenger
|
||||
{
|
||||
[PacketPath("/messenger/proceed")]
|
||||
public class ProceedMsg : LobbyMsgHandler
|
||||
{
|
||||
protected override async Task HandleAsync()
|
||||
{
|
||||
var req = ReadData<ReqProceedMessage>();
|
||||
|
||||
// TODO: save these things
|
||||
var response = new ResProceedMessage();
|
||||
|
||||
WriteData(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
27
nksrv/LobbyServer/Msgs/Team/SetTeam.cs
Normal file
27
nksrv/LobbyServer/Msgs/Team/SetTeam.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using nksrv.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace nksrv.LobbyServer.Msgs.Team
|
||||
{
|
||||
[PacketPath("/team/setteam")]
|
||||
public class SetTeam : LobbyMsgHandler
|
||||
{
|
||||
protected override async Task HandleAsync()
|
||||
{
|
||||
var req = await ReadData<ReqSetTeam>();
|
||||
var user = GetUser();
|
||||
|
||||
var response = new ResSetTeam();
|
||||
response.Type = req.Type;
|
||||
response.Teams.AddRange(req.Teams.ToArray());
|
||||
|
||||
// TODO
|
||||
|
||||
WriteData(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,17 +73,17 @@ namespace nksrv.LobbyServer.Msgs.User
|
||||
}
|
||||
|
||||
// TODO: Save outpost data
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 1, BuildingId = 22401, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 4, BuildingId = 22701, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 5, BuildingId = 22801, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 6, BuildingId = 22901, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 7, BuildingId = 23001, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 3, BuildingId = 23101, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 2, BuildingId = 23201, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 9, BuildingId = 23301, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 8, BuildingId = 23401, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 10, BuildingId = 23501, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
//response.Outposts.Add(new NetUserOutpostData() { SlotId = 38, BuildingId = 33601, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 1, BuildingId = 22401, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 4, BuildingId = 22701, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 5, BuildingId = 22801, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 6, BuildingId = 22901, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 7, BuildingId = 23001, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 3, BuildingId = 23101, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 2, BuildingId = 23201, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 9, BuildingId = 23301, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 8, BuildingId = 23401, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 10, BuildingId = 23501, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
response.Outposts.Add(new NetUserOutpostData() { SlotId = 38, BuildingId = 33601, IsDone = true, StartAt = 638549982076760660, CompleteAt = 638549982076760660 });
|
||||
|
||||
response.LastClearedNormalMainStageId = user.LastStageCleared;
|
||||
|
||||
|
||||
24
nksrv/LobbyServer/Msgs/User/GetUserProfile.cs
Normal file
24
nksrv/LobbyServer/Msgs/User/GetUserProfile.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using nksrv.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace nksrv.LobbyServer.Msgs.User
|
||||
{
|
||||
[PacketPath("/User/GetProfile")]
|
||||
public class GetUserProfile : LobbyMsgHandler
|
||||
{
|
||||
protected override async Task HandleAsync()
|
||||
{
|
||||
var req = await ReadData<ReqGetProfileData>();
|
||||
|
||||
var response = new ResGetProfileData();
|
||||
|
||||
Console.WriteLine(req.TargetUsn);
|
||||
response.Data = new NetProfileData();
|
||||
WriteData(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1521,14 +1521,15 @@ message NetProfileData {
|
||||
// TODO
|
||||
}
|
||||
|
||||
message ResGetProfileData {
|
||||
int64 targetUsn = 2;
|
||||
}
|
||||
|
||||
message ReqGetProfileData {
|
||||
int64 targetUsn = 2;
|
||||
}
|
||||
message ResGetProfileData {
|
||||
NetProfileData data = 2;
|
||||
}
|
||||
|
||||
|
||||
message ReqSetWallpaper {
|
||||
repeated NetWallpaperData wallpaperList = 2;
|
||||
}
|
||||
@@ -1552,4 +1553,23 @@ message ReqListInvitation {}
|
||||
message ResListInvitation {
|
||||
ListInvitationError error = 1;
|
||||
repeated NetInvitation invitationList = 2;
|
||||
}
|
||||
|
||||
message ReqProceedMessage {
|
||||
string messageId = 2;
|
||||
}
|
||||
message ResProceedMessage {
|
||||
NetMessage message = 1;
|
||||
NetRewardData reward = 2;
|
||||
}
|
||||
|
||||
message ReqSetTeam {
|
||||
int32 type = 2;
|
||||
int32 contentsId = 3;
|
||||
repeated NetTeamData teams = 4;
|
||||
}
|
||||
|
||||
message ResSetTeam {
|
||||
int32 type = 2;
|
||||
repeated NetTeamData teams = 3;
|
||||
}
|
||||
@@ -11,6 +11,7 @@ namespace nksrv.StaticInfo
|
||||
// <Stage ID, Reward data>
|
||||
public static readonly Dictionary<int, NetRewardData> RewardData =
|
||||
new() {
|
||||
// Chapter 0
|
||||
{ 6000001, new NetRewardData() { Currency = {
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.Gold, Value = 500 },
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.CharacterExp , Value = 600 }
|
||||
@@ -26,6 +27,29 @@ namespace nksrv.StaticInfo
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.CharacterExp , Value = 600 }
|
||||
} }
|
||||
},
|
||||
// Chapter 1
|
||||
{ 6001001, new NetRewardData() { Currency = {
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.Gold, Value = 1000 },
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.CharacterExp , Value = 1200 }
|
||||
} }
|
||||
},
|
||||
{ 6001002, new NetRewardData() { Currency = {
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.Gold, Value = 1000 },
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.CharacterExp , Value = 1200 }
|
||||
} }
|
||||
},
|
||||
{ 6001003, new NetRewardData() { Currency = {
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.Gold, Value = 1000 },
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.CharacterExp , Value = 1200 }
|
||||
} }
|
||||
},
|
||||
{ 6001004, new NetRewardData() { Currency = {
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.Gold, Value = 1000 },
|
||||
new NetCurrencyData() { Type = (int)CurrencyType.CharacterExp , Value = 1200 }
|
||||
|
||||
// todo include the other items
|
||||
} }
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user