playroom优化

This commit is contained in:
hahwu 2025-07-28 10:38:24 +08:00
parent 34ab97fb30
commit 265038b8cb
2 changed files with 92 additions and 74 deletions

View File

@ -76,6 +76,14 @@ func PlayroomBackData(p *Player) {
EmojiId: int32(v.Emoji),
})
}
AdWatch := make([]*proto.AdItem, 0)
for k, v := range PlayroomMod.ADItem {
AdWatch = append(AdWatch, &proto.AdItem{
Watch: int32(v.Watch),
LastWatch: int32(v.LastTime),
ItemId: int32(k),
})
}
data := G_GameLogicPtr.GetUserData(int(p.M_DwUin))
r.Dress = Dress
@ -98,6 +106,7 @@ func PlayroomBackData(p *Player) {
r.Kiss = int32(data.Kiss)
r.Revenge = PlayroomMod.RevengeUid
r.InteractNum = int32(PlayroomMod.InteractNum)
r.AdItem = AdWatch
p.PushClientRes(r)
}

View File

@ -19380,6 +19380,7 @@ type ResPlayroom struct {
InteractNum int32 `protobuf:"varint,25,opt,name=InteractNum,proto3" json:"InteractNum,omitempty"` // 互动次数
Kiss int32 `protobuf:"varint,26,opt,name=Kiss,proto3" json:"Kiss,omitempty"` // 亲吻次数
Revenge int64 `protobuf:"varint,27,opt,name=Revenge,proto3" json:"Revenge,omitempty"` // 复仇Uid
AdItem []*AdItem `protobuf:"bytes,28,rep,name=AdItem,proto3" json:"AdItem,omitempty"` // 广告奖励信息
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -19603,6 +19604,13 @@ func (x *ResPlayroom) GetRevenge() int64 {
return 0
}
func (x *ResPlayroom) GetAdItem() []*AdItem {
if x != nil {
return x.AdItem
}
return nil
}
type NotifyPlayroomTask struct {
state protoimpl.MessageState `protogen:"open.v1"`
DailyTask []*DailyTask `protobuf:"bytes,1,rep,name=DailyTask,proto3" json:"DailyTask,omitempty"` // 每日任务
@ -26104,8 +26112,7 @@ const file_proto_Gameapi_proto_rawDesc = "" +
"\rResRaceReward\x12&\n" +
"\x04Code\x18\x01 \x01(\x0e2\x12.tutorial.RES_CODER\x04Code\x12\x10\n" +
"\x03Msg\x18\x02 \x01(\tR\x03Msg\"\r\n" +
"\vReqPlayroom\"\xe3\n" +
"\n" +
"\vReqPlayroom\"\x8d\v\n" +
"\vResPlayroom\x12\x16\n" +
"\x06status\x18\x01 \x01(\x05R\x06status\x12(\n" +
"\x05Items\x18\x02 \x03(\v2\x12.tutorial.ItemInfoR\x05Items\x122\n" +
@ -26138,7 +26145,8 @@ const file_proto_Gameapi_proto_rawDesc = "" +
"\x0fDailyTaskReward\x18\x18 \x03(\x05R\x0fDailyTaskReward\x12 \n" +
"\vInteractNum\x18\x19 \x01(\x05R\vInteractNum\x12\x12\n" +
"\x04Kiss\x18\x1a \x01(\x05R\x04Kiss\x12\x18\n" +
"\aRevenge\x18\x1b \x01(\x03R\aRevenge\x1a;\n" +
"\aRevenge\x18\x1b \x01(\x03R\aRevenge\x12(\n" +
"\x06AdItem\x18\x1c \x03(\v2\x10.tutorial.AdItemR\x06AdItem\x1a;\n" +
"\rPlayroomEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\x1a7\n" +
@ -27401,77 +27409,78 @@ var file_proto_Gameapi_proto_depIdxs = []int32{
497, // 196: tutorial.ResPlayroom.Dress:type_name -> tutorial.ResPlayroom.DressEntry
498, // 197: tutorial.ResPlayroom.DressSet:type_name -> tutorial.ResPlayroom.DressSetEntry
163, // 198: tutorial.ResPlayroom.DailyTask:type_name -> tutorial.DailyTask
163, // 199: tutorial.NotifyPlayroomTask.DailyTask:type_name -> tutorial.DailyTask
2, // 200: tutorial.ResPlayroomTask.Code:type_name -> tutorial.RES_CODE
2, // 201: tutorial.ResPlayroomTaskReward.Code:type_name -> tutorial.RES_CODE
2, // 202: tutorial.ResPlayroomUnlock.Code:type_name -> tutorial.RES_CODE
2, // 203: tutorial.ResPlayroomUpvote.Code:type_name -> tutorial.RES_CODE
499, // 204: tutorial.ReqPlayroomDressSet.DressSet:type_name -> tutorial.ReqPlayroomDressSet.DressSetEntry
2, // 205: tutorial.ResPlayroomDressSet.Code:type_name -> tutorial.RES_CODE
2, // 206: tutorial.ResPlayroomPetAirSet.Code:type_name -> tutorial.RES_CODE
2, // 207: tutorial.ResPlayroomWrokOutline.Code:type_name -> tutorial.RES_CODE
159, // 208: tutorial.NotifyPlayroomLose.LoseItem:type_name -> tutorial.ItemInfo
369, // 209: tutorial.NotifyPlayroomLose.Chip:type_name -> tutorial.ChipInfo
500, // 210: tutorial.NotifyPlayroomMood.Mood:type_name -> tutorial.NotifyPlayroomMood.MoodEntry
501, // 211: tutorial.NotifyPlayroomMood.Physiology:type_name -> tutorial.NotifyPlayroomMood.PhysiologyEntry
371, // 212: tutorial.NotifyPlayroomMood.AdItem:type_name -> tutorial.AdItem
502, // 213: tutorial.ResPlayroomInfo.Playroom:type_name -> tutorial.ResPlayroomInfo.PlayroomEntry
503, // 214: tutorial.ResPlayroomInfo.Items:type_name -> tutorial.ResPlayroomInfo.ItemsEntry
504, // 215: tutorial.ResPlayroomInfo.flip:type_name -> tutorial.ResPlayroomInfo.FlipEntry
505, // 216: tutorial.ResPlayroomInfo.Emoji:type_name -> tutorial.ResPlayroomInfo.EmojiEntry
506, // 217: tutorial.ResPlayroomInfo.DressSet:type_name -> tutorial.ResPlayroomInfo.DressSetEntry
2, // 218: tutorial.ResPlayroomFlip.Code:type_name -> tutorial.RES_CODE
2, // 219: tutorial.ResPlayroomGuide.Code:type_name -> tutorial.RES_CODE
2, // 220: tutorial.ResPlayroomFlipReward.Code:type_name -> tutorial.RES_CODE
2, // 221: tutorial.ResPlayroomGame.Code:type_name -> tutorial.RES_CODE
507, // 222: tutorial.ResPlayroomGame.Items:type_name -> tutorial.ResPlayroomGame.ItemsEntry
159, // 223: tutorial.ResPlayroomGameShowReward.Items:type_name -> tutorial.ItemInfo
2, // 224: tutorial.ResPlayroomInteract.Code:type_name -> tutorial.RES_CODE
508, // 225: tutorial.ReqPlayroomSetRoom.Playroom:type_name -> tutorial.ReqPlayroomSetRoom.PlayroomEntry
2, // 226: tutorial.ResPlayroomSetRoom.Code:type_name -> tutorial.RES_CODE
2, // 227: tutorial.ResPlayroomSelectReward.Code:type_name -> tutorial.RES_CODE
2, // 228: tutorial.ResPlayroomLose.Code:type_name -> tutorial.RES_CODE
2, // 229: tutorial.ResPlayroomWork.Code:type_name -> tutorial.RES_CODE
2, // 230: tutorial.ResPlayroomRest.Code:type_name -> tutorial.RES_CODE
2, // 231: tutorial.ResPlayroomDraw.Code:type_name -> tutorial.RES_CODE
2, // 232: tutorial.ResPlayroomChip.Code:type_name -> tutorial.RES_CODE
2, // 233: tutorial.ResPlayroomBuyItem.Code:type_name -> tutorial.RES_CODE
2, // 234: tutorial.ResPlayroomShop.Code:type_name -> tutorial.RES_CODE
409, // 235: tutorial.ResFriendTreasure.List:type_name -> tutorial.TreasureInfo
409, // 236: tutorial.ReqFriendTreasureStart.List:type_name -> tutorial.TreasureInfo
2, // 237: tutorial.ResFriendTreasureStart.Code:type_name -> tutorial.RES_CODE
2, // 238: tutorial.ResFriendTreasureEnd.Code:type_name -> tutorial.RES_CODE
2, // 239: tutorial.ResFriendTreasureFilp.Code:type_name -> tutorial.RES_CODE
420, // 240: tutorial.ResCollectInfo.Items:type_name -> tutorial.CollectItem
159, // 241: tutorial.CollectItem.Items:type_name -> tutorial.ItemInfo
2, // 242: tutorial.ResCollect.Code:type_name -> tutorial.RES_CODE
425, // 243: tutorial.ResCatnip.GameList:type_name -> tutorial.CatnipGame
214, // 244: tutorial.CatnipGame.Partner:type_name -> tutorial.ResPlayerSimple
2, // 245: tutorial.ResCatnipInvite.Code:type_name -> tutorial.RES_CODE
2, // 246: tutorial.ResCatnipAgree.Code:type_name -> tutorial.RES_CODE
2, // 247: tutorial.ResCatnipRefuse.Code:type_name -> tutorial.RES_CODE
2, // 248: tutorial.ResCatnipMultiply.Code:type_name -> tutorial.RES_CODE
2, // 249: tutorial.ResCatnipPlay.Code:type_name -> tutorial.RES_CODE
2, // 250: tutorial.ResCatnipReward.Code:type_name -> tutorial.RES_CODE
2, // 251: tutorial.ResCatnipGrandReward.Code:type_name -> tutorial.RES_CODE
162, // 252: tutorial.ResDailyTask.WeekRewardEntry.value:type_name -> tutorial.DailyWeek
163, // 253: tutorial.ResDailyTask.DailyTaskEntry.value:type_name -> tutorial.DailyTask
199, // 254: tutorial.ResLimitEvent.LimitEventListEntry.value:type_name -> tutorial.LimitEvent
214, // 255: tutorial.ResRank.RankListEntry.value:type_name -> tutorial.ResPlayerSimple
258, // 256: tutorial.ResMailList.MailListEntry.value:type_name -> tutorial.MailInfo
274, // 257: tutorial.ResCharge.SpecialShopEntry.value:type_name -> tutorial.ResSpecialShop
275, // 258: tutorial.ResCharge.ChessShopEntry.value:type_name -> tutorial.ResChessShop
286, // 259: tutorial.ResEndless.EndlessListEntry.value:type_name -> tutorial.ResEndlessInfo
215, // 260: tutorial.ResChampshipRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank
215, // 261: tutorial.ResChampshipPreRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank
359, // 262: tutorial.ResPlayroom.DressEntry.value:type_name -> tutorial.PlayroomDress
159, // 263: tutorial.ResPlayroomInfo.ItemsEntry.value:type_name -> tutorial.ItemInfo
159, // 264: tutorial.ResPlayroomGame.ItemsEntry.value:type_name -> tutorial.ItemInfo
265, // [265:265] is the sub-list for method output_type
265, // [265:265] is the sub-list for method input_type
265, // [265:265] is the sub-list for extension type_name
265, // [265:265] is the sub-list for extension extendee
0, // [0:265] is the sub-list for field type_name
371, // 199: tutorial.ResPlayroom.AdItem:type_name -> tutorial.AdItem
163, // 200: tutorial.NotifyPlayroomTask.DailyTask:type_name -> tutorial.DailyTask
2, // 201: tutorial.ResPlayroomTask.Code:type_name -> tutorial.RES_CODE
2, // 202: tutorial.ResPlayroomTaskReward.Code:type_name -> tutorial.RES_CODE
2, // 203: tutorial.ResPlayroomUnlock.Code:type_name -> tutorial.RES_CODE
2, // 204: tutorial.ResPlayroomUpvote.Code:type_name -> tutorial.RES_CODE
499, // 205: tutorial.ReqPlayroomDressSet.DressSet:type_name -> tutorial.ReqPlayroomDressSet.DressSetEntry
2, // 206: tutorial.ResPlayroomDressSet.Code:type_name -> tutorial.RES_CODE
2, // 207: tutorial.ResPlayroomPetAirSet.Code:type_name -> tutorial.RES_CODE
2, // 208: tutorial.ResPlayroomWrokOutline.Code:type_name -> tutorial.RES_CODE
159, // 209: tutorial.NotifyPlayroomLose.LoseItem:type_name -> tutorial.ItemInfo
369, // 210: tutorial.NotifyPlayroomLose.Chip:type_name -> tutorial.ChipInfo
500, // 211: tutorial.NotifyPlayroomMood.Mood:type_name -> tutorial.NotifyPlayroomMood.MoodEntry
501, // 212: tutorial.NotifyPlayroomMood.Physiology:type_name -> tutorial.NotifyPlayroomMood.PhysiologyEntry
371, // 213: tutorial.NotifyPlayroomMood.AdItem:type_name -> tutorial.AdItem
502, // 214: tutorial.ResPlayroomInfo.Playroom:type_name -> tutorial.ResPlayroomInfo.PlayroomEntry
503, // 215: tutorial.ResPlayroomInfo.Items:type_name -> tutorial.ResPlayroomInfo.ItemsEntry
504, // 216: tutorial.ResPlayroomInfo.flip:type_name -> tutorial.ResPlayroomInfo.FlipEntry
505, // 217: tutorial.ResPlayroomInfo.Emoji:type_name -> tutorial.ResPlayroomInfo.EmojiEntry
506, // 218: tutorial.ResPlayroomInfo.DressSet:type_name -> tutorial.ResPlayroomInfo.DressSetEntry
2, // 219: tutorial.ResPlayroomFlip.Code:type_name -> tutorial.RES_CODE
2, // 220: tutorial.ResPlayroomGuide.Code:type_name -> tutorial.RES_CODE
2, // 221: tutorial.ResPlayroomFlipReward.Code:type_name -> tutorial.RES_CODE
2, // 222: tutorial.ResPlayroomGame.Code:type_name -> tutorial.RES_CODE
507, // 223: tutorial.ResPlayroomGame.Items:type_name -> tutorial.ResPlayroomGame.ItemsEntry
159, // 224: tutorial.ResPlayroomGameShowReward.Items:type_name -> tutorial.ItemInfo
2, // 225: tutorial.ResPlayroomInteract.Code:type_name -> tutorial.RES_CODE
508, // 226: tutorial.ReqPlayroomSetRoom.Playroom:type_name -> tutorial.ReqPlayroomSetRoom.PlayroomEntry
2, // 227: tutorial.ResPlayroomSetRoom.Code:type_name -> tutorial.RES_CODE
2, // 228: tutorial.ResPlayroomSelectReward.Code:type_name -> tutorial.RES_CODE
2, // 229: tutorial.ResPlayroomLose.Code:type_name -> tutorial.RES_CODE
2, // 230: tutorial.ResPlayroomWork.Code:type_name -> tutorial.RES_CODE
2, // 231: tutorial.ResPlayroomRest.Code:type_name -> tutorial.RES_CODE
2, // 232: tutorial.ResPlayroomDraw.Code:type_name -> tutorial.RES_CODE
2, // 233: tutorial.ResPlayroomChip.Code:type_name -> tutorial.RES_CODE
2, // 234: tutorial.ResPlayroomBuyItem.Code:type_name -> tutorial.RES_CODE
2, // 235: tutorial.ResPlayroomShop.Code:type_name -> tutorial.RES_CODE
409, // 236: tutorial.ResFriendTreasure.List:type_name -> tutorial.TreasureInfo
409, // 237: tutorial.ReqFriendTreasureStart.List:type_name -> tutorial.TreasureInfo
2, // 238: tutorial.ResFriendTreasureStart.Code:type_name -> tutorial.RES_CODE
2, // 239: tutorial.ResFriendTreasureEnd.Code:type_name -> tutorial.RES_CODE
2, // 240: tutorial.ResFriendTreasureFilp.Code:type_name -> tutorial.RES_CODE
420, // 241: tutorial.ResCollectInfo.Items:type_name -> tutorial.CollectItem
159, // 242: tutorial.CollectItem.Items:type_name -> tutorial.ItemInfo
2, // 243: tutorial.ResCollect.Code:type_name -> tutorial.RES_CODE
425, // 244: tutorial.ResCatnip.GameList:type_name -> tutorial.CatnipGame
214, // 245: tutorial.CatnipGame.Partner:type_name -> tutorial.ResPlayerSimple
2, // 246: tutorial.ResCatnipInvite.Code:type_name -> tutorial.RES_CODE
2, // 247: tutorial.ResCatnipAgree.Code:type_name -> tutorial.RES_CODE
2, // 248: tutorial.ResCatnipRefuse.Code:type_name -> tutorial.RES_CODE
2, // 249: tutorial.ResCatnipMultiply.Code:type_name -> tutorial.RES_CODE
2, // 250: tutorial.ResCatnipPlay.Code:type_name -> tutorial.RES_CODE
2, // 251: tutorial.ResCatnipReward.Code:type_name -> tutorial.RES_CODE
2, // 252: tutorial.ResCatnipGrandReward.Code:type_name -> tutorial.RES_CODE
162, // 253: tutorial.ResDailyTask.WeekRewardEntry.value:type_name -> tutorial.DailyWeek
163, // 254: tutorial.ResDailyTask.DailyTaskEntry.value:type_name -> tutorial.DailyTask
199, // 255: tutorial.ResLimitEvent.LimitEventListEntry.value:type_name -> tutorial.LimitEvent
214, // 256: tutorial.ResRank.RankListEntry.value:type_name -> tutorial.ResPlayerSimple
258, // 257: tutorial.ResMailList.MailListEntry.value:type_name -> tutorial.MailInfo
274, // 258: tutorial.ResCharge.SpecialShopEntry.value:type_name -> tutorial.ResSpecialShop
275, // 259: tutorial.ResCharge.ChessShopEntry.value:type_name -> tutorial.ResChessShop
286, // 260: tutorial.ResEndless.EndlessListEntry.value:type_name -> tutorial.ResEndlessInfo
215, // 261: tutorial.ResChampshipRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank
215, // 262: tutorial.ResChampshipPreRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank
359, // 263: tutorial.ResPlayroom.DressEntry.value:type_name -> tutorial.PlayroomDress
159, // 264: tutorial.ResPlayroomInfo.ItemsEntry.value:type_name -> tutorial.ItemInfo
159, // 265: tutorial.ResPlayroomGame.ItemsEntry.value:type_name -> tutorial.ItemInfo
266, // [266:266] is the sub-list for method output_type
266, // [266:266] is the sub-list for method input_type
266, // [266:266] is the sub-list for extension type_name
266, // [266:266] is the sub-list for extension extendee
0, // [0:266] is the sub-list for field type_name
}
func init() { file_proto_Gameapi_proto_init() }