Commit 1c8db43f authored by hujiebin's avatar hujiebin

feat:调整

parent 32d87956
...@@ -369,8 +369,8 @@ message GlobalGameBanner { ...@@ -369,8 +369,8 @@ message GlobalGameBanner {
/* id == 147 羊羊匹配成功 */ /* id == 147 羊羊匹配成功 */
message SheepMatchSuccess { message SheepMatchSuccess {
uint64 match_id = 1; uint64 match_id = 1;
User userId1 = 2; User user = 2;
User userId2 = 3; User otherUser = 3;
} }
message SheepGamePlayer { message SheepGamePlayer {
......
...@@ -219,19 +219,19 @@ func SendGroupChatNotice(fromUserId uint64, userIds []uint64, senderExtId string ...@@ -219,19 +219,19 @@ func SendGroupChatNotice(fromUserId uint64, userIds []uint64, senderExtId string
} }
// 羊羊匹配成功 // 羊羊匹配成功
func SendSheepMatchSuccess(matchId, userId1, userId2 uint64, nick1, nick2, avatar1, avatar2 string) error { func SendSheepMatchSuccess(matchId, myUserId, otherUserId uint64, nick1, nick2, avatar1, avatar2 string) error {
msg := &userProxy.SheepMatchSuccess{ msg := &userProxy.SheepMatchSuccess{
MatchId: matchId, MatchId: matchId,
UserId1: &userProxy.User{Id: userId1, Nick: nick1, Avatar: avatar1}, User: &userProxy.User{Id: myUserId, Nick: nick1, Avatar: avatar1},
UserId2: &userProxy.User{Id: userId2, Nick: nick2, Avatar: avatar2}, OtherUser: &userProxy.User{Id: otherUserId, Nick: nick2, Avatar: avatar2},
} }
if buffer, err := proto.Marshal(msg); err == nil { if buffer, err := proto.Marshal(msg); err == nil {
var userIds []uint64 var userIds []uint64
if userId1 > 0 { if myUserId > 0 {
userIds = append(userIds, userId1) userIds = append(userIds, myUserId)
} }
if userId2 > 0 { if otherUserId > 0 {
userIds = append(userIds, userId2) userIds = append(userIds, otherUserId)
} }
rspUids, err := multicast(userIds, MsgTypeSheepGameMatchSuccess, buffer) rspUids, err := multicast(userIds, MsgTypeSheepGameMatchSuccess, buffer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment