累计签到进阶奖励修改

This commit is contained in:
by 2024-06-25 10:48:36 +08:00
parent a6d76b3f94
commit c61c88266b
3 changed files with 8 additions and 2 deletions

View File

@ -430,7 +430,7 @@ type AddUp2TypeDate struct {
Day int32 `protobuf:"varint,1,opt,name=Day,proto3" json:"Day,omitempty"` Day int32 `protobuf:"varint,1,opt,name=Day,proto3" json:"Day,omitempty"`
Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` // 1代表观看视频 2代表钻石类型 Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` // 1代表观看视频 2代表钻石类型
Num int32 `protobuf:"varint,3,opt,name=Num,proto3" json:"Num,omitempty"` // Num int32 `protobuf:"varint,3,opt,name=Num,proto3" json:"Num,omitempty"` //完成次
} }
func (x *AddUp2TypeDate) Reset() { func (x *AddUp2TypeDate) Reset() {

View File

@ -81,7 +81,7 @@ message WelfareDate {
message AddUp2TypeDate{ message AddUp2TypeDate{
int32 Day = 1; int32 Day = 1;
int32 Id = 2; // 1 2 int32 Id = 2; // 1 2
int32 Num = 3; // int32 Num = 3; //
} }
// //

View File

@ -757,6 +757,9 @@ func (this *WelfareMgr) UpdateAddUp2Date(p *Player, day int32, endTime int64) {
return return
} }
typeId := addUpDate2Type[0].Id typeId := addUpDate2Type[0].Id
if p.WelfData.Sign7.Addup2Data[day] == nil {
p.WelfData.Sign7.Addup2Data[day] = make(map[int32]int64)
}
p.WelfData.Sign7.Addup2Data[day][typeId] = endTime p.WelfData.Sign7.Addup2Data[day][typeId] = endTime
//通知客户端 //通知客户端
pack := &welfare.SCSignDayAddup2Award{} pack := &welfare.SCSignDayAddup2Award{}
@ -772,6 +775,9 @@ func (this *WelfareMgr) GetAddUp2Award(p *Player, day int32) {
// 判断是否已经领取 // 判断是否已经领取
Num := int32(0) Num := int32(0)
EndTime := int64(0) EndTime := int64(0)
if p.WelfData.Sign7.Addup2Data[day] == nil {
return
}
for num, endTime := range p.WelfData.Sign7.Addup2Data[day] { for num, endTime := range p.WelfData.Sign7.Addup2Data[day] {
if endTime == -1 { if endTime == -1 {
return return