Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-common
Commits
1c8db43f
Commit
1c8db43f
authored
Apr 20, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:调整
parent
32d87956
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
userProxy.proto
protocol/userProxy.proto
+2
-2
user_center_func.go
rpc/user_center_func.go
+8
-8
No files found.
protocol/userProxy.proto
View file @
1c8db43f
...
@@ -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
user
Id1
=
2
;
User
user
=
2
;
User
userId2
=
3
;
User
otherUser
=
3
;
}
}
message
SheepGamePlayer
{
message
SheepGamePlayer
{
...
...
rpc/user_center_func.go
View file @
1c8db43f
...
@@ -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
,
User
Id1
:
&
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment