You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
977 B
39 lines
977 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
using Sog;
|
|
using ProtoCSStruct;
|
|
|
|
namespace Game
|
|
{
|
|
public static class FriendOpSvc
|
|
{
|
|
//参数检查
|
|
public static int CheckValidCliFriendOpReq(PlayerOnGame player, ref CSFriendOpReq req)
|
|
{
|
|
if(req.OpSeq < 0)
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
if(req.TargetUid == player.UserID)
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
if(req.OpType == (int)DBFriendOpType.AgreeAdd
|
|
|| req.OpType == (int)DBFriendOpType.Refuse
|
|
|| req.OpType == (int)DBFriendOpType.Invite
|
|
|| req.OpType == (int)DBFriendOpType.Delete
|
|
|| req.OpType == (int)DBFriendOpType.AddBlacklist
|
|
|| req.OpType == (int)DBFriendOpType.DelBlacklist)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
return -1;
|
|
}
|
|
}
|
|
}
|
|
|