36 lines
982 B
C#
36 lines
982 B
C#
using Google.Protobuf;
|
|
using Google.Protobuf.WellKnownTypes;
|
|
|
|
|
|
using ServerCore;
|
|
using ServerBase;
|
|
using ServerCommon;
|
|
using ServerCommon.BusinessLogDomain;
|
|
using MetaAssets;
|
|
|
|
|
|
namespace GameServer;
|
|
|
|
public class SendFriendRequestInterlockAction : FriendInterlockBase
|
|
{
|
|
private DateTime m_request_time;
|
|
public SendFriendRequestInterlockAction(UserBase owner, string myGuid, string friendGuid, DateTime requestTime) : base(owner, myGuid,friendGuid)
|
|
{
|
|
m_request_time = requestTime;
|
|
}
|
|
|
|
public override async Task<Result> doAction()
|
|
{
|
|
var server_logic = GameServerApp.getServerLogic();
|
|
|
|
var owner = getOwner();
|
|
|
|
DateTime now = DateTimeHelper.Current;
|
|
|
|
var friend_request_cache = new FriendReqCacheRequest(owner, getMyGuid(), getFriendGuid(), server_logic.getRedisConnector());
|
|
var result = await friend_request_cache.addFriendRequest(owner.getUserGuid(), getFriendGuid(), now);
|
|
|
|
return result;
|
|
}
|
|
}
|