45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using Google.Protobuf;
|
|
using Google.Protobuf.WellKnownTypes;
|
|
|
|
|
|
using ServerCore;
|
|
using ServerBase;
|
|
using ServerCommon;
|
|
using ServerCommon.BusinessLogDomain;
|
|
using MetaAssets;
|
|
|
|
|
|
|
|
namespace GameServer;
|
|
|
|
|
|
public class CancelFriendRequestInterlockAction : FriendInterlockBase
|
|
{
|
|
public CancelFriendRequestInterlockAction(UserBase owner, string myGuid, string friendGuid) : base(owner, myGuid, friendGuid)
|
|
{
|
|
}
|
|
|
|
public override async Task<Result> doAction()
|
|
{
|
|
var owner = getOwner();
|
|
|
|
var server_logic = GameServerApp.getServerLogic();
|
|
FriendReqCacheRequest cache = new FriendReqCacheRequest(owner, getMyGuid(), getFriendGuid(), server_logic.getRedisConnector());
|
|
var result = await cache.cancelFriendRequest();
|
|
if (result.isFail()) return result;
|
|
|
|
//log
|
|
var invokers = new List<ILogInvoker>();
|
|
invokers.Add(new CancelFriendRequestBusinessLog(getMyGuid(), getFriendGuid()));
|
|
var log_action = new LogActionEx(LogActionType.CancelFriendRequest);
|
|
BusinessLogger.collectLogs(log_action, owner, invokers);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
}
|
|
|
|
|
|
}
|