package msg // 0未添加 1已申请未通过 2已是好友 const ( FriendStatusNotAdded int64 = iota // 未添加 FriendStatusPendingApproval // 已申请未通过 FriendStatusAlreadyFriends // 已是好友 ) // GetFriendList 获取好友列表信息 type GetFriendList struct { PlayerId int64 `json:"userId"` } type ResponseGetFriendList struct { ErrCode int `json:"errCode"` Msg string `json:"msg,omitempty"` Data FriendStatus `json:"data"` } type FriendStatus struct { Friends []*PlayerNickImg `json:"friends"` GiveTimes int `json:"give"` // 已赠送次数 ReceiveTimes int `json:"receive"` // 已领取次数 } type PlayerNickImg struct { PlayerId int64 `json:"playerId"` HeadId int64 `json:"headId"` //头像 FrameId int64 `json:"frameId"` //头像框 Nick string `json:"nick"` //昵称 Level int64 `json:"level"` //等级 ServerId int64 `json:"serverId"` //服务器id Online int64 `json:"online"` //在线状态 LastLoginTick int64 `json:"lastLoginTick"` //上次登录时间 Give int64 `json:"give"` //赠送状态 Receive int64 `json:"receive"` //领取状态 } // RequestAddFriend 添加好友请求 type RequestAddFriend struct { PlayerId int64 `json:"userId"` Recipients []int64 `json:"recipients"` } type ResponseRequestAddFriend struct { ErrCode int `json:"errCode"` Msg string `json:"msg,omitempty"` Data []int64 `json:"data"` } // ReviewAddFriend 审批好友请求 type ReviewAddFriend struct { PlayerId int64 `json:"userId"` Agrees []int64 `json:"agrees"` Rejects []int64 `json:"rejects"` } type ResponseReviewAddFriend struct { ErrCode int `json:"errCode"` Msg string `json:"msg,omitempty"` Data ReviewAddFriendData `json:"data"` } type ReviewAddFriendData struct { Agrees []int64 `json:"agrees"` Rejects []int64 `json:"rejects"` } // GiveStamina 赠送体力 type GiveStamina struct { PlayerId int64 `json:"userId"` FriendIds []int64 `json:"friendIds"` // 赠送的好友Id } type ResponseGiveStamina struct { ErrCode int `json:"errCode"` Msg string `json:"msg,omitempty"` Data GiveStaminaData `json:"data"` } type GiveStaminaData struct { GivePlayerIds []int64 `json:"givePlayerIds"` // 赠送的好友Id GiveCount int `json:"giveCount"` // 赠送次数 } // ReceiveStamina 获取体力 type ReceiveStamina struct { PlayerId int64 `json:"userId"` Friends []int64 `json:"friendIds"` // 赠送的好友Id } type ResponseReceiveStamina struct { ErrCode int `json:"errCode"` Msg string `json:"msg,omitempty"` Data *ReceiveStaminaData `json:"data"` } type ReceiveStaminaData struct { Friends []int64 `json:"friendIds"` // 赠送的好友Id Materials map[int64]int64 `json:"materials"` // 体力 } // FriendRequestList 获取申请列表信息 type FriendRequestList struct { PlayerId int64 `json:"userId"` } type ResponseFriendRequestList struct { ErrCode int `json:"errCode"` Msg string `json:"msg,omitempty"` Data []*ApplyInfo `json:"data"` } type ApplyInfo struct { PlayerId int64 `json:"playerId"` CreateTs int64 `json:"createTs"` HeadId int64 `json:"headId"` //头像 FrameId int64 `json:"frameId"` //头像框 Nick string `json:"nick"` //昵称 Level int64 `json:"level"` //等级 ServerId int64 `json:"serverId"` //服务器id } // RefreshCandidateFriends 刷新待选好友列表 type RefreshCandidateFriends struct { PlayerId int64 `json:"userId"` } type ResponseRefreshCandidateFriends struct { ErrCode int `json:"errCode"` Msg string `json:"msg,omitempty"` Data []*CandidateFriend `json:"data"` } type RefreshCandidateFriendsData struct { CreateTs int64 `json:"createTs"` // 申请时间 PlayerId int64 `json:"playerId"` HeadId int64 `json:"headId"` //头像 FrameId int64 `json:"frameId"` //头像框 Nick string `json:"nick"` //昵称 Level int64 `json:"level"` //等级 ServerId int64 `json:"serverId"` //服务器id Online int64 `json:"online"` //在线状态 } // SearchCandidateFriends 查找玩家 type SearchCandidateFriends struct { PlayerId int64 `json:"userId"` Search string `json:"search"` } type ResponseSearchCandidateFriends struct { ErrCode int `json:"errCode"` Msg string `json:"msg,omitempty"` Data []*CandidateFriend `json:"data"` } type CandidateFriend struct { PlayerId int64 `json:"playerId"` HeadId int64 `json:"headId"` //头像 FrameId int64 `json:"frameId"` //头像框 Nick string `json:"nick"` //昵称 Level int64 `json:"level"` //等级 ServerId int64 `json:"serverId"` //服务器id Online int64 `json:"online"` //在线状态 LastLoginTick int64 `json:"lastLoginTick"` //上次登录时间 FriendStatus int64 `json:"friendStatus"` // 0未添加 1已申请未通过 2已是好友 } // DeleteFriend 删除好友 type DeleteFriend struct { PlayerId int64 `json:"userId"` FriendId int64 `json:"friendId"` } type ResponseDeleteFriend struct { ErrCode int `json:"errCode"` Msg string `json:"msg,omitempty"` Data int64 `json:"data"` }