forked from PGR/ascnet
Some stubs for Dorm and Guild softlocks
Dorm still has a few spots with invalid data which softlock. Guild will still softlock on trying to load guild entries, but I can't do much about that at the moment.
This commit is contained in:
parent
abe7e6639b
commit
a36eeeef63
|
@ -0,0 +1,46 @@
|
||||||
|
using MessagePack;
|
||||||
|
|
||||||
|
namespace AscNet.GameServer.Handlers
|
||||||
|
{
|
||||||
|
|
||||||
|
#region MsgPackScheme
|
||||||
|
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class DormEnterRequest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class DormEnterResponse
|
||||||
|
{
|
||||||
|
public int Code;
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class DormitoryListRequest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class DormitoryListResponse
|
||||||
|
{
|
||||||
|
public int Code;
|
||||||
|
}
|
||||||
|
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
internal class DormModule
|
||||||
|
{
|
||||||
|
[RequestPacketHandler("DormEnterRequest")]
|
||||||
|
public static void DormEnterRequestHandler(Session session, Packet.Request packet)
|
||||||
|
{
|
||||||
|
session.SendResponse(new DormEnterResponse(), packet.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
[RequestPacketHandler("DormitoryListRequest")]
|
||||||
|
public static void DormitoryListRequestHandler(Session session, Packet.Request packet)
|
||||||
|
{
|
||||||
|
session.SendResponse(new DormitoryListResponse(), packet.Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
using AscNet.Common.MsgPack;
|
||||||
|
using MessagePack;
|
||||||
|
|
||||||
|
namespace AscNet.GameServer.Handlers
|
||||||
|
{
|
||||||
|
|
||||||
|
#region MsgPackScheme
|
||||||
|
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class GuildListRecommendRequest
|
||||||
|
{
|
||||||
|
public int PageNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class GuildListRecommendResponse
|
||||||
|
{
|
||||||
|
public int Code;
|
||||||
|
}
|
||||||
|
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
internal class GuildModule
|
||||||
|
{
|
||||||
|
[RequestPacketHandler("GuildListRecommendRequest")]
|
||||||
|
public static void GuildListRecommendRequestHandler(Session session, Packet.Request packet)
|
||||||
|
{
|
||||||
|
session.SendResponse(new GuildListRecommendResponse(), packet.Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -129,6 +129,32 @@ namespace AscNet.GameServer.Handlers
|
||||||
public int Code;
|
public int Code;
|
||||||
public List<long> DisplayCharIdList;
|
public List<long> DisplayCharIdList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class QueryPlayerDetailRequest
|
||||||
|
{
|
||||||
|
public int PlayerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class QueryPlayerDetailResponse
|
||||||
|
{
|
||||||
|
public int Code;
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class SetAppearanceRequest
|
||||||
|
{
|
||||||
|
public int CharacterAppearanceType;
|
||||||
|
public dynamic? Characters;
|
||||||
|
public AppearanceSettingInfo AppearanceSettingInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class SetAppearanceResponse
|
||||||
|
{
|
||||||
|
public int Code;
|
||||||
|
}
|
||||||
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -234,5 +260,17 @@ namespace AscNet.GameServer.Handlers
|
||||||
|
|
||||||
session.SendResponse(new SetDisplayCharIdFirstResponse() { DisplayCharIdList = session.player.PlayerData.DisplayCharIdList }, packet.Id);
|
session.SendResponse(new SetDisplayCharIdFirstResponse() { DisplayCharIdList = session.player.PlayerData.DisplayCharIdList }, packet.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RequestPacketHandler("QueryPlayerDetailRequest")]
|
||||||
|
public static void QueryPlayerDetailRequestHandler(Session session, Packet.Request packet)
|
||||||
|
{
|
||||||
|
session.SendResponse(new QueryPlayerDetailResponse() { Code = 1 }, packet.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
[RequestPacketHandler("SetAppearanceRequest")]
|
||||||
|
public static void SetAppearanceRequestHandler(Session session, Packet.Request packet)
|
||||||
|
{
|
||||||
|
session.SendResponse(new SetAppearanceResponse() { Code = 1 }, packet.Id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,37 @@
|
||||||
using AscNet.Common.MsgPack;
|
using AscNet.Common.MsgPack;
|
||||||
|
using MessagePack;
|
||||||
|
|
||||||
namespace AscNet.GameServer.Handlers
|
namespace AscNet.GameServer.Handlers
|
||||||
{
|
{
|
||||||
internal class ShopModule
|
|
||||||
{
|
#region MsgPackScheme
|
||||||
/* TODO: Needs types
|
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||||
[RequestPacketHandler("GetShopBaseInfoRequest")]
|
[MessagePackObject(true)]
|
||||||
public static void GetShopBaseInfoRequestHandler(Session session, Packet.Request packet)
|
public class GetShopBaseInfoRequest
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class GetShopBaseInfoResponse
|
||||||
|
{
|
||||||
|
public int Code;
|
||||||
|
}
|
||||||
|
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
internal class ShopModule
|
||||||
|
{
|
||||||
|
[RequestPacketHandler("GetShopInfoRequest")]
|
||||||
|
public static void GetShopInfoRequestHandler(Session session, Packet.Request packet)
|
||||||
|
{
|
||||||
|
GetShopInfoResponse rsp = new()
|
||||||
|
{
|
||||||
|
Code = 0,
|
||||||
|
ClientShop = { }
|
||||||
|
};
|
||||||
|
|
||||||
|
session.SendResponse(rsp, packet.Id);
|
||||||
|
}
|
||||||
|
|
||||||
[RequestPacketHandler("GetShopInfoReceiveRequest")]
|
[RequestPacketHandler("GetShopInfoReceiveRequest")]
|
||||||
public static void GetShopInfoReceiveRequestHandler(Session session, Packet.Request packet)
|
public static void GetShopInfoReceiveRequestHandler(Session session, Packet.Request packet)
|
||||||
|
@ -23,16 +45,10 @@ namespace AscNet.GameServer.Handlers
|
||||||
session.SendResponse(rsp, packet.Id);
|
session.SendResponse(rsp, packet.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
[RequestPacketHandler("GetShopInfoRequest")]
|
[RequestPacketHandler("GetShopBaseInfoRequest")]
|
||||||
public static void GetShopInfoRequestHandler(Session session, Packet.Request packet)
|
public static void GetShopBaseInfoRequestHandler(Session session, Packet.Request packet)
|
||||||
{
|
{
|
||||||
GetShopInfoResponse rsp = new()
|
session.SendResponse(new GetShopBaseInfoResponse(), packet.Id);
|
||||||
{
|
|
||||||
Code = 0,
|
|
||||||
ClientShop = { }
|
|
||||||
};
|
|
||||||
|
|
||||||
session.SendResponse(rsp, packet.Id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue