From ca7becb3d492ce9a40fb5a773a28913ae60249a8 Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Thu, 5 Jun 2025 11:06:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=9C=E8=AE=BF=E7=82=B9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/PlayerBack.go | 1 + src/server/game/RegisterNetworkFunc.go | 3 ++- src/server/msg/Gameapi.pb.go | 13 +++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/server/game/PlayerBack.go b/src/server/game/PlayerBack.go index b8e7fdb4..1339aa1c 100644 --- a/src/server/game/PlayerBack.go +++ b/src/server/game/PlayerBack.go @@ -96,6 +96,7 @@ func PlayroomBackData(p *Player) { r.DailyTask = PlayroomMod.BackDataTask() r.Kiss = int32(data.Kiss) r.Revenge = PlayroomMod.Revenge + r.InteractNum = int32(PlayroomMod.InteractNum) p.PushClientRes(r) } diff --git a/src/server/game/RegisterNetworkFunc.go b/src/server/game/RegisterNetworkFunc.go index 6228d5f0..d1c90842 100644 --- a/src/server/game/RegisterNetworkFunc.go +++ b/src/server/game/RegisterNetworkFunc.go @@ -3152,7 +3152,8 @@ func ReqPlayroomInteract(player *Player, buf []byte) error { LimitedTimePlayroomTrigger(player) player.NotifyPlayroomKiss() player.PushClientRes(&msg.ResPlayroomInteract{ - Code: msg.RES_CODE_SUCCESS, + Code: msg.RES_CODE_SUCCESS, + InteractNum: int32(PlayroomMod.InteractNum), }) return nil } diff --git a/src/server/msg/Gameapi.pb.go b/src/server/msg/Gameapi.pb.go index 9aac84a3..640f638e 100644 --- a/src/server/msg/Gameapi.pb.go +++ b/src/server/msg/Gameapi.pb.go @@ -20862,6 +20862,7 @@ type ResPlayroomInteract struct { state protoimpl.MessageState `protogen:"open.v1"` Code RES_CODE `protobuf:"varint,1,opt,name=Code,proto3,enum=tutorial.RES_CODE" json:"Code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"` + InteractNum int32 `protobuf:"varint,3,opt,name=InteractNum,proto3" json:"InteractNum,omitempty"` // 互动次数 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -20910,6 +20911,13 @@ func (x *ResPlayroomInteract) GetMsg() string { return "" } +func (x *ResPlayroomInteract) GetInteractNum() int32 { + if x != nil { + return x.InteractNum + } + return 0 +} + // playroom装饰 type ReqPlayroomSetRoom struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -24462,10 +24470,11 @@ const file_proto_Gameapi_proto_rawDesc = "" + "\x05value\x18\x02 \x01(\v2\x12.tutorial.ItemInfoR\x05value:\x028\x01\"9\n" + "\x13ReqPlayroomInteract\x12\x0e\n" + "\x02Id\x18\x01 \x01(\x05R\x02Id\x12\x12\n" + - "\x04Type\x18\x02 \x01(\x05R\x04Type\"O\n" + + "\x04Type\x18\x02 \x01(\x05R\x04Type\"q\n" + "\x13ResPlayroomInteract\x12&\n" + "\x04Code\x18\x01 \x01(\x0e2\x12.tutorial.RES_CODER\x04Code\x12\x10\n" + - "\x03Msg\x18\x02 \x01(\tR\x03Msg\"\x99\x01\n" + + "\x03Msg\x18\x02 \x01(\tR\x03Msg\x12 \n" + + "\vInteractNum\x18\x03 \x01(\x05R\vInteractNum\"\x99\x01\n" + "\x12ReqPlayroomSetRoom\x12F\n" + "\bPlayroom\x18\x01 \x03(\v2*.tutorial.ReqPlayroomSetRoom.PlayroomEntryR\bPlayroom\x1a;\n" + "\rPlayroomEntry\x12\x10\n" +