Compare commits

..

No commits in common. "main" and "2024.1.28" have entirely different histories.

27 changed files with 33579 additions and 7772 deletions

View file

@ -5,7 +5,6 @@
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable> <Nullable>disable</Nullable>
<RollForward>Major</RollForward>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

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

View file

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

View file

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

View file

@ -22,7 +22,7 @@
var accountData = DispatchHelper.ToLoginResponseData(); var accountData = DispatchHelper.ToLoginResponseData();
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create() await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(0) .Retcode((int)RetcodeStatus.RetSucc)
.Message("OK") .Message("OK")
.Object("data", new JObject .Object("data", new JObject
{ {

View file

@ -25,7 +25,7 @@
context.Response.ContentType = "text/plain"; context.Response.ContentType = "text/plain";
await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new RegionList await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new RegionList
{ {
Retcode = 0, Retcode = (uint)RetcodeStatus.RetSucc,
TopServerRegionName = RegionManager.GetTopServerRegionName(), TopServerRegionName = RegionManager.GetTopServerRegionName(),
RegionInfoLists = { RegionManager.GetRegionList() } RegionInfoLists = { RegionManager.GetRegionList() }
}))); })));

View file

@ -25,13 +25,10 @@
B5 = true, B5 = true,
B6 = true, B6 = true,
B7 = true, B7 = true,
B8 = true, Gfemaboifee = true,
useTcp = true,
//MdkResVersion = "5335706", //MdkResVersion = "5335706",
AssetBundleUrl = "https://autopatchos.starrails.com/asb/BetaLive/output_6510636_cb4da670a18a", AssetBundleUrl = "https://autopatchcn.bhsr.com/asb/BetaLive/output_6355877_591cdefefe9b",
ExResourceUrl = "https://autopatchos.starrails.com/design_data/BetaLive/output_6519585_2be8ac313835", ExResourceUrl = "https://autopatchcn.bhsr.com/design_data/BetaLive/output_6367879_26191d7cc23b",
IfixVersion = "https://autopatchos.starrails.com/ifix/BetaLive/output_6523427_28cc5c21c689",
LuaUrl = "https://autopatchos.starrails.com/lua/BetaLive/output_6516960_dede96733b5b",
}))); })));
return true; return true;

View file

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

View file

@ -13,7 +13,7 @@
var accountData = DispatchHelper.ToLoginResponseData(); var accountData = DispatchHelper.ToLoginResponseData();
await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create() await context.Response.WriteAllJsonAsync(DispatchResponseBuilder.Create()
.Retcode(0) .Retcode((int)RetcodeStatus.RetSucc)
.Message("OK") .Message("OK")
.Object("data", new JObject .Object("data", new JObject
{ {

View file

@ -5,7 +5,6 @@
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable> <Nullable>disable</Nullable>
<RollForward>Major</RollForward>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -13,15 +13,11 @@
var response = new GetAvatarDataScRsp var response = new GetAvatarDataScRsp
{ {
Retcode = 0, Retcode = (uint)RetcodeStatus.RetSucc,
IsAll = request.IsGetAll IsAll = request.IsGetAll
}; };
uint[] characters = new uint[] { 8001,8002,8003,8004, uint[] characters = new uint[] { 8001, 1307, 1306, 1312 };
1001,1002,1003,1004,1005,1006,1008,1009,1013,
1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,
1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1217,
1301,1302,1303,1304,1305,1306,1307,1308,1312};
foreach (uint id in characters) foreach (uint id in characters)
{ {
@ -29,8 +25,8 @@
{ {
BaseAvatarId = id, BaseAvatarId = id,
Exp = 0, Exp = 0,
Level = 80, Level = 1,
Promotion = 6, Promotion = 0,
Rank = 6, Rank = 6,
EquipmentUniqueId = 0 EquipmentUniqueId = 0
}; };

View file

@ -1,239 +0,0 @@
using FreeSR.Gateserver.Manager.Handlers.Core;
using static FreeSR.Gateserver.Manager.Handlers.LineupReqGroup;
using FreeSR.Gateserver.Network;
using FreeSR.Proto;
namespace FreeSR.Gateserver.Manager.Handlers
{
internal static class BattleReqGroup
{
[Handler(CmdType.CmdSetLineupNameCsReq)]
public static void OnSetLineupNameCsReq(NetSession session, int cmdId, object data)
{
var request = data as SetLineupNameCsReq;
if(request.Name == "battle")
{
var lineupInfo = new LineupInfo
{
ExtraLineupType = ExtraLineupType.LineupNone,
Name = "Squad 1",
Mp = 5,
MaxMp = 5,
LeaderSlot = 0
};
List<uint> characters = new List<uint> { Avatar1, Avatar2, Avatar3, Avatar4 };
foreach (uint id in characters)
{
if (id == 0) continue;
lineupInfo.AvatarLists.Add(new LineupAvatar
{
Id = id,
Hp = 10000,
Satiety = 100,
Sp = new AmountInfo{CurAmount = 10000,MaxAmount = 10000},
AvatarType = AvatarType.AvatarFormalType,
Slot = (uint)lineupInfo.AvatarLists.Count
});
}
var sceneInfo = new SceneInfo
{
GameModeType = 2,
EntryId = 2010101,
PlaneId = 20101,
FloorId = 20101001
};
var calaxInfoTest = new SceneEntityInfo
{
GroupId = 19,
InstId = 300001,
EntityId = 4194583,
Prop = new ScenePropInfo
{
PropState = 1,
PropId = 808
},
Motion = new MotionInfo
{
Pos = new Vector
{
X = -570,
Y = 19364,
Z = 4480
},
Rot = new Vector
{
Y = 180000
}
},
};
sceneInfo.EntityLists.Add(calaxInfoTest);
session.Send(CmdType.CmdEnterSceneByServerScNotify, new EnterSceneByServerScNotify
{
Scene = sceneInfo,
Lineup = lineupInfo
});
session.Send(CmdType.CmdSceneEntityMoveScNotify, new SceneEntityMoveScNotify
{
EntryId = 2010101,
EntityId = 0,
Motion = new MotionInfo
{
Pos = new Vector
{
X = -570,
Y = 19364,
Z = 4480
},
Rot = new Vector
{
Y = 180000
}
}
});
}
session.Send(CmdType.CmdSetLineupNameScRsp, new SetLineupNameScRsp
{
Retcode = 0,
Name = request.Name,
Index = request.Index
});
}
[Handler(CmdType.CmdStartCocoonStageCsReq)]
public static void OnStartCocoonStageCsReq(NetSession session, int cmdId, object data)
{
var request = data as StartCocoonStageCsReq;
Dictionary<uint, List<uint>> monsterIds = new Dictionary<uint, List<uint>>
{
{ 1, new List<uint> { 3013010, 3012010, 3013010, 3001010 } },
{ 2, new List<uint> { 8034010 } },
{ 3, new List<uint> { 3014022 } },
};
Dictionary<uint, uint> monsterLevels = new Dictionary<uint, uint>
{
{1,70},{2,70},{3,60}
};
//basic
var battleInfo = new SceneBattleInfo
{
StageId = 201012311,
LogicRandomSeed = 639771447,
WorldLevel = 6
};
var testRelic = new BattleRelic
{
Id = 61011,
Level = 999,
MainAffixId = 1,
SubAffixLists = {new RelicAffix
{
AffixId = 4,
Step = 999
} }
};
//avatar
List<uint> SkillIdEnds = new List<uint> { 1, 2, 3, 4, 7, 101, 102, 103, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210 };
List<uint> characters = new List<uint> { Avatar1, Avatar2, Avatar3, Avatar4 };
foreach (uint avatarId in characters)
{
var avatarData = new BattleAvatar
{
Id = avatarId,
Level = 80,
Promotion = 6,
Rank = 6,
Hp = 10000,
AvatarType = AvatarType.AvatarFormalType,
WorldLevel = 6,
Sp = new AmountInfo { CurAmount = 10000, MaxAmount = 10000 },
RelicLists = { testRelic },
EquipmentLists = {new BattleEquipment
{
Id = 23006,
Level = 80,
Rank = 5,
Promotion = 6
} }
};
foreach (uint end in SkillIdEnds)
{
uint level = 1;
if (end == 1) level = 6;
else if (end < 4 || end == 4) level = 10;
if (end > 4) level = 1;
avatarData.SkilltreeLists.Add(new AvatarSkillTree
{
PointId = avatarId * 1000 + end,
Level = level
});
}
battleInfo.BattleAvatarLists.Add(avatarData);
}
//monster
for (uint i = 1; i <= monsterIds.Count; i++)
{
SceneMonsterWave monsterInfo = new SceneMonsterWave
{
Pkgenfbhofi = i,
MonsterParam = new SceneMonsterParam
{
Level = monsterLevels[i],
}
};
if (monsterIds.ContainsKey(i))
{
List<uint> monsterIdList = monsterIds[i];
foreach (uint monsterId in monsterIdList)
{
monsterInfo.MonsterLists.Add(new SceneMonsterInfo
{
MonsterId = monsterId
});
}
}
battleInfo.MonsterWaveLists.Add(monsterInfo);
}
var response = new StartCocoonStageScRsp
{
Retcode = 0,
CocoonId = request.CocoonId,
Wave = request.Wave,
PropEntityId = request.PropEntityId,
BattleInfo = battleInfo
};
session.Send(CmdType.CmdStartCocoonStageScRsp, response);
}
[Handler(CmdType.CmdPVEBattleResultCsReq)]
public static void OnPVEBattleResultCsReq(NetSession session, int cmdId, object data)
{
var request = data as PVEBattleResultCsReq;
session.Send(CmdType.CmdPVEBattleResultScRsp, new PVEBattleResultScRsp
{
Retcode = 0,
EndStatus = request.EndStatus
});
}
}
}

View file

@ -6,16 +6,12 @@
internal static class LineupReqGroup internal static class LineupReqGroup
{ {
public static uint Avatar1 = 8001;
public static uint Avatar2 = 1308;
public static uint Avatar3 = 1304;
public static uint Avatar4 = 1301;
[Handler(CmdType.CmdGetCurLineupDataCsReq)] [Handler(CmdType.CmdGetCurLineupDataCsReq)]
public static void OnGetCurLineupDataCsReq(NetSession session, int cmdId, object _) public static void OnGetCurLineupDataCsReq(NetSession session, int cmdId, object _)
{ {
var response = new GetCurLineupDataScRsp var response = new GetCurLineupDataScRsp
{ {
Retcode = 0 Retcode = (uint)RetcodeStatus.RetSucc
}; };
response.Lineup = new LineupInfo response.Lineup = new LineupInfo
@ -27,7 +23,7 @@
MaxMp = 5 MaxMp = 5
}; };
var characters = new uint[] { Avatar1, Avatar2, Avatar3, Avatar4 }; var characters = new uint[] { 8001, 1307, 1306, 1312 };
foreach (uint id in characters) foreach (uint id in characters)
{ {
@ -50,7 +46,7 @@
{ {
var response = new GetAllLineupDataScRsp var response = new GetAllLineupDataScRsp
{ {
Retcode = 0, Retcode = (uint)RetcodeStatus.RetSucc,
CurIndex = 0, CurIndex = 0,
}; };
@ -63,7 +59,7 @@
LeaderSlot = 0 LeaderSlot = 0
}); });
var characters = new uint[] { Avatar1, Avatar2, Avatar3, Avatar4 }; var characters = new uint[] { 8001, 1307, 1306, 1312 };
foreach (uint id in characters) foreach (uint id in characters)
{ {
@ -88,91 +84,8 @@
session.Send(CmdType.CmdChangeLineupLeaderScRsp, new ChangeLineupLeaderScRsp session.Send(CmdType.CmdChangeLineupLeaderScRsp, new ChangeLineupLeaderScRsp
{ {
Slot = request.Slot, Slot = request.Slot,
Retcode = 0 Retcode = (uint)RetcodeStatus.RetSucc
}); });
} }
[Handler(CmdType.CmdJoinLineupCsReq)]
public static void OnJoinLineupCsReq(NetSession session, int cmdId, object data)
{
var request = data as JoinLineupCsReq;
if (request.Slot == 0) Avatar1 = request.BaseAvatarId;
if (request.Slot == 1) Avatar2 = request.BaseAvatarId;
if (request.Slot == 2) Avatar3 = request.BaseAvatarId;
if (request.Slot == 3) Avatar4 = request.BaseAvatarId;
RefreshLineup(session);
session.Send(CmdType.CmdJoinLineupScRsp, new JoinLineupScRsp
{
Retcode = 0
});
}
[Handler(CmdType.CmdReplaceLineupCsReq)]
public static void OnReplaceLineupCsReq(NetSession session, int cmdId, object data)
{
var request = data as ReplaceLineupCsReq;
Avatar1 = 0; Avatar2 = 0; Avatar3 = 0; Avatar4 = 0;
foreach (LineupSlotData slotData in request.LineupSlotLists)
{
if (slotData.Slot == 0) Avatar1 = slotData.Id;
if (slotData.Slot == 1) Avatar2 = slotData.Id;
if (slotData.Slot == 2) Avatar3 = slotData.Id;
if (slotData.Slot == 3) Avatar4 = slotData.Id;
}
RefreshLineup(session);
session.Send(CmdType.CmdReplaceLineupScRsp, new ReplaceLineupScRsp
{
Retcode = 0
});
}
[Handler(CmdType.CmdQuitLineupCsReq)]
public static void OnQuitLineupCsReq(NetSession session, int cmdId, object data)
{
var request = data as QuitLineupCsReq;
if (request.BaseAvatarId == Avatar1) Avatar1 = 0;
if (request.BaseAvatarId == Avatar2) Avatar2 = 0;
if (request.BaseAvatarId == Avatar3) Avatar3 = 0;
if (request.BaseAvatarId == Avatar4) Avatar4 = 0;
RefreshLineup(session);
session.Send(CmdType.CmdQuitLineupScRsp, new QuitLineupScRsp
{
Retcode = 0,
BaseAvatarId = request.BaseAvatarId,
IsVirtual = request.IsVirtual
});
}
public static void RefreshLineup(NetSession session) {
var characters = new uint[] { Avatar1, Avatar2, Avatar3, Avatar4 };
var response = new SyncLineupNotify
{
Lineup = new LineupInfo
{
ExtraLineupType = ExtraLineupType.LineupNone,
Name = "Squad 1",
Mp = 5,
MaxMp = 5,
LeaderSlot = 0
}
};
foreach (uint id in characters)
{
if (id == 0) continue;
response.Lineup.AvatarLists.Add(new LineupAvatar
{
AvatarType = AvatarType.AvatarFormalType,
Sp = new AmountInfo { CurAmount = 10000, MaxAmount = 10000 },
Hp = 10000,
Satiety = 100,
Id = id,
Slot = (uint)response.Lineup.AvatarLists.Count
});
}
session.Send(CmdType.CmdSyncLineupNotify, response);
}
} }
} }

View file

@ -12,108 +12,19 @@
var request = data as GetMissionStatusCsReq; var request = data as GetMissionStatusCsReq;
GetMissionStatusScRsp response = new GetMissionStatusScRsp GetMissionStatusScRsp response = new GetMissionStatusScRsp
{ {
Retcode = 0, Retcode = (uint)RetcodeStatus.RetSucc,
}; };
response.FinishedMainMissionIdLists = new uint[] { response.FinishedMainMissionIdLists = new uint[] {
1000101, 1000111, 1000112, 1000113, 1000114, 1000201, 1000202, 1000203, 1000204, 1000300, 1000301, 1000302, 1000303, 1000101,1000112,1000113,1000201,1000202,1000204,1000301,1000401,1000402,1000410,1000510,1000601,1010301,
1000304, 1000400, 1000401, 1000402, 1000410, 1000500, 1000501, 1000502, 1000503, 1000504, 1000505, 1000510, 1000511, 1010302,1010401,1010403,1010701,1011403,1010202,1010902,1011102,4010101 };
1010001, 1010002, 1010101, 1010201, 1010202, 1010203, 1010204, 1010205, 1010206, 1010301, 1010302, 1010303, 1010401,
1010405, 1010402, 1010403, 1010500, 1010501, 1010502, 1010503, 1010601, 1010602, 1010700, 1010701, 1010801, 1010802,
1010901, 1010902, 1011001, 1011002, 1011003, 1011100, 1011101, 1011102, 1011103, 1011201, 1011202, 1011301, 1011400,
1011401, 1011402, 1011403, 1011501, 1011502, 1011503, 1020101, 1020201, 1020302, 1020301, 1020400, 1020401, 1020402,
1020403, 1020501, 1020601, 1020701, 1020702, 1020801, 1020901, 1021001, 1021101, 1021201, 1021301, 1021401, 1021501,
1021601, 1021702, 1021703, 1030101, 1030102, 1030201, 1030202, 1030301, 1030302, 1030303, 1030304, 1030401, 1030402,
1030403, 1030501, 1030601, 1030701, 1030702, 1030801, 2000001, 2000002, 2000003, 2000004, 2000100, 2000101, 2000131,
2000132, 2000133, 2000110, 2000111, 2000301, 2000103, 2000112, 2000108, 2000104, 2000102, 2000105, 2000106, 2000107,
2000313, 2000314, 2000109, 2000113, 2000116, 2000118, 2000119, 2000120, 2000122, 2000302, 2000303, 2000304, 2000305,
2000310, 2000311, 2000312, 2000320, 2000701, 2000702, 2000703, 2000704, 2000705, 2000706, 2000707, 2000801, 2000802,
2000803, 2000901, 2000902, 2000903, 2001001, 2001002, 2001003, 2010005, 2010301, 2010302, 2011103, 2011104, 2011409,
2010401, 2010402, 2010405, 2010502, 2010503, 2010701, 2010708, 2010709, 2010720, 2010730, 2010731, 2010732, 2010733,
2010734, 2010735, 2010904, 2011101, 2011102, 2011105, 2011301, 2011302, 2011303, 2011501, 2011502, 2010909, 2010910,
2011601, 2011701, 2011801, 2011901, 2011902, 2011903, 2011904, 2011905, 2011906, 2020301, 2020302, 2020304, 2020316,
2020317, 2020318, 2020319, 2020401, 2020402, 2020403, 2020404, 2020405, 2020406, 2020407, 2020303, 2020103, 2020104,
2020105, 2020106, 2020107, 2020108, 2020109, 2020110, 2020111, 2020201, 2020202, 2020203, 2020204, 2020205, 2000201,
2000202, 2000203, 2000204, 2000205, 2000206, 2000207, 2000208, 2000209, 2000211, 2000212, 2010201, 2010202, 2010203,
2010204, 2010205, 2010206, 2010500, 2010501, 2010705, 2010706, 2010901, 2010902, 2010903, 2010702, 2010703, 2011400,
2011401, 2011406, 2011402, 2011403, 2011404, 2011405, 2011407, 2011408, 2011410, 2011411, 2011412, 2011413, 2010905,
2010906, 2010907, 2010908, 2010911, 2010912, 2020305, 2020306, 2020309, 2020307, 2020308, 2020701, 2020702, 2020703,
2020313, 2020314, 2020315, 6020101, 6020201, 6020202, 2020501, 2020502, 2020503, 2020504, 2020505, 2020506, 2020507,
2020601, 2020602, 2020603, 2020604, 2020801, 2020802, 2020901, 2021001, 2021002, 2021009, 2021601, 2021602, 2021701,
2021702, 2021703, 2021704, 2021705, 2021801, 2021802, 2021803, 2030001, 2030002, 2030003, 2030101, 2030102, 2030201,
2030202, 2030203, 2030301, 2030302, 3000201, 3000202, 3000203, 3000211, 3000212, 3000213, 3000301, 3000302, 3000303,
3000522, 3000523, 3000524, 3000525, 3000526, 3000527, 3000601, 3000602, 3000603, 3000604, 3000701, 3000702, 3000703,
3000704, 3000705, 3000800, 3000801, 3000802, 3000803, 3010102, 3010103, 3010104, 3010105, 3010201, 3010202, 3010203,
3010204, 3010205, 3011011, 3011012, 3011013, 3011014, 3011111, 3011112, 3011113, 3011114, 3011201, 3011202, 3011203,
3011204, 3011205, 3011206, 3011207, 3011208, 3011401, 3011402, 3011403, 3011404, 3011405, 3011406, 3011407, 3011408,
3011501, 3011502, 3011503, 3011504, 3011505, 3011601, 3011602, 3011603, 3011604, 3011605, 3011606, 3011607, 3011608,
3011609, 3011610, 3012001, 3020101, 3020102, 3020103, 3020104, 3020105, 3020106, 3020107, 3020108, 3020201, 3020202,
3020203, 3020204, 3020205, 3020206, 4020101, 4020102, 4020103, 4020104, 4020105, 4020106, 4020107, 4020108, 4020109,
4020110, 4020111, 4020112, 4020113, 4020114, 4010105, 4010106, 4010107, 4010112, 4010113, 4010131, 4010115, 4010116,
4010121, 4010122, 4010123, 4010124, 4010125, 4010126, 4010127, 4010128, 4010133, 4010134, 4010135, 4010130, 4010136,
4010137, 4010138, 4010140, 4010141, 4015101, 4015103, 4015102, 4015202, 4015203, 4015204, 4015301, 4015302, 4015303,
4015401, 4015402, 4015403, 4015501, 4015601, 4015701, 4030001, 4030002, 4030003, 4030004, 4030006, 4030007, 4030009,
4030010, 4040001, 4040002, 4040003, 4040004, 4040005, 4040006, 4040052, 4040007, 4040008, 4040051, 4040009, 4040010,
4040011, 4040012, 4040053, 4040014, 4040015, 4040017, 4040018, 4040019, 4040020, 4040021, 4040022, 4040023, 4040024,
4040100, 4040189, 4040190, 4040101, 4040151, 4040154, 4040102, 4040103, 4040153, 4040104, 4040152, 4040105, 4040106,
4040155, 4040107, 4040108, 4040109, 4040156, 4040157, 4040110, 4040114, 4040115, 4040158, 4040159, 4040160, 4040161,
4040162, 4040116, 4040169, 4040163, 4040164, 4040165, 4040166, 4040167, 4040168, 4040170, 4040171, 4040172, 4040173,
4040174, 4040175, 4040176, 4040177, 4040178, 4040179, 4040180, 4040181, 4040182, 4040183, 4040184, 4040185, 4040186,
4040117, 4040118, 4040119, 4040187, 4040120, 4040188, 4040121, 4040122, 4040123, 4040124, 4040125, 4040126, 4040127,
4040128, 4040129, 4040130, 4140101, 4140102, 4140103, 4140104, 4140105, 4140106, 4140107, 4140108, 4140109, 4140110,
4140111, 4140112, 4140113, 4140114, 4140115, 4140116, 4140117, 4140118, 4140119, 4140120, 4140121, 4140122, 4140123,
4040201, 4040202, 4040203, 4040204, 4040205, 4040206, 4040207, 4040208, 4040290, 4040209, 4040210, 4040211, 4040212,
4040213, 4040214, 4040215, 4040216, 4040217, 4040218, 4040219, 4040220, 4040221, 4040222, 4040223, 4040224, 4040225,
4040226, 4040227, 4040228, 4040229, 4040230, 4040231, 4040240, 4040241, 4040242, 4040244, 4040245, 4040246, 4040247,
4040248, 4040249, 4040250, 4040251, 4040252, 4040253, 4040254, 4040255, 4040256, 4040257, 4040258, 4040259, 4040260,
4040261, 4040262, 4040263, 4040264, 4240301, 4240302, 4240304, 4240305, 4240306, 4240307, 4240308, 4240309, 4240310,
4240311, 4240312, 4240313, 4240314, 4240316, 4240317, 4240401, 4240402, 4340101, 4340102, 4340103, 4340104, 4340105,
4340106, 4340107, 4340108, 4340150, 4340151, 4340152, 4340153, 4340154, 4340155, 4340156, 4340157, 4540101, 4540102,
4540103, 4540104, 4540105, 4540106, 4540107, 4540111, 4540112, 4540113, 4540114, 4540201, 4540202, 4540203, 4540204,
4540205, 4540206, 4540211, 4540212, 4540213, 4540214, 4540301, 4540302, 4540303, 4540304, 4540305, 4540306, 4540307,
4540311, 4540312, 4540313, 4540314, 4540315, 4540401, 4540402, 4540403, 4540404, 4540405, 4540406, 4540407, 4540408,
4540411, 4540412, 4540413, 4540414, 4040300, 4040301, 4040302, 4040303, 4040304, 4040305, 4040306, 4040307, 4040308,
4040309, 4040310, 4040311, 4040312, 4040313, 4040314, 4040315, 4040316, 4040317, 4040318, 4040319, 4040320, 4040321,
4040322, 4040323, 4040324, 4040325, 4040326, 4040327, 4040328, 4040329, 4040330, 4040331, 4040341, 4050005, 4050007,
4050008, 4050009, 4050010, 4050011, 4050012, 4050013, 4050014, 4050015, 4050016, 4050017, 4050018, 4050019, 4050020,
4050021, 4050022, 4050023, 4050024, 4050025, 4050026, 4050027, 4050028, 4050029, 4050030, 4050031, 4050032, 4050033,
4050034, 4050035, 4050036, 4050037, 4050038, 4050039, 4072121, 4072122, 4072123, 4071311, 4071312, 4071313, 4071320,
4071321, 4071322, 4122101, 4122102, 4122103, 4072011, 4072012, 4072013, 4072021, 4072022, 4072023, 4072024, 4070011,
4070012, 4070013, 4081311, 4081312, 4081313, 4081314, 4081315, 4081316, 4081317, 4081318, 8000001, 8000002, 8000101,
8000102, 8000104, 8000105, 8000131, 8000132, 8000133, 8000134, 8000135, 8000136, 8000137, 8000138, 8000139, 8000151,
8000152, 8000153, 8000154, 8000155, 8000156, 8000157, 8000158, 8000159, 8000161, 8000162, 8000170, 8000171, 8000172,
8000173, 8000174, 8000175, 8000177, 8000178, 8000180, 8000181, 8000183, 8000182, 8000185, 8000184, 8000186, 8000187,
8000188, 8000189, 8000201, 8000202, 8000203, 8000204, 8001201, 8001202, 8001203, 8001205, 8001206, 8001207, 8001208,
8001209, 8001211, 8001212, 8001213, 8001215, 8001216, 8001219, 8001220, 8001223, 8001224, 8001225, 8001226, 8001227,
8001204, 8001210, 8001214, 8001217, 8001218, 8001221, 8001222, 8001241, 8001242, 8001243, 8001244, 8001251, 8001252,
8001253, 8001254, 8001255, 8001261, 8001262, 8001263, 8001264, 8001265, 8001266, 8001267, 8001268, 8011401, 8002100,
8002101, 8002102, 8002106, 8002103, 8002104, 8002105, 8002107, 8002201, 8002202, 8002211, 8002212, 8002213, 8002214,
8002221, 8002222, 8002231, 8002232, 8002233, 8002234, 8003101, 8003102, 8003201, 8003202, 8003213, 8003214, 8003204,
8003220, 8003217, 8003203, 8003215, 8003205, 8003206, 8003207, 8003221, 8003218, 8003208, 8003216, 8003209, 8003210,
8003222, 8003219, 8003211, 8003212, 8003240, 8003241, 8003242, 8003243, 8003244, 8003245, 8003246, 8003247, 8003248,
8003249, 8003250, 8003251, 8003260, 8003261, 8003262, 8003263, 8003264, 8003265, 8003266, 8003267, 8003268, 8003269,
8003278, 8003279, 8003280, 8003281, 8003282, 8003283, 8003284, 8012101, 8012102, 8012103, 8012104, 8012105, 8012106,
8012107, 8012401, 8013101, 8013102, 8013103, 8013104, 8013105, 8013106, 8013107, 8013108, 8013109, 8013110, 8014101,
8014102, 8014103, 8014104, 8014105, 8014106, 8014108, 8014112, 8014121, 8014122, 8014123, 8014124, 8014125, 8014126,
8014127, 8014128, 8014129, 8014130, 8014131, 8014132, 8014133, 8014134, 8014135, 8014136, 8014137, 8014138, 8014139,
8014140, 8014141, 8014142, 8014143, 8014144, 8014145, 8014146, 8014147, 8014148, 8014149, 8014150, 8014161, 8014162,
8014163, 8014164, 8014165, 8014166, 8014167, 8014168, 8015191, 8015101, 8015111, 8015192, 8015102, 8015112, 8015193,
8015103, 8015113, 8015123, 8015194, 8015104, 8015114, 8015195, 8015196, 8015197, 8015198, 8015150, 8015151, 8015152,
8015153, 8015154, 8015155, 8015156, 8015157, 8015158, 8015159, 8015161, 8015162, 8015163, 8015164, 8015165, 8015171,
8015172, 8015173, 8015180, 8015201, 8015202, 8015203, 8016101, 8016102, 8016103, 8016104, 8016105, 8016106, 8016201,
8016202, 8016203, 8016204, 8016205, 8016206, 8016207, 8016208, 8016209, 8016210, 8016211, 8016212, 8016213, 8016301,
8016302, 8016303, 8016304, 8016305, 8017101, 8017102, 8020101, 8020102, 8020103, 8020104, 8020105, 8020106, 8020107,
8020108, 8020201, 8020202, 8020203, 8020204, 8020205, 8020206, 8020207, 8020208, 8020209, 8020210, 8020211, 8020212,
8020213, 8020214, 8020215, 8020216, 8020217, 8020218, 8020219, 8020220, 8020221, 8020222, 8020223, 8020224, 8020225,
8020226, 8020227, 8020228, 8020229, 8020230, 8020231, 8020232, 8020233, 8020234, 8020235, 8020236, 8020300, 8020301,
8020302, 8020303, 8020304, 8020305 };
if (request.SubMissionIdLists != null) if (request.SubMissionIdLists != null)
{ {
foreach (uint id in request.SubMissionIdLists) foreach (uint id in request.SubMissionIdLists)
{ {
response.SubMissionStatusLists.Add(new Mission() response.MissionEventStatusLists.Add(new Mission()
{ {
Id = id, Id = id,
Progress = 0, Progress = 0,
@ -126,7 +37,7 @@
{ {
foreach (uint id in request.MainMissionIdLists) foreach (uint id in request.MainMissionIdLists)
{ {
response.MissionEventStatusLists.Add(new Mission() response.SubMissionStatusLists.Add(new Mission()
{ {
Id = id, Id = id,
Progress = 0, Progress = 0,

View file

@ -12,31 +12,31 @@
public static void OnGetNpcTakenRewardCsReq(NetSession session, int cmdId, object data) public static void OnGetNpcTakenRewardCsReq(NetSession session, int cmdId, object data)
{ {
var npcRewardReq = data as GetNpcTakenRewardCsReq; var npcRewardReq = data as Eddbhmdjadb;
session.Send(CmdType.CmdGetNpcTakenRewardScRsp, new GetNpcTakenRewardScRsp session.Send(CmdType.CmdGetNpcTakenRewardScRsp, new Nikhfbniagb
{ {
NpcId = npcRewardReq.NpcId, NpcId = npcRewardReq.Okonlennkfb,
Retcode = 0 Retcode = (uint)RetcodeStatus.RetSucc
}); });
} }
[Handler(CmdType.CmdGetFirstTalkByPerformanceNpcCsReq)] [Handler(CmdType.CmdGetFirstTalkByPerformanceNpcCsReq)]
public static void OnGetFirstTalkByPerformanceNpcCsReq(NetSession session, int cmdId, object data) public static void OnGetFirstTalkByPerformanceNpcCsReq(NetSession session, int cmdId, object data)
{ {
var npcPerformanceReq = data as GetFirstTalkByPerformanceNpcCsReq; var npcPerformanceReq = data as Jknjlicadhe;
var response = new GetFirstTalkByPerformanceNpcScRsp var response = new Kpbeklbbihd
{ {
Retcode = 0 Retcode = (uint)RetcodeStatus.RetSucc
}; };
foreach(uint id in npcPerformanceReq.FirstTalkIdLists) foreach(uint id in npcPerformanceReq.Ffgeablhjmms)
{ {
response.NpcMeetStatusLists.Add(new NpcMeetStatusInfo response.Hhldcbegobcs.Add(new NpcMeetStatusInfo
{ {
IsMeet = true, Jgndlkbohij = true,
MeetId = id Okonlennkfb = id
}); });
} }

View file

@ -22,14 +22,9 @@
session.Send(CmdType.CmdPlayerHeartBeatScRsp, new PlayerHeartBeatScRsp session.Send(CmdType.CmdPlayerHeartBeatScRsp, new PlayerHeartBeatScRsp
{ {
Retcode = 0, Retcode = (uint)RetcodeStatus.RetSucc,
DownloadData = new ClientDownloadData DownloadData = new ClientDownloadData(),
{
Version = 51,
Time = DateTimeOffset.Now.ToUnixTimeMilliseconds(),
Data = Convert.FromBase64String("G0x1YVMBGZMNChoKBAQICHhWAAAAAAAAAAAAAAAod0ABD0BGcmVlU1JMdWEudHh0AAAAAAAAAAAAAQccAAAAJABAAClAQAApgEAAKcBAAFYAAQAsgAABXUBBAOSAQQAkAUAAKcFBAikBQgIpQUIC7AAAAWyAAACWgAIA6cDCAMEAwwEWAQMAqoABgKlBgQCpQUMDqYFDAxLAQwMRQACAqUGBAJ9BRIiewP1/GQCAABIAAAAEA0NTBAxVbml0eUVuZ2luZQQLR2FtZU9iamVjdAQFRmluZAQpVUlSb290L0Fib3ZlRGlhbG9nL0JldGFIaW50RGlhbG9nKENsb25lKQQYR2V0Q29tcG9uZW50c0luQ2hpbGRyZW4EB3R5cGVvZgQEUlBHBAdDbGllbnQEDkxvY2FsaXplZFRleHQTAAAAAAAAAAAEB0xlbmd0aBMBAAAAAAAAAAQLZ2FtZU9iamVjdAQFbmFtZQQJSGludFRleHQEBXRleHQUYTxiPkZyZWVTUiBpcyBhIGZyZWUgc29mdHdhcmUuRnJlZVNS5piv5LiA5Liq5YWN6LS56L2v5Lu244CCIGh0dHBzOi8vZGlzY29yZC5nZy9yZXZlcnNlZHJvb21zPC9iPgEAAAABAAAAAAAcAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAEAAAABAAAAAQAAAAEAAAABAAAAAUAAAAFAAAABQAAAAUAAAAFAAAABgAAAAYAAAAEAAAACQAAAAYAAAAEb2JqBgAAABwAAAAHY29tcHRzDgAAABwAAAAMKGZvciBpbmRleCkSAAAAGwAAAAwoZm9yIGxpbWl0KRIAAAAbAAAACyhmb3Igc3RlcCkSAAAAGwAAAAJpEwAAABoAAAABAAAABV9FTlY=")
},
ClientTimeMs = heartbeatReq.ClientTimeMs, ClientTimeMs = heartbeatReq.ClientTimeMs,
ServerTimeMs = (ulong)DateTimeOffset.Now.ToUnixTimeMilliseconds() ServerTimeMs = (ulong)DateTimeOffset.Now.ToUnixTimeMilliseconds()
}); });
@ -40,17 +35,19 @@
{ {
session.Send(CmdType.CmdGetHeroBasicTypeInfoScRsp, new GetHeroBasicTypeInfoScRsp session.Send(CmdType.CmdGetHeroBasicTypeInfoScRsp, new GetHeroBasicTypeInfoScRsp
{ {
Retcode = 0, Retcode = (uint)RetcodeStatus.RetSucc,
Gender = Gender.GenderMan, Gender = Gender.GenderMan,
BasicTypeInfoLists ={ Cdkjkpnjjjas ={
new PlayerHeroBasicTypeInfo new Hlbbodklpbo
{ {
BasicType = HeroBasicType.BoyWarrior, Peihhlcchfj = HeroBasicType.BoyWarrior,
Rank = 1, Rank = 1,
Knhaecbafbas = {} Chmeifanmags = {}
} }
}, },
CurBasicType = HeroBasicType.BoyWarrior, CurBasicType = HeroBasicType.BoyWarrior,
Bhepmbpaojp = false,
Cnlbajkmnbn = false
}); });
} }
@ -74,10 +71,10 @@
session.Send(CmdType.CmdPlayerLoginScRsp, new PlayerLoginScRsp session.Send(CmdType.CmdPlayerLoginScRsp, new PlayerLoginScRsp
{ {
Retcode = 0, Retcode = (uint)RetcodeStatus.RetSucc,
//IsNewPlayer = false, //IsNewPlayer = false,
LoginRandom = request.LoginRandom, LoginRandom = request.LoginRandom,
Stamina = 240, Stamina = 100,
ServerTimestampMs = (ulong)DateTimeOffset.Now.ToUnixTimeSeconds() * 1000, ServerTimestampMs = (ulong)DateTimeOffset.Now.ToUnixTimeSeconds() * 1000,
BasicInfo = new PlayerBasicInfo BasicInfo = new PlayerBasicInfo
{ {
@ -98,12 +95,30 @@
{ {
session.Send(CmdType.CmdPlayerGetTokenScRsp, new PlayerGetTokenScRsp session.Send(CmdType.CmdPlayerGetTokenScRsp, new PlayerGetTokenScRsp
{ {
Retcode = 0, Retcode = (uint)RetcodeStatus.RetSucc,
Uid = 1337, Uid = 1337,
//BlackInfo = null, //BlackInfo = null,
Msg = "OK", Msg = "OK",
SecretKeySeed = 0 SecretKeySeed = 0
}); });
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
{
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

@ -3,7 +3,6 @@
using FreeSR.Gateserver.Manager.Handlers.Core; using FreeSR.Gateserver.Manager.Handlers.Core;
using FreeSR.Gateserver.Network; using FreeSR.Gateserver.Network;
using FreeSR.Proto; using FreeSR.Proto;
using System.Numerics;
internal static class SceneReqGroup internal static class SceneReqGroup
@ -16,12 +15,12 @@
GameModeType = 1, GameModeType = 1,
//Bkmbkahohif = 1, //Bkmbkahohif = 1,
//Admbbnbnibk = 1, //Admbbnbnibk = 1,
EntryId = 2032101, EntryId = 1030101,
PlaneId = 20321, PlaneId = 10301,
FloorId = 20321001, FloorId = 10301001,
}; };
/*scene.EntityLists.Add(new SceneEntityInfo scene.EntityLists.Add(new SceneEntityInfo
{ {
EntityId = 0, EntityId = 0,
GroupId = 0, GroupId = 0,
@ -31,52 +30,13 @@
Pos = new Vector(), Pos = new Vector(),
Rot = new Vector() Rot = new Vector()
} }
});*/ });
session.Send(CmdType.CmdGetCurSceneInfoScRsp, new GetCurSceneInfoScRsp session.Send(CmdType.CmdGetCurSceneInfoScRsp, new GetCurSceneInfoScRsp
{ {
Scene = scene, Scene = scene,
Retcode = 0 Retcode = (uint)RetcodeStatus.RetSucc
}); });
} }
[Handler(CmdType.CmdGetSceneMapInfoCsReq)]
public static void OnGetSceneMapInfoCsReq(NetSession session, int cmdId, object data)
{
var request = data as GetSceneMapInfoCsReq;
uint[] back = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 0 };
var mapinfo = new SceneMapInfo
{
Retcode = 0,
LightenSectionLists = back,
ChestLists = {
new ChestInfo
{
ChestType = ChestType.MapInfoChestTypeNormal
},
new ChestInfo
{
ChestType = ChestType.MapInfoChestTypePuzzle
},
new ChestInfo
{
ChestType = ChestType.MapInfoChestTypeChallenge
}
},
};
var response = new GetSceneMapInfoScRsp
{
Retcode = 0,
EntryId = request.EntryIdLists[0],
CurMapEntryId = request.EntryId,
SceneMapInfoes = { mapinfo },
LightenSectionLists = back,
};
session.Send(CmdType.CmdGetSceneMapInfoScRsp, response);
}
} }
} }

View file

@ -14,7 +14,7 @@
{ {
var response = new GetTutorialGuideScRsp var response = new GetTutorialGuideScRsp
{ {
Retcode = 0 Retcode = (uint)RetcodeStatus.RetSucc
}; };
uint[] guides = new uint[] uint[] guides = new uint[]
@ -50,7 +50,7 @@
var response = new GetTutorialScRsp var response = new GetTutorialScRsp
{ {
Retcode = 0, Retcode = (uint)RetcodeStatus.RetSucc,
}; };
foreach (uint id in completedTutorials) foreach (uint id in completedTutorials)

View file

@ -25,28 +25,18 @@
//{CmdType.CmdGetQuestDataCsReq, typeof(GetQuestDataCsReq)}, //{CmdType.CmdGetQuestDataCsReq, typeof(GetQuestDataCsReq)},
//{CmdType.CmdGetChallengeCsReq, typeof(GetChallengeCsReq)}, //{CmdType.CmdGetChallengeCsReq, typeof(GetChallengeCsReq)},
{CmdType.CmdGetCurSceneInfoCsReq, typeof(GetCurSceneInfoCsReq)}, {CmdType.CmdGetCurSceneInfoCsReq, typeof(GetCurSceneInfoCsReq)},
{CmdType.CmdGetSceneMapInfoCsReq, typeof(GetSceneMapInfoCsReq)},
{CmdType.CmdGetBasicInfoCsReq, typeof(GetBasicInfoCsReq)}, {CmdType.CmdGetBasicInfoCsReq, typeof(GetBasicInfoCsReq)},
{CmdType.CmdGetHeroBasicTypeInfoCsReq, typeof(GetHeroBasicTypeInfoCsReq)}, {CmdType.CmdGetHeroBasicTypeInfoCsReq, typeof(Hlbbodklpbo)},
{CmdType.CmdPlayerHeartBeatCsReq, typeof(PlayerHeartBeatCsReq)}, {CmdType.CmdPlayerHeartBeatCsReq, typeof(PlayerHeartBeatCsReq)},
//{CmdType.CmdGetGachaInfoCsReq, typeof(GetGachaInfoCsReq)}, //{CmdType.CmdGetGachaInfoCsReq, typeof(GetGachaInfoCsReq)},
//{CmdType.CmdDoGachaCsReq, typeof(DoGachaCsReq)}, //{CmdType.CmdDoGachaCsReq, typeof(DoGachaCsReq)},
{CmdType.CmdGetNpcTakenRewardCsReq, typeof(GetNpcTakenRewardCsReq)}, {CmdType.CmdGetNpcTakenRewardCsReq, typeof(Eddbhmdjadb)},
{CmdType.CmdGetFirstTalkByPerformanceNpcCsReq, typeof(GetFirstTalkByPerformanceNpcCsReq)}, {CmdType.CmdGetFirstTalkByPerformanceNpcCsReq, typeof(Jknjlicadhe)},
{CmdType.CmdSceneEntityMoveCsReq, typeof(SceneEntityMoveCsReq)}, //{CmdType.CmdGetBagCsReq, typeof(GetBagCsReq)}
{CmdType.CmdReplaceLineupCsReq, typeof(ReplaceLineupCsReq)},
{CmdType.CmdJoinLineupCsReq, typeof(JoinLineupCsReq)},
{CmdType.CmdQuitLineupCsReq, typeof(QuitLineupCsReq)},
{CmdType.CmdSwapLineupCsReq, typeof(SwapLineupCsReq)},
{CmdType.CmdSetLineupNameCsReq, typeof(SetLineupNameCsReq)},
{CmdType.CmdStartCocoonStageCsReq, typeof(StartCocoonStageCsReq)},
{CmdType.CmdPVEBattleResultCsReq, typeof(PVEBattleResultCsReq)}
}); });
s_types = builder.ToImmutable(); s_types = builder.ToImmutable();

View file

@ -28,5 +28,20 @@
await _channel.WriteAndFlushAsync(packet); 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);
}
} }
} }

View file

@ -33,7 +33,6 @@
NotifyManager.AddReqGroupHandler(typeof(SceneReqGroup)); NotifyManager.AddReqGroupHandler(typeof(SceneReqGroup));
NotifyManager.AddReqGroupHandler(typeof(GachaReqGroup)); NotifyManager.AddReqGroupHandler(typeof(GachaReqGroup));
NotifyManager.AddReqGroupHandler(typeof(NPCReqGroup)); NotifyManager.AddReqGroupHandler(typeof(NPCReqGroup));
NotifyManager.AddReqGroupHandler(typeof(BattleReqGroup));
NotifyManager.Init(); NotifyManager.Init();
} }

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,6 @@
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable> <Nullable>disable</Nullable>
<RollForward>Major</RollForward>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,6 @@
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable> <Nullable>disable</Nullable>
<RollForward>Major</RollForward>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -5,7 +5,6 @@
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable> <Nullable>disable</Nullable>
<RollForward>Major</RollForward>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -1,14 +1,14 @@
# FreeSR - Server Software Reimplementation for a Certain Turn-Based Anime Game # FreeSR - Server Software Reimplementation for a Certain Turn-Based Anime Game
**FreeSR** is an open-source server software reimplementation for a certain turn-based anime game, specifically version 2.0.5 developed by xeondev. This project aims to provide a platform for running private servers, enabling players to enjoy the game in a controlled environment with modified or additional features. The open-source version of FreeSR missing some and has empty classes, inviting contributors to actively participate by raising issues or submitting pull requests. **FreeSR** is an open-source server software reimplementation for a certain turn-based anime game, specifically version 1.6.5 developed by xeondev. This project aims to provide a platform for running private servers, enabling players to enjoy the game in a controlled environment with modified or additional features. The open-source version of FreeSR missing some and has empty classes, inviting contributors to actively participate by raising issues or submitting pull requests.
## Introduction ## Introduction
The "FreeSR" project is an initiative to recreate the server-side functionality of a certain turn-based anime game, version 2.0.5, which was originally developed by xeondev. The "FreeSR" project is an initiative to recreate the server-side functionality of a certain turn-based anime game, version 1.6.5, which was originally developed by xeondev.
## Features ## Features
- Server software reimplementation for a certain turn-based anime game (version 2.0.5) - Server software reimplementation for a certain turn-based anime game (version 1.6.5)
- Open-source with permissive licensing - Open-source with permissive licensing
- Extensible architecture allowing for custom modifications and additional features - Extensible architecture allowing for custom modifications and additional features
- Regular updates and maintenance to address issues and improve functionality - Regular updates and maintenance to address issues and improve functionality