Archived
1
0
Fork 0
forked from Moux23333/FreeSR
This commit is contained in:
moux23333 2024-01-27 21:08:24 +08:00
parent 22fc0b0848
commit 396cf2de7f
30 changed files with 34183 additions and 1593 deletions

View file

@ -16,6 +16,9 @@
Directory.SetCurrentDirectory(AppContext.BaseDirectory);
AppDomain.CurrentDomain.UnhandledException += OnFatalException;
Console.WriteLine("FreeSR is a free and open-source software, if you paid for this, you have been scammed!");
Console.WriteLine("FreeSR是一个免费且开源的软件如果你是花钱买来的则说明你被骗了");
Console.WriteLine("https://git.xeondev.com/Moux23333/FreeSR");
s_log.Info("Initializing...");
CommandManager.Instance.Initialize(typeof(AccountCommandCategory));

View file

@ -21,6 +21,10 @@
AppDomain.CurrentDomain.UnhandledException += OnFatalException;
Console.Title = Title;
Console.WriteLine("FreeSR is a free and open-source software, if you paid for this, you have been scammed!");
Console.WriteLine("FreeSR是一个免费且开源的软件如果你是花钱买来的则说明你被骗了");
Console.WriteLine("https://git.xeondev.com/Moux23333/FreeSR");
s_log.Info("Initializing...");
ConfigurationManager<DispatchServerConfiguration>.Instance.Initialize("DispatchServer.json");

View file

@ -0,0 +1,21 @@
{
"Network": {
"Host": "0.0.0.0",
"Port": 8888
},
"Database": {
"ConnectionString": "mongodb://127.0.0.1:27017/",
"Name": "FreeSR",
"Entries": [
{
"CollectionName": "accounts",
"Type": "Account"
}
]
},
"Region": {
"Name": "FreeSR",
"EnvType": "2",
"DispatchUrl": "http://dispatch.starrails.com/query_gateway"
}
}

View file

@ -28,7 +28,7 @@
context.Response.StatusCode = HttpStatusCode.OK;
context.Response.ContentType = "application/json";
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(Retcode.RETCODE_RET_SUCC)
.Retcode((int)RetcodeStatus.RetSucc)
.Message("OK")
.Object("data", dataObject)
.Build());

View file

@ -12,7 +12,7 @@
context.Response.StatusCode = HttpStatusCode.OK;
context.Response.ContentType = "application/json";
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(Retcode.RETCODE_RET_SUCC)
.Retcode((int)RetcodeStatus.RetSucc)
.Message("OK")
.Object("data", Data)
.Build());

View file

@ -11,7 +11,7 @@
context.Response.StatusCode = HttpStatusCode.OK;
context.Response.ContentType = "application/json";
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(Retcode.RETCODE_RET_SUCC)
.Retcode((int)RetcodeStatus.RetSucc)
.Boolean("success", true)
.String("message", "")
.Build());

View file

@ -28,7 +28,7 @@
if (account == null)
{
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(Retcode.RETCODE_RET_FAIL)
.Retcode((int)RetcodeStatus.RetFail)
.Message("Account not found.")
.Object("data", null)
.Build());
@ -38,7 +38,7 @@
// no password check, because client patch is closed-source for now.
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(Retcode.RETCODE_RET_SUCC)
.Retcode((int)RetcodeStatus.RetSucc)
.Message("OK")
.Object("data", new JObject
{

View file

@ -23,11 +23,11 @@
context.Response.StatusCode = HttpStatusCode.OK;
context.Response.ContentType = "text/plain";
await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new DispatchRegionsData
await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new RegionList
{
Retcode = Retcode.RETCODE_RET_SUCC,
TopSeverRegionName = RegionManager.GetTopServerRegionName(),
RegionList = RegionManager.GetRegionList()
Retcode = (uint)RetcodeStatus.RetSucc,
TopServerRegionName = RegionManager.GetTopServerRegionName(),
RegionInfoLists = { RegionManager.GetRegionList() }
})));
return true;

View file

@ -13,19 +13,22 @@
context.Response.ContentType = "text/plain";
await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new Gateserver
{
Retcode = Retcode.RETCODE_RET_SUCC,
Msg = "OK",
Retcode = 0,
Msg0 = "OK",
Ip = "127.0.0.1",
RegionName = "FreeSR",
Port = 22301,
Mljaogdhcki = true,
LoginWhiteMsg = "Access verification failed. Please check if you have logged in to the correct account and server.",
Jcdlppbocpe = true,
Gifijbibiin = true,
Ibplbfhmgkf = true,
MbResVersion = "5335706",
AssetBundleUrl = "https://autopatchos.starrails.com/asb/V1.3Live/output_5355192_0007722cfc",
ExResourceUrl = "https://autopatchos.starrails.com/design_data/V1.3Live/output_5371504_9fdb2fe63e",
B1 = true,
B2 = true,
B3 = true,
B4 = true,
B5 = true,
B6 = true,
B7 = true,
Gfemaboifee = true,
//MdkResVersion = "5335706",
AssetBundleUrl = "https://autopatchcn.bhsr.com/asb/BetaLive/output_6355877_591cdefefe9b",
ExResourceUrl = "https://autopatchcn.bhsr.com/design_data/BetaLive/output_6367879_26191d7cc23b",
})));
return true;

View file

@ -13,7 +13,7 @@
context.Response.StatusCode = HttpStatusCode.OK;
context.Response.ContentType = "application/json";
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(Retcode.RETCODE_RET_SUCC)
.Retcode((int)RetcodeStatus.RetSucc)
.Message("OK")
.Object("data", CaptchaData)
.Build());

View file

@ -24,7 +24,7 @@
if (account == null)
{
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(Retcode.RETCODE_RET_FAIL)
.Retcode((int)RetcodeStatus.RetFail)
.Message("Account not found.")
.Object("data", null)
.Build());
@ -34,7 +34,7 @@
else if (account.Token != token)
{
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(Retcode.RETCODE_RET_FAIL)
.Retcode((int)RetcodeStatus.RetFail)
.Message("Invalid user token.")
.Object("data", null)
.Build());
@ -43,7 +43,7 @@
}
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(Retcode.RETCODE_RET_SUCC)
.Retcode((int)RetcodeStatus.RetSucc)
.Message("OK")
.Object("data", new JObject
{

View file

@ -12,9 +12,9 @@
s_configuration = configuration;
}
public static List<RegionEntry> GetRegionList()
public static RegionInfo GetRegionList()
{
var region = new RegionEntry
var region = new RegionInfo
{
EnvType = s_configuration.EnvType,
DispatchUrl = s_configuration.DispatchUrl,
@ -23,7 +23,7 @@
Title = s_configuration.Name
};
return new List<RegionEntry> { region };
return region;
}
public static string GetTopServerRegionName() => s_configuration.Name;

View file

@ -11,7 +11,7 @@
{
{"uid", model.Uid},
{"name", model.Name},
{"email", ""},
{"email", "reversedrooms"},
{"mobile", ""},
{"is_email_verify", "0"},
{"realname", ""},

View file

@ -9,6 +9,7 @@
<ItemGroup>
<PackageReference Include="DotNetty.Handlers" Version="0.7.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Nito.AsyncEx.Context" Version="5.1.2" />
</ItemGroup>

View file

@ -17,6 +17,9 @@
AppDomain.CurrentDomain.UnhandledException += OnFatalException;
Console.Title = Title;
Console.WriteLine("FreeSR is a free and open-source software, if you paid for this, you have been scammed!");
Console.WriteLine("FreeSR是一个免费且开源的软件如果你是花钱买来的则说明你被骗了");
Console.WriteLine("https://git.xeondev.com/Moux23333/FreeSR");
s_log.Info("Initializing...");
ConfigurationManager<GateServerConfiguration>.Instance.Initialize("GateServer.json");

View file

@ -0,0 +1,6 @@
{
"Network": {
"Host": "0.0.0.0",
"Port": 22301
}
}

View file

@ -6,35 +6,44 @@
internal static class AvatarReqGroup
{
[Handler(CmdType.GetAvatarDataCsReq)]
[Handler(CmdType.CmdGetAvatarDataCsReq)]
public static void OnGetAvatarDataCsReq(NetSession session, int cmdId, object data)
{
var request = data as GetAvatarDataCsReq;
var response = new GetAvatarDataScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
IsAll = request.IsGetAll,
AvatarList = new List<Avatar>()
Retcode = (uint)RetcodeStatus.RetSucc,
IsAll = request.IsGetAll
};
int[] characters = new int[] { 8001, 1005, 1003 };
uint[] characters = new uint[] { 8001, 1307, 1306, 1312 };
foreach (int id in characters)
foreach (uint id in characters)
{
response.AvatarList.Add(new Avatar
var avatarData = new Avatar
{
BaseAvatarId = id,
Exp = 0,
Level = 1,
Promotion = 0,
Rank = 6,
SkilltreeList = new List<AvatarSkillTree>(),
EquipmentUniqueId = 0
});
};
List<uint> SkillIdEnds = new List<uint> { 1, 2, 3, 4, 7, 101, 102, 103, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210 };
foreach (uint end in SkillIdEnds)
{
avatarData.SkilltreeLists.Add(new AvatarSkillTree
{
PointId = id * 1000 + end,
Level = 1
});
}
response.AvatarLists.Add(avatarData);
}
session.Send(CmdType.GetAvatarDataScRsp, response);
session.Send(CmdType.CmdGetAvatarDataScRsp, response);
}
}
}

View file

@ -1,343 +1,7 @@
namespace FreeSR.Gateserver.Manager.Handlers
{
using FreeSR.Gateserver.Manager.Handlers.Core;
using FreeSR.Gateserver.Network;
using FreeSR.Proto;
using static System.Net.WebRequestMethods;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.ComponentModel.Design;
internal static class GachaReqGroup
{
[Handler(CmdType.GetGachaInfoCsReq)]
public static void OnGetGachaInfoCsReq(NetSession session, int cmdId, object data)
{
var Gacha1List = new List<int>();
session.Send(CmdType.GetGachaInfoScRsp, new GetGachaInfoScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
GachaRandom = 0,
GachaInfoList = new List<GachaInfo>
{
new GachaInfo
{
//ENJHJHKNGOG = "https://webstatic-sea.hoyoverse.com/hkrpg/event/e20211215gacha-v2/index.html?authkey_ver=1&sign_type=2&auth_appid=webview_gacha&win_mode=fullscreen#/log",
Dmdldgldfdj = new List<int>(1208),
//JDMIIMJFAPK = "https://webstatic-sea.hoyoverse.com/hkrpg/event/e20211215gacha-v2/index.html?authkey_ver=1&sign_type=2&auth_appid=webview_gacha&win_mode=fullscreen&gacha_id=ad9815cdf2308104c377aac42c7f0cdd8d&timestamp=1689725163",
Pldioknjpjj = new List<int>{1208, 1110, 1109, 1106},
BeginTime = 1689719400,
EndTime = 4070880000,
GachaId = 2010
}
}
});
}
[Handler(CmdType.DoGachaCsReq)]
public static void OnDoGachaCsReq(NetSession session, int cmdId, object data)
{
var gachaReq = data as DoGachaCsReq;
if (gachaReq.GachaNum == 1)
{
session.Send(CmdType.DoGachaScRsp, new DoGachaScRsp
{
GachaId = gachaReq.GachaId,
Nmaojeiedak = gachaReq.GachaRandom + 1,
GachaNum = gachaReq.GachaNum,
GachaItemList = new List<GachaItem>
{
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1107,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
}
},
});
}
if (gachaReq.GachaNum == 10)
{
session.Send(CmdType.DoGachaScRsp, new DoGachaScRsp
{
GachaId = gachaReq.GachaId,
Nmaojeiedak = gachaReq.GachaRandom + 10,
GachaNum = gachaReq.GachaNum,
GachaItemList = new List<GachaItem>
{
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1208,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
},
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1208,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
},
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1208,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
},
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1208,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
},
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1208,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
},
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1208,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
},
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1208,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
},
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1208,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
},
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1208,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
},
new GachaItem
{
Item = new List<Item>
{
new Item
{
ItemId = 1208,
Num = 1,
}
}[0],
Dpjjnjflnjm = new List<ItemList>
{
new ItemList
{
List = new List<Item>
{
new Item
{
ItemId = 252,
Num = 40,
}
}
}
}[0]
}
},
});
}
}
// GachaReqGroup.
}
}

View file

@ -1,30 +1,7 @@
namespace FreeSR.Gateserver.Manager.Handlers
{
using FreeSR.Gateserver.Manager.Handlers.Core;
using FreeSR.Gateserver.Network;
using FreeSR.Proto;
internal static class ItemReqGroup
{
[Handler(CmdType.GetBagCsReq)]
public static void OnGetBagCsReq(NetSession session, int cmdId, object _)
{
session.Send(CmdType.GetBagScRsp, new GetBagScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
MaterialList = new List<Material>
{
new Material
{
Tid = 101,
Num = 10
},
new Material
{
Tid = 102,
Num = 10
}
}
});
}
// ItemReqGroup.
}
}

View file

@ -6,86 +6,83 @@
internal static class LineupReqGroup
{
[Handler(CmdType.GetCurLineupDataCsReq)]
[Handler(CmdType.CmdGetCurLineupDataCsReq)]
public static void OnGetCurLineupDataCsReq(NetSession session, int cmdId, object _)
{
var response = new GetCurLineupDataScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC
Retcode = (uint)RetcodeStatus.RetSucc
};
response.Lineup = new LineupInfo
{
ExtraLineupType = ExtraLineupType.LINEUP_NONE,
ExtraLineupType = ExtraLineupType.LineupNone,
Name = "Squad 1",
AvatarList = new List<LineupAvatar>(),
LeaderSlot = 5,
Foafdgjflmc = 5
LeaderSlot = 0,
Mp = 5
};
var characters = new int[] { 8001, 1005, 1003 };
var characters = new uint[] { 8001, 1307, 1306, 1312 };
foreach (int id in characters)
foreach (uint id in characters)
{
response.Lineup.AvatarList.Add(new LineupAvatar
response.Lineup.AvatarLists.Add(new LineupAvatar
{
AvatarType = AvatarType.AVATAR_FORMAL_TYPE,
CurHealth = new HealthBarInfo { CurHp = 10000, MaxHp = 10000 },
Sp = 10000,
AvatarType = AvatarType.AvatarFormalType,
Hp = 10000,
Sp = new AmountInfo { CurAmount = 10000,MaxAmount = 10000},
Satiety = 100,
Id = id,
Slot = response.Lineup.AvatarList.Count
Slot = (uint)response.Lineup.AvatarLists.Count
});
}
session.Send(CmdType.GetCurLineupDataScRsp, response);
session.Send(CmdType.CmdGetCurLineupDataScRsp, response);
}
[Handler(CmdType.GetAllLineupDataCsReq)]
[Handler(CmdType.CmdGetAllLineupDataCsReq)]
public static void OnGetAllLineupDataCsReq(NetSession session, int cmdId, object data)
{
var response = new GetAllLineupDataScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
Retcode = (uint)RetcodeStatus.RetSucc,
CurIndex = 0,
LineupList = new List<LineupInfo>()
};
response.LineupList.Add(new LineupInfo
response.LineupLists.Add(new LineupInfo
{
ExtraLineupType = ExtraLineupType.LINEUP_NONE,
ExtraLineupType = ExtraLineupType.LineupNone,
Name = "Squad 1",
AvatarList = new List<LineupAvatar>(),
Foafdgjflmc = 5,
LeaderSlot = 3
Mp = 5,
LeaderSlot = 0
});
var characters = new int[] { 8001, 1005, 1003 };
var characters = new uint[] { 8001, 1307, 1306, 1312 };
foreach (int id in characters)
foreach (uint id in characters)
{
response.LineupList[0].AvatarList.Add(new LineupAvatar
response.LineupLists[0].AvatarLists.Add(new LineupAvatar
{
AvatarType = AvatarType.AVATAR_FORMAL_TYPE,
CurHealth = new HealthBarInfo { CurHp = 10000, MaxHp = 10000 },
Sp = 10000,
AvatarType = AvatarType.AvatarFormalType,
Sp = new AmountInfo { CurAmount = 10000, MaxAmount = 10000 },
Hp = 10000,
Satiety = 100,
Id = id,
Slot = response.LineupList[0].AvatarList.Count
Slot = (uint)response.LineupLists[0].AvatarLists.Count
});
}
session.Send(CmdType.GetAllLineupDataScRsp, response);
session.Send(CmdType.CmdGetAllLineupDataScRsp, response);
}
[Handler(CmdType.ChangeLineupLeaderCsReq)]
[Handler(CmdType.CmdChangeLineupLeaderCsReq)]
public static void OnChangeLineupLeaderCsReq(NetSession session, int cmdId, object data)
{
var request = data as ChangeLineupLeaderCsReq;
session.Send(CmdType.ChangeLineupLeaderScRsp, new ChangeLineupLeaderScRsp
session.Send(CmdType.CmdChangeLineupLeaderScRsp, new ChangeLineupLeaderScRsp
{
Slot = request.Slot,
Retcode = Retcode.RETCODE_RET_SUCC
Retcode = (uint)RetcodeStatus.RetSucc
});
}
}

View file

@ -6,82 +6,47 @@
internal static class MissionReqGroup
{
[Handler(CmdType.GetMissionStatusCsReq)]
[Handler(CmdType.CmdGetMissionStatusCsReq)]
public static void OnGetMissionStatusCsReq(NetSession session, int cmdId, object data)
{
var request = data as GetMissionStatusCsReq;
GetMissionStatusScRsp response = new GetMissionStatusScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
DisabledMainMissionIdList = new List<int>(),
FinishedMainMissionIdList = new List<int>(),
MissionEventStatusList = new List<Mission>(),
SubMissionStatusList = new List<Mission>(),
UnfinishedMainMissionIdList = new List<int>()
Retcode = (uint)RetcodeStatus.RetSucc,
};
response.FinishedMainMissionIdList = new List<int>
{
1000101,
1000112,
1000113,
1000201,
1000202,
1000204,
1000301,
1000401,
1000402,
1000410,
1000510,
1000601,
1010301,
1010302,
1010401,
1010403,
1010701,
1011403,
1010202,
1010902,
1011102,
4010101
};
response.FinishedMainMissionIdLists = new uint[] {
1000101,1000112,1000113,1000201,1000202,1000204,1000301,1000401,1000402,1000410,1000510,1000601,1010301,
1010302,1010401,1010403,1010701,1011403,1010202,1010902,1011102,4010101 };
if (request.MissionEventIdList != null)
{
foreach (int id in request.MissionEventIdList)
{
response.UnfinishedMainMissionIdList.Add(id);
}
}
if (request.SubMissionIdList != null)
if (request.SubMissionIdLists != null)
{
foreach (int id in request.SubMissionIdList)
foreach (uint id in request.SubMissionIdLists)
{
response.MissionEventStatusList.Add(new Mission()
response.MissionEventStatusLists.Add(new Mission()
{
Id = id,
Progress = 0,
Status = MissionStatus.MISSION_FINISH
Status = MissionStatus.MissionFinish
});
}
}
if (request.MainMissionIdList != null)
if (request.MainMissionIdLists != null)
{
foreach (int id in request.MainMissionIdList)
foreach (uint id in request.MainMissionIdLists)
{
response.SubMissionStatusList.Add(new Mission()
response.SubMissionStatusLists.Add(new Mission()
{
Id = id,
Progress = 0,
Status = MissionStatus.MISSION_FINISH
Status = MissionStatus.MissionFinish
});
}
}
session.Send(CmdType.GetMissionStatusScRsp, response);
session.Send(CmdType.CmdGetMissionStatusScRsp, response);
}
}
}

View file

@ -8,34 +8,40 @@
internal static class NPCReqGroup
{
//maybe useless
[Handler(CmdType.GetNpcTakenRewardCsReq)]
[Handler(CmdType.CmdGetNpcTakenRewardCsReq)]
public static void OnGetNpcTakenRewardCsReq(NetSession session, int cmdId, object data)
{
var npcRewardReq = data as GetNpcTakenRewardCsReq;
var npcRewardReq = data as Eddbhmdjadb;
session.Send(CmdType.GetNpcTakenRewardScRsp, new GetNpcTakenRewardScRsp
session.Send(CmdType.CmdGetNpcTakenRewardScRsp, new Nikhfbniagb
{
NpcId = npcRewardReq.NpcId,
Retcode = Retcode.RETCODE_RET_SUCC
NpcId = npcRewardReq.Okonlennkfb,
Retcode = (uint)RetcodeStatus.RetSucc
});
}
[Handler(CmdType.GetFirstTalkByPerformanceNpcCsReq)]
[Handler(CmdType.CmdGetFirstTalkByPerformanceNpcCsReq)]
public static void OnGetFirstTalkByPerformanceNpcCsReq(NetSession session, int cmdId, object data)
{
session.Send(CmdType.GetFirstTalkByPerformanceNpcScRsp, new GetFirstTalkByPerformanceNpcScRsp
var npcPerformanceReq = data as Jknjlicadhe;
var response = new Kpbeklbbihd
{
Retcode = Retcode.RETCODE_RET_SUCC,
NpcMeetStatusList = new List<OCLEPLBNNPA>
{
new OCLEPLBNNPA
Retcode = (uint)RetcodeStatus.RetSucc
};
foreach(uint id in npcPerformanceReq.Ffgeablhjmms)
{
response.Hhldcbegobcs.Add(new NpcMeetStatusInfo
{
IsMeet = true,
Jljhobhmaof = 1
},
}
});
Jgndlkbohij = true,
Okonlennkfb = id
});
}
session.Send(CmdType.CmdGetFirstTalkByPerformanceNpcScRsp, response);
}
}
}

View file

@ -5,51 +5,56 @@
using FreeSR.Proto;
using NLog;
using System;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using Newtonsoft.Json;
internal static class PlayerReqGroup
{
private static readonly Logger s_log = LogManager.GetCurrentClassLogger();
[Handler(CmdType.PlayerHeartBeatCsReq)]
[Handler(CmdType.CmdPlayerHeartBeatCsReq)]
public static void OnPlayerHeartBeatCsReq(NetSession session, int cmdId, object data)
{
var heartbeatReq = data as PlayerHeartBeatCsReq;
session.Send(CmdType.PlayerHeartBeatScRsp, new PlayerHeartBeatScRsp
session.Send(CmdType.CmdPlayerHeartBeatScRsp, new PlayerHeartBeatScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
Retcode = (uint)RetcodeStatus.RetSucc,
DownloadData = new ClientDownloadData(),
ClientTimeMs = heartbeatReq.ClientTimeMs,
ServerTimeMs = DateTimeOffset.Now.ToUnixTimeMilliseconds()
ServerTimeMs = (ulong)DateTimeOffset.Now.ToUnixTimeMilliseconds()
});
}
[Handler(CmdType.GetHeroBasicTypeInfoCsReq)]
[Handler(CmdType.CmdGetHeroBasicTypeInfoCsReq)]
public static void OnGetHeroBasicTypeInfoCsReq(NetSession session, int cmdId, object _)
{
session.Send(CmdType.GetHeroBasicTypeInfoScRsp, new GetHeroBasicTypeInfoScRsp
session.Send(CmdType.CmdGetHeroBasicTypeInfoScRsp, new GetHeroBasicTypeInfoScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
Retcode = (uint)RetcodeStatus.RetSucc,
Gender = Gender.GenderMan,
BasicTypeInfoList = new List<HeroBasicTypeInfo>
{
new HeroBasicTypeInfo
Cdkjkpnjjjas ={
new Hlbbodklpbo
{
BasicType = HeroBasicType.BoyWarrior,
Peihhlcchfj = HeroBasicType.BoyWarrior,
Rank = 1,
SkillTreeList = new List<AvatarSkillTree>()
Chmeifanmags = {}
}
},
CurBasicType = HeroBasicType.BoyWarrior,
IsPlayerInfoModified = false,
IsGenderModified = false
Bhepmbpaojp = false,
Cnlbajkmnbn = false
});
}
[Handler(CmdType.GetBasicInfoCsReq)]
[Handler(CmdType.CmdGetBasicInfoCsReq)]
public static void OnGetBasicInfoCsReq(NetSession session, int cmdId, object _)
{
session.Send(CmdType.GetBasicInfoScRsp, new GetBasicInfoScRsp
session.Send(CmdType.CmdGetBasicInfoScRsp, new GetBasicInfoScRsp
{
CurDay = 1,
ExchangeTimes = 0,
@ -59,55 +64,61 @@
});
}
[Handler(CmdType.PlayerLoginCsReq)]
[Handler(CmdType.CmdPlayerLoginCsReq)]
public static void OnPlayerLoginCsReq(NetSession session, int cmdId, object data)
{
var request = data as PlayerLoginCsReq;
session.Send(CmdType.PlayerLoginScRsp, new PlayerLoginScRsp
session.Send(CmdType.CmdPlayerLoginScRsp, new PlayerLoginScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
IsNewPlayer = false,
Retcode = (uint)RetcodeStatus.RetSucc,
//IsNewPlayer = false,
LoginRandom = request.LoginRandom,
Stamina = 100,
ServerTimestampMs = DateTimeOffset.Now.ToUnixTimeSeconds() * 1000,
ServerTimestampMs = (ulong)DateTimeOffset.Now.ToUnixTimeSeconds() * 1000,
BasicInfo = new PlayerBasicInfo
{
Nickname = "xeondev",
Level = 30,
Level = 70,
Exp = 0,
Stamina = 100,
MCoin = 0,
HCoin = 0,
SCoin = 0,
WorldLevel = 0
Mcoin = 0,
Hcoin = 0,
Scoin = 0,
WorldLevel = 6
}
});
}
[Handler(CmdType.PlayerGetTokenCsReq)]
[Handler(CmdType.CmdPlayerGetTokenCsReq)]
public static void OnPlayerGetTokenCsReq(NetSession session, int cmdId, object data)
{
var request = data as PlayerGetTokenCsReq;
session.Send(CmdType.PlayerGetTokenScRsp, new PlayerGetTokenScRsp
session.Send(CmdType.CmdPlayerGetTokenScRsp, new PlayerGetTokenScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
Uid = int.Parse(request.AccountUid),
BlackInfo = null,
Msg = null,
Retcode = (uint)RetcodeStatus.RetSucc,
Uid = 1337,
//BlackInfo = null,
Msg = "OK",
SecretKeySeed = 0
});
session.Send(CmdType.BattlePassInfoNotify, new BattlePassInfoNotify
byte[] decodedBytes = Convert.FromBase64String("eyJPcGdpbW5rb2tuanMiOlt7Iklvbm1sb2tjZ25nIjowLCJCZWdpblRpbWUiOjAsIkpvZGlwZ2xkb2hqIjoiIiwiR2djYWFrZ2ZjYm8iOmZhbHNlLCJFbmRUaW1lIjoyMDIxOTc4Nzc0LCJEZWxnam5jaGxwaiI6IiIsIkNvbmZpZ0lkIjowLCJKaGpiZ21tcGNjaiI6IkZyZWVTUiBpcyBhIGZyZWUgYW5kIG9wZW4tc291cmNlIHNvZnR3YXJlLCBpZiB5b3UgcGFpZCBmb3IgdGhpcywgeW91IGhhdmUgYmVlbiBzY2FtbWVkISBGcmVlU1LmmK/kuIDkuKrlhY3otLnkuJTlvIDmupDnmoTova/ku7bvvIzlpoLmnpzkvaDmmK/oirHpkrHkubDmnaXnmoTvvIzor7TmmI7kvaDooqvpqpfkuobvvIFyZXBvc2l0b3J5IGxpbmsg5LuT5bqT5Zyw5Z2AOmh0dHBzOi8vZ2l0Lnhlb25kZXYuY29tL01vdXgyMzMzMy9GcmVlU1IiLCJLcGZmY2hjb2xlZCI6MH1dfQ==");
string decodedJsonData = Encoding.UTF8.GetString(decodedBytes);
ServerAnnounceNotify announceNotify = JsonConvert.DeserializeObject<ServerAnnounceNotify>(decodedJsonData);
session.Send(10, announceNotify);
/*session.Send(10, new ServerAnnounceNotify
{
Ibkdaabmege = ILGFODEJBBH.BP_TIER_TYPE_PREMIUM_2,
Caajdlolcml = 0,
Ipneaeepcmk = 4,
Okffhjicndl = 0,
Exp = 1000,
Level = 50
});
Opgimnkoknjs =
{
new AnnounceData
{
BeginTime = 0,
EndTime = DateTimeOffset.Now.ToUnixTimeSeconds() + 10,
Jhjbgmmpccj = @"FreeSR is a free and open-source software, if you paid for this, you have been scammed! FreeSR是一个免费且开源的软件如果你是花钱买来的说明你被骗了repository link 仓库地址:https://git.xeondev.com/Moux23333/FreeSR"
}
}
});*/
}
}
}

View file

@ -7,23 +7,20 @@
internal static class SceneReqGroup
{
[Handler(CmdType.GetCurSceneInfoCsReq)]
[Handler(CmdType.CmdGetCurSceneInfoCsReq)]
public static void OnGetCurSceneInfoCsReq(NetSession session, int cmdId, object data)
{
SceneInfo scene = new SceneInfo
{
GameModeType = 1,
Bkmbkahohif = 1,
Admbbnbnibk = 1,
EntryId = 1000101,
PlaneId = 10001,
FloorId = 10001001,
EntityList = new List<SceneEntityInfo>(),
EnvBuffList = new List<BuffInfo>(),
LightenSectionList = new List<int>()
//Bkmbkahohif = 1,
//Admbbnbnibk = 1,
EntryId = 1030101,
PlaneId = 10301,
FloorId = 10301001,
};
scene.EntityList.Add(new SceneEntityInfo
scene.EntityLists.Add(new SceneEntityInfo
{
EntityId = 0,
GroupId = 0,
@ -35,10 +32,10 @@
}
});
session.Send(CmdType.GetCurSceneInfoScRsp, new GetCurSceneInfoScRsp
session.Send(CmdType.CmdGetCurSceneInfoScRsp, new GetCurSceneInfoScRsp
{
Scene = scene,
Retcode = Retcode.RETCODE_RET_SUCC
Retcode = (uint)RetcodeStatus.RetSucc
});
}
}

View file

@ -9,36 +9,35 @@
{
private static readonly Logger s_log = LogManager.GetCurrentClassLogger();
[Handler(CmdType.GetTutorialGuideCsReq)]
[Handler(CmdType.CmdGetTutorialGuideCsReq)]
public static void OnGetTutorialGuideCsReq(NetSession session, int cmdId, object _)
{
var response = new GetTutorialGuideScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
TutorialGuideList = new List<TutorialGuide>()
Retcode = (uint)RetcodeStatus.RetSucc
};
int[] guides = new int[]
uint[] guides = new uint[]
{
1101, 1102, 1104, 1105, 1116, 1117, 2006, 2007, 2101, 2105, 2106, 2107, 3007, 3105, 3106, 4001, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 5101, 5102, 5103, 5104, 5105, 6001, 6002, 6003, 6004, 6005, 6006, 6007, 9101, 9102, 9103, 9104, 9105, 9106, 9107, 9108
};
foreach (int id in guides)
foreach (uint id in guides)
{
response.TutorialGuideList.Add(new TutorialGuide
response.TutorialGuideLists.Add(new TutorialGuide
{
Id = id,
Status = TutorialStatus.TUTORIAL_FINISH
Status = TutorialStatus.TutorialFinish
});
}
session.Send(CmdType.GetTutorialGuideScRsp, response);
session.Send(CmdType.CmdGetTutorialGuideScRsp, response);
}
[Handler(CmdType.GetTutorialCsReq)]
[Handler(CmdType.CmdGetTutorialCsReq)]
public static void OnGetTutorialCsReq(NetSession session, int cmdId, object _)
{
int[] completedTutorials = new int[]
uint[] completedTutorials = new uint[]
{
1001, 1002, 1003, 1004, 1005, 1007, 1008, 1010, 1011,
2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015,
@ -51,20 +50,19 @@
var response = new GetTutorialScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
TutorialList = new List<Tutorial>()
Retcode = (uint)RetcodeStatus.RetSucc,
};
foreach (int id in completedTutorials)
foreach (uint id in completedTutorials)
{
response.TutorialList.Add(new Tutorial
response.TutorialLists.Add(new Tutorial
{
Id = id,
Status = TutorialStatus.TUTORIAL_FINISH
Status = TutorialStatus.TutorialFinish
});
}
session.Send(CmdType.GetTutorialScRsp, response);
session.Send(CmdType.CmdGetTutorialScRsp, response);
}
}
}

View file

@ -13,30 +13,30 @@
var builder = ImmutableDictionary.CreateBuilder<CmdType, Type>();
builder.AddRange(new Dictionary<CmdType, Type>()
{
{CmdType.PlayerGetTokenCsReq, typeof(PlayerGetTokenCsReq)},
{CmdType.PlayerLoginCsReq, typeof(PlayerLoginCsReq)},
{CmdType.GetAvatarDataCsReq, typeof(GetAvatarDataCsReq)},
{CmdType.CmdPlayerGetTokenCsReq, typeof(PlayerGetTokenCsReq)},
{CmdType.CmdPlayerLoginCsReq, typeof(PlayerLoginCsReq)},
{CmdType.CmdGetAvatarDataCsReq, typeof(GetAvatarDataCsReq)},
{CmdType.GetAllLineupDataCsReq, typeof(GetAllLineupDataCsReq)},
{CmdType.GetCurLineupDataCsReq, typeof(GetCurLineupDataCsReq)},
{CmdType.ChangeLineupLeaderCsReq, typeof(ChangeLineupLeaderCsReq)},
{CmdType.CmdGetAllLineupDataCsReq, typeof(GetAllLineupDataCsReq)},
{CmdType.CmdGetCurLineupDataCsReq, typeof(GetCurLineupDataCsReq)},
{CmdType.CmdChangeLineupLeaderCsReq, typeof(ChangeLineupLeaderCsReq)},
{CmdType.GetMissionStatusCsReq, typeof(GetMissionStatusCsReq)},
{CmdType.GetQuestDataCsReq, typeof(GetQuestDataCsReq)},
{CmdType.GetChallengeCsReq, typeof(GetChallengeCsReq)},
{CmdType.GetCurSceneInfoCsReq, typeof(GetCurSceneInfoCsReq)},
{CmdType.CmdGetMissionStatusCsReq, typeof(GetMissionStatusCsReq)},
//{CmdType.CmdGetQuestDataCsReq, typeof(GetQuestDataCsReq)},
//{CmdType.CmdGetChallengeCsReq, typeof(GetChallengeCsReq)},
{CmdType.CmdGetCurSceneInfoCsReq, typeof(GetCurSceneInfoCsReq)},
{CmdType.GetBasicInfoCsReq, typeof(GetBasicInfoCsReq)},
{CmdType.GetHeroBasicTypeInfoCsReq, typeof(GetHeroBasicTypeInfoCsReq)},
{CmdType.PlayerHeartBeatCsReq, typeof(PlayerHeartBeatCsReq)},
{CmdType.CmdGetBasicInfoCsReq, typeof(GetBasicInfoCsReq)},
{CmdType.CmdGetHeroBasicTypeInfoCsReq, typeof(Hlbbodklpbo)},
{CmdType.CmdPlayerHeartBeatCsReq, typeof(PlayerHeartBeatCsReq)},
{CmdType.GetGachaInfoCsReq, typeof(GetGachaInfoCsReq)},
{CmdType.DoGachaCsReq, typeof(DoGachaCsReq)},
//{CmdType.CmdGetGachaInfoCsReq, typeof(GetGachaInfoCsReq)},
//{CmdType.CmdDoGachaCsReq, typeof(DoGachaCsReq)},
{CmdType.GetNpcTakenRewardCsReq, typeof(GetNpcTakenRewardCsReq)},
{CmdType.GetFirstTalkByPerformanceNpcCsReq, typeof(GetFirstTalkByPerformanceNpcCsReq)},
{CmdType.CmdGetNpcTakenRewardCsReq, typeof(Eddbhmdjadb)},
{CmdType.CmdGetFirstTalkByPerformanceNpcCsReq, typeof(Jknjlicadhe)},
{CmdType.GetBagCsReq, typeof(GetBagCsReq)}
//{CmdType.CmdGetBagCsReq, typeof(GetBagCsReq)}
});
s_types = builder.ToImmutable();

View file

@ -45,56 +45,56 @@
private static Dictionary<CmdType, CmdType> s_dummyTable = new Dictionary<CmdType, CmdType>
{
{CmdType.GetLevelRewardTakenListCsReq, CmdType.GetLevelRewardTakenListScRsp},
{CmdType.GetRogueScoreRewardInfoCsReq, CmdType.GetRogueScoreRewardInfoScRsp},
{CmdType.GetGachaInfoCsReq, CmdType.GetGachaInfoScRsp},
{CmdType.QueryProductInfoCsReq, CmdType.QueryProductInfoScRsp},
{CmdType.GetQuestDataCsReq, CmdType.GetQuestDataScRsp},
{CmdType.GetQuestRecordCsReq, CmdType.GetQuestRecordScRsp},
{CmdType.GetFriendListInfoCsReq, CmdType.GetFriendListInfoScRsp},
{CmdType.GetFriendApplyListInfoCsReq, CmdType.GetFriendApplyListInfoScRsp},
{CmdType.GetCurAssistCsReq, CmdType.GetCurAssistScRsp},
{CmdType.GetRogueHandbookDataCsReq, CmdType.GetRogueHandbookDataScRsp},
{CmdType.GetDailyActiveInfoCsReq, CmdType.GetDailyActiveInfoScRsp},
{CmdType.GetFightActivityDataCsReq, CmdType.GetFightActivityDataScRsp},
{CmdType.GetMultipleDropInfoCsReq, CmdType.GetMultipleDropInfoScRsp},
{CmdType.GetPlayerReturnMultiDropInfoCsReq, CmdType.GetPlayerReturnMultiDropInfoScRsp},
{CmdType.GetShareDataCsReq, CmdType.GetShareDataScRsp},
{CmdType.GetTreasureDungeonActivityDataCsReq, CmdType.GetTreasureDungeonActivityDataScRsp},
{CmdType.PlayerReturnInfoQueryCsReq, CmdType.PlayerReturnInfoQueryScRsp},
{CmdType.GetBasicInfoCsReq, CmdType.GetBasicInfoScRsp},
{CmdType.GetHeroBasicTypeInfoCsReq, CmdType.GetHeroBasicTypeInfoScRsp},
{CmdType.GetBagCsReq, CmdType.GetBagScRsp},
{CmdType.GetPlayerBoardDataCsReq, CmdType.GetPlayerBoardDataScRsp},
{CmdType.GetAvatarDataCsReq, CmdType.GetAvatarDataScRsp},
{CmdType.GetAllLineupDataCsReq, CmdType.GetAllLineupDataScRsp},
{CmdType.GetActivityScheduleConfigCsReq, CmdType.GetActivityScheduleConfigScRsp},
{CmdType.GetMissionDataCsReq, CmdType.GetMissionDataScRsp},
{CmdType.GetMissionEventDataCsReq, CmdType.GetMissionEventDataScRsp},
{CmdType.GetChallengeCsReq, CmdType.GetChallengeScRsp},
{CmdType.GetCurChallengeCsReq, CmdType.GetCurChallengeScRsp},
{CmdType.GetRogueInfoCsReq, CmdType.GetRogueInfoScRsp},
{CmdType.GetExpeditionDataCsReq, CmdType.GetExpeditionDataScRsp},
{CmdType.GetRogueDialogueEventDataCsReq, CmdType.GetRogueDialogueEventDataScRsp},
{CmdType.GetJukeboxDataCsReq, CmdType.GetJukeboxDataScRsp},
{CmdType.SyncClientResVersionCsReq, CmdType.SyncClientResVersionScRsp},
{CmdType.DailyFirstMeetPamCsReq, CmdType.DailyFirstMeetPamScRsp},
{CmdType.GetMuseumInfoCsReq, CmdType.GetMuseumInfoScRsp},
{CmdType.GetLoginActivityCsReq, CmdType.GetLoginActivityScRsp},
{CmdType.GetRaidInfoCsReq, CmdType.GetRaidInfoScRsp},
{CmdType.GetTrialActivityDataCsReq, CmdType.GetTrialActivityDataScRsp},
{CmdType.GetBoxingClubInfoCsReq, CmdType.GetBoxingClubInfoScRsp},
{CmdType.GetNpcStatusCsReq, CmdType.GetNpcStatusScRsp},
{CmdType.TextJoinQueryCsReq, CmdType.TextJoinQueryScRsp},
{CmdType.GetSpringRecoverDataCsReq, CmdType.GetSpringRecoverDataScRsp},
{CmdType.GetChatFriendHistoryCsReq, CmdType.GetChatFriendHistoryScRsp},
{CmdType.GetSecretKeyInfoCsReq, CmdType.GetSecretKeyInfoScRsp},
{CmdType.GetVideoVersionKeyCsReq, CmdType.GetVideoVersionKeyScRsp},
{CmdType.GetCurLineupDataCsReq, CmdType.GetCurLineupDataScRsp},
{CmdType.GetCurBattleInfoCsReq, CmdType.GetCurBattleInfoScRsp},
{CmdType.GetCurSceneInfoCsReq, CmdType.GetCurSceneInfoScRsp},
{CmdType.GetPhoneDataCsReq, CmdType.GetPhoneDataScRsp},
{CmdType.PlayerLoginFinishCsReq, CmdType.PlayerLoginFinishScRsp}
{CmdType.CmdGetLevelRewardTakenListCsReq, CmdType.CmdGetLevelRewardTakenListScRsp},
{CmdType.CmdGetRogueScoreRewardInfoCsReq, CmdType.CmdGetRogueScoreRewardInfoScRsp},
{CmdType.CmdGetGachaInfoCsReq, CmdType.CmdGetGachaInfoScRsp},
{CmdType.CmdQueryProductInfoCsReq, CmdType.CmdQueryProductInfoScRsp},
{CmdType.CmdGetQuestDataCsReq, CmdType.CmdGetQuestDataScRsp},
{CmdType.CmdGetQuestRecordCsReq, CmdType.CmdGetQuestRecordScRsp},
{CmdType.CmdGetFriendListInfoCsReq, CmdType.CmdGetFriendListInfoScRsp},
{CmdType.CmdGetFriendApplyListInfoCsReq, CmdType.CmdGetFriendApplyListInfoScRsp},
{CmdType.CmdGetCurAssistCsReq, CmdType.CmdGetCurAssistScRsp},
{CmdType.CmdGetRogueHandbookDataCsReq, CmdType.CmdGetRogueHandbookDataScRsp},
{CmdType.CmdGetDailyActiveInfoCsReq, CmdType.CmdGetDailyActiveInfoScRsp},
{CmdType.CmdGetFightActivityDataCsReq, CmdType.CmdGetFightActivityDataScRsp},
{CmdType.CmdGetMultipleDropInfoCsReq, CmdType.CmdGetMultipleDropInfoScRsp},
{CmdType.CmdGetPlayerReturnMultiDropInfoCsReq, CmdType.CmdGetPlayerReturnMultiDropInfoScRsp},
{CmdType.CmdGetShareDataCsReq, CmdType.CmdGetShareDataScRsp},
{CmdType.CmdGetTreasureDungeonActivityDataCsReq, CmdType.CmdGetTreasureDungeonActivityDataScRsp},
{CmdType.CmdPlayerReturnInfoQueryCsReq, CmdType.CmdPlayerReturnInfoQueryScRsp},
{CmdType.CmdGetBasicInfoCsReq, CmdType.CmdGetBasicInfoScRsp},
{CmdType.CmdGetHeroBasicTypeInfoCsReq, CmdType.CmdGetHeroBasicTypeInfoScRsp},
{CmdType.CmdGetBagCsReq, CmdType.CmdGetBagScRsp},
{CmdType.CmdGetPlayerBoardDataCsReq, CmdType.CmdGetPlayerBoardDataScRsp},
{CmdType.CmdGetAvatarDataCsReq, CmdType.CmdGetAvatarDataScRsp},
{CmdType.CmdGetAllLineupDataCsReq, CmdType.CmdGetAllLineupDataScRsp},
{CmdType.CmdGetActivityScheduleConfigCsReq, CmdType.CmdGetActivityScheduleConfigScRsp},
{CmdType.CmdGetMissionDataCsReq, CmdType.CmdGetMissionDataScRsp},
{CmdType.CmdGetMissionEventDataCsReq, CmdType.CmdGetMissionEventDataScRsp},
{CmdType.CmdGetChallengeCsReq, CmdType.CmdGetChallengeScRsp},
{CmdType.CmdGetCurChallengeCsReq, CmdType.CmdGetCurChallengeScRsp},
{CmdType.CmdGetRogueInfoCsReq, CmdType.CmdGetRogueInfoScRsp},
{CmdType.CmdGetExpeditionDataCsReq, CmdType.CmdGetExpeditionDataScRsp},
{CmdType.CmdGetRogueDialogueEventDataCsReq, CmdType.CmdGetRogueDialogueEventDataScRsp},
{CmdType.CmdGetJukeboxDataCsReq, CmdType.CmdGetJukeboxDataScRsp},
{CmdType.CmdSyncClientResVersionCsReq, CmdType.CmdSyncClientResVersionScRsp},
{CmdType.CmdDailyFirstMeetPamCsReq, CmdType.CmdDailyFirstMeetPamScRsp},
{CmdType.CmdGetMuseumInfoCsReq, CmdType.CmdGetMuseumInfoScRsp},
{CmdType.CmdGetLoginActivityCsReq, CmdType.CmdGetLoginActivityScRsp},
{CmdType.CmdGetRaidInfoCsReq, CmdType.CmdGetRaidInfoScRsp},
{CmdType.CmdGetTrialActivityDataCsReq, CmdType.CmdGetTrialActivityDataScRsp},
{CmdType.CmdGetBoxingClubInfoCsReq, CmdType.CmdGetBoxingClubInfoScRsp},
{CmdType.CmdGetNpcStatusCsReq, CmdType.CmdGetNpcStatusScRsp},
{CmdType.CmdTextJoinQueryCsReq, CmdType.CmdTextJoinQueryScRsp},
{CmdType.CmdGetSpringRecoverDataCsReq, CmdType.CmdGetSpringRecoverDataScRsp},
{CmdType.CmdGetChatFriendHistoryCsReq, CmdType.CmdGetChatFriendHistoryScRsp},
{CmdType.CmdGetSecretKeyInfoCsReq, CmdType.CmdGetSecretKeyInfoScRsp},
{CmdType.CmdGetVideoVersionKeyCsReq, CmdType.CmdGetVideoVersionKeyScRsp},
{CmdType.CmdGetCurLineupDataCsReq, CmdType.CmdGetCurLineupDataScRsp},
{CmdType.CmdGetCurBattleInfoCsReq, CmdType.CmdGetCurBattleInfoScRsp},
{CmdType.CmdGetCurSceneInfoCsReq, CmdType.CmdGetCurSceneInfoScRsp},
{CmdType.CmdGetPhoneDataCsReq, CmdType.CmdGetPhoneDataScRsp},
{CmdType.CmdPlayerLoginFinishCsReq, CmdType.CmdPlayerLoginFinishScRsp}
};
[ProtoContract]

View file

@ -28,5 +28,20 @@
await _channel.WriteAndFlushAsync(packet);
}
public async void Send<T>(int cmdId, T data) where T : class
{
var packet = new NetPacket()
{
CmdId = cmdId,
Data = data
};
var buffer = Unpooled.Buffer();
packet.Serialize<T>(buffer);
packet.Buf = buffer;
await _channel.WriteAndFlushAsync(packet);
}
}
}

File diff suppressed because it is too large Load diff

32721
FreeSR.Proto/StarRail.cs Normal file

File diff suppressed because it is too large Load diff