diff --git a/src/server/game/mod/friendTreasure.go/friendTreasure.go b/src/server/game/mod/friendTreasure.go/friendTreasure.go index 59741706..e737695a 100644 --- a/src/server/game/mod/friendTreasure.go/friendTreasure.go +++ b/src/server/game/mod/friendTreasure.go/friendTreasure.go @@ -13,7 +13,7 @@ type FriendTreasureMod struct { Shift int // 挡位 Pos []int List map[int]*msg.TreasureInfo - List2 []int32 // 选择的好友 + List2 []int64 // 选择的好友 Status int } @@ -36,7 +36,7 @@ func (f *FriendTreasureMod) ZeroUpdate() { f.Shift = 0 f.Pos = nil f.List = make(map[int]*msg.TreasureInfo) - f.List2 = nil + f.List2 = []int64{} f.Status = GAME_STATUS_IDLE } @@ -44,7 +44,7 @@ func (f *FriendTreasureMod) InitGame(List []*msg.TreasureInfo, List2 []int32) { for _, v := range List { f.List[int(v.Pos)] = v } - f.List2 = List2 + f.Status = 1 } @@ -65,6 +65,9 @@ func (f *FriendTreasureMod) Flip(Pos int) ([]*item.Item, error) { Info.Status = GAME_STATUS_START return friendTreasureCfg.GetChestItems(Prob), nil } + if Info.Uid != 0 { + f.List2 = append(f.List2, Info.Uid) + } Info.Status = GAME_STATUS_START return nil, nil } diff --git a/src/server/msg/Gameapi.pb.go b/src/server/msg/Gameapi.pb.go index 11e66616..5707d9e9 100644 --- a/src/server/msg/Gameapi.pb.go +++ b/src/server/msg/Gameapi.pb.go @@ -19437,7 +19437,7 @@ type ResFriendTreasure struct { Star int32 `protobuf:"varint,2,opt,name=Star,proto3" json:"Star,omitempty"` // 星级 Shift int32 `protobuf:"varint,3,opt,name=Shift,proto3" json:"Shift,omitempty"` // 当前挡位 List []*TreasureInfo `protobuf:"bytes,4,rep,name=List,proto3" json:"List,omitempty"` // 列表 - List2 []int32 `protobuf:"varint,5,rep,packed,name=List2,proto3" json:"List2,omitempty"` // + List2 []int64 `protobuf:"varint,5,rep,packed,name=List2,proto3" json:"List2,omitempty"` // 今日已翻玩家列表 } func (x *ResFriendTreasure) Reset() { @@ -19498,7 +19498,7 @@ func (x *ResFriendTreasure) GetList() []*TreasureInfo { return nil } -func (x *ResFriendTreasure) GetList2() []int32 { +func (x *ResFriendTreasure) GetList2() []int64 { if x != nil { return x.List2 } @@ -22641,7 +22641,7 @@ var file_proto_Gameapi_proto_rawDesc = []byte{ 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x6c, 0x2e, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x69, 0x73, 0x74, 0x32, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x22, 0xa6, 0x01, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,