【猫草大作战】-邀请列表优化

This commit is contained in:
hahwu 2025-12-08 16:41:39 +08:00
parent baf4914f9b
commit efab82709f
2 changed files with 48 additions and 34 deletions

View File

@ -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)
}

View File

@ -26118,6 +26118,7 @@ type CatnipInvite struct {
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() }