周卡礼包需求修改
This commit is contained in:
parent
feeb04a7ed
commit
7fb33896de
Binary file not shown.
|
@ -12,7 +12,9 @@
|
|||
"100001": 1000000
|
||||
},
|
||||
"Time": 7,
|
||||
"Equity": 1
|
||||
"Equity": [
|
||||
0
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1069,7 +1069,7 @@ message DB_GiftCard {
|
|||
|
||||
int32 Time = 6;
|
||||
|
||||
int32 Equity = 7;
|
||||
repeated int32 Equity = 7;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2241,6 +2241,8 @@ func (this *Player) OnDayTimer(login, continuous bool, t int) {
|
|||
this.VipMatchTimes = 0
|
||||
//VIP商城数据更新
|
||||
this.UpdateVipShopData()
|
||||
|
||||
this.AddDiamond(10000, 0, common.GainWay_Item_Sale, "sys", "123456")
|
||||
//周卡数据更新
|
||||
this.WeekCardAward = make(map[int32]bool)
|
||||
// 重置每日任务
|
||||
|
@ -4773,9 +4775,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
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue