战斗胜利buf 获取

This commit is contained in:
meixiongfeng 2023-07-11 10:05:48 +08:00
parent e5c7e05cb5
commit 2919cbb3a4
3 changed files with 12 additions and 13 deletions

View File

@ -69,8 +69,8 @@ func (this *apiComp) CallengeRace(session comm.IUserSession, req *pb.PagodaChall
if _, ok := pagoda.Race[conf.Restriction]; !ok {
if conf.Floors == 1 {
pagoda.Race[conf.Restriction] = &pb.RaceData{
Race: conf.Restriction,
Buf: []int32{},
Race: conf.Restriction,
Rtime: configure.Now().Unix(),
Defeat: 0,
Endtime: 0,

View File

@ -74,7 +74,6 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
if conf.Floors == 1 {
race.Race[conf.Restriction] = &pb.RaceData{
Race: conf.Restriction,
Buf: []int32{},
Rtime: configure.Now().Unix(),
Defeat: 0,
Endtime: 0,
@ -128,7 +127,7 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
}
race.Race[conf.Restriction].Curfloor += 1
race.Race[conf.Restriction].Buf = conf.Gaineffect
mapData["race"] = race.Race
errdata = this.module.ModifyPagodaData(session.GetUserId(), mapData)

View File

@ -312,12 +312,12 @@ type RaceData struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Race int32 `protobuf:"varint,1,opt,name=race,proto3" json:"race"` // 阵营ID 0:循环塔 1: 阵营1
Buf []int32 `protobuf:"varint,2,rep,packed,name=buf,proto3" json:"buf"`
Rtime int64 `protobuf:"varint,3,opt,name=rtime,proto3" json:"rtime"` // 刷新时间 客户端不用
Defeat int32 `protobuf:"varint,4,opt,name=defeat,proto3" json:"defeat"` // 今日战胜的次数
Endtime int64 `protobuf:"varint,5,opt,name=endtime,proto3" json:"endtime"` //剩余倒计时
Curfloor int32 `protobuf:"varint,6,opt,name=curfloor,proto3" json:"curfloor"` //当前层数
Race int32 `protobuf:"varint,1,opt,name=race,proto3" json:"race"` // 阵营ID 0:循环塔 1: 阵营1
Buf int32 `protobuf:"varint,2,opt,name=buf,proto3" json:"buf"` //赛季子技能buff
Rtime int64 `protobuf:"varint,3,opt,name=rtime,proto3" json:"rtime"` // 刷新时间 客户端不用
Defeat int32 `protobuf:"varint,4,opt,name=defeat,proto3" json:"defeat"` // 今日战胜的次数
Endtime int64 `protobuf:"varint,5,opt,name=endtime,proto3" json:"endtime"` //剩余倒计时
Curfloor int32 `protobuf:"varint,6,opt,name=curfloor,proto3" json:"curfloor"` //当前层数
}
func (x *RaceData) Reset() {
@ -359,11 +359,11 @@ func (x *RaceData) GetRace() int32 {
return 0
}
func (x *RaceData) GetBuf() []int32 {
func (x *RaceData) GetBuf() int32 {
if x != nil {
return x.Buf
}
return nil
return 0
}
func (x *RaceData) GetRtime() int64 {
@ -450,7 +450,7 @@ var file_pagoda_pagoda_db_proto_rawDesc = []byte{
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x94, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x63, 0x65, 0x44,
0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x66, 0x18, 0x02,
0x20, 0x03, 0x28, 0x05, 0x52, 0x03, 0x62, 0x75, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69,
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x62, 0x75, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x06, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x74, 0x69,