From efab82709f97400e5a31e6afbba8383031cc814f Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Mon, 8 Dec 2025 16:41:39 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=8C=AB=E8=8D=89=E5=A4=A7=E4=BD=9C?= =?UTF-8?q?=E6=88=98=E3=80=91-=E9=82=80=E8=AF=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/ActivityFunc.go | 4 ++ src/server/msg/Gameapi.pb.go | 78 +++++++++++++++++++-------------- 2 files changed, 48 insertions(+), 34 deletions(-) diff --git a/src/server/game/ActivityFunc.go b/src/server/game/ActivityFunc.go index 5c8b5267..dffa8beb 100644 --- a/src/server/game/ActivityFunc.go +++ b/src/server/game/ActivityFunc.go @@ -370,6 +370,10 @@ func (p *Player) CatnipBackData() { } } for _, v := range tmpData { + ResPlayerSimple := G_getGameLogic().GetResSimplePlayerByUid(int(v.Uid)) + if ResPlayerSimple != nil { + v.Player = ResPlayerSimple + } InviteList = append(InviteList, v) } diff --git a/src/server/msg/Gameapi.pb.go b/src/server/msg/Gameapi.pb.go index e6f594dc..4ad2f617 100644 --- a/src/server/msg/Gameapi.pb.go +++ b/src/server/msg/Gameapi.pb.go @@ -26115,9 +26115,10 @@ func (x *CatnipGame) GetFriendProgress() int32 { type CatnipInvite struct { state protoimpl.MessageState `protogen:"open.v1"` - Uid int64 `protobuf:"varint,1,opt,name=Uid,proto3" json:"Uid,omitempty"` // 好友id - Time int64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"` // 邀请时间 - Type int32 `protobuf:"varint,3,opt,name=Type,proto3" json:"Type,omitempty"` // 状态 0 可以邀请,1 已邀请 2 被邀请 3 已满员 + Uid int64 `protobuf:"varint,1,opt,name=Uid,proto3" json:"Uid,omitempty"` // 好友id + Time int64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"` // 邀请时间 + Type int32 `protobuf:"varint,3,opt,name=Type,proto3" json:"Type,omitempty"` // 状态 0 可以邀请,1 已邀请 2 被邀请 3 已满员 + Player *ResPlayerSimple `protobuf:"bytes,4,opt,name=Player,proto3" json:"Player,omitempty"` // 好友信息 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -26173,6 +26174,13 @@ func (x *CatnipInvite) GetType() int32 { return 0 } +func (x *CatnipInvite) GetPlayer() *ResPlayerSimple { + if x != nil { + return x.Player + } + return nil +} + // 邀请好友 type ReqCatnipInvite struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -29370,11 +29378,12 @@ const file_proto_Gameapi_proto_rawDesc = "" + "\x06Reward\x18\x04 \x03(\x05R\x06Reward\x123\n" + "\aPartner\x18\x05 \x01(\v2\x19.tutorial.ResPlayerSimpleR\aPartner\x12\x14\n" + "\x05Emoji\x18\x06 \x01(\x05R\x05Emoji\x12&\n" + - "\x0eFriendProgress\x18\a \x01(\x05R\x0eFriendProgress\"H\n" + + "\x0eFriendProgress\x18\a \x01(\x05R\x0eFriendProgress\"{\n" + "\fCatnipInvite\x12\x10\n" + "\x03Uid\x18\x01 \x01(\x03R\x03Uid\x12\x12\n" + "\x04Time\x18\x02 \x01(\x03R\x04Time\x12\x12\n" + - "\x04Type\x18\x03 \x01(\x05R\x04Type\"3\n" + + "\x04Type\x18\x03 \x01(\x05R\x04Type\x121\n" + + "\x06Player\x18\x04 \x01(\v2\x19.tutorial.ResPlayerSimpleR\x06Player\"3\n" + "\x0fReqCatnipInvite\x12\x0e\n" + "\x02Id\x18\x01 \x01(\x05R\x02Id\x12\x10\n" + "\x03Uid\x18\x02 \x01(\x03R\x03Uid\"]\n" + @@ -30532,35 +30541,36 @@ var file_proto_Gameapi_proto_depIdxs = []int32{ 460, // 275: tutorial.ResCatnip.GameList:type_name -> tutorial.CatnipGame 461, // 276: tutorial.ResCatnip.FriendList:type_name -> tutorial.CatnipInvite 232, // 277: tutorial.CatnipGame.Partner:type_name -> tutorial.ResPlayerSimple - 2, // 278: tutorial.ResCatnipInvite.Code:type_name -> tutorial.RES_CODE - 2, // 279: tutorial.ResCatnipAgree.Code:type_name -> tutorial.RES_CODE - 2, // 280: tutorial.ResCatnipRefuse.Code:type_name -> tutorial.RES_CODE - 2, // 281: tutorial.ResCatnipMultiply.Code:type_name -> tutorial.RES_CODE - 2, // 282: tutorial.ResCatnipPlay.Code:type_name -> tutorial.RES_CODE - 2, // 283: tutorial.ResCatnipReward.Code:type_name -> tutorial.RES_CODE - 2, // 284: tutorial.ResCatnipGrandReward.Code:type_name -> tutorial.RES_CODE - 2, // 285: tutorial.ResCatnipEmoji.Code:type_name -> tutorial.RES_CODE - 172, // 286: tutorial.ResGuideTask.TaskEntry.value:type_name -> tutorial.GuideTask - 178, // 287: tutorial.ResDailyTask.WeekRewardEntry.value:type_name -> tutorial.DailyWeek - 179, // 288: tutorial.ResDailyTask.DailyTaskEntry.value:type_name -> tutorial.DailyTask - 215, // 289: tutorial.ResLimitEvent.LimitEventListEntry.value:type_name -> tutorial.LimitEvent - 232, // 290: tutorial.ResRank.RankListEntry.value:type_name -> tutorial.ResPlayerSimple - 284, // 291: tutorial.ResMailList.MailListEntry.value:type_name -> tutorial.MailInfo - 302, // 292: tutorial.ResCharge.SpecialShopEntry.value:type_name -> tutorial.ResSpecialShop - 303, // 293: tutorial.ResCharge.ChessShopEntry.value:type_name -> tutorial.ResChessShop - 294, // 294: tutorial.ResCharge.WeeklyDiscountEntry.value:type_name -> tutorial.WeeklyDiscountInfo - 314, // 295: tutorial.ResEndless.EndlessListEntry.value:type_name -> tutorial.ResEndlessInfo - 234, // 296: tutorial.ResChampshipRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank - 234, // 297: tutorial.ResChampshipPreRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank - 391, // 298: tutorial.ResPlayroom.DressEntry.value:type_name -> tutorial.PlayroomDress - 294, // 299: tutorial.ResPlayroom.WeeklyDiscountEntry.value:type_name -> tutorial.WeeklyDiscountInfo - 169, // 300: tutorial.ResPlayroomInfo.ItemsEntry.value:type_name -> tutorial.ItemInfo - 169, // 301: tutorial.ResPlayroomGame.ItemsEntry.value:type_name -> tutorial.ItemInfo - 302, // [302:302] is the sub-list for method output_type - 302, // [302:302] is the sub-list for method input_type - 302, // [302:302] is the sub-list for extension type_name - 302, // [302:302] is the sub-list for extension extendee - 0, // [0:302] is the sub-list for field type_name + 232, // 278: tutorial.CatnipInvite.Player:type_name -> tutorial.ResPlayerSimple + 2, // 279: tutorial.ResCatnipInvite.Code:type_name -> tutorial.RES_CODE + 2, // 280: tutorial.ResCatnipAgree.Code:type_name -> tutorial.RES_CODE + 2, // 281: tutorial.ResCatnipRefuse.Code:type_name -> tutorial.RES_CODE + 2, // 282: tutorial.ResCatnipMultiply.Code:type_name -> tutorial.RES_CODE + 2, // 283: tutorial.ResCatnipPlay.Code:type_name -> tutorial.RES_CODE + 2, // 284: tutorial.ResCatnipReward.Code:type_name -> tutorial.RES_CODE + 2, // 285: tutorial.ResCatnipGrandReward.Code:type_name -> tutorial.RES_CODE + 2, // 286: tutorial.ResCatnipEmoji.Code:type_name -> tutorial.RES_CODE + 172, // 287: tutorial.ResGuideTask.TaskEntry.value:type_name -> tutorial.GuideTask + 178, // 288: tutorial.ResDailyTask.WeekRewardEntry.value:type_name -> tutorial.DailyWeek + 179, // 289: tutorial.ResDailyTask.DailyTaskEntry.value:type_name -> tutorial.DailyTask + 215, // 290: tutorial.ResLimitEvent.LimitEventListEntry.value:type_name -> tutorial.LimitEvent + 232, // 291: tutorial.ResRank.RankListEntry.value:type_name -> tutorial.ResPlayerSimple + 284, // 292: tutorial.ResMailList.MailListEntry.value:type_name -> tutorial.MailInfo + 302, // 293: tutorial.ResCharge.SpecialShopEntry.value:type_name -> tutorial.ResSpecialShop + 303, // 294: tutorial.ResCharge.ChessShopEntry.value:type_name -> tutorial.ResChessShop + 294, // 295: tutorial.ResCharge.WeeklyDiscountEntry.value:type_name -> tutorial.WeeklyDiscountInfo + 314, // 296: tutorial.ResEndless.EndlessListEntry.value:type_name -> tutorial.ResEndlessInfo + 234, // 297: tutorial.ResChampshipRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank + 234, // 298: tutorial.ResChampshipPreRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank + 391, // 299: tutorial.ResPlayroom.DressEntry.value:type_name -> tutorial.PlayroomDress + 294, // 300: tutorial.ResPlayroom.WeeklyDiscountEntry.value:type_name -> tutorial.WeeklyDiscountInfo + 169, // 301: tutorial.ResPlayroomInfo.ItemsEntry.value:type_name -> tutorial.ItemInfo + 169, // 302: tutorial.ResPlayroomGame.ItemsEntry.value:type_name -> tutorial.ItemInfo + 303, // [303:303] is the sub-list for method output_type + 303, // [303:303] is the sub-list for method input_type + 303, // [303:303] is the sub-list for extension type_name + 303, // [303:303] is the sub-list for extension extendee + 0, // [0:303] is the sub-list for field type_name } func init() { file_proto_Gameapi_proto_init() }