Compare commits

...

10 Commits

Author SHA1 Message Date
amizing25
96ec724693 update for version 3.1.5x 2025-03-04 09:48:38 +07:00
xeon
44b9bf8580 Merge pull request 'Auto .NET version Roll-Forward for skill issue people' (#1) from YYHEggEgg/FreeSR:main into main
Reviewed-on: https://git.xeondev.com/Moux23333/FreeSR/pulls/1
2024-03-25 16:06:30 +00:00
Soldier 11
a8bdaa63a5 Auto .NET version Roll-Forward 2024-02-26 19:44:46 +08:00
moux23333
ec84048099 Update README.md 2024-02-21 15:04:17 +08:00
moux23333
205cc9e120 support 2.0.5 2024-02-21 14:41:22 +08:00
moux23333
d2d6517007 update mission 2024-01-31 12:31:26 +08:00
moux23333
d38e3f0af4 support battle 2024-01-31 12:30:49 +08:00
moux23333
855fc2c9bb all avatars and team character changing 2024-01-31 12:30:01 +08:00
moux23333
a8c597104e remove unused code 2024-01-28 12:28:25 +08:00
moux23333
355cf9a836 Update README.md 2024-01-28 12:20:27 +08:00
31 changed files with 59468 additions and 26370 deletions

View File

@@ -5,6 +5,7 @@
<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((int)RetcodeStatus.RetSucc) .Retcode(0)
.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((int)RetcodeStatus.RetSucc) .Retcode(0)
.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((int)RetcodeStatus.RetSucc) .Retcode(0)
.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((int)RetcodeStatus.RetSucc) .Retcode(0)
.Message("OK") .Message("OK")
.Object("data", new JObject .Object("data", new JObject
{ {

View File

@@ -23,11 +23,11 @@
context.Response.StatusCode = HttpStatusCode.OK; context.Response.StatusCode = HttpStatusCode.OK;
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 DispatchRegionData()
{ {
Retcode = (uint)RetcodeStatus.RetSucc, Retcode = 0,
TopServerRegionName = RegionManager.GetTopServerRegionName(), TopSeverRegionName = RegionManager.GetTopServerRegionName(),
RegionInfoLists = { RegionManager.GetRegionList() } RegionLists = { RegionManager.GetRegionList() }
}))); })));
return true; return true;

View File

@@ -14,21 +14,22 @@
await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new Gateserver await context.Response.WriteAllAsync(Convert.ToBase64String(ProtobufUtil.Serialize(new Gateserver
{ {
Retcode = 0, Retcode = 0,
Msg0 = "OK", Msg = "OK",
Ip = "127.0.0.1", Ip = "127.0.0.1",
RegionName = "FreeSR", RegionName = "FreeSR",
Port = 22301, Port = 22301,
B1 = true, UseTcp = true,
B2 = true, EnableWatermark = true,
B3 = true, EnableCdnIpv6 = 1,
B4 = true, EnableVersionUpdate = true,
B5 = true, EnableAndroidMiddlePackage = true,
B6 = true, EnableDesignDataVersionUpdate = true,
B7 = true, EnableUploadBattleLog = true,
Gfemaboifee = true, EnableSaveReplayFile = true,
//MdkResVersion = "5335706", AssetBundleUrl = "",
AssetBundleUrl = "https://autopatchcn.bhsr.com/asb/BetaLive/output_6355877_591cdefefe9b", ExResourceUrl = "",
ExResourceUrl = "https://autopatchcn.bhsr.com/design_data/BetaLive/output_6367879_26191d7cc23b", IfixVersion = "",
LuaUrl = "",
}))); })));
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((int)RetcodeStatus.RetSucc) .Retcode(0)
.Message("OK") .Message("OK")
.Object("data", CaptchaData) .Object("data", CaptchaData)
.Build()); .Build());

View File

@@ -1,32 +0,0 @@
namespace FreeSR.Dispatch.Handlers.Sdk
{
using Ceen;
using FreeSR.Database;
using FreeSR.Database.Account;
internal class CreateAccountHandler : IHttpModule
{
public async Task<bool> HandleAsync(IHttpContext context)
{
var query = context.Request.QueryString;
var name = query["user"];
var password = query["pass"];
var database = DatabaseManager.Instance.Get<AccountDatabase>();
var account = await database.Create(name, password);
context.Response.StatusCode = HttpStatusCode.OK;
if (account == null)
{
await context.Response.WriteAllAsync("Sorry, this username is already taken.", "text/plain");
}
else
{
await context.Response.WriteAllAsync($"Successfully created account with name {account.Name}, uid: {account.Uid}", "text/plain");
}
return true;
}
}
}

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((int)RetcodeStatus.RetSucc) .Retcode(0)
.Message("OK") .Message("OK")
.Object("data", new JObject .Object("data", new JObject
{ {

View File

@@ -12,9 +12,9 @@
s_configuration = configuration; s_configuration = configuration;
} }
public static RegionInfo GetRegionList() public static RegionEntry GetRegionList()
{ {
var region = new RegionInfo var region = new RegionEntry
{ {
EnvType = s_configuration.EnvType, EnvType = s_configuration.EnvType,
DispatchUrl = s_configuration.DispatchUrl, DispatchUrl = s_configuration.DispatchUrl,

View File

@@ -5,6 +5,7 @@
<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,11 +13,15 @@
var response = new GetAvatarDataScRsp var response = new GetAvatarDataScRsp
{ {
Retcode = (uint)RetcodeStatus.RetSucc, Retcode = 0,
IsAll = request.IsGetAll IsGetAll = request.IsGetAll
}; };
uint[] characters = new uint[] { 8001, 1307, 1306, 1312 }; uint[] characters = new uint[] { 8001,8002,8003,8004,
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)
{ {
@@ -25,8 +29,8 @@
{ {
BaseAvatarId = id, BaseAvatarId = id,
Exp = 0, Exp = 0,
Level = 1, Level = 80,
Promotion = 0, Promotion = 6,
Rank = 6, Rank = 6,
EquipmentUniqueId = 0 EquipmentUniqueId = 0
}; };

View File

@@ -0,0 +1,239 @@
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,
SpBar = new SpBarInfo {CurSp = 10000, MaxSp = 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,
SpBar = new SpBarInfo { CurSp = 10000, MaxSp = 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
{
WaveId = i,
WaveParam = new SceneMonsterWaveParam
{
Level = monsterLevels[i],
}
};
if (monsterIds.ContainsKey(i))
{
List<uint> monsterIdList = monsterIds[i];
foreach (uint monsterId in monsterIdList)
{
monsterInfo.MonsterLists.Add(new SceneMonster
{
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,12 +6,16 @@
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 = (uint)RetcodeStatus.RetSucc Retcode = 0
}; };
response.Lineup = new LineupInfo response.Lineup = new LineupInfo
@@ -23,7 +27,7 @@
MaxMp = 5 MaxMp = 5
}; };
var characters = new uint[] { 8001, 1307, 1306, 1312 }; var characters = new uint[] { Avatar1, Avatar2, Avatar3, Avatar4 };
foreach (uint id in characters) foreach (uint id in characters)
{ {
@@ -31,7 +35,7 @@
{ {
AvatarType = AvatarType.AvatarFormalType, AvatarType = AvatarType.AvatarFormalType,
Hp = 10000, Hp = 10000,
Sp = new AmountInfo { CurAmount = 10000,MaxAmount = 10000}, SpBar = new SpBarInfo { CurSp = 10000,MaxSp = 10000},
Satiety = 100, Satiety = 100,
Id = id, Id = id,
Slot = (uint)response.Lineup.AvatarLists.Count Slot = (uint)response.Lineup.AvatarLists.Count
@@ -46,7 +50,7 @@
{ {
var response = new GetAllLineupDataScRsp var response = new GetAllLineupDataScRsp
{ {
Retcode = (uint)RetcodeStatus.RetSucc, Retcode = 0,
CurIndex = 0, CurIndex = 0,
}; };
@@ -59,14 +63,14 @@
LeaderSlot = 0 LeaderSlot = 0
}); });
var characters = new uint[] { 8001, 1307, 1306, 1312 }; var characters = new uint[] { Avatar1, Avatar2, Avatar3, Avatar4 };
foreach (uint id in characters) foreach (uint id in characters)
{ {
response.LineupLists[0].AvatarLists.Add(new LineupAvatar response.LineupLists[0].AvatarLists.Add(new LineupAvatar
{ {
AvatarType = AvatarType.AvatarFormalType, AvatarType = AvatarType.AvatarFormalType,
Sp = new AmountInfo { CurAmount = 10000, MaxAmount = 10000 }, SpBar = new SpBarInfo { CurSp = 10000, MaxSp = 10000 },
Hp = 10000, Hp = 10000,
Satiety = 100, Satiety = 100,
Id = id, Id = id,
@@ -84,8 +88,91 @@
session.Send(CmdType.CmdChangeLineupLeaderScRsp, new ChangeLineupLeaderScRsp session.Send(CmdType.CmdChangeLineupLeaderScRsp, new ChangeLineupLeaderScRsp
{ {
Slot = request.Slot, Slot = request.Slot,
Retcode = (uint)RetcodeStatus.RetSucc Retcode = 0
}); });
} }
[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.Slots)
{
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,
SpBar = new SpBarInfo { CurSp = 10000, MaxSp = 10000 },
Hp = 10000,
Satiety = 100,
Id = id,
Slot = (uint)response.Lineup.AvatarLists.Count
});
}
session.Send(CmdType.CmdSyncLineupNotify, response);
}
} }
} }

View File

@@ -12,30 +12,106 @@
var request = data as GetMissionStatusCsReq; var request = data as GetMissionStatusCsReq;
GetMissionStatusScRsp response = new GetMissionStatusScRsp GetMissionStatusScRsp response = new GetMissionStatusScRsp
{ {
Retcode = (uint)RetcodeStatus.RetSucc, Retcode = 0,
}; };
response.FinishedMainMissionIdLists = new uint[] { response.FinishedMainMissionIdLists = new uint[] {
1000101,1000112,1000113,1000201,1000202,1000204,1000301,1000401,1000402,1000410,1000510,1000601,1010301, 1000101, 1000111, 1000112, 1000113, 1000114, 1000201, 1000202, 1000203, 1000204, 1000300, 1000301, 1000302, 1000303,
1010302,1010401,1010403,1010701,1011403,1010202,1010902,1011102,4010101 }; 1000304, 1000400, 1000401, 1000402, 1000410, 1000500, 1000501, 1000502, 1000503, 1000504, 1000505, 1000510, 1000511,
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.MissionEventStatusLists.Add(new Mission()
{
Id = id,
Progress = 0,
Status = MissionStatus.MissionFinish
});
}
}
if (request.MainMissionIdLists != null)
{
foreach (uint id in request.MainMissionIdLists)
{ {
response.SubMissionStatusLists.Add(new Mission() response.SubMissionStatusLists.Add(new Mission()
{ {

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 Eddbhmdjadb; var npcRewardReq = data as GetNpcTakenRewardCsReq;
session.Send(CmdType.CmdGetNpcTakenRewardScRsp, new Nikhfbniagb session.Send(CmdType.CmdGetNpcTakenRewardScRsp, new GetNpcTakenRewardScRsp
{ {
NpcId = npcRewardReq.Okonlennkfb, NpcId = npcRewardReq.NpcId,
Retcode = (uint)RetcodeStatus.RetSucc Retcode = 0
}); });
} }
[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 Jknjlicadhe; var npcPerformanceReq = data as GetFirstTalkByPerformanceNpcCsReq;
var response = new Kpbeklbbihd var response = new GetFirstTalkByPerformanceNpcScRsp
{ {
Retcode = (uint)RetcodeStatus.RetSucc Retcode = 0
}; };
foreach(uint id in npcPerformanceReq.Ffgeablhjmms) foreach(uint id in npcPerformanceReq.NpcTalkLists)
{ {
response.Hhldcbegobcs.Add(new NpcMeetStatusInfo response.NpcTalkInfoLists.Add(new NpcTalkInfo
{ {
Jgndlkbohij = true, Iagodfdjaik = true,
Okonlennkfb = id NpcTalkId = id
}); });
} }

View File

@@ -22,32 +22,26 @@
session.Send(CmdType.CmdPlayerHeartBeatScRsp, new PlayerHeartBeatScRsp session.Send(CmdType.CmdPlayerHeartBeatScRsp, new PlayerHeartBeatScRsp
{ {
Retcode = (uint)RetcodeStatus.RetSucc, Retcode = 0,
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()
}); });
} }
[Handler(CmdType.CmdGetHeroBasicTypeInfoCsReq)] [Handler(CmdType.CmdGetMultiPathAvatarInfoCsReq)]
public static void OnGetHeroBasicTypeInfoCsReq(NetSession session, int cmdId, object _) public static void OnGetHeroBasicTypeInfoCsReq(NetSession session, int cmdId, object _)
{ {
session.Send(CmdType.CmdGetHeroBasicTypeInfoScRsp, new GetHeroBasicTypeInfoScRsp session.Send(CmdType.CmdGetMultiPathAvatarInfoScRsp, new GetMultiPathAvatarInfoScRsp()
{ {
Retcode = (uint)RetcodeStatus.RetSucc, Retcode = 0,
Gender = Gender.GenderMan, CurrentMultiPathAvatarIds = { }
Cdkjkpnjjjas ={
new Hlbbodklpbo
{
Peihhlcchfj = HeroBasicType.BoyWarrior,
Rank = 1,
Chmeifanmags = {}
}
},
CurBasicType = HeroBasicType.BoyWarrior,
Bhepmbpaojp = false,
Cnlbajkmnbn = false
}); });
} }
@@ -71,10 +65,10 @@
session.Send(CmdType.CmdPlayerLoginScRsp, new PlayerLoginScRsp session.Send(CmdType.CmdPlayerLoginScRsp, new PlayerLoginScRsp
{ {
Retcode = (uint)RetcodeStatus.RetSucc, Retcode = 0,
//IsNewPlayer = false, //IsNewPlayer = false,
LoginRandom = request.LoginRandom, LoginRandom = request.LoginRandom,
Stamina = 100, Stamina = 240,
ServerTimestampMs = (ulong)DateTimeOffset.Now.ToUnixTimeSeconds() * 1000, ServerTimestampMs = (ulong)DateTimeOffset.Now.ToUnixTimeSeconds() * 1000,
BasicInfo = new PlayerBasicInfo BasicInfo = new PlayerBasicInfo
{ {
@@ -95,30 +89,12 @@
{ {
session.Send(CmdType.CmdPlayerGetTokenScRsp, new PlayerGetTokenScRsp session.Send(CmdType.CmdPlayerGetTokenScRsp, new PlayerGetTokenScRsp
{ {
Retcode = (uint)RetcodeStatus.RetSucc, Retcode = 0,
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,6 +3,7 @@
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
@@ -15,12 +16,12 @@
GameModeType = 1, GameModeType = 1,
//Bkmbkahohif = 1, //Bkmbkahohif = 1,
//Admbbnbnibk = 1, //Admbbnbnibk = 1,
EntryId = 1030101, EntryId = 2032101,
PlaneId = 10301, PlaneId = 20321,
FloorId = 10301001, FloorId = 20321001,
}; };
scene.EntityLists.Add(new SceneEntityInfo /*scene.EntityLists.Add(new SceneEntityInfo
{ {
EntityId = 0, EntityId = 0,
GroupId = 0, GroupId = 0,
@@ -30,13 +31,50 @@
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 = (uint)RetcodeStatus.RetSucc Retcode = 0
}); });
} }
[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 MazeMapData()
{
Retcode = 0,
LightenSectionLists = back,
UnlockedChestLists = {
new MazeChest
{
MapInfoChestType = MapInfoChestType.MapInfoChestTypeNormal
},
new MazeChest
{
MapInfoChestType = MapInfoChestType.MapInfoChestTypePuzzle
},
new MazeChest
{
MapInfoChestType = MapInfoChestType.MapInfoChestTypeChallenge
}
},
};
var response = new GetSceneMapInfoScRsp
{
Retcode = 0,
CurMapEntryId = request.CurMapEntryId,
MapLists = { mapinfo },
};
session.Send(CmdType.CmdGetSceneMapInfoScRsp, response);
}
} }
} }

View File

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

View File

@@ -25,18 +25,28 @@
//{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(Hlbbodklpbo)}, {CmdType.CmdGetMultiPathAvatarInfoCsReq, typeof(GetMultiPathAvatarInfoCsReq)},
{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(Eddbhmdjadb)}, {CmdType.CmdGetNpcTakenRewardCsReq, typeof(GetNpcTakenRewardCsReq)},
{CmdType.CmdGetFirstTalkByPerformanceNpcCsReq, typeof(Jknjlicadhe)}, {CmdType.CmdGetFirstTalkByPerformanceNpcCsReq, typeof(GetFirstTalkByPerformanceNpcCsReq)},
//{CmdType.CmdGetBagCsReq, typeof(GetBagCsReq)} {CmdType.CmdSceneEntityMoveCsReq, typeof(SceneEntityMoveCsReq)},
{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

@@ -63,19 +63,17 @@
{CmdType.CmdGetTreasureDungeonActivityDataCsReq, CmdType.CmdGetTreasureDungeonActivityDataScRsp}, {CmdType.CmdGetTreasureDungeonActivityDataCsReq, CmdType.CmdGetTreasureDungeonActivityDataScRsp},
{CmdType.CmdPlayerReturnInfoQueryCsReq, CmdType.CmdPlayerReturnInfoQueryScRsp}, {CmdType.CmdPlayerReturnInfoQueryCsReq, CmdType.CmdPlayerReturnInfoQueryScRsp},
{CmdType.CmdGetBasicInfoCsReq, CmdType.CmdGetBasicInfoScRsp}, {CmdType.CmdGetBasicInfoCsReq, CmdType.CmdGetBasicInfoScRsp},
{CmdType.CmdGetHeroBasicTypeInfoCsReq, CmdType.CmdGetHeroBasicTypeInfoScRsp}, {CmdType.CmdGetMultiPathAvatarInfoCsReq, CmdType.CmdGetMultiPathAvatarInfoScRsp},
{CmdType.CmdGetBagCsReq, CmdType.CmdGetBagScRsp}, {CmdType.CmdGetBagCsReq, CmdType.CmdGetBagScRsp},
{CmdType.CmdGetPlayerBoardDataCsReq, CmdType.CmdGetPlayerBoardDataScRsp}, {CmdType.CmdGetPlayerBoardDataCsReq, CmdType.CmdGetPlayerBoardDataScRsp},
{CmdType.CmdGetAvatarDataCsReq, CmdType.CmdGetAvatarDataScRsp}, {CmdType.CmdGetAvatarDataCsReq, CmdType.CmdGetAvatarDataScRsp},
{CmdType.CmdGetAllLineupDataCsReq, CmdType.CmdGetAllLineupDataScRsp}, {CmdType.CmdGetAllLineupDataCsReq, CmdType.CmdGetAllLineupDataScRsp},
{CmdType.CmdGetActivityScheduleConfigCsReq, CmdType.CmdGetActivityScheduleConfigScRsp}, {CmdType.CmdGetActivityScheduleConfigCsReq, CmdType.CmdGetActivityScheduleConfigScRsp},
{CmdType.CmdGetMissionDataCsReq, CmdType.CmdGetMissionDataScRsp}, {CmdType.CmdGetMissionDataCsReq, CmdType.CmdGetMissionDataScRsp},
{CmdType.CmdGetMissionEventDataCsReq, CmdType.CmdGetMissionEventDataScRsp},
{CmdType.CmdGetChallengeCsReq, CmdType.CmdGetChallengeScRsp}, {CmdType.CmdGetChallengeCsReq, CmdType.CmdGetChallengeScRsp},
{CmdType.CmdGetCurChallengeCsReq, CmdType.CmdGetCurChallengeScRsp}, {CmdType.CmdGetCurChallengeCsReq, CmdType.CmdGetCurChallengeScRsp},
{CmdType.CmdGetRogueInfoCsReq, CmdType.CmdGetRogueInfoScRsp}, {CmdType.CmdGetRogueInfoCsReq, CmdType.CmdGetRogueInfoScRsp},
{CmdType.CmdGetExpeditionDataCsReq, CmdType.CmdGetExpeditionDataScRsp}, {CmdType.CmdGetExpeditionDataCsReq, CmdType.CmdGetExpeditionDataScRsp},
{CmdType.CmdGetRogueDialogueEventDataCsReq, CmdType.CmdGetRogueDialogueEventDataScRsp},
{CmdType.CmdGetJukeboxDataCsReq, CmdType.CmdGetJukeboxDataScRsp}, {CmdType.CmdGetJukeboxDataCsReq, CmdType.CmdGetJukeboxDataScRsp},
{CmdType.CmdSyncClientResVersionCsReq, CmdType.CmdSyncClientResVersionScRsp}, {CmdType.CmdSyncClientResVersionCsReq, CmdType.CmdSyncClientResVersionScRsp},
{CmdType.CmdDailyFirstMeetPamCsReq, CmdType.CmdDailyFirstMeetPamScRsp}, {CmdType.CmdDailyFirstMeetPamCsReq, CmdType.CmdDailyFirstMeetPamScRsp},
@@ -86,7 +84,6 @@
{CmdType.CmdGetBoxingClubInfoCsReq, CmdType.CmdGetBoxingClubInfoScRsp}, {CmdType.CmdGetBoxingClubInfoCsReq, CmdType.CmdGetBoxingClubInfoScRsp},
{CmdType.CmdGetNpcStatusCsReq, CmdType.CmdGetNpcStatusScRsp}, {CmdType.CmdGetNpcStatusCsReq, CmdType.CmdGetNpcStatusScRsp},
{CmdType.CmdTextJoinQueryCsReq, CmdType.CmdTextJoinQueryScRsp}, {CmdType.CmdTextJoinQueryCsReq, CmdType.CmdTextJoinQueryScRsp},
{CmdType.CmdGetSpringRecoverDataCsReq, CmdType.CmdGetSpringRecoverDataScRsp},
{CmdType.CmdGetChatFriendHistoryCsReq, CmdType.CmdGetChatFriendHistoryScRsp}, {CmdType.CmdGetChatFriendHistoryCsReq, CmdType.CmdGetChatFriendHistoryScRsp},
{CmdType.CmdGetSecretKeyInfoCsReq, CmdType.CmdGetSecretKeyInfoScRsp}, {CmdType.CmdGetSecretKeyInfoCsReq, CmdType.CmdGetSecretKeyInfoScRsp},
{CmdType.CmdGetVideoVersionKeyCsReq, CmdType.CmdGetVideoVersionKeyScRsp}, {CmdType.CmdGetVideoVersionKeyCsReq, CmdType.CmdGetVideoVersionKeyScRsp},
@@ -94,7 +91,8 @@
{CmdType.CmdGetCurBattleInfoCsReq, CmdType.CmdGetCurBattleInfoScRsp}, {CmdType.CmdGetCurBattleInfoCsReq, CmdType.CmdGetCurBattleInfoScRsp},
{CmdType.CmdGetCurSceneInfoCsReq, CmdType.CmdGetCurSceneInfoScRsp}, {CmdType.CmdGetCurSceneInfoCsReq, CmdType.CmdGetCurSceneInfoScRsp},
{CmdType.CmdGetPhoneDataCsReq, CmdType.CmdGetPhoneDataScRsp}, {CmdType.CmdGetPhoneDataCsReq, CmdType.CmdGetPhoneDataScRsp},
{CmdType.CmdPlayerLoginFinishCsReq, CmdType.CmdPlayerLoginFinishScRsp} {CmdType.CmdPlayerLoginFinishCsReq, CmdType.CmdPlayerLoginFinishScRsp},
{CmdType.CmdGetRechargeGiftInfoCsReq, CmdType.CmdGetRechargeGiftInfoScRsp}
}; };
[ProtoContract] [ProtoContract]

View File

@@ -28,20 +28,5 @@
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,6 +33,7 @@
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,6 +4,7 @@
<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,6 +4,7 @@
<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,6 +5,7 @@
<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

@@ -15,14 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{C07D30E9
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FreeSR.Tool.Proxy", "FreeSR.Tool.Proxy\FreeSR.Tool.Proxy.csproj", "{11A573ED-C01C-42E3-9130-6E04E4A8DD17}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FreeSR.Tool.Proxy", "FreeSR.Tool.Proxy\FreeSR.Tool.Proxy.csproj", "{11A573ED-C01C-42E3-9130-6E04E4A8DD17}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Database", "Database", "{CFA0B752-6955-4991-AA1E-92D67F720C12}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FreeSR.Database", "FreeSR.Database\FreeSR.Database.csproj", "{5CD88C90-31BB-40D9-812B-A347B96D9C8A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FreeSR.Database.Account", "FreeSR.Database.Account\FreeSR.Database.Account.csproj", "{EF0DF7FB-F570-4847-B0BE-CBB98529111A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FreeSR.Admin", "FreeSR.Admin\FreeSR.Admin.csproj", "{343019DD-8928-447C-A8E4-7FFE92BC823E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSR.Gateserver", "FreeSR.Gateserver\FreeSR.Gateserver.csproj", "{AF8975EC-2283-47A8-84BC-646AB99830E7}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSR.Gateserver", "FreeSR.Gateserver\FreeSR.Gateserver.csproj", "{AF8975EC-2283-47A8-84BC-646AB99830E7}"
EndProject EndProject
Global Global
@@ -47,18 +39,6 @@ Global
{11A573ED-C01C-42E3-9130-6E04E4A8DD17}.Debug|Any CPU.Build.0 = Debug|Any CPU {11A573ED-C01C-42E3-9130-6E04E4A8DD17}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11A573ED-C01C-42E3-9130-6E04E4A8DD17}.Release|Any CPU.ActiveCfg = Release|Any CPU {11A573ED-C01C-42E3-9130-6E04E4A8DD17}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11A573ED-C01C-42E3-9130-6E04E4A8DD17}.Release|Any CPU.Build.0 = Release|Any CPU {11A573ED-C01C-42E3-9130-6E04E4A8DD17}.Release|Any CPU.Build.0 = Release|Any CPU
{5CD88C90-31BB-40D9-812B-A347B96D9C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CD88C90-31BB-40D9-812B-A347B96D9C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CD88C90-31BB-40D9-812B-A347B96D9C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CD88C90-31BB-40D9-812B-A347B96D9C8A}.Release|Any CPU.Build.0 = Release|Any CPU
{EF0DF7FB-F570-4847-B0BE-CBB98529111A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF0DF7FB-F570-4847-B0BE-CBB98529111A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF0DF7FB-F570-4847-B0BE-CBB98529111A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF0DF7FB-F570-4847-B0BE-CBB98529111A}.Release|Any CPU.Build.0 = Release|Any CPU
{343019DD-8928-447C-A8E4-7FFE92BC823E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{343019DD-8928-447C-A8E4-7FFE92BC823E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{343019DD-8928-447C-A8E4-7FFE92BC823E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{343019DD-8928-447C-A8E4-7FFE92BC823E}.Release|Any CPU.Build.0 = Release|Any CPU
{AF8975EC-2283-47A8-84BC-646AB99830E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AF8975EC-2283-47A8-84BC-646AB99830E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AF8975EC-2283-47A8-84BC-646AB99830E7}.Debug|Any CPU.Build.0 = Debug|Any CPU {AF8975EC-2283-47A8-84BC-646AB99830E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF8975EC-2283-47A8-84BC-646AB99830E7}.Release|Any CPU.ActiveCfg = Release|Any CPU {AF8975EC-2283-47A8-84BC-646AB99830E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -70,9 +50,6 @@ Global
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{3FAA4180-015C-4E63-BA3F-6AF826FEC6F6} = {F9800F84-180D-49D6-9D65-D9A1C5D4797D} {3FAA4180-015C-4E63-BA3F-6AF826FEC6F6} = {F9800F84-180D-49D6-9D65-D9A1C5D4797D}
{11A573ED-C01C-42E3-9130-6E04E4A8DD17} = {C07D30E9-B7F8-43D6-B338-FF860D4B06D1} {11A573ED-C01C-42E3-9130-6E04E4A8DD17} = {C07D30E9-B7F8-43D6-B338-FF860D4B06D1}
{5CD88C90-31BB-40D9-812B-A347B96D9C8A} = {CFA0B752-6955-4991-AA1E-92D67F720C12}
{EF0DF7FB-F570-4847-B0BE-CBB98529111A} = {CFA0B752-6955-4991-AA1E-92D67F720C12}
{343019DD-8928-447C-A8E4-7FFE92BC823E} = {F9800F84-180D-49D6-9D65-D9A1C5D4797D}
{AF8975EC-2283-47A8-84BC-646AB99830E7} = {F9800F84-180D-49D6-9D65-D9A1C5D4797D} {AF8975EC-2283-47A8-84BC-646AB99830E7} = {F9800F84-180D-49D6-9D65-D9A1C5D4797D}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution

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 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. **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.
## Introduction ## Introduction
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. 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.
## Features ## Features
- Server software reimplementation for a certain turn-based anime game (version 1.6.5) - Server software reimplementation for a certain turn-based anime game (version 2.0.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
@@ -19,19 +19,9 @@ To get started with FreeSR, follow the steps below:
1. Clone the repository to your local machine. 1. Clone the repository to your local machine.
2. Build project with dotnet7.0. 2. Build project with dotnet7.0.
3. Install MongoDB on your machine. 3. Create configuration files for Dispatch and Gateserver. (just rename the .example.json file in your build folder to [ServerName].json and configure it for your machine)
4. Create configuration files for Dispatch, Gateserver and Admin servers. (just rename the .example.json file in your build folder to [ServerName].json and configure it for your machine) 4. Run FreeSR.Dispatch and FreeSR.Gateserver
5. Run FreeSR.Admin, FreeSR.Dispatch and FreeSR.Gateserver 5. Enjoy the game!
6. Enjoy the game!
## Creating an account
To create new account in your server, follow the steps below:
1. Make sure your FreeSR.Admin, FreeSR.Dispatch and FreeSR.Gateserver servers are up and running.
2. Go to http://localhost:1337/console
3. Create account by using following command: `account create [LOGIN] [PASSWORD]`
4. Your account is now created, you can use it in the game.
## Connecting ## Connecting
@@ -43,6 +33,6 @@ We welcome contributions from the community to make FreeSR even better. If you f
## Contact ## Contact
Feel free to join our [Discord server](https://discord.gg/xUtW8FJRK5) for discussions and community interactions. Feel free to join our [Discord server](https://discord.gg/reversedrooms) for discussions and community interactions.