Compare commits
3 Commits
fe0904c4fb
...
0595d999f4
Author | SHA1 | Date |
---|---|---|
|
0595d999f4 | |
|
06d5ac5fad | |
|
7fb33896de |
Binary file not shown.
|
@ -12,7 +12,9 @@
|
||||||
"100001": 1000000
|
"100001": 1000000
|
||||||
},
|
},
|
||||||
"Time": 7,
|
"Time": 7,
|
||||||
"Equity": 1
|
"Equity": [
|
||||||
|
0
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -1415,10 +1415,12 @@ func (this *Player) GetWeekCardPrivilege(typeId int32) bool {
|
||||||
for id, endTime := range this.WeekCardTime {
|
for id, endTime := range this.WeekCardTime {
|
||||||
if endTime > now {
|
if endTime > now {
|
||||||
data := srvdata.PBDB_GiftCardMgr.GetData(id)
|
data := srvdata.PBDB_GiftCardMgr.GetData(id)
|
||||||
if data.Equity == typeId {
|
for _, equity := range data.GetEquity() {
|
||||||
|
if equity == typeId {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"`
|
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"`
|
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"`
|
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() {
|
func (x *DB_GiftCard) Reset() {
|
||||||
|
@ -6309,11 +6309,11 @@ func (x *DB_GiftCard) GetTime() int32 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DB_GiftCard) GetEquity() int32 {
|
func (x *DB_GiftCard) GetEquity() []int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Equity
|
return x.Equity
|
||||||
}
|
}
|
||||||
return 0
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type DB_GiftCardArray struct {
|
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,
|
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,
|
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,
|
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, 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,
|
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,
|
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
|
|
|
@ -1069,7 +1069,7 @@ message DB_GiftCard {
|
||||||
|
|
||||||
int32 Time = 6;
|
int32 Time = 6;
|
||||||
|
|
||||||
int32 Equity = 7;
|
repeated int32 Equity = 7;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8202,11 +8202,19 @@ func AgcConvertDB_GiftCard(fi,fo string) {
|
||||||
break
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4618,10 +4618,13 @@ func (this *Player) GetWeekCardPrivilege(typeId int32) bool {
|
||||||
for id, endTime := range this.WeekCardTime {
|
for id, endTime := range this.WeekCardTime {
|
||||||
if endTime > now {
|
if endTime > now {
|
||||||
data := srvdata.PBDB_GiftCardMgr.GetData(id)
|
data := srvdata.PBDB_GiftCardMgr.GetData(id)
|
||||||
if data.Equity == typeId {
|
for _, equity := range data.GetEquity() {
|
||||||
|
if equity == typeId {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue