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; } } }