KCP gameserver with packet dispatch, scene streaming, combat, gacha and the shop, plus a small HTTP server for the login flow and the wish history page. Game data under assets is pulled out of the client instead of being typed by hand. The excel tables come from the packed bin container and the spawn points from the compiled scene scripts.
92 lines
3.8 KiB
C#
92 lines
3.8 KiB
C#
using Yuanshen.Gameserver.Controllers.Attributes;
|
|
using Yuanshen.Gameserver.Controllers.Result;
|
|
using Yuanshen.Protocol;
|
|
|
|
namespace Yuanshen.Gameserver.Controllers;
|
|
|
|
[NetController]
|
|
internal sealed class StubController : ControllerBase
|
|
{
|
|
[NetCommand(CmdType.ClientFpsStatusNotify)]
|
|
public ValueTask<IResult> OnClientFpsStatusNotify() => ValueTask.FromResult(Ok());
|
|
|
|
[NetCommand(CmdType.EntityAbilityConfigHashNotify)]
|
|
public ValueTask<IResult> OnEntityAbilityConfigHashNotify() => ValueTask.FromResult(Ok());
|
|
|
|
[NetCommand(CmdType.MonsterAIConfigHashNotify)]
|
|
public ValueTask<IResult> OnMonsterAIConfigHashNotify() => ValueTask.FromResult(Ok());
|
|
|
|
[NetCommand(CmdType.EvtEntityRenderersChangedNotify)]
|
|
public ValueTask<IResult> OnEvtEntityRenderersChangedNotify() => ValueTask.FromResult(Ok());
|
|
|
|
[NetCommand(CmdType.EvtAiSyncCombatThreatInfoNotify)]
|
|
public ValueTask<IResult> OnEvtAiSyncCombatThreatInfoNotify() => ValueTask.FromResult(Ok());
|
|
|
|
[NetCommand(CmdType.PlayerSetPauseReq)]
|
|
public ValueTask<IResult> OnPlayerSetPauseReq()
|
|
=> ValueTask.FromResult(Response(CmdType.PlayerSetPauseRsp, new PlayerSetPauseRsp { Retcode = Retcode.RET_SUCC }));
|
|
|
|
[NetCommand(CmdType.PathfindingEnterSceneReq)]
|
|
public ValueTask<IResult> OnPathfindingEnterSceneReq()
|
|
=> ValueTask.FromResult(Response(CmdType.PathfindingEnterSceneRsp,
|
|
new PathfindingEnterSceneRsp { Retcode = Retcode.RET_SUCC }));
|
|
|
|
[NetCommand(CmdType.PersonalLineAllDataReq)]
|
|
public ValueTask<IResult> OnPersonalLineAllDataReq()
|
|
=> ValueTask.FromResult(Response(CmdType.PersonalLineAllDataRsp,
|
|
new PersonalLineAllDataRsp { Retcode = Retcode.RET_SUCC }));
|
|
|
|
[NetCommand(CmdType.GetAllActivatedBargainDataReq)]
|
|
public ValueTask<IResult> OnGetAllActivatedBargainDataReq()
|
|
=> ValueTask.FromResult(Response(CmdType.GetAllActivatedBargainDataRsp,
|
|
new GetAllActivatedBargainDataRsp { Retcode = Retcode.RET_SUCC }));
|
|
|
|
[NetCommand(CmdType.GetInvestigationMonsterReq)]
|
|
public ValueTask<IResult> OnGetInvestigationMonsterReq()
|
|
=> ValueTask.FromResult(Response(CmdType.GetInvestigationMonsterRsp,
|
|
new GetInvestigationMonsterRsp { Retcode = Retcode.RET_SUCC }));
|
|
|
|
[NetCommand(CmdType.GetPlayerFriendListReq)]
|
|
public ValueTask<IResult> OnGetPlayerFriendListReq()
|
|
=> ValueTask.FromResult(Response(CmdType.GetPlayerFriendListRsp,
|
|
new GetPlayerFriendListRsp { Retcode = Retcode.RET_SUCC }));
|
|
|
|
[NetCommand(CmdType.SceneGetAreaExplorePercentReq)]
|
|
public ValueTask<IResult> OnSceneGetAreaExplorePercentReq()
|
|
{
|
|
SceneGetAreaExplorePercentReq req = Packet!.DecodeBody<SceneGetAreaExplorePercentReq>();
|
|
|
|
return ValueTask.FromResult(Response(CmdType.SceneGetAreaExplorePercentRsp, new SceneGetAreaExplorePercentRsp
|
|
{
|
|
Retcode = Retcode.RET_SUCC,
|
|
AreaId = req.AreaId,
|
|
ExplorePercent = 0
|
|
}));
|
|
}
|
|
|
|
[NetCommand(CmdType.AvatarFetterLevelRewardReq)]
|
|
public ValueTask<IResult> OnAvatarFetterLevelRewardReq()
|
|
{
|
|
AvatarFetterLevelRewardReq req = Packet!.DecodeBody<AvatarFetterLevelRewardReq>();
|
|
|
|
return ValueTask.FromResult(Response(CmdType.AvatarFetterLevelRewardRsp, new AvatarFetterLevelRewardRsp
|
|
{
|
|
Retcode = Retcode.RET_SUCC,
|
|
AvatarGuid = req.AvatarGuid,
|
|
FetterLevel = req.FetterLevel
|
|
}));
|
|
}
|
|
|
|
[NetCommand(CmdType.QueryPathReq)]
|
|
public ValueTask<IResult> OnQueryPathReq()
|
|
{
|
|
QueryPathReq req = Packet!.DecodeBody<QueryPathReq>();
|
|
|
|
return ValueTask.FromResult(Response(CmdType.QueryPathRsp, new QueryPathRsp
|
|
{
|
|
Retcode = Retcode.RET_SUCC,
|
|
QueryId = req.QueryId,
|
|
QueryStatus = 1
|
|
}));
|
|
}
|
|
}
|