Unlock scene points & areas
This commit is contained in:
parent
2204bf42fe
commit
563a174b2a
2 changed files with 35 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
using NahidaImpact.Gameserver.Controllers.Attributes;
|
using NahidaImpact.Gameserver.Controllers.Attributes;
|
||||||
using NahidaImpact.Gameserver.Controllers.Result;
|
using NahidaImpact.Gameserver.Controllers.Result;
|
||||||
|
using NahidaImpact.Gameserver.Game;
|
||||||
using NahidaImpact.Gameserver.Game.Scene;
|
using NahidaImpact.Gameserver.Game.Scene;
|
||||||
using NahidaImpact.Protocol;
|
using NahidaImpact.Protocol;
|
||||||
|
|
||||||
|
@ -11,6 +12,39 @@ internal class SceneController : ControllerBase
|
||||||
// TODO: Scene management, Entity management!!!
|
// TODO: Scene management, Entity management!!!
|
||||||
public const uint WeaponEntityId = 100663300;
|
public const uint WeaponEntityId = 100663300;
|
||||||
|
|
||||||
|
[NetCommand(CmdType.GetScenePointReq)]
|
||||||
|
public ValueTask<IResult> OnGetScenePointReq(SceneManager sceneManager, Player player)
|
||||||
|
{
|
||||||
|
GetScenePointRsp rsp = new()
|
||||||
|
{
|
||||||
|
SceneId = sceneManager.CurrentSceneId,
|
||||||
|
BelongUid = player.Uid
|
||||||
|
};
|
||||||
|
|
||||||
|
for (uint i = 1; i <= 777; i++)
|
||||||
|
{
|
||||||
|
rsp.UnlockedPointList.Add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ValueTask.FromResult(Response(CmdType.GetScenePointRsp, rsp));
|
||||||
|
}
|
||||||
|
|
||||||
|
[NetCommand(CmdType.GetSceneAreaReq)]
|
||||||
|
public ValueTask<IResult> OnGetSceneAreaReq(SceneManager sceneManager)
|
||||||
|
{
|
||||||
|
GetSceneAreaRsp rsp = new()
|
||||||
|
{
|
||||||
|
SceneId = sceneManager.CurrentSceneId
|
||||||
|
};
|
||||||
|
|
||||||
|
for (uint i = 1; i <= 20; i++)
|
||||||
|
{
|
||||||
|
rsp.AreaIdList.Add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ValueTask.FromResult(Response(CmdType.GetSceneAreaRsp, rsp));
|
||||||
|
}
|
||||||
|
|
||||||
[NetCommand(CmdType.PostEnterSceneReq)]
|
[NetCommand(CmdType.PostEnterSceneReq)]
|
||||||
public async ValueTask<IResult> OnPostEnterSceneReq(SceneManager sceneManager)
|
public async ValueTask<IResult> OnPostEnterSceneReq(SceneManager sceneManager)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace NahidaImpact.Gameserver.Game.Scene;
|
||||||
internal class SceneManager(NetSession session, Player player, EntityManager entityManager, EntityFactory entityFactory, BinDataCollection binData)
|
internal class SceneManager(NetSession session, Player player, EntityManager entityManager, EntityFactory entityFactory, BinDataCollection binData)
|
||||||
{
|
{
|
||||||
public uint EnterToken { get; private set; }
|
public uint EnterToken { get; private set; }
|
||||||
|
public uint CurrentSceneId => _sceneId;
|
||||||
|
|
||||||
private readonly BinDataCollection _binData = binData;
|
private readonly BinDataCollection _binData = binData;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue