This repository has been archived on 2024-03-29. You can view files and clone it, but cannot push or open issues or pull requests.
FreeSR/FreeSR.Gateserver/Manager/Handlers/SceneReqGroup.cs

83 lines
2.5 KiB
C#
Raw Permalink Normal View History

2024-01-27 13:06:07 +00:00
namespace FreeSR.Gateserver.Manager.Handlers
{
using FreeSR.Gateserver.Manager.Handlers.Core;
using FreeSR.Gateserver.Network;
using FreeSR.Proto;
2024-02-21 06:41:22 +00:00
using System.Numerics;
2024-01-27 13:06:07 +00:00
internal static class SceneReqGroup
{
2024-01-27 13:08:24 +00:00
[Handler(CmdType.CmdGetCurSceneInfoCsReq)]
2024-01-27 13:06:07 +00:00
public static void OnGetCurSceneInfoCsReq(NetSession session, int cmdId, object data)
{
SceneInfo scene = new SceneInfo
{
GameModeType = 1,
2024-01-27 13:08:24 +00:00
//Bkmbkahohif = 1,
//Admbbnbnibk = 1,
2024-02-21 06:41:22 +00:00
EntryId = 2032101,
PlaneId = 20321,
FloorId = 20321001,
2024-01-27 13:06:07 +00:00
};
2024-01-31 04:31:26 +00:00
/*scene.EntityLists.Add(new SceneEntityInfo
2024-01-27 13:06:07 +00:00
{
EntityId = 0,
GroupId = 0,
InstId = 0,
Motion = new MotionInfo()
{
Pos = new Vector(),
Rot = new Vector()
}
2024-01-31 04:31:26 +00:00
});*/
2024-01-27 13:06:07 +00:00
2024-01-27 13:08:24 +00:00
session.Send(CmdType.CmdGetCurSceneInfoScRsp, new GetCurSceneInfoScRsp
2024-01-27 13:06:07 +00:00
{
Scene = scene,
2024-02-21 06:41:22 +00:00
Retcode = 0
2024-01-27 13:06:07 +00:00
});
}
2024-02-21 06:41:22 +00:00
[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);
}
2024-01-27 13:06:07 +00:00
}
}