Commit c0b6f322 authored by hujiebin's avatar hujiebin

proto

parent edd07972
......@@ -362,4 +362,5 @@ message GlobalGameBanner {
uint64 userId = 2;
string avatar = 3;
uint64 diamond = 4;
string bannerUrl = 5;
}
\ No newline at end of file
......@@ -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,
GameType: gameType,
UserId: winUserId,
Avatar: avatar,
Diamond: diamond,
BannerUrl: bannerUrl,
}
if buffer, err := proto.Marshal(msg); err == nil {
rspUids, err := broadcast(MsgTypeGlobalGameBanner, 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