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
c0b6f322
Commit
c0b6f322
authored
Feb 23, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proto
parent
edd07972
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
userProxy.proto
protocol/userProxy.proto
+1
-0
user_center_func.go
rpc/user_center_func.go
+15
-4
No files found.
protocol/userProxy.proto
View file @
c0b6f322
...
...
@@ -362,4 +362,5 @@ message GlobalGameBanner {
uint64
userId
=
2
;
string
avatar
=
3
;
uint64
diamond
=
4
;
string
bannerUrl
=
5
;
}
\ No newline at end of file
rpc/user_center_func.go
View file @
c0b6f322
...
...
@@ -93,12 +93,23 @@ func SendDiamondChange(userId uint64, diamond uint32) error {
// 发送游戏横幅
// param winUserId:胜利的用户id
// param gameType 0:slot 5:luckybox 6:fruit
func
SendGlobalGameBanner
(
winUserId
uint64
,
diamond
uint64
,
avatar
string
,
gameType
uint32
)
error
{
bannerUrl
:=
""
switch
gameType
{
case
0
:
bannerUrl
=
"https://image.whoisamy.shop/hilo/resource/game/game_banner_slot.png"
case
5
:
bannerUrl
=
"https://image.whoisamy.shop/hilo/resource/game/game_banner_luckybox.png"
case
6
:
bannerUrl
=
"https://image.whoisamy.shop/hilo/resource/game/game_banner_fruit.png"
}
msg
:=
&
userProxy
.
GlobalGameBanner
{
GameType
:
gameType
,
UserId
:
winUserId
,
Avatar
:
avatar
,
Diamond
:
diamond
,
BannerUrl
:
bannerUrl
,
}
if
buffer
,
err
:=
proto
.
Marshal
(
msg
);
err
==
nil
{
rspUids
,
err
:=
broadcast
(
MsgTypeGlobalGameBanner
,
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