From d2526a180961e103da9df827d3eb6a382a4779d4 Mon Sep 17 00:00:00 2001 From: hujiebin Date: Wed, 7 Jun 2023 17:08:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=BB=E7=9F=B3=E5=8F=98=E5=8C=96=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocol/userProxy.proto | 1 + rpc/user_center_func.go | 5 +++-- script/utils/utils_test.go | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/protocol/userProxy.proto b/protocol/userProxy.proto index 5a1f665..15ce505 100644 --- a/protocol/userProxy.proto +++ b/protocol/userProxy.proto @@ -355,6 +355,7 @@ message RoomInviteMember { /* id == 145 钻石变化 */ message DiamondChange { uint32 remainDiamond = 1; + uint32 remainPinkDiamond = 2; } /* id == 146 游戏横幅 */ diff --git a/rpc/user_center_func.go b/rpc/user_center_func.go index 8325600..e0546d0 100644 --- a/rpc/user_center_func.go +++ b/rpc/user_center_func.go @@ -68,9 +68,10 @@ func SendGlobalRocketNotice(groupId string, period string, round uint32, stage u } // 发送钻石变化通知 -func SendDiamondChange(userId uint64, diamond uint32) error { +func SendDiamondChange(userId uint64, diamond, pinkDiamond uint32) error { msg := &userProxy.DiamondChange{ - RemainDiamond: diamond, + RemainDiamond: diamond, + RemainPinkDiamond: pinkDiamond, } if buffer, err := proto.Marshal(msg); err == nil { rspUids, err := multicast([]uint64{userId}, MsgDiamondChange, buffer) diff --git a/script/utils/utils_test.go b/script/utils/utils_test.go index 28d1a39..e845eca 100644 --- a/script/utils/utils_test.go +++ b/script/utils/utils_test.go @@ -10,6 +10,6 @@ func TestTestCommon(t *testing.T) { } func TestJwt(t *testing.T) { - token, _ := jwt.GenerateToken(4549, "f98c7fe5698e447c998615332eb660d1", "hiloApi") + token, _ := jwt.GenerateToken(7619, "f2ab93523f2a4f94825d544a67607290", "hiloApi") t.Logf(token) } -- 2.22.0