WutheringWaves/GameServer/Controllers/FriendSystemController.cs

37 lines
996 B
C#
Raw Normal View History

2024-02-09 22:15:05 +00:00
using GameServer.Controllers.Attributes;
using GameServer.Network;
using GameServer.Network.Messages;
using Protocol;
namespace GameServer.Controllers;
internal class FriendSystemController : Controller
{
public FriendSystemController(PlayerSession session) : base(session)
{
// FriendController.
2024-02-09 22:15:05 +00:00
}
[NetEvent(MessageId.FriendAllRequest)]
public RpcResult OnFriendAllRequest() => Response(MessageId.FriendAllResponse, new FriendAllResponse
2024-02-14 21:22:21 +00:00
{
FriendInfoList =
{
CreateDummyFriendInfo(1338, "Yangyang", "discord.gg/reversedrooms", 1402)
2024-02-14 21:22:21 +00:00
}
});
private static FriendInfo CreateDummyFriendInfo(int id, string name, string signature, int headIconId) => new()
{
Info = new()
{
PlayerId = id,
Name = name,
Signature = signature,
Level = 5,
HeadId = headIconId,
IsOnline = true,
LastOfflineTime = -1
}
};
2024-02-09 22:15:05 +00:00
}