diff --git a/data/DB_GiftCard.dat b/data/DB_GiftCard.dat index 90fe006..1560036 100644 Binary files a/data/DB_GiftCard.dat and b/data/DB_GiftCard.dat differ diff --git a/data/DB_GiftCard.json b/data/DB_GiftCard.json index e1d7dfb..e3df84b 100644 --- a/data/DB_GiftCard.json +++ b/data/DB_GiftCard.json @@ -12,7 +12,9 @@ "100001": 1000000 }, "Time": 7, - "Equity": 1 + "Equity": [ + 0 + ] } ] } \ No newline at end of file diff --git a/gamesrv/base/player.go b/gamesrv/base/player.go index a1067f3..a766a95 100644 --- a/gamesrv/base/player.go +++ b/gamesrv/base/player.go @@ -1415,8 +1415,10 @@ func (this *Player) GetWeekCardPrivilege(typeId int32) bool { for id, endTime := range this.WeekCardTime { if endTime > now { data := srvdata.PBDB_GiftCardMgr.GetData(id) - if data.Equity == typeId { - return true + for _, equity := range data.GetEquity() { + if equity == typeId { + return true + } } } } diff --git a/protocol/server/pbdata.pb.go b/protocol/server/pbdata.pb.go index 28ad6b4..cf49d9f 100644 --- a/protocol/server/pbdata.pb.go +++ b/protocol/server/pbdata.pb.go @@ -6232,7 +6232,7 @@ type DB_GiftCard struct { Rewards map[int64]int64 `protobuf:"bytes,4,rep,name=Rewards,proto3" json:"Rewards,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` DayRewards map[int64]int64 `protobuf:"bytes,5,rep,name=DayRewards,proto3" json:"DayRewards,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` Time int32 `protobuf:"varint,6,opt,name=Time,proto3" json:"Time,omitempty"` - Equity int32 `protobuf:"varint,7,opt,name=Equity,proto3" json:"Equity,omitempty"` + Equity []int32 `protobuf:"varint,7,rep,packed,name=Equity,proto3" json:"Equity,omitempty"` } func (x *DB_GiftCard) Reset() { @@ -6309,11 +6309,11 @@ func (x *DB_GiftCard) GetTime() int32 { return 0 } -func (x *DB_GiftCard) GetEquity() int32 { +func (x *DB_GiftCard) GetEquity() []int32 { if x != nil { return x.Equity } - return 0 + return nil } type DB_GiftCardArray struct { @@ -10750,7 +10750,7 @@ var file_pbdata_proto_rawDesc = []byte{ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x44, 0x61, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x1a, 0x3a, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x1a, 0x3a, 0x0a, 0x0c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, diff --git a/protocol/server/pbdata.proto b/protocol/server/pbdata.proto index 38e9103..b70f796 100644 --- a/protocol/server/pbdata.proto +++ b/protocol/server/pbdata.proto @@ -1069,7 +1069,7 @@ message DB_GiftCard { int32 Time = 6; - int32 Equity = 7; + repeated int32 Equity = 7; } diff --git a/tools/xlsx2binary/agc.go b/tools/xlsx2binary/agc.go index cf6a571..4f946d0 100644 --- a/tools/xlsx2binary/agc.go +++ b/tools/xlsx2binary/agc.go @@ -8202,12 +8202,20 @@ func AgcConvertDB_GiftCard(fi,fo string) { break } - temp, _ = strconv.ParseInt(row.Cells[6].String(), 10, 32) - data.Equity = int32(temp) - + arrStr = strings.Split(row.Cells[6].String(), "|") + arrInt = nil + if len(arrStr) > 0 && row.Cells[6].String() != "" { + arrInt = make([]int32, len(arrStr), len(arrStr)) + for i, v := range arrStr { + temp, _ = strconv.ParseInt(strings.TrimSpace(v), 10, 32) + arrInt[i] = int32(temp) + } + } + data.Equity = arrInt + diff --git a/worldsrv/player.go b/worldsrv/player.go index 5bbe9fb..74b847e 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -4618,9 +4618,12 @@ func (this *Player) GetWeekCardPrivilege(typeId int32) bool { for id, endTime := range this.WeekCardTime { if endTime > now { data := srvdata.PBDB_GiftCardMgr.GetData(id) - if data.Equity == typeId { - return true + for _, equity := range data.GetEquity() { + if equity == typeId { + return true + } } + } } return false diff --git a/xlsx/DB_GiftCard.xlsx b/xlsx/DB_GiftCard.xlsx index ad109cc..1e95bf3 100644 Binary files a/xlsx/DB_GiftCard.xlsx and b/xlsx/DB_GiftCard.xlsx differ