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)
|
|
|
|
|
{
|
2024-02-10 11:51:20 +00:00
|
|
|
|
// FriendController.
|
2024-02-09 22:15:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[NetEvent(MessageId.FriendAllRequest)]
|
2024-02-14 21:22:21 +00:00
|
|
|
|
public ResponseMessage OnFriendAllRequest() => Response(MessageId.FriendAllResponse, new FriendAllResponse
|
|
|
|
|
{
|
|
|
|
|
FriendInfoList =
|
|
|
|
|
{
|
|
|
|
|
CreateDummyFriendInfo(1338, "Taoqi", "discord.gg/reversedrooms", 1601)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|