playroom优化

This commit is contained in:
hahwu 2025-06-05 17:26:46 +08:00
parent 61d865d6c5
commit 7f034659e3
2 changed files with 12 additions and 12 deletions

View File

@ -52,8 +52,8 @@ type PlayroomMod struct {
DailyTask map[int]*DailyTask // 每日任务
DailyTaskReward []int // 每日任务奖励
Physiology map[int]*Physiology
InteractNum int // 互动次数
Revenge bool // 是否复仇
InteractNum int // 互动次数
Revenge int64 // 复仇Uid
}
type DailyTask struct {
@ -317,7 +317,7 @@ func (p *PlayroomMod) AddChip(Uid int, Time int64) {
return
}
p.ChipList = append(p.ChipList, &ChipInfo{Uid: Uid, Time: Time})
p.Revenge = true
p.Revenge = int64(Uid)
}
func (p *PlayroomMod) SetTarget(Target int) {
@ -450,7 +450,7 @@ func (p *PlayroomMod) ResetGame() {
p.GameId = 0
p.GameReward = make(map[int]*item.Item)
p.InteractNum = 0
p.Revenge = false
p.Revenge = 0
}
func (p *PlayroomMod) ResetLose() {

View File

@ -18792,7 +18792,7 @@ type ResPlayroom struct {
DailyTaskReward []int32 `protobuf:"varint,24,rep,packed,name=DailyTaskReward,proto3" json:"DailyTaskReward,omitempty"` // 任务大奖励
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 bool `protobuf:"varint,27,opt,name=Revenge,proto3" json:"Revenge,omitempty"` // 是否复仇
Revenge int64 `protobuf:"varint,27,opt,name=Revenge,proto3" json:"Revenge,omitempty"` // 复仇Uid
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -19009,11 +19009,11 @@ func (x *ResPlayroom) GetKiss() int32 {
return 0
}
func (x *ResPlayroom) GetRevenge() bool {
func (x *ResPlayroom) GetRevenge() int64 {
if x != nil {
return x.Revenge
}
return false
return 0
}
type NotifyPlayroomTask struct {
@ -19918,7 +19918,7 @@ type NotifyPlayroomLose struct {
state protoimpl.MessageState `protogen:"open.v1"`
LoseItem []*ItemInfo `protobuf:"bytes,1,rep,name=LoseItem,proto3" json:"LoseItem,omitempty"` // 损失的道具
Chip []*ChipInfo `protobuf:"bytes,2,rep,name=Chip,proto3" json:"Chip,omitempty"` // 碎片
Revenge bool `protobuf:"varint,3,opt,name=Revenge,proto3" json:"Revenge,omitempty"` // 是否复仇
Revenge int64 `protobuf:"varint,3,opt,name=Revenge,proto3" json:"Revenge,omitempty"` // 复仇
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -19967,11 +19967,11 @@ func (x *NotifyPlayroomLose) GetChip() []*ChipInfo {
return nil
}
func (x *NotifyPlayroomLose) GetRevenge() bool {
func (x *NotifyPlayroomLose) GetRevenge() int64 {
if x != nil {
return x.Revenge
}
return false
return 0
}
type ChipInfo struct {
@ -24304,7 +24304,7 @@ 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(\bR\aRevenge\x1a;\n" +
"\aRevenge\x18\x1b \x01(\x03R\aRevenge\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" +
@ -24378,7 +24378,7 @@ const file_proto_Gameapi_proto_rawDesc = "" +
"\x12NotifyPlayroomLose\x12.\n" +
"\bLoseItem\x18\x01 \x03(\v2\x12.tutorial.ItemInfoR\bLoseItem\x12&\n" +
"\x04Chip\x18\x02 \x03(\v2\x12.tutorial.ChipInfoR\x04Chip\x12\x18\n" +
"\aRevenge\x18\x03 \x01(\bR\aRevenge\"\x1c\n" +
"\aRevenge\x18\x03 \x01(\x03R\aRevenge\"\x1c\n" +
"\bChipInfo\x12\x10\n" +
"\x03Uid\x18\x01 \x01(\x03R\x03Uid\"\xb0\x02\n" +
"\x12NotifyPlayroomMood\x12\x18\n" +